App-Netdisco

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

2.036002 - 2017-06-26

  [ENHANCEMENTS]

  * #319 better fix for acceping ACL names or values in check_acl_*
  * #311 added duplicate devices report with option to delete
  * #263 discover neighbors advertising ipv6 management addresses
  * #286 support only/no ACLs for snmp_auth stanza, update docs
  * support NETDISCO_DBNAME in "netdisco-do psql"
  * die with message when snmp_auth community is (mis-)configured as a list
  * faster DNS lookups for SNMP Timeouts Report entries

  [BUG FIXES]

  * #231 fix docs to stop old daemon and start new backend worker
  * #320 DNS subroutines are redefined
  * #318 ACLs with RegExp are very slow - aggressive resolver timeouts
  * #317 #265 #311 when renumbering on discover, delete likely duplicate devices
  * #316 neighbor map should fall back to device sysname after dns
  * #310 allow multiple LLDP management addresses
  * fix bug on device port view (speed-up) to avoid DB query on every node

lib/App/Netdisco/AnyEvent/Nbtstat.pm  view on Meta::CPAN


sub new {
    my ( $class, %args ) = @_;

    my $interval = $args{interval};
    # This default should generate ~ 50 requests per second
    $interval = 0.2 unless defined $interval;

    my $timeout = $args{timeout};

    # Timeout should be 250ms according to RFC1002, but we're going to double
    $timeout = 0.5 unless defined $timeout;

    my $self = bless { interval => $interval, timeout => $timeout, %args },
        $class;

    Scalar::Util::weaken( my $wself = $self );

    socket my $fh4, AF_INET, Socket::SOCK_DGRAM(), 0
        or Carp::croak "Unable to create socket : $!";

lib/App/Netdisco/Configuration.pm  view on Meta::CPAN


# convert tacacs from single to lists

if (ref {} eq ref setting('tacacs')
  and exists setting('tacacs')->{'key'}) {

  config->{'tacacs'} = [
    Host => setting('tacacs')->{'server'},
    Key  => setting('tacacs')->{'key'} || setting('tacacs')->{'secret'},
    Port => (setting('tacacs')->{'port'} || 'tacacs'),
    Timeout => (setting('tacacs')->{'timeout'} || 15),
  ];
}
elsif (ref [] eq ref setting('tacacs')) {
  my @newservers = ();
  foreach my $server (@{ setting('tacacs') }) {
    push @newservers, [
      Host => $server->{'server'},
      Key  => $server->{'key'} || $server->{'secret'},
      Port => ($server->{'port'} || 'tacacs'),
      Timeout => ($server->{'timeout'} || 15),
    ];
  }
  config->{'tacacs'} = [ @newservers ];
}

# support unordered dictionaries as if they were a single item list

if (ref {} eq ref setting('device_identity')) {
  config->{'device_identity'} = [ setting('device_identity') ];
}

lib/App/Netdisco/Transport/SNMP.pm  view on Meta::CPAN


sub _snmp_connect_generic {
  my ($mode, $device, $useclass) = @_;
  $mode ||= 'read';

  my %snmp_args = (
    AutoSpecify => 0,
    DestHost => $device->ip,
    # the defined() allows 0 to be a settable value 
    Retries => defined(setting('snmpretries')) ? setting('snmpretries') : 2,
    Timeout => (setting('snmptimeout') || 1000000),
    NonIncreasing => (setting('nonincreasing') || 0),
    BulkWalk => ((defined setting('bulkwalk_off') && setting('bulkwalk_off'))
                 ? 0 : 1),
    BulkRepeaters => (setting('bulkwalk_repeaters') || 20),
    MibDirs => [ get_mibdirs() ],
    IgnoreNetSNMPConf => 1,
    Debug => ($ENV{INFO_TRACE} || 0),
    DebugSNMP => ($ENV{SNMP_TRACE} || 0),
  );
  my $snmp_fast_connect_timeout = defined(setting('snmp_fast_connect_timeout'))

lib/App/Netdisco/Transport/SNMP.pm  view on Meta::CPAN

  my $tag_name = 'snmp_auth_tag_'. $mode;
  my $stored_tag = eval { $device->community->$tag_name };

  if ($device->in_storage and $stored_tag) {
      debug sprintf '[%s:%s] try_connect with cached tag %s',
          $snmp_args{DestHost}, $snmp_args{RemotePort}, $stored_tag;

      my $comm = $communities[0];
      my $ver = (exists $comm->{community} ? 2 : 3);
      my %local_args = (%snmp_args,
        Version => $ver, Retries => 0, Timeout => $snmp_fast_connect_timeout);
        
      my $info = _try_connect($device, $classes[0], $comm, $mode, \%local_args,
            ($useclass ? 0 : 1) );
      # if successful, restore the default/user timeouts and return
      if ($info) {
          my $class = ($useclass ? $classes[0] : $info->device_type) // $classes[0];
          Module::Load::load $class;
          return $class->new(
            %snmp_args, Version => $ver,
            ($info->offline ? (Cache => $info->cache) : ()),
            _mk_info_commargs($comm),
          );
      }
  }

  # try the communities in a fast pass using best version

  VERSION: foreach my $ver (3, 2) {
      my %local_args = (%snmp_args,
        Version => $ver, Retries => 0, Timeout => $snmp_fast_connect_timeout);

      COMMUNITY: foreach my $comm (@communities) {
          next unless $comm;

          next if $ver eq 3 and exists $comm->{community};
          next if $ver ne 3 and !exists $comm->{community};

          my $info = _try_connect($device, $classes[0], $comm, $mode, \%local_args,
            ($useclass ? 0 : 1) );

lib/App/Netdisco/Transport/SNMP.pm  view on Meta::CPAN

      (sprintf 'v3:%s:%s/%s', ($comm->{user},
                              ($comm->{auth}->{proto} || 'noAuth'),
                              ($comm->{priv}->{proto} || 'noPriv'))) );
  }
  my $info = undef;

  try {
      $snmp_args->{Offline} || debug
        sprintf '[%s:%s] try_connect with v: %s, t: %s, r: %s, class: %s%s, comm: %s',
          $snmp_args->{DestHost}, $snmp_args->{RemotePort},
          $snmp_args->{Version}, ($snmp_args->{Timeout} / 1000000), $snmp_args->{Retries},
          $class,
          ($comm->{tag} ? ', tag: '. $comm->{tag} : ''), $debug_comm;
      Module::Load::load $class;

      $info = $class->new(%$snmp_args, %comm_args) or return;
      $info = ($mode eq 'read' ? _try_read($info, $device, $comm)
                               : _try_write($info, $device, $comm));

      # first time a device is discovered, re-instantiate into specific class
      if ($reclass and $info and ($info->device_type // '') ne $class) {

share/contrib/raddb/dictionary.cisco  view on Meta::CPAN

ATTRIBUTE       Cisco-Idle-Limit                244     integer		Cisco
ATTRIBUTE       Cisco-Xmit-Rate                 255     integer		Cisco

# original Cistron disconnect causes
VALUE           Cisco-Disconnect-Cause        Unknown                 2
VALUE           Cisco-Disconnect-Cause        CLID-Authentication-Failure     4
VALUE           Cisco-Disconnect-Cause        No-Carrier              10
VALUE           Cisco-Disconnect-Cause        Lost-Carrier            11
VALUE           Cisco-Disconnect-Cause        No-Detected-Result-Codes        12
VALUE           Cisco-Disconnect-Cause        User-Ends-Session       20
VALUE           Cisco-Disconnect-Cause        Idle-Timeout            21
VALUE           Cisco-Disconnect-Cause        Exit-Telnet-Session     22
VALUE           Cisco-Disconnect-Cause        No-Remote-IP-Addr       23
VALUE           Cisco-Disconnect-Cause        Exit-Raw-TCP            24
VALUE           Cisco-Disconnect-Cause        Password-Fail           25
VALUE           Cisco-Disconnect-Cause        Raw-TCP-Disabled        26
VALUE           Cisco-Disconnect-Cause        Control-C-Detected      27
VALUE           Cisco-Disconnect-Cause        EXEC-Program-Destroyed  28
VALUE           Cisco-Disconnect-Cause        Timeout-PPP-LCP         40
VALUE           Cisco-Disconnect-Cause        Failed-PPP-LCP-Negotiation      41
VALUE           Cisco-Disconnect-Cause        Failed-PPP-PAP-Auth-Fail        42
VALUE           Cisco-Disconnect-Cause        Failed-PPP-CHAP-Auth    43
VALUE           Cisco-Disconnect-Cause        Failed-PPP-Remote-Auth  44
VALUE           Cisco-Disconnect-Cause        PPP-Remote-Terminate    45
VALUE           Cisco-Disconnect-Cause        PPP-Closed-Event        46
VALUE           Cisco-Disconnect-Cause        Session-Timeout         100
VALUE           Cisco-Disconnect-Cause        Session-Failed-Security 101
VALUE           Cisco-Disconnect-Cause        Session-End-Callback    102
VALUE           Cisco-Disconnect-Cause        Invalid-Protocol        120

share/contrib/raddb/dictionary.quintum  view on Meta::CPAN

ATTRIBUTE       Quintum-NAS-Port-Name-In			230		string		Quintum
ATTRIBUTE       Quintum-NAS-Port-Name-Out			231		string		Quintum

# original Cistron disconnect causes
VALUE           Cisco-Disconnect-Cause        Unknown                 2
VALUE           Cisco-Disconnect-Cause        CLID-Authentication-Failure     4
VALUE           Cisco-Disconnect-Cause        No-Carrier              10
VALUE           Cisco-Disconnect-Cause        Lost-Carrier            11
VALUE           Cisco-Disconnect-Cause        No-Detected-Result-Codes        12
VALUE           Cisco-Disconnect-Cause        User-Ends-Session       20
VALUE           Cisco-Disconnect-Cause        Idle-Timeout            21
VALUE           Cisco-Disconnect-Cause        Exit-Telnet-Session     22
VALUE           Cisco-Disconnect-Cause        No-Remote-IP-Addr       23
VALUE           Cisco-Disconnect-Cause        Exit-Raw-TCP            24
VALUE           Cisco-Disconnect-Cause        Password-Fail           25
VALUE           Cisco-Disconnect-Cause        Raw-TCP-Disabled        26
VALUE           Cisco-Disconnect-Cause        Control-C-Detected      27
VALUE           Cisco-Disconnect-Cause        EXEC-Program-Destroyed  28
VALUE           Cisco-Disconnect-Cause        Timeout-PPP-LCP         40
VALUE           Cisco-Disconnect-Cause        Failed-PPP-LCP-Negotiation      41
VALUE           Cisco-Disconnect-Cause        Failed-PPP-PAP-Auth-Fail        42
VALUE           Cisco-Disconnect-Cause        Failed-PPP-CHAP-Auth    43
VALUE           Cisco-Disconnect-Cause        Failed-PPP-Remote-Auth  44
VALUE           Cisco-Disconnect-Cause        PPP-Remote-Terminate    45
VALUE           Cisco-Disconnect-Cause        PPP-Closed-Event        46
VALUE           Cisco-Disconnect-Cause        Session-Timeout         100
VALUE           Cisco-Disconnect-Cause        Session-Failed-Security 101
VALUE           Cisco-Disconnect-Cause        Session-End-Callback    102
VALUE           Cisco-Disconnect-Cause        Invalid-Protocol        120

share/contrib/raddb/dictionary.rfc2865  view on Meta::CPAN


ATTRIBUTE   Reply-Message               18      string
ATTRIBUTE   Callback-Number             19      string
ATTRIBUTE   Callback-Id                 20      string

ATTRIBUTE   Framed-Route                22      string
ATTRIBUTE   Framed-IPX-Network          23      ipaddr
ATTRIBUTE   State                       24      string
ATTRIBUTE   Class                       25      string
ATTRIBUTE   Vendor-Specific             26      string
ATTRIBUTE   Session-Timeout             27      integer
ATTRIBUTE   Idle-Timeout                28      integer
ATTRIBUTE   Termination-Action          29      integer
ATTRIBUTE   Called-Station-Id           30      string
ATTRIBUTE   Calling-Station-Id          31      string
ATTRIBUTE   NAS-Identifier              32      string
ATTRIBUTE   Proxy-State                 33      string
ATTRIBUTE   Login-LAT-Service           34      string
ATTRIBUTE   Login-LAT-Node              35      string
ATTRIBUTE   Login-LAT-Group             36      string
ATTRIBUTE   Framed-AppleTalk-Link       37      integer
ATTRIBUTE   Framed-AppleTalk-Network    38      integer

share/contrib/raddb/dictionary.rfc2866  view on Meta::CPAN

VALUE   Acct-Status-Type        Accounting-Off          8
VALUE   Acct-Status-Type        Failed                  15

VALUE   Acct-Authentic          RADIUS                  1
VALUE   Acct-Authentic          Local                   2
VALUE   Acct-Authentic          Remote                  3

VALUE   Acct-Terminate-Cause    User-Request            1
VALUE   Acct-Terminate-Cause    Lost-Carrier            2
VALUE   Acct-Terminate-Cause    Lost-Service            3
VALUE   Acct-Terminate-Cause    Idle-Timeout            4
VALUE   Acct-Terminate-Cause    Session-Timeout         5
VALUE   Acct-Terminate-Cause    Admin-Reset             6
VALUE   Acct-Terminate-Cause    Admin-Reboot            7
VALUE   Acct-Terminate-Cause    Port-Error              8
VALUE   Acct-Terminate-Cause    NAS-Error               9
VALUE   Acct-Terminate-Cause    NAS-Request             10
VALUE   Acct-Terminate-Cause    NAS-Reboot              11
VALUE   Acct-Terminate-Cause    Port-Unneeded           12
VALUE   Acct-Terminate-Cause    Port-Preempted          13
VALUE   Acct-Terminate-Cause    Port-Suspended          14
VALUE   Acct-Terminate-Cause    Service-Unavailable     15

share/contrib/raddb/dictionary.shiva  view on Meta::CPAN


VALUE	Shiva-Connect-Reason	Remote			1
VALUE	Shiva-Connect-Reason	Dialback		2
VALUE	Shiva-Connect-Reason	Virtual-Connection	3
VALUE	Shiva-Connect-Reason	Bandwidth-On-Demand	4

#	Shiva Disconnect Reason Values

VALUE	Shiva-Disconnect-Reason Remote			1
VALUE	Shiva-Disconnect-Reason Error			2
VALUE	Shiva-Disconnect-Reason Idle-Timeout		3
VALUE	Shiva-Disconnect-Reason Session-Timeout		4
VALUE	Shiva-Disconnect-Reason Admin-Disconnect	5
VALUE	Shiva-Disconnect-Reason Dialback		6
VALUE	Shiva-Disconnect-Reason Virtual-Connection	7
VALUE	Shiva-Disconnect-Reason Bandwidth-On-Demand	8
VALUE	Shiva-Disconnect-Reason Failed-Authentication	9
VALUE	Shiva-Disconnect-Reason Preempted		10
VALUE	Shiva-Disconnect-Reason Blocked			11
VALUE	Shiva-Disconnect-Reason Tariff-Management	12
VALUE	Shiva-Disconnect-Reason Backup			13

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

ATTRIB_NMC	USR-Characters-Sent			0x0071	integer
ATTRIB_NMC	USR-Characters-Received			0x0072	integer
ATTRIB_NMC	USR-Blocks-Sent				0x0075	integer
ATTRIB_NMC	USR-Blocks-Received			0x0076	integer
ATTRIB_NMC	USR-Blocks-Resent			0x0077	integer
ATTRIB_NMC	USR-Retrains-Requested			0x0078	integer
ATTRIB_NMC	USR-Retrains-Granted			0x0079	integer
ATTRIB_NMC	USR-Line-Reversals			0x007A	integer
ATTRIB_NMC	USR-Number-Of-Characters-Lost		0x007B	integer
ATTRIB_NMC	USR-Number-of-Blers			0x007D	integer
ATTRIB_NMC	USR-Number-of-Link-Timeouts		0x007E	integer
ATTRIB_NMC	USR-Number-of-Fallbacks			0x007F	integer
ATTRIB_NMC	USR-Number-of-Upshifts			0x0080	integer
ATTRIB_NMC	USR-Number-of-Link-NAKs			0x0081	integer
ATTRIB_NMC	USR-DTR-False-Timeout			0x00BE	integer
ATTRIB_NMC	USR-Fallback-Limit			0x00BF	integer
ATTRIB_NMC	USR-Block-Error-Count-Limit		0x00C0	integer
ATTRIB_NMC	USR-DTR-True-Timeout			0x00DA	integer
ATTRIB_NMC	USR-Security-Login-Limit		0xBEDE	integer
ATTRIB_NMC	USR-Security-Resp-Limit			0xBEFA	integer
ATTRIB_NMC	USR-DTE-Ring-No-Answer-Limit		0xBF17	integer
ATTRIB_NMC	USR-Back-Channel-Data-Rate		0x007C	integer
ATTRIB_NMC	USR-Simplified-MNP-Levels		0x0099	integer
ATTRIB_NMC	USR-Simplified-V42bis-Usage		0x00C7	integer
ATTRIB_NMC	USR-Mbi_Ct_PRI_Card_Slot		0x0184	integer
ATTRIB_NMC	USR-Mbi_Ct_TDM_Time_Slot		0x0185	integer
ATTRIB_NMC	USR-Mbi_Ct_PRI_Card_Span_Line		0x0186	integer
ATTRIB_NMC	USR-Mbi_Ct_BChannel_Used		0x0187	integer

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

ATTRIB_NMC	USR-PW_Cutoff				0x900d	string
ATTRIB_NMC	USR-PW_Packet				0x900e	string
ATTRIB_NMC	USR-Primary_DNS_Server			0x900f	ipaddr
ATTRIB_NMC	USR-Secondary_DNS_Server		0x9010	ipaddr
ATTRIB_NMC	USR-Primary_NBNS_Server			0x9011	ipaddr
ATTRIB_NMC	USR-Secondary_NBNS_Server		0x9012	ipaddr
ATTRIB_NMC	USR-Syslog-Tap				0x9013	integer
ATTRIB_NMC	USR-Chassis-Call-Slot			0x9019	integer
ATTRIB_NMC	USR-Chassis-Call-Span			0x901A	integer
ATTRIB_NMC	USR-Chassis-Call-Channel		0x901B	integer
ATTRIB_NMC	USR-Keypress-Timeout			0x901C	integer
ATTRIB_NMC	USR-Unauthenticated-Time		0x901D	integer
ATTRIB_NMC	USR-Connect-Speed			0x9023	integer
ATTRIB_NMC	USR-Framed_IP_Address_Pool_Name		0x9024	string
ATTRIB_NMC	USR-MP-EDO				0x9025	string	

#
# Pilgrim attributes
# 
ATTRIB_NMC	USR-Bearer-Capabilities			0x9800	integer
ATTRIB_NMC	USR-Speed-Of-Connection			0x9801	integer

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

ATTRIB_NMC	USR-Routing-Protocol			0x9826	integer
ATTRIB_NMC	USR-Modem-Group				0x9827	integer
ATTRIB_NMC	USR-Modem-Training-Time			0x9842	integer
ATTRIB_NMC	USR-Interface-Index			0x9843	integer
ATTRIB_NMC	USR-MP-MRRU				0x982f	integer

ATTRIB_NMC	USR-SAP-Filter-In			0x9002	string
ATTRIB_NMC	USR-MIC					0x9014	string
ATTRIB_NMC	USR-Log-Filter-Packets			0x9017	string
ATTRIB_NMC	USR-VPN-Encrypter			0x901e	integer
ATTRIB_NMC	USR-Re-Chap-Timeout			0x9020	integer
ATTRIB_NMC	USR-Tunnel-Switch-Endpoint		0x9868	string

ATTRIB_NMC	USR-IP-SAA-Filter			0x9870	integer
ATTRIB_NMC	Initial-Modulation-Type			0x0923	integer
ATTRIB_NMC	USR-VTS-Session-Key			0x9856	string
ATTRIB_NMC	USR-Orig-NAS-Type			0x9857	string
ATTRIB_NMC	USR-Call-Arrival-Time			0x9858	integer
ATTRIB_NMC	USR-Call-End-Time			0x9859	integer
ATTRIB_NMC	USR-Tunnel-Auth-Hostname		0x986b	string
ATTRIB_NMC	USR-Acct-Reason-Code			0x986c	integer

share/contrib/raddb/dictionary.usr  view on Meta::CPAN



#	Event Indentifiers

VALUE	USR-Event-Id	Module-Inserted			6
VALUE	USR-Event-Id	Module-Removed			7
VALUE	USR-Event-Id	PSU-Voltage-Alarm		8
VALUE	USR-Event-Id	PSU-Failed			9
VALUE	USR-Event-Id	HUB-Temp-Out-of-Range		10
VALUE	USR-Event-Id	Fan-Failed			11
VALUE	USR-Event-Id	Watchdog-Timeout		12
VALUE	USR-Event-Id	Mgmt-Bus-Failure		13
VALUE	USR-Event-Id	In-Connection-Est		14
VALUE	USR-Event-Id	Out-Connection-Est		15
VALUE	USR-Event-Id	In-Connection-Term		16
VALUE	USR-Event-Id	Out-Connection-Term		17
VALUE	USR-Event-Id	Connection-Failed		18
VALUE	USR-Event-Id	Connection-Timeout		19
VALUE	USR-Event-Id	DTE-Transmit-Idle		20
VALUE	USR-Event-Id	DTR-True			21
VALUE	USR-Event-Id	DTR-False			22
VALUE	USR-Event-Id	Block-Error-at-Threshold	23
VALUE	USR-Event-Id	Fallbacks-at-Threshold		24
VALUE	USR-Event-Id	No-Dial-Tone-Detected		25
VALUE	USR-Event-Id	No-Loop-Current-Detected	26
VALUE	USR-Event-Id	Yellow-Alarm			27
VALUE	USR-Event-Id	Red-Alarm			28
VALUE	USR-Event-Id	Loss-Of-Signal			29

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-Connect-Term-Reason	unableToRetrain			14
VALUE	USR-Connect-Term-Reason	managementCommand		15
VALUE	USR-Connect-Term-Reason	noDialTone			16
VALUE	USR-Connect-Term-Reason	keyAbort			17
VALUE	USR-Connect-Term-Reason	lineBusy			18
VALUE	USR-Connect-Term-Reason	noAnswer			19
VALUE	USR-Connect-Term-Reason	voice				20
VALUE	USR-Connect-Term-Reason	noAnswerTone			21
VALUE	USR-Connect-Term-Reason	noCarrier			22
VALUE	USR-Connect-Term-Reason	undetermined			23
VALUE	USR-Connect-Term-Reason	v42SabmeTimeout			24
VALUE	USR-Connect-Term-Reason	v42BreakTimeout			25
VALUE	USR-Connect-Term-Reason	v42DisconnectCmd		26
VALUE	USR-Connect-Term-Reason	v42IdExchangeFail		27
VALUE	USR-Connect-Term-Reason	v42BadSetup			28
VALUE	USR-Connect-Term-Reason	v42InvalidCodeWord		29
VALUE	USR-Connect-Term-Reason	v42StringToLong			30
VALUE	USR-Connect-Term-Reason	v42InvalidCommand		31
VALUE	USR-Connect-Term-Reason	none				32	
VALUE	USR-Connect-Term-Reason	v32Cleardown			33
VALUE	USR-Connect-Term-Reason	dialSecurity			34
VALUE	USR-Connect-Term-Reason	remoteAccessDenied		35

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-Connect-Term-Reason	noPromptingInSync		39
VALUE	USR-Connect-Term-Reason	nonArqMode			40
VALUE	USR-Connect-Term-Reason	modeIncompatible		41
VALUE	USR-Connect-Term-Reason	noPromptInNonARQ		42
VALUE	USR-Connect-Term-Reason	dialBackLink			43
VALUE	USR-Connect-Term-Reason	linkAbort			44
VALUE	USR-Connect-Term-Reason	autopassFailed			45
VALUE	USR-Connect-Term-Reason	pbGenericError			46
VALUE	USR-Connect-Term-Reason	pbLinkErrTxPreAck		47
VALUE	USR-Connect-Term-Reason	pbLinkErrTxTardyACK		48
VALUE	USR-Connect-Term-Reason	pbTransmitBusTimeout		49
VALUE	USR-Connect-Term-Reason	pbReceiveBusTimeout		50
VALUE	USR-Connect-Term-Reason	pbLinkErrTxTAL			51
VALUE	USR-Connect-Term-Reason	pbLinkErrRxTAL			52
VALUE	USR-Connect-Term-Reason	pbTransmitMasterTimeout		53
VALUE	USR-Connect-Term-Reason	pbClockMissing			54
VALUE	USR-Connect-Term-Reason	pbReceivedLsWhileLinkUp		55
VALUE	USR-Connect-Term-Reason	pbOutOfSequenceFrame		56
VALUE	USR-Connect-Term-Reason	pbBadFrame			57
VALUE	USR-Connect-Term-Reason	pbAckWaitTimeout		58
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
VALUE   USR-Connect-Term-Reason	remoteHungUpDuringTraining              80
VALUE   USR-Connect-Term-Reason	trainingTimeout         81
VALUE   USR-Connect-Term-Reason	incomingModemNotAvailable               82
VALUE   USR-Connect-Term-Reason	incomingInvalidBearerCap                83
VALUE   USR-Connect-Term-Reason	incomingInvalidChannelID                84
VALUE   USR-Connect-Term-Reason	incomingInvalidProgInd          85
VALUE   USR-Connect-Term-Reason	incomingInvalidCallingPty               86
VALUE   USR-Connect-Term-Reason	incomingInvalidCalledPty                87
VALUE   USR-Connect-Term-Reason	incomingCallBlock               88
VALUE   USR-Connect-Term-Reason	incomingLoopStNoRingOff         89
VALUE   USR-Connect-Term-Reason	outgoingTelcoDisconnect         90
VALUE   USR-Connect-Term-Reason	outgoingEMWinkTimeout           91
VALUE   USR-Connect-Term-Reason	outgoingEMWinkTooShort          92
VALUE   USR-Connect-Term-Reason	outgoingNoChannelAvail          93
VALUE   USR-Connect-Term-Reason	dspReboot               94
VALUE   USR-Connect-Term-Reason	noDSPRespToKA           95
VALUE   USR-Connect-Term-Reason	noDSPRespToDisc         96
VALUE   USR-Connect-Term-Reason	dspTailPtrInvalid               97
VALUE   USR-Connect-Term-Reason	dspHeadPtrInvalid               98

VALUE	USR-Failure-to-Connect-Reason	dtrDrop			1
VALUE	USR-Failure-to-Connect-Reason	escapeSequence		2

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-Failure-to-Connect-Reason	unableToRetrain		14
VALUE	USR-Failure-to-Connect-Reason	managementCommand	15
VALUE	USR-Failure-to-Connect-Reason	noDialTone		16
VALUE	USR-Failure-to-Connect-Reason	keyAbort		17
VALUE	USR-Failure-to-Connect-Reason	lineBusy		18
VALUE	USR-Failure-to-Connect-Reason	noAnswer		19
VALUE	USR-Failure-to-Connect-Reason	voice			20
VALUE	USR-Failure-to-Connect-Reason	noAnswerTone		21
VALUE	USR-Failure-to-Connect-Reason	noCarrier		22
VALUE	USR-Failure-to-Connect-Reason	undetermined		23
VALUE	USR-Failure-to-Connect-Reason	v42SabmeTimeout		24
VALUE	USR-Failure-to-Connect-Reason	v42BreakTimeout		25
VALUE	USR-Failure-to-Connect-Reason	v42DisconnectCmd	26
VALUE	USR-Failure-to-Connect-Reason	v42IdExchangeFail	27
VALUE	USR-Failure-to-Connect-Reason	v42BadSetup		28
VALUE	USR-Failure-to-Connect-Reason	v42InvalidCodeWord	29
VALUE	USR-Failure-to-Connect-Reason	v42StringToLong		30
VALUE	USR-Failure-to-Connect-Reason	v42InvalidCommand	31
VALUE	USR-Failure-to-Connect-Reason	none			32	
VALUE	USR-Failure-to-Connect-Reason	v32Cleardown		33
VALUE	USR-Failure-to-Connect-Reason	dialSecurity		34
VALUE	USR-Failure-to-Connect-Reason	remoteAccessDenied	35

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-Failure-to-Connect-Reason	noPromptingInSync	39
VALUE	USR-Failure-to-Connect-Reason	nonArqMode		40
VALUE	USR-Failure-to-Connect-Reason	modeIncompatible	41
VALUE	USR-Failure-to-Connect-Reason	noPromptInNonARQ	42
VALUE	USR-Failure-to-Connect-Reason	dialBackLink		43
VALUE	USR-Failure-to-Connect-Reason	linkAbort		44
VALUE	USR-Failure-to-Connect-Reason	autopassFailed		45
VALUE	USR-Failure-to-Connect-Reason	pbGenericError		46
VALUE	USR-Failure-to-Connect-Reason	pbLinkErrTxPreAck	47
VALUE	USR-Failure-to-Connect-Reason	pbLinkErrTxTardyACK	48
VALUE	USR-Failure-to-Connect-Reason	pbTransmitBusTimeout	49
VALUE	USR-Failure-to-Connect-Reason	pbReceiveBusTimeout	50
VALUE	USR-Failure-to-Connect-Reason	pbLinkErrTxTAL		51
VALUE	USR-Failure-to-Connect-Reason	pbLinkErrRxTAL		52
VALUE	USR-Failure-to-Connect-Reason	pbTransmitMasterTimeout 53
VALUE	USR-Failure-to-Connect-Reason	pbClockMissing		54
VALUE	USR-Failure-to-Connect-Reason	pbReceivedLsWhileLinkUp 55
VALUE	USR-Failure-to-Connect-Reason	pbOutOfSequenceFrame	56
VALUE	USR-Failure-to-Connect-Reason	pbBadFrame		57
VALUE	USR-Failure-to-Connect-Reason	pbAckWaitTimeout	58
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
VALUE   USR-Failure-to-Connect-Reason     remoteHungUpDuringTraining              80
VALUE   USR-Failure-to-Connect-Reason     trainingTimeout         81
VALUE   USR-Failure-to-Connect-Reason     incomingModemNotAvailable               82
VALUE   USR-Failure-to-Connect-Reason     incomingInvalidBearerCap                83
VALUE   USR-Failure-to-Connect-Reason     incomingInvalidChannelID                84
VALUE   USR-Failure-to-Connect-Reason     incomingInvalidProgInd          85
VALUE   USR-Failure-to-Connect-Reason     incomingInvalidCallingPty               86
VALUE   USR-Failure-to-Connect-Reason     incomingInvalidCalledPty                87
VALUE   USR-Failure-to-Connect-Reason     incomingCallBlock               88
VALUE   USR-Failure-to-Connect-Reason     incomingLoopStNoRingOff         89
VALUE   USR-Failure-to-Connect-Reason     outgoingTelcoDisconnect         90
VALUE   USR-Failure-to-Connect-Reason     outgoingEMWinkTimeout           91
VALUE   USR-Failure-to-Connect-Reason     outgoingEMWinkTooShort          92
VALUE   USR-Failure-to-Connect-Reason     outgoingNoChannelAvail          93
VALUE   USR-Failure-to-Connect-Reason     dspReboot               94
VALUE   USR-Failure-to-Connect-Reason     noDSPRespToKA           95
VALUE   USR-Failure-to-Connect-Reason     noDSPRespToDisc         96
VALUE   USR-Failure-to-Connect-Reason     dspTailPtrInvalid               97
VALUE   USR-Failure-to-Connect-Reason     dspHeadPtrInvalid               98

VALUE	USR-Simplified-MNP-Levels		none			1
VALUE	USR-Simplified-MNP-Levels		mnpLevel3		2

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-Device-Connected-To		quadModem	3

VALUE	USR-Call-Event-Code			notSupported	      1
VALUE	USR-Call-Event-Code			setup		      2
VALUE	USR-Call-Event-Code			usrSetup	      3
VALUE	USR-Call-Event-Code			telcoDisconnect	      4
VALUE	USR-Call-Event-Code			usrDisconnect	      5
VALUE	USR-Call-Event-Code			noFreeModem	      6
VALUE	USR-Call-Event-Code			modemsNotAllowed      7
VALUE	USR-Call-Event-Code			modemsRejectCall      8
VALUE	USR-Call-Event-Code			modemSetupTimeout     9
VALUE	USR-Call-Event-Code			noFreeIGW	      10
VALUE	USR-Call-Event-Code			igwRejectCall	      11
VALUE	USR-Call-Event-Code			igwSetupTimeout	      12
VALUE	USR-Call-Event-Code			noFreeTdmts	      13
VALUE	USR-Call-Event-Code			bcReject	      14
VALUE	USR-Call-Event-Code			ieReject	      15
VALUE	USR-Call-Event-Code			chidReject	      16
VALUE	USR-Call-Event-Code			progReject	      17
VALUE	USR-Call-Event-Code			callingPartyReject    18
VALUE	USR-Call-Event-Code			calledPartyReject     19
VALUE	USR-Call-Event-Code			blocked		      20
VALUE	USR-Call-Event-Code			analogBlocked	      21
VALUE	USR-Call-Event-Code			digitalBlocked	      22

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-Call-Event-Code			noFreeBchannel	      27
VALUE	USR-Call-Event-Code			inOutCallCollision    28
VALUE	USR-Call-Event-Code			inCallArrival		29
VALUE	USR-Call-Event-Code			outCallArrival		30
VALUE	USR-Call-Event-Code			inCallConnect		31
VALUE	USR-Call-Event-Code			outCallConnect		32

VALUE	USR-HARC-Disconnect-Code		No-Error		0
VALUE	USR-HARC-Disconnect-Code		No-Carrier		1
VALUE	USR-HARC-Disconnect-Code		No-DSR			2
VALUE	USR-HARC-Disconnect-Code		Timeout			3
VALUE	USR-HARC-Disconnect-Code		Reset			4
VALUE	USR-HARC-Disconnect-Code		Call-Drop-Req		5
VALUE	USR-HARC-Disconnect-Code		Idle-Timeout		6
VALUE	USR-HARC-Disconnect-Code		Session-Timeout		7
VALUE	USR-HARC-Disconnect-Code		User-Req-Drop		8
VALUE	USR-HARC-Disconnect-Code		Host-Req-Drop		9
VALUE	USR-HARC-Disconnect-Code		Service-Interruption	10
VALUE	USR-HARC-Disconnect-Code		Service-Unavailable	11
VALUE	USR-HARC-Disconnect-Code		User-Input-Error	12
VALUE	USR-HARC-Disconnect-Code		NAS-Drop-For-Callback	13
VALUE	USR-HARC-Disconnect-Code		NAS-Drop-Misc-Non-Error	14
VALUE	USR-HARC-Disconnect-Code		NAS-Internal-Error	15
VALUE	USR-HARC-Disconnect-Code		Line-Busy		16
VALUE	USR-HARC-Disconnect-Code		RESERVED		17
VALUE	USR-HARC-Disconnect-Code		RESERVED		18
VALUE	USR-HARC-Disconnect-Code		Tunnel-Term-Unreach	19
VALUE	USR-HARC-Disconnect-Code		Tunnel-Refused		20
VALUE	USR-HARC-Disconnect-Code		Tunnel-Auth-Failed	21
VALUE	USR-HARC-Disconnect-Code		Tunnel-Session-Timeout	22
VALUE	USR-HARC-Disconnect-Code		Tunnel-Timeout		23
VALUE	USR-HARC-Disconnect-Code		RESERVED		24
VALUE	USR-HARC-Disconnect-Code		Radius-Res-Reclaim	25
VALUE	USR-HARC-Disconnect-Code		DNIS-Auth-Failed	26
VALUE	USR-HARC-Disconnect-Code		PAP-Auth-Failure	27
VALUE	USR-HARC-Disconnect-Code		CHAP-Auth-Failure	28
VALUE	USR-HARC-Disconnect-Code		PPP-LCP-Failed		29
VALUE	USR-HARC-Disconnect-Code		PPP-NCP-Failed		30
VALUE	USR-HARC-Disconnect-Code		Radius-Timeout		31

VALUE	USR-CCP-Algorithm			NONE			1
VALUE	USR-CCP-Algorithm			Stac			2
VALUE	USR-CCP-Algorithm			MS			3
VALUE	USR-CCP-Algorithm			Any			4

VALUE	USR-Tunnel-Security			None			0
VALUE	USR-Tunnel-Security			Control-Only		1
VALUE	USR-Tunnel-Security			Data-Only		2
VALUE	USR-Tunnel-Security			Both-Data-and-Control	3

share/contrib/raddb/dictionary.usr  view on Meta::CPAN

VALUE	USR-RMMIE-x2-Status			excessHighFrequencyAtten	12
VALUE	USR-RMMIE-x2-Status			connectNotSupport3200	13
VALUE	USR-RMMIE-x2-Status			retrainBeforeConnection	14

VALUE	USR-RMMIE-Planned-Disconnect		none			1
VALUE	USR-RMMIE-Planned-Disconnect		dteNotReady		2
VALUE	USR-RMMIE-Planned-Disconnect		dteInterfaceError	3
VALUE	USR-RMMIE-Planned-Disconnect		dteRequest		4
VALUE	USR-RMMIE-Planned-Disconnect		escapeToOnlineCommandMode	5
VALUE	USR-RMMIE-Planned-Disconnect		athCommand		6
VALUE	USR-RMMIE-Planned-Disconnect		inactivityTimeout	7
VALUE	USR-RMMIE-Planned-Disconnect		arqProtocolError	8
VALUE	USR-RMMIE-Planned-Disconnect		arqProtocolRetransmitLim	9
VALUE	USR-RMMIE-Planned-Disconnect		invalidComprDataCodeword	10
VALUE	USR-RMMIE-Planned-Disconnect		invalidComprDataStringLen	11
VALUE	USR-RMMIE-Planned-Disconnect		invalidComprDataCommand	12

VALUE	USR-RMMIE-Last-Update-Event		none			1
VALUE	USR-RMMIE-Last-Update-Event		initialConnection	2
VALUE	USR-RMMIE-Last-Update-Event		retrain			3
VALUE	USR-RMMIE-Last-Update-Event		speedShift		4

share/public/javascripts/bootstrap-toggle.min.js  view on Meta::CPAN

 * bootstrap5-toggle v5.4.1
 * https://palcarazm.github.io/bootstrap5-toggle/
 * @author 2011-2014 Min Hur (https://github.com/minhur)
 * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
 * @author 2022 Pablo Alcaraz Martínez (https://github.com/palcarazm)
 * @funding GitHub Sponsors
 * @see https://github.com/sponsors/palcarazm
 * @license MIT
 * @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
 */
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var t,e,i,s,n,o,a;!function(t){t.ON="on",t.OFF="off",t.MIXED="mixed"}(t||(t={})),function(t){t.ENABLED="enabled",t.DISABLED="disabled",t.READONLY="readonly"}(e|...
//# sourceMappingURL=bootstrap5-toggle.ecmas.min.js.map

share/public/javascripts/bootstrap.min.js  view on Meta::CPAN

  */
/*!
 * @popperjs/core v2.11.8 - MIT License
 *
 * Copyright (c) 2019 Federico Zivolo
 *
 * Popper is inlined into this file by Bootstrap's bundle build, which emits
 * only the banner above it. This notice is reproduced from the @popperjs/core
 * package so that the licence travels with the code it covers.
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,function(){"use strict";const t=new Map,e...
//# sourceMappingURL=bootstrap.bundle.min.js.map

share/public/javascripts/dataTables.min.js  view on Meta::CPAN

/*! DataTables 3.0.3
 * Copyright (c) SpryMedia Ltd - datatables.net/license
 */
(t=>{"function"==typeof define&&define.amd?define([],function(){return t(window,document)}):"object"==typeof exports?"undefined"==typeof window?module.exports=function(e){return e=e||window,t(e,e.document)}:module.exports=t(window,window.document):wi...

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/htmx.min.js  view on Meta::CPAN

var htmx=(()=>{const e={parse(t){if(!t)return{};if(t.startsWith("{"))return JSON.parse(t);let r=/(?:"([^"]+)"|'([^']+)'|([^\s,:]+))(?:\s*:\s*(?:"([^"]*)"|'([^']*)'|<((?:[^/]|\/(?!>))+)\/>|([^\s,]+)))?(?=\s|,|$)/g,i={};for(let s of t.matchAll(r)){let[...

share/public/javascripts/netdisco-admin.js  view on Meta::CPAN

    // reload this table every 5 seconds
    var countdownIcon = document.getElementById('nd_countdown-control-icon');
    if ((tab == 'jobqueue')
        && countdownIcon && countdownIcon.classList.contains('fa-play')) {

        var countdownLabel = document.getElementById('nd_countdown');
        if (countdownLabel) countdownLabel.textContent = String(timermax);

        // add new timers
        for (var i = timercache; i > 0; i--) {
          nd_timers.push(setTimeout(function() {
            var label = document.getElementById('nd_countdown');
            if (label) label.textContent = String(timercache);
            timercache = timercache - 1;
          }, ((timermax * 1000) - (i * 1000)) ));
        }

        nd_timers.push(setTimeout(function() {
          // clear any running timers
          for (var j = 0; j < nd_timers.length; j++) {
              clearTimeout(nd_timers[j]);
          }

          // reset the timer cache
          timercache = timermax - 1;

          // reload the tab content in...
          htmx.trigger('#' + tab + '_form', 'submit');
        }, (timermax * 1000)));
    }

share/public/javascripts/netdisco-admin.js  view on Meta::CPAN

    var tab = nd_active_tab;
    var target = nd_active_target;
    timermax = Number((activeForm && activeForm.dataset.ndJobqueueRefresh) || 5);
    timercache = timermax - 1;

    // job control sidebar submit should reset timer
    // and update bookmark
    var submitBtn = document.getElementById(tab + '_submit');
    if (submitBtn) submitBtn.addEventListener('click', function() {
      for (var i = 0; i < nd_timers.length; i++) {
          clearTimeout(nd_timers[i]);
      }
      // reset the timer cache
      timercache = timermax - 1;

      // bookmark
      var tabForm = document.getElementById(tab + '_form');
      var querystr = tabForm ? ndRequest.query(tabForm) : '';
      var bookmark = document.getElementById('nd_jobqueue-bookmark');
      if (bookmark) bookmark.setAttribute('href', uri_base + '/admin/' + tab + '?' + querystr);
    });

    // job control refresh icon should reload the page
    var refreshBtn = document.getElementById('nd_countdown-refresh');
    if (refreshBtn) refreshBtn.addEventListener('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
      htmx.trigger('#' + tab + '_form', 'submit');
    });

    // job control pause/play icon switcheroo
    var controlBtn = document.getElementById('nd_countdown-control');
    if (controlBtn) controlBtn.addEventListener('click', function(event) {
      event.preventDefault();
      var icon = document.getElementById('nd_countdown-control-icon');
      if (!icon) return;
      icon.classList.toggle('fa-pause');
      icon.classList.toggle('fa-play');
      icon.classList.toggle('text-danger');
      icon.classList.toggle('text-success');

      if (icon.classList.contains('fa-pause')) {
        for (var i = 0; i < nd_timers.length; i++) {
            clearTimeout(nd_timers[i]);
        }
        var countdownLabel = document.getElementById('nd_countdown');
        if (countdownLabel) countdownLabel.textContent = '0';
      }
      else {
        htmx.trigger('#' + tab + '_form', 'submit');
      }
    });

    // activity for admin task tables

share/public/javascripts/netdisco-admin.js  view on Meta::CPAN

    const content = document.querySelector('.content');
    if (content) content.addEventListener('click', function(event) {
      var button = event.target instanceof Element ? event.target.closest('.nd_adminbutton') : null;
      if (!button || !content.contains(button)) return;

      // 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 = button.getAttribute('name');

      // admin task name with special case(s)
      var task = tab + '/';
      if (tab == 'duplicatedevices') {
        task = '';
      }

share/public/javascripts/netdisco-netmap.js  view on Meta::CPAN


    fg.linkCurvature(function (l) {
      const s = endpointId(l, 'source'),
        t = endpointId(l, 'target');
      return s === t ? 0.6 : 0;
    });

    // the old template zoomed to the center node 1.5 s after start when
    // mapshow=neighbors (a legacy value still reachable from bookmarks)
    if (map.dataset.ndMapshow === 'neighbors') {
      setTimeout(function () {
        const n = graph.nodeDataById(graph.centernode);
        if (n) {
          fg.centerAt(n.x, n.y, 600);
          fg.zoom(4, 600);
        }
      }, 1500);
    }

    // box select: shift-drag replaces the old freehand lasso by ruling.
    // capture-phase listener so force-graph's own pan never sees the drag.

share/public/javascripts/netdisco-netmap.js  view on Meta::CPAN

        { signal: signal }
      );
    });

    /**
     * Resizes the graph canvas to the pane's current width after a short delay,
     * letting the sidebar toggle or fullscreen transition finish first.
     * @returns {void}
     */
    function resizeGraphContainer() {
      setTimeout(function () {
        const resizePaneEl = document.getElementById('netmap_pane');
        const resizePaneParent = resizePaneEl && resizePaneEl.parentElement;
        fg.width(parseInt(resizePaneParent ? getComputedStyle(resizePaneParent).width : '0')).height(
          window.innerHeight - 100
        );
      }, 500);
    }
    const sidebarToggleIn = document.getElementById('nd_sidebar-toggle-img-in');
    if (sidebarToggleIn) sidebarToggleIn.addEventListener('click', resizeGraphContainer, { signal: signal });
    const sidebarToggleOut = document.getElementById('nd_sidebar-toggle-img-out');

share/public/javascripts/netdisco-portcontrol.js  view on Meta::CPAN

    (function worker() {
      ndRequest.getJSON(uri_base + '/ajax/userlog')
        .then(function(data) {
          for (var i = 0; i < data['error'].length; i++) {
            ndToast.error(data['error'][i], 'Failed Job:');
          }
          for (i = 0; i < data['done'].length; i++) {
            ndToast.success(data['done'][i], 'Successful Job:');
          }
          // Schedule next request when the current one's complete
          setTimeout(worker, 5000);
        })
        .catch(function() {
          // after failure, try less often
          setTimeout(worker, 60000);
        });
    })();
  }

  // Cast once: querySelectorAll's own return type carries only Element, and
  // that leaves every event registered below untyped for its listener too.
  var tabContents = /** @type {NodeListOf<HTMLElement>} */ (document.querySelectorAll('.tab-content'));

  // toggle visibility of port up/down and edit controls
  tabContents.forEach(function (root) {

share/public/javascripts/netdisco-typeahead.js  view on Meta::CPAN

      close();
    }
    owner = field;
    const settings = readOptions(field);
    options = settings;
    theMenu().className = 'nd_typeahead-menu ' + settings.menuClass;
    field.setAttribute('role', 'combobox');
    field.setAttribute('aria-controls', MENU_ID);
    field.setAttribute('aria-autocomplete', 'list');
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(() => search(field, term, settings), DELAY);
  }

  /**
   * Writes a chosen row into its field and closes the menu.
   * @param {HTMLInputElement} field the field being filled in
   * @param {{value: string}} row the chosen row
   * @param {boolean} fromEnter true when a live Enter keydown is choosing the row
   * @returns {void}
   */
  function commit(field, row, fromEnter) {

share/public/javascripts/netdisco.js  view on Meta::CPAN

// Back and Forward re-request the page, which is what we want, but the library
// answers them by swapping the response into the body rather than navigating.
// That re-inserts the layout's script tags and runs them against a document
// that already ran them, so every const in them is declared twice and the page
// dies. Asking for a real reload is the same round trip without that.
htmx.config.history = 'reload';

// The library's own ceiling is 60 seconds, which a Ports tab on a large device
// has been measured to exceed. This one is far above any pane load ever
// observed, so it only ever cuts off a request that was never going to answer.
htmx.config.defaultTimeout = 300000;

// promoted from a <body> data attribute; the layout carries no inline
// JavaScript for CodeQL to skip.
var uri_base = document.body.dataset.ndUriBase;
var nd_check_userlog = (document.body.dataset.ndCheckUserlog === '1');

// a data-nd-has-sidebar="tab" marker of 0 means the tab ships no sidebar
// template. Shared with the htmx path, which does not call do_search.
function nd_has_sidebar(tab) {
  // A tab whose sidebar include throws renders the try block's marker (1)

share/public/javascripts/netdisco.js  view on Meta::CPAN

  // looking like it was answered.
  document.body.addEventListener('htmx:error', function (evt) {
    var ctx = evt.detail.ctx;
    if (!ctx) return;
    var error = evt.detail.error;
    var aborted = !!(error && error.name === 'AbortError');
    if (ctx.response && !aborted) return;
    var target = ctx.target;
    if (!target.id.match(/_pane$/)) return;
    if (nd_latest_pane_request !== ctx) return;
    // An abort nothing replaced is the ceiling in htmx.config.defaultTimeout
    // firing, which is worth naming: it sends an administrator looking at how
    // long the query takes rather than at the network.
    nd_pane_failure(target, aborted ? 'request timed out' : 'network error');
  });
  function nd_session_expired(pane) {
    // every part is a literal
    // eslint-disable-next-line no-unsanitized/property
    pane.innerHTML =
      '<div class="col-md-5 alert alert-warning"><i class="fas fa-right-to-bracket"></i> ' +
      'Your session has expired. <a href="' + nd_login_url() + '">Log in again</a> to carry on.</div>';

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/public/swagger-ui/swagger-ui-standalone-preset.js  view on Meta::CPAN

/*! For license information please see swagger-ui-standalone-preset.js.LICENSE.txt */
!function webpackUniversalModuleDefinition(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalo...

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

{"version":3,"file":"swagger-ui-standalone-preset.js","mappings":";CAAA,SAAUA,iCAAiCC,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAmC,0BAAID,IAEvCD,EAAgC,0BAAIC,GACrC,CATD,CASGK,MA...



( run in 3.485 seconds using v1.01-cache-2.11-cpan-85d3896f969 )