ispbills-icli 8.1.0 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/commands.js +13 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ispbills-icli",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
4
4
  "description": "iCli — IspBills AI network engineer in your terminal",
5
5
  "keywords": [
6
6
  "ispbills",
package/src/commands.js CHANGED
@@ -26,7 +26,8 @@ export const SLASH_COMMANDS = [
26
26
  { cmd: '/vlan', hint: '[id]', desc: 'VLAN usage — free or in use', group: 'Access' },
27
27
  { cmd: '/pppoe', hint: '[user]', desc: 'PPPoE session detail', group: 'Access' },
28
28
  { cmd: '/online', hint: '', desc: 'List online PPPoE sessions', group: 'Access' },
29
- { cmd: '/offline', hint: '', desc: 'List offline customers / ONUs', group: 'Access' },
29
+ { cmd: '/offline', hint: '[olt/router]', desc: 'List offline OLTs, routers or ONUs', group: 'Access' },
30
+ { cmd: '/down', hint: '[circuit]', desc: 'List down circuits / uplinks', group: 'Access' },
30
31
  { cmd: '/bandwidth', hint: '[device]', desc: 'Traffic / bandwidth usage', group: 'Access' },
31
32
 
32
33
  // ── Layer 2/3 lookups ──
@@ -88,7 +89,17 @@ export function slashToQuestion(line) {
88
89
  case '/vlan': return on(`is VLAN ${arg} in use or free across the network?`, 'list all VLANs and show which are in use or free');
89
90
  case '/pppoe': return on(`show PPPoE session detail for ${arg}`, 'summarise current PPPoE sessions');
90
91
  case '/online': return 'list currently online PPPoE sessions';
91
- case '/offline': return 'list customers or ONUs that are currently offline';
92
+ case '/offline': {
93
+ const t = arg.toLowerCase();
94
+ if (/olt/.test(t)) return 'list all OLTs that are currently offline or unreachable';
95
+ if (/rout|nas|mikrotik|router/.test(t)) return 'list all routers / NAS devices that are currently offline or unreachable';
96
+ if (/onu|ont/.test(t)) return 'list all ONUs that are currently offline';
97
+ if (/cust|client|user/.test(t)) return 'list all customers that are currently offline';
98
+ return arg
99
+ ? `list all ${arg} that are currently offline`
100
+ : 'list everything that is currently offline — OLTs, routers and ONUs';
101
+ }
102
+ case '/down': return on(`is the ${arg} circuit / uplink down? show its status`, 'list all down circuits, uplinks or backbone links across the network');
92
103
  case '/bandwidth': return on(`show traffic and bandwidth usage on ${arg}`, 'show current bandwidth usage across the network and flag the top talkers');
93
104
 
94
105
  // Layer 2/3 lookups