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/nodevendor.tt',
{ results => $json, opt => $vendor },
{ layout => 'no
esults;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/report/devicebylocation.tt', { results => $json }, { layout => 'noop' };
}
else {
d_parts => [], # intentional, is inflated via make_snmpwalk_browsable()
value => to_json([encode_base64($val, '')]),
};
}
debug sprintf 'walked %d rows', scalar keys %sto
Netdisco::Backend::Role::Scheduler;
use Dancer qw/:moose :syntax :script/;
use NetAddr::IP;
use JSON::PP ();
use Algorithm::Cron;
use App::Netdisco::Util::MCE;
use App::Netdisco::JobQueue qw/jq_ins
ive', $wid;
return debug "sch ($wid): no need for scheduler... quitting"
}
my $coder = JSON::PP->new->utf8(0)->allow_nonref(1)->allow_unknown(1);
while (1) {
# sleep until some poi
orker::Status';
use App::Netdisco::JobQueue 'jq_insert';
use Dancer::Plugin::DBIC 'schema';
use JSON::PP ();
register_worker({ phase => 'check' }, sub {
my ($job, $workerconf) = @_;
return Sta
');
});
register_worker({ phase => 'main' }, sub {
my ($job, $workerconf) = @_;
my $coder = JSON::PP->new->utf8(0)->allow_nonref(1)->allow_unknown(1);
my $sched = $coder->decode( $job->extra |
calar @results;
if (request->is_ajax) {
my $json = to_json( \@results );
template 'ajax/search/vlan.tt', { results => $json }, { layout => 'noop' };
}
else {
heade
tered = $rs->get_datatables_filtered_count($exp_params);
content_type 'application/json';
return to_json(
{ draw => int( param('draw') ),
recordsTotal => i
) } @results;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/search/port.tt', { results => $json }, { layout => 'noop' };
}
else {
heade
};
}
if (request->is_ajax) {
my $json = to_json (\@results);
template 'ajax/report/portvlanmismatch.tt', { results => $json }, { layout => 'noop' };
}
else {
r @results;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/report/portssid.tt', { results => $json }, { layout => 'noop' };
}
else {
hea
@results;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/report/ipinventory.tt', { results => $json }, { layout => 'noop' };
}
else {
he
@results;
if ( request->is_ajax ) {
my $json = to_json (\@results);
template 'ajax/report/vlaninventory.tt', { results => $json }, { layout => 'noop' };
}
else {
h
esults;
if ( request->is_ajax ) {
my $json = to_json (\@results);
template 'ajax/report/vlanmultiplenames.tt', { results => $json }, { layout => 'noop' };
}
else {
esults;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/report/nodesdiscovered.tt', { results => $json }, { layout => 'noop' };
}
else {
=~ m/^\.1(\.\d+)*$/ or send_error('Bad OID Base', 404);
content_type 'application/json';
return to_json [{
text => 'No data for this device. Admins can request a snapshot in the Detail
unt;
# snapshot should run a loadmibs, but just in case that didn't happen...
return to_json [{
text => 'No MIB objects. Please run a loadmibs job.',
children => \0,
state
et_snmp_data($device->ip, $base);
to_json $items;
};
ajax '/ajax/data/snmp/typeahead' => require_login sub {
my $term = param('term') or return to_json [];
my $device = param('ip');
ults;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/report/portssid.tt',
{ results => $json, opt => $ssid }, { layout => 'noop' };
}
rt_multipart_form
end_multipart_form
isindex
dump
include
json
));
# Update - get from CGI module, add special dump tag
#
#%CGI_TAG_IMPLICIT=map {$_ => 1} (
++} qw(
perl
script
style
start_html
end_html
include
div
api
json
htmx
table
);
# Nullify Entities encode & decode
#
*HTML::Entities::encode=sub { };
*H
reate a .psp file with no leading start_html
#
map { $HTML::Tagset::isBodyElement{$_}++ } qw(htmx json dump);
# And that we also block <p> tag closures
#
push @HTML::Tagset::p_closure_barriers, key
As above
#
WEBDYNE_CONTENT_TYPE_TEXT => 'text/plain',
WEBDYNE_CONTENT_TYPE_JSON => 'application/json',
# Script types which are executable so we won't subst strings in them
t mode - recompile loaded modules
#
WEBDYNE_RELOAD => 0,
# Use JSON canonical mode ?
#
WEBDYNE_JSON_CANONICAL => 1,
# Enable the API mode ?
#
WEBDYNE_API_
f',
'css' => 'text/css',
'js' => 'application/javascript',
'json' => 'application/json',
'pdf' => 'application/pdf',
'svg' => 'image/svg+xml'
},
@results;
if ( request->is_ajax ) {
my $json = to_json( \@results );
template 'ajax/report/halfduplex.tt', { results => $json }, { layout => 'noop' };
}
else {
he
d2 Script-based tooling
Available in 0.1.8, basic C<schedule-activity.pl> script supports Dumper/JSON schedules and activity lists, compiling with/out safety checks. Future support may provide for c
requests and responses against an OpenAPI v3.1 or v3.2 document
# KEYWORDS: validation evaluation JSON Schema OpenAPI v3.1 v3.2 Swagger HTTP request response
our $VERSION = '0.107';
use 5.020;
use u
at 'indexed';
use Feature::Compat::Try;
use Encode 2.89 ();
use JSON::Schema::Modern;
use JSON::Schema::Modern::Utilities qw(jsonp unjsonp canonical_uri E abort is_equal is_elements_unique true false)
;
use OpenAPI::Modern::Utilities qw(add_vocab_and_default_schemas);
use JSON::Schema::Modern::Document::OpenAPI;
use MooX::TypeTiny 0.002002;
use Types::Standard qw(InstanceOf Bool);
use Mojo::Util qw