Group
Extension

Matches 35358

App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Util/DeviceAuth.pm ( view source; MetaCPAN )
}
          else {
            my $stanza = undef;
            try {
              $stanza = from_json( $line );
              debug sprintf '[%s] external credentials stanza added',
                $
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Util/Worker.pm ( view source; MetaCPAN )
      event_data  => dclone (vars->{'hook_data'} || {}) };

  # remove scalar references which to_json cannot handle
  visit( $extra->{'event_data'}, sub {
    my ($key, $valueref) = @_;
    $$valuere
' if ref $$valueref eq 'SCALAR';
  });

  jq_insert({
    action => ('hook::'. lc($conf->{'type'})),
    extra  => encode_base64( encode('UTF-8', to_json( $extra )), '' ),
  });

  return 1;
}

true;
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/DB/Result.pm ( view source; MetaCPAN )
ToJSON});

  # this replacement will avoid the issue of relation names which override
  # field names, causing TO_JSON to return object instances, breaking to_json
  *DBIx::Class::Helper::Row::ToJSON:
:TO_JSON = sub {
      my $self = shift;
      my $columns_info = $self->columns_info($self->serializable_columns);
      my $columns_data = { $self->get_columns };
      return {
         map +($_ =>
 $columns_data->{$_}), keys %$columns_info
      };
  };
}

# for DBIx::Class::Helper::Row::ToJSON
# to allow text columns to be included in results

sub unserializable_data_types {
   return {
      
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Worker/Plugin/Show.pm ( view source; MetaCPAN )
r ':syntax';
use App::Netdisco::Worker::Plugin;
use aliased 'App::Netdisco::Worker::Status';

use JSON::PP ();
use Data::Printer ();
use App::Netdisco::Transport::SNMP;

register_worker({ phase => 'ch

  my $result = sub { eval { $snmp->$object() } };

  if ($ENV{ND2_DO_QUIET}) {
      my $coder = JSON::PP->new->utf8(1)
                               ->allow_nonref(1)
                              
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Util/SNMP.pm ( view source; MetaCPAN )
pec::Functions qw/splitdir catdir catfile/;
use MIME::Base64 'decode_base64';
use SNMP::Info;
use JSON::PP ();

use base 'Exporter';
our @EXPORT = ();
our @EXPORT_OK = qw/
  get_communities
  snmp_com
 Base64 encoded,
decodes it and then munge to handle data format, before finally pretty
render in JSON format.

=cut

sub get_code_info { return ($_[0]) =~ m/^(.+)::(.*?)$/ }
sub sub_name      { retur
ength $encoded;

    my $json = JSON::PP->new->utf8->pretty->allow_nonref->allow_unknown->canonical;
    $json->sort_by( sub { sortable_oid($JSON::PP::a) cmp sortable_oid($JSON::PP::b) } );

    retur
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm ( view source; MetaCPAN )
_actions';
use App::Netdisco::Backend::Job;
use App::Netdisco::DB::ExplicitLocking ':modes';

use JSON::PP ();
use Try::Tiny;

use base 'Exporter';
our @EXPORT = ();
our @EXPORT_OK = qw/
  jq_warm_thr
}

          die 'failed to find row for custom field update' unless $row;

          my $coder = JSON::PP->new->utf8(0)->allow_nonref(1)->allow_unknown(1);
          $spec->{subaction} = $coder->enco
row->make_column_dirty('custom_fields');
          $row->update({
            custom_fields => \['jsonb_set(custom_fields, ?, ?)'
                              => (qq{{$spec->{action}}}, $spec->{subac
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Util/CustomFields.pm ( view source; MetaCPAN )
Netdisco::DB::ResultSet::Device;
use App::Netdisco::DB::ResultSet::DevicePort;

my %device_fields_json = ();
my @inline_device_actions = ();
my @inline_device_port_actions = ();

foreach my $config (@
'name'};
  push @inline_device_actions, $config->{'name'};
  ++$device_fields_json{ $config->{'name'} } if $config->{'json_list'};
}

foreach my $config (@{ setting('custom_fields')->{'device_port'} |
    map {( ('cf_'. $_) => \[
              ($device_fields_json{$_} ? q{ARRAY(SELECT json_array_elements_text((me.custom_fields ->> ?) ::json))::text[]}
                                       : 'me.cu
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Util/Snapshot.pm ( view source; MetaCPAN )
search({ -or => [
        -bool => \q{ array_length(oid_parts, 1) IS NULL },
        -bool => \q{ jsonb_typeof(value) != 'array' }, ] })->count) {

      my @rows = $device->oids->search({},{
        
],
      })->hri->all;

      $oids{$_->{oid}} = {
          %{ $_ },
          value => (@{ from_json($_->{value}) })[0],
      } for @rows;
  }
  # or we have an snmpwalk file on disk
  elsif (-f $
     => $oid,
            oid_parts => [], # not needed temporarily 
            value     => to_json([ ((defined $type and $type eq 'BASE64') ? $value
                                               
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/API/Objects.pm ( view source; MetaCPAN )
tset('Device')
    ->find( params->{ip} ) } or send_error('Bad Device', 404);
  return to_json $device->TO_JSON;
};

foreach my $rel (qw/device_ips vlans ports modules port_vlans wireless_ports ssids 
        ->find( params->{ip} )->$rel } or send_error('Bad Device', 404);
      return to_json [ map {$_->TO_JSON} $rows->all ];
    };
}

swagger_path {
  tags => ['Objects'],
  path => setting('api_b
 ),
    ( param('backend') ? ( backend   => param('backend') ) : () ),
  })->delete;

  return to_json { deleted => ($gone || 0)};
};

foreach my $rel (qw/nodes active_nodes nodes_with_age active_node
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Search/Device.pm ( view source; MetaCPAN )
]} @results;

    if ( request->is_ajax ) {
        my $json = to_json( \@results );
        template 'ajax/search/device.tt', { results => $json }, { layout => 'noop' };;
    }
    else {
        hea
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Worker/Plugin/LoadMIBs.pm ( view source; MetaCPAN )
_rs = schema('netdisco')
          ->resultset('DeviceBrowser')
          ->search({ -bool => \q{ jsonb_typeof(value) != 'array' } });

    if ($legacy_rs->count) {
        my @rows = $legacy_rs->hri-
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);
            $row->{value} = to_json([$value]);
        }

        schema('netdisco')->resultset('DeviceBrowser')->populate(\@rows);
 
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/NodeMultiIPs.pm ( view source; MetaCPAN )
@results;

    if ( request->is_ajax ) {
        my $json = to_json( \@results );
        template 'ajax/report/nodemultiips.tt', { results => $json }, { layout => 'noop' };
    }
    else {
        h
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/DeviceDnsMismatch.pm ( view source; MetaCPAN )
sults;

    if ( request->is_ajax ) {
        my $json = to_json( \@results );
        template 'ajax/report/devicednsmismatch.tt', { results => $json }, { layout => 'noop' };
    }
    else {
       
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/ApRadioChannelPower.pm ( view source; MetaCPAN )
tered = $rs->get_datatables_filtered_count($exp_params);

    content_type 'application/json';
    return to_json(
        {   draw            => int( param('draw') ),
            recordsTotal    => i
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortMultiNodes.pm ( view source; MetaCPAN )
results;

    if ( request->is_ajax ) {
        my $json = to_json (\@results);
        template 'ajax/report/portmultinodes.tt', { results => $json }, { layout => 'noop' };
    }
    else {
        h
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/ModuleInventory.pm ( view source; MetaCPAN )
tered = $rs->get_datatables_filtered_count($exp_params);

    content_type 'application/json';
    return to_json(
        {   draw            => int( param('draw') ),
            recordsTotal    => i
}

    if ( request->is_ajax ) {
        my $json = to_json( \@results );
        template 'ajax/report/moduleinventory.tt',
            { results => $json, opt => $has_opt },
            { layout => 
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortUtilization.pm ( view source; MetaCPAN )
>hri->all;

    if (request->is_ajax) {
        my $json = to_json (\@results);
        template 'ajax/report/portutilization.tt', { results => $json }, { layout => 'noop' };
    }
    else {
        
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/Netbios.pm ( view source; MetaCPAN )
tered = $rs->get_datatables_filtered_count($exp_params);

    content_type 'application/json';
    return to_json(
        {   draw            => int( param('draw') ),
            recordsTotal    => i
    }

    if ( request->is_ajax ) {
        my $json = to_json( \@results );
        template 'ajax/report/netbios.tt',
            { results => $json, opt => $domain },
            { layout => 'noop
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/ApChannelDist.pm ( view source; MetaCPAN )
results;

    if ( request->is_ajax ) {
        my $json = to_json( \@results );
        template 'ajax/report/apchanneldist.tt', { results => $json }, { layout => 'noop' };
    }
    else {
        h
App-Netdisco ( O/OL/OLIVER/App-Netdisco-2.095004.tar.gz, OLIVER, 2025; MetaCPAN )
App-Netdisco/lib/App/Netdisco/Web/Plugin/Report/DeviceAddrNoDNS.pm ( view source; MetaCPAN )
results;

    if ( request->is_ajax ) {
        my $json = to_json (\@results);
        template 'ajax/report/deviceaddrnodns.tt', { results => $json }, { layout => 'noop' };
    }
    else {
        

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.