App-Netdisco

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  * Add PoE control to port_control (+ up/down,vlan,name,location,contact)

  [ENHANCEMENTS]

  * eradicate checks for dns column in node_ip table - now assumed to be there
  * remove .pl from script names
  * no longer deploy FK constraints with DB schema as they upset legacy netdisco.pm

  [BUG FIXES]

  * port cotrol user log check now looks for all actions
  * node search switchport link shows connected nodes again
  * show device IP in search results when DNS is not available

0.7 - 2012-11-25

  [NEW FEATURES]

  * Add Port Control (admin table) features to web
  * Implement DBIx::Class::Schema::Versioned support - DB schema is now versioned
  * Navbar query for device with single hit redirects to Device details page

lib/App/Netdisco/Util/Snapshot.pm  view on Meta::CPAN


      my @lines = read_lines($pseudo_cache);
      my %store = ();

      # sometimes we're given a snapshot with iso. instead of .1.
      if ($lines[0] !~ m/^.\d/) {
          warning 'snapshot file rejected - has translated names/values instead of numeric';
          return {};
      }

      # parse the snmpwalk output which looks like
      # .1.0.8802.1.1.2.1.1.1.0 = INTEGER: 30
      foreach my $line (@lines) {
          my ($oid, $type, $value) = $line =~ m/^(\S+)\s+=\s+(?:([^:]+):\s+)?(.+)$/;
          next unless $oid and $value;

          # empty string makes the capture go wonky
          $value = '' if $value =~ m/^[^:]+: ?$/;

          # remove quotes from strings
          $value =~ s/^"//;

lib/App/Netdisco/Worker/Plugin/Discover/Neighbors.pm  view on Meta::CPAN

              }

              if (!defined $neigh) {
                  my $mac = NetAddr::MAC->new(mac => ($remote_id || ''));
                  if ($mac and not $mac->errstr) {
                      $neigh = $devices->single({mac => $mac->as_ieee});
                  }
              }

              # some HP switches send 127.0.0.1 as remote_ip if no ip address
              # on default vlan for HP switches remote_ip looks like
              # "myswitchname(012345-012345)"
              if (!defined $neigh) {
                  (my $tmpid = $remote_id) =~ s/.*\(([0-9a-f]{6})-([0-9a-f]{6})\).*/$1$2/;
                  my $mac = NetAddr::MAC->new(mac => ($tmpid || ''));
                  if ($mac and not $mac->errstr) {
                      debug sprintf
                        ' [%s] neigh - trying to find neighbor %s by MAC %s',
                        $device->ip, $remote_id, $mac->as_ieee;
                      $neigh = $devices->single({mac => $mac->as_ieee});
                  }

lib/App/Netdisco/Worker/Plugin/LoadMIBs.pm  view on Meta::CPAN

  # legacy snapshot upgrade
  schema('netdisco')->txn_do(sub {
    my $legacy_rs = schema('netdisco')
          ->resultset('DeviceBrowser')
          ->search({ -bool => \q{ jsonb_typeof(value) != 'array' } });

    if ($legacy_rs->count) {
        my @rows = $legacy_rs->hri->all;
        my $gone = $legacy_rs->delete;
        
        # the legacy looks like encode_base64( nfreeze( [$data] ) )
        foreach my $row (@rows) {
            my $value = (@{ thaw( decode_base64( from_json($row->{value}) ) ) })[0];
            $value = (ref {} eq ref $value)
              ? { map {($_ => (defined $value->{$_} ? encode_base64($value->{$_}, '') : undef))}
                  keys %$value }
              : (defined $value ? encode_base64($value, '') : undef);
            $row->{value} = to_json([$value]);
        }

        schema('netdisco')->resultset('DeviceBrowser')->populate(\@rows);

share/public/css/netdisco.css  view on Meta::CPAN


.nd_scrollable {
    height: 85vh;
    overflow: auto;
}

.nd_snmp_search_param {
  margin-top: -3px !important;
}

/* fake looks for form submit buttons embedded in bootstrap dropdowns */
.nd_btn-link {
  display: block;
  padding: 2px 20px;
  clear: both;
  font-weight: normal;
  line-height: 18px;
  color: #333333;
  white-space: nowrap;
  text-decoration: none;
  margin-top: 0px !important;

share/public/swagger-ui/swagger-ui-bundle.js.map  view on Meta::CPAN

{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 396b8c743e9ffbc09e47","webpack:///./node_modules/react/react.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/babel-run...

share/public/swagger-ui/swagger-ui-standalone-preset.js.map  view on Meta::CPAN

{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 5e373a31950a06c8d2bb","webpack:///./node_modules/@kyleshockey/js-yaml/lib/js-yaml/type.js","webpack:///./node_modules/core-js/modules/_wks.js","webpa...

share/public/swagger-ui/swagger-ui.js.map  view on Meta::CPAN

{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap fb516ccd71e38bfe6f58","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///./node_modules/babel-runtime/helpers/classCall...



( run in 0.356 second using v1.01-cache-2.11-cpan-64827b87656 )