view release on metacpan or search on metacpan
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
cb => $cb,
destination => scalar sockaddr_in( $port, $ip ),
};
$self->{_tasks}{ $request->{destination} } = $request;
my $delay = $self->interval * scalar keys %{ $self->{_tasks} || {} };
# There's probably a better way to throttle the sends
# but this will work for now since we currently don't support retries
my $w; $w = AE::timer $delay, 0, sub {
undef $w;
$self->_send_request($request);
};
return $self;
}
sub _on_read {
my ( $self, $resp, $peer ) = @_;
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
};
}
elsif ( $status eq 'OK' ) {
$results = { 'status' => 'SHORT' };
}
else {
$results = { 'status' => $status };
}
# Clear request specific data
delete $request->{timer};
# Cleanup
delete $self->{_tasks}{ $request->{destination} };
# Done
$request->{cb}->($results);
undef $request;
return;
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
my $msg = "";
# We use process id as identifier field, since don't have a need to
# unique responses beyond host / port queried
$msg .= pack( "n*", $$, 0, 1, 0, 0, 0 );
$msg .= _encode_name( "*", "\x00", 0 );
$msg .= pack( "n*", 0x21, 0x0001 );
$request->{start} = time;
$request->{timer} = AE::timer $self->timeout, 0, sub {
$self->_store_result( $request, 'TIMEOUT' );
};
my $fh = $self->{fh4};
send $fh, $msg, 0, $request->{destination}
or $self->_store_result( $request, 'ERROR' );
return;
}
share/contrib/raddb/dictionary.usr view on Meta::CPAN
VALUE USR-Connect-Term-Reason pbReceivedAckSeqErr 59
VALUE USR-Connect-Term-Reason pbReceiveOvrflwRNRFail 60
VALUE USR-Connect-Term-Reason pbReceiveMsgBufOvrflw 61
VALUE USR-Connect-Term-Reason rcvdGatewayDiscCmd 62
VALUE USR-Connect-Term-Reason tokenPassingTimeout 63
VALUE USR-Connect-Term-Reason dspInterruptTimeout 64
VALUE USR-Connect-Term-Reason mnpProtocolViolation 65
VALUE USR-Connect-Term-Reason class2FaxHangupCmd 66
VALUE USR-Connect-Term-Reason hstSpeedSwitchTimeout 67
VALUE USR-Connect-Term-Reason tooManyUnacked 68
VALUE USR-Connect-Term-Reason timerExpired 69
VALUE USR-Connect-Term-Reason t1Glare 70
VALUE USR-Connect-Term-Reason priDialoutRqTimeout 71
VALUE USR-Connect-Term-Reason abortAnlgDstOvrIsdn 72
VALUE USR-Connect-Term-Reason normalUserCallClear 73
VALUE USR-Connect-Term-Reason normalUnspecified 74
VALUE USR-Connect-Term-Reason bearerIncompatibility 75
VALUE USR-Connect-Term-Reason protocolErrorEvent 76
VALUE USR-Connect-Term-Reason abnormalDisconnect 77
VALUE USR-Connect-Term-Reason invalidCauseValue 78
VALUE USR-Connect-Term-Reason resourceUnavailable 79
share/contrib/raddb/dictionary.usr view on Meta::CPAN
VALUE USR-Failure-to-Connect-Reason pbReceivedAckSeqErr 59
VALUE USR-Failure-to-Connect-Reason pbReceiveOvrflwRNRFail 60
VALUE USR-Failure-to-Connect-Reason pbReceiveMsgBufOvrflw 61
VALUE USR-Failure-to-Connect-Reason rcvdGatewayDiscCmd 62
VALUE USR-Failure-to-Connect-Reason tokenPassingTimeout 63
VALUE USR-Failure-to-Connect-Reason dspInterruptTimeout 64
VALUE USR-Failure-to-Connect-Reason mnpProtocolViolation 65
VALUE USR-Failure-to-Connect-Reason class2FaxHangupCmd 66
VALUE USR-Failure-to-Connect-Reason hstSpeedSwitchTimeout 67
VALUE USR-Failure-to-Connect-Reason tooManyUnacked 68
VALUE USR-Failure-to-Connect-Reason timerExpired 69
VALUE USR-Failure-to-Connect-Reason t1Glare 70
VALUE USR-Failure-to-Connect-Reason priDialoutRqTimeout 71
VALUE USR-Failure-to-Connect-Reason abortAnlgDstOvrIsdn 72
VALUE USR-Failure-to-Connect-Reason normalUserCallClear 73
VALUE USR-Failure-to-Connect-Reason normalUnspecified 74
VALUE USR-Failure-to-Connect-Reason bearerIncompatibility 75
VALUE USR-Failure-to-Connect-Reason protocolErrorEvent 76
VALUE USR-Failure-to-Connect-Reason abnormalDisconnect 77
VALUE USR-Failure-to-Connect-Reason invalidCauseValue 78
VALUE USR-Failure-to-Connect-Reason resourceUnavailable 79
share/public/javascripts/force-graph.min.js view on Meta::CPAN
// Version 1.51.4 force-graph - https://github.com/vasturiano/force-graph
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).ForceGraph=n()}(this,function(){"use strict";function n(t,n){...
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
qr.readability=function(t,n){var e=qr(t),r=qr(n);return(Math.max(e.getLuminance(),r.getLuminance())+.05)/(Math.min(e.getLuminance(),r.getLuminance())+.05)},qr.isReadable=function(t,n,e){var r,i,o=qr.readability(t,n);switch(i=!1,(r=function(t){var n,e...
share/public/javascripts/jquery-latest.min.js view on Meta::CPAN
/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof windo...
share/public/javascripts/jquery-ui.min.js view on Meta::CPAN
/*! jQuery UI - v1.14.2 - 2026-01-28
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js...
* Copyright OpenJS Foundation and other contributors; Licensed MIT */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){"use strict";t.ui=t.ui||{},t.ui.version="1.14.2";var e,i,s,n,o,a=0,r=Array.prototype.hasOwnProperty,l=Array.prototype.slice;h=t.cleanData,t.cl...
share/public/javascripts/netdisco.js view on Meta::CPAN
top: 40
,position: 'fixed'
});
inner_view_processing(tab);
});
// Empty the pane for the duration of the request, so the indicator is the
// only thing on screen. Leaving the previous results up gives an interactive
// table that no longer answers the search being run.
//
// jobqueue is excluded for the reason it carries no indicator: it refreshes
// on a timer and would blank on every tick.
document.body.addEventListener('htmx:beforeRequest', function (evt) {
var target = evt.detail.target;
if (!target.id.match(/_pane$/) || target.id === 'jobqueue_pane') return;
// force-graph renders every frame until destroyed, and emptying the pane
// only detaches its canvas. netmap.js destroys the previous instance as
// well, but not until the new fragment's script runs.
if (target.id === 'netmap_pane' && window.graph && window.graph.fg
&& typeof window.graph.fg._destructor === 'function') {
window.graph.fg._destructor();
share/public/swagger-ui/swagger-ui-bundle.js view on Meta::CPAN
/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */
!function webpackUniversalModuleDefinition(s,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.SwaggerUIBundle=o():s.SwaggerUIBundle=o()}(this,(...
share/public/swagger-ui/swagger-ui-bundle.js.map view on Meta::CPAN
{"version":3,"file":"swagger-ui-bundle.js","mappings":";CAAA,SAAUA,iCAAiCC,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAyB,gBAAID,IAE7BD,EAAsB,gBAAIC,GAC3B,CATD,CASGK,MAAM,cCRLC,EA...
share/views/admintask.tt view on Meta::CPAN
</span>
[% ELSIF task.provides_csv %]
<span id="nd_device-name">
<a id="nd_csv-download" href="#" download="netdisco.csv">
<i id="nd_csv-download-icon" class="text-info far fa-file-lines fa-lg"
rel="tooltip" data-bs-placement="left" data-bs-title="Download as CSV"></i></a>
</span>
[% END %]
</ul>
<div class="tab-content">
[%# jobqueue deliberately has no indicator: it refreshes on a timer, and
the spinner would flash on every tick. Mirrors do_search's guard. -%]
[% UNLESS task.tag == 'jobqueue' -%]
<div id="[% task.tag | html_entity %]_indicator" class="htmx-indicator col-md-2 alert">
<i class="fas fa-spinner fa-spin"></i> Waiting for results...
</div>
[% END %]
<div class="tab-pane active" id="[% task.tag | html_entity %]_pane"></div>
</div>
</div>
share/views/js/admintask.js view on Meta::CPAN
// used by the tabbing interface to make sure the correct
// ajax content is loaded
var path = 'admin';
// keep track of timers so we can kill them
var nd_timers = new Array();
// quoted so the file stays valid JavaScript for CodeQL, which reads this
// template rather than its output, and so a setting cannot land in expression
// position: html_entity escapes for HTML, not for JavaScript
var timermax = Number('[% settings.jobqueue_refresh || 5 | html_entity %]');
var timercache = timermax - 1;
// this is called by do_search to support local code
// which might need to act on the newly inserted content
// but which cannot use jQuery delegation via .on()
function inner_view_processing(tab) {
// reload this table every 5 seconds
if ((tab == 'jobqueue')
&& $('#nd_countdown-control-icon').hasClass('fa-play')) {
$('#nd_countdown').text(timermax);
// add new timers
for (var i = timercache; i > 0; i--) {
nd_timers.push(setTimeout(function() {
$('#nd_countdown').text(timercache);
timercache = timercache - 1;
}, ((timermax * 1000) - (i * 1000)) ));
}
nd_timers.push(setTimeout(function() {
// clear any running timers
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
// reset the timer cache
timercache = timermax - 1;
// reload the tab content in...
nd_submit('#' + tab + '_form');
}, (timermax * 1000)));
}
// activate typeahead on the queue filter boxes
$('.nd_queue_ta').autocomplete({
source: function (request, response) {
var name = $(this.element)[0].name;
var query = $(this.element).serialize();
return $.get( uri_base + '/ajax/data/queue/typeahead/' + name, query, function (data) {
return response(data);
});
share/views/js/admintask.js view on Meta::CPAN
$(this).siblings('.nd_topo_dev').autocomplete('search', '%') });
// get all ports on port input focus
$(target).on('focus', '.nd_topo_port', function(e) {
$(this).autocomplete('search') });
$(target).on('click', '.nd_topo_port_caret', function(e) {
$(this).siblings('.nd_topo_port').val('');
$(this).siblings('.nd_topo_port').autocomplete('search');
});
// job control sidebar submit should reset timer
// and update bookmark
$('#' + tab + '_submit').click(function(event) {
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
// reset the timer cache
timercache = timermax - 1;
// bookmark
var querystr = $('#' + tab + '_form').serialize();
$('#nd_jobqueue-bookmark').attr('href',uri_base + '/admin/' + tab + '?' + querystr);
});
// job control refresh icon should reload the page
$('#nd_countdown-refresh').click(function(event) {
event.preventDefault();
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
// reset the timer cache
timercache = timermax - 1;
// and reload content
nd_submit('#' + tab + '_form');
});
// job control pause/play icon switcheroo
$('#nd_countdown-control').click(function(event) {
event.preventDefault();
var icon = $('#nd_countdown-control-icon');
icon.toggleClass('fa-pause fa-play text-danger text-success');
if (icon.hasClass('fa-pause')) {
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
$('#nd_countdown').text('0');
}
else {
nd_submit('#' + tab + '_form');
}
});
// activity for admin task tables
// dynamically bind to all forms in the table
$('.content').on('click', '.nd_adminbutton', function(event) {
// stop form from submitting normally
event.preventDefault();
// clear any running timers
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
// what purpose - add/update/del
var mode = $(this).attr('name');
// admin task name with special case(s)
var task = tab + '/';
if (tab == 'duplicatedevices') {
task = '';
}