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;
}
lib/App/Netdisco/Web/AuthN.pm view on Meta::CPAN
username => session('logged_in_user'),
userip => request->remote_address,
event => (sprintf 'Login (%s)', ($api ? 'API' : 'WebUI')),
details => param('return_url'),
});
$user->update({ last_on => \'LOCALTIMESTAMP' });
if ($api) {
header('Content-Type' => 'application/json');
#Â if there's a current valid token then reissue it and reset timer
$user->update({
token_from => time,
($provider->validate_api_token($user->token)
? () : (token => \'md5(random()::text)')),
})->discard_changes();
return to_json { api_key => $user->token };
}
redirect ((scalar URI::Based->new(param('return_url'))->path_query) || '/');
}
lib/App/Netdisco/Worker/Plugin/GetAPIKey.pm view on Meta::CPAN
my $user = schema('netdisco')->resultset('User')
->find({ username => $username });
return Status->error("No such user")
unless $user and $user->in_storage;
# from the internals of Dancer::Plugin::Auth::Extensible
my $provider = Dancer::Plugin::Auth::Extensible::auth_provider('users');
#Â if there's a current valid token then reissue it and reset timer
$user->update({
token_from => time,
($provider->validate_api_token($user->token)
? () : (token => \'md5(random()::text)')),
})->discard_changes();
return Status->done(
sprintf 'Set token for user %s: %s', $username, $user->token);
});
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/d3-3.5.17.min.js view on Meta::CPAN
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){ret...
r(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.l...
return g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}...
shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov...
if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l...
share/public/javascripts/jquery-latest.min.js view on Meta::CPAN
/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this...
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"str...
marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+...
padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement...
share/public/javascripts/jquery-ui.custom.min.js view on Meta::CPAN
/*! jQuery UI - v1.10.3 - 2013-05-06
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.d...
share/public/javascripts/jquery.qtip.min.js view on Meta::CPAN
/* qTip2 v2.0.1-105 tips modal viewport svg imagemap ie6 | qtip2.com | Licensed MIT, GPL | Sun Jun 02 2013 13:17:38 */
(function(t,e,s){(function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.qtip&&t(jQuery)})(function(o){function n(t,e,i,s){this.id=i,this.target=t,this.tooltip=E,this.elements=elements={target:t},this._...
}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),ae=N.tip=function(t){return new x(t,t.options.style.tip)},ae.initialize="render",ae.sanitize=funct...
(function(c,q){var m="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function n(){var b=c(j),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function p(b){k(b.t...
p)))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred():0,r=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),l=[],j=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLo...
n();return d?d.promise(g):g}})(jQuery);
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 view on Meta::CPAN
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory(require("deep-extend"),require("immutable"),require("css.escape"),require("memoizee"),require("stream"),require("ba...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var base64=__webpack_require__(383);var ieee754=__webpack_require__(384);var isArray=__webpack_require__(385);exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==und...
//# sourceMappingURL=swagger-ui.js.map
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...
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();
var timermax = [% 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('icon-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...
$('#' + tab + '_form').trigger('submit');
}, (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
$('#' + tab + '_form').trigger('submit');
});
// job control pause/play icon switcheroo
$('#nd_countdown-control').click(function(event) {
event.preventDefault();
var icon = $('#nd_countdown-control-icon');
icon.toggleClass('icon-pause icon-play text-error text-success');
if (icon.hasClass('icon-pause')) {
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
$('#nd_countdown').text('0');
}
else {
$('#' + tab + '_form').trigger('submit');
}
});
// 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 = '';
}