secubox-openwrt/package/secubox/luci-app-device-intel/htdocs/luci-static/resources/device-intel/api.js
CyberMind-FR 57db9cfb40 feat: Add device-intel and dns-provider packages
Add 4 new packages implementing unified device intelligence and
DNS provider API management:

- secubox-app-dns-provider: dnsctl CLI with OVH, Gandi, Cloudflare
  adapters for DNS record CRUD, HAProxy vhost sync, propagation
  verification, and ACME DNS-01 wildcard certificate issuance
- luci-app-dns-provider: RPCD handler + LuCI views for provider
  settings and DNS record management
- secubox-app-device-intel: Aggregation layer merging mac-guardian,
  client-guardian, DHCP, P2P mesh, and exposure data with heuristic
  classification engine and USB/MQTT/Zigbee emulator modules
- luci-app-device-intel: RPCD handler + 5 LuCI views (dashboard,
  devices, emulators, mesh, settings) with shared API and CSS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:47:20 +01:00

73 lines
1.6 KiB
JavaScript

'use strict';
'require baseclass';
'require rpc';
var callGetDevices = rpc.declare({
object: 'luci.device-intel',
method: 'get_devices',
expect: {}
});
var callGetDevice = rpc.declare({
object: 'luci.device-intel',
method: 'get_device',
params: ['mac'],
expect: {}
});
var callGetSummary = rpc.declare({
object: 'luci.device-intel',
method: 'get_summary',
expect: {}
});
var callGetMeshDevices = rpc.declare({
object: 'luci.device-intel',
method: 'get_mesh_devices',
expect: {}
});
var callGetEmulators = rpc.declare({
object: 'luci.device-intel',
method: 'get_emulators',
expect: {}
});
var callGetDeviceTypes = rpc.declare({
object: 'luci.device-intel',
method: 'get_device_types',
expect: {}
});
var callClassifyDevice = rpc.declare({
object: 'luci.device-intel',
method: 'classify_device',
params: ['mac'],
expect: {}
});
var callSetDeviceMeta = rpc.declare({
object: 'luci.device-intel',
method: 'set_device_meta',
params: ['mac', 'type', 'label'],
expect: {}
});
var callRefresh = rpc.declare({
object: 'luci.device-intel',
method: 'refresh',
expect: {}
});
return baseclass.extend({
getDevices: function() { return callGetDevices(); },
getDevice: function(mac) { return callGetDevice(mac); },
getSummary: function() { return callGetSummary(); },
getMeshDevices: function() { return callGetMeshDevices(); },
getEmulators: function() { return callGetEmulators(); },
getDeviceTypes: function() { return callGetDeviceTypes(); },
classifyDevice: function(mac) { return callClassifyDevice(mac); },
setDeviceMeta: function(mac, type, label) { return callSetDeviceMeta(mac, type, label); },
refresh: function() { return callRefresh(); }
});