From e1d8f0e6f9ab673a266f7813d267ae6dfaef5784 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 1 Dec 2024 02:03:42 +0200 Subject: [PATCH] treewide: declare rpc calls with const Signed-off-by: Sergey Ponomarev --- .../luci-static/resources/adblock-fast/status.js | 10 +++++----- .../luci-static/resources/view/alist/config.js | 2 +- .../luci-static/resources/view/apinger/overview.js | 2 +- .../resources/view/attendedsysupgrade/overview.js | 6 +++--- .../luci-static/resources/view/cloudflared/config.js | 2 +- applications/luci-app-example/YAML.md | 2 +- .../view/example/rpc-jsonmap-tablesection.js | 2 +- .../view/example/rpc-jsonmap-typedsection.js | 2 +- .../htdocs/luci-static/resources/view/example/rpc.js | 4 ++-- .../htdocs/luci-static/resources/view/frpc.js | 2 +- .../htdocs/luci-static/resources/view/frps.js | 2 +- .../luci-static/resources/https-dns-proxy/status.js | 12 ++++++------ .../resources/view/keepalived/overview.js | 2 +- .../resources/view/status/include/35_keepalived.js | 2 +- .../resources/view/system/led-trigger/usbport.js | 2 +- .../luci-static/resources/view/libreswan/overview.js | 2 +- .../luci-static/resources/view/lldpd/config.js | 4 ++-- .../luci-static/resources/view/lldpd/status.js | 2 +- .../resources/view/mwan3/status/overview.js | 2 +- .../resources/view/status/include/90_mwan3.js | 2 +- .../htdocs/luci-static/resources/view/natmap.js | 2 +- .../luci-static/resources/view/nlbw/display.js | 2 +- .../resources/view/freifunk-services/services.js | 4 ++-- .../luci-static/resources/view/package-manager.js | 2 +- .../htdocs/luci-static/resources/pbr/status.js | 12 ++++++------ .../htdocs/luci-static/resources/view/qos/qos.js | 2 +- .../luci-static/resources/view/smartdns/smartdns.js | 2 +- .../htdocs/luci-static/resources/view/squid.js | 2 +- .../htdocs/luci-static/resources/view/tor/tor-hs.js | 2 +- .../luci-static/resources/view/transmission.js | 2 +- .../luci-static/resources/view/usteer/usteer.js | 2 +- .../luci-static/resources/view/v2raya/config.js | 2 +- .../luci-static/resources/view/vnstat2/graphs.js | 2 +- .../htdocs/luci-static/resources/view/xfrpc.js | 2 +- 34 files changed, 53 insertions(+), 53 deletions(-) diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js index d89e228953..1307065eb1 100644 --- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js +++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js @@ -27,31 +27,31 @@ var pkg = { }, }; -var getFileUrlFilesizes = rpc.declare({ +const getFileUrlFilesizes = rpc.declare({ object: "luci." + pkg.Name, method: "getFileUrlFilesizes", params: ["name", "url"], }); -var getInitList = rpc.declare({ +const getInitList = rpc.declare({ object: "luci." + pkg.Name, method: "getInitList", params: ["name"], }); -var getInitStatus = rpc.declare({ +const getInitStatus = rpc.declare({ object: "luci." + pkg.Name, method: "getInitStatus", params: ["name"], }); -var getPlatformSupport = rpc.declare({ +const getPlatformSupport = rpc.declare({ object: "luci." + pkg.Name, method: "getPlatformSupport", params: ["name"], }); -var _setInitAction = rpc.declare({ +const _setInitAction = rpc.declare({ object: "luci." + pkg.Name, method: "setInitAction", params: ["name", "action"], diff --git a/applications/luci-app-alist/htdocs/luci-static/resources/view/alist/config.js b/applications/luci-app-alist/htdocs/luci-static/resources/view/alist/config.js index 25fde44075..c31aa7c497 100644 --- a/applications/luci-app-alist/htdocs/luci-static/resources/view/alist/config.js +++ b/applications/luci-app-alist/htdocs/luci-static/resources/view/alist/config.js @@ -8,7 +8,7 @@ 'require validation'; 'require view'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/overview.js b/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/overview.js index de74be676d..215eeb8ab8 100644 --- a/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/overview.js +++ b/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/overview.js @@ -4,7 +4,7 @@ 'require form'; 'require poll'; -var callApingerStatus = rpc.declare({ +const callApingerStatus = rpc.declare({ object: 'apinger', method: 'status', expect: { }, diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js index 110b241be9..08856611d8 100644 --- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js +++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js @@ -9,17 +9,17 @@ 'require dom'; 'require fs'; -let callPackagelist = rpc.declare({ +const callPackagelist = rpc.declare({ object: 'rpc-sys', method: 'packagelist', }); -let callSystemBoard = rpc.declare({ +const callSystemBoard = rpc.declare({ object: 'system', method: 'board', }); -let callUpgradeStart = rpc.declare({ +const callUpgradeStart = rpc.declare({ object: 'rpc-sys', method: 'upgrade_start', params: ['keep'], diff --git a/applications/luci-app-cloudflared/htdocs/luci-static/resources/view/cloudflared/config.js b/applications/luci-app-cloudflared/htdocs/luci-static/resources/view/cloudflared/config.js index 4ae395f054..b945228b1e 100644 --- a/applications/luci-app-cloudflared/htdocs/luci-static/resources/view/cloudflared/config.js +++ b/applications/luci-app-cloudflared/htdocs/luci-static/resources/view/cloudflared/config.js @@ -8,7 +8,7 @@ 'require rpc'; 'require view'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-example/YAML.md b/applications/luci-app-example/YAML.md index a97048a4d2..30b756d20c 100644 --- a/applications/luci-app-example/YAML.md +++ b/applications/luci-app-example/YAML.md @@ -63,7 +63,7 @@ These are the changes you need in the `rpc.js` file. Declare the RPC call ```js -var load_sample_yaml = rpc.declare({ +const load_sample_yaml = rpc.declare({ object: 'luci.example', method: 'get_yaml_file_sample' }); diff --git a/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-tablesection.js b/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-tablesection.js index 4a009782e4..c1ab606010 100644 --- a/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-tablesection.js +++ b/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-tablesection.js @@ -15,7 +15,7 @@ in that directory will be the value for the object key in the declared map. Permissions to make these calls must be granted in /usr/share/rpcd/acl.d via a file named the same as the application package name (luci-app-example) */ -var load_sample2 = rpc.declare({ +const load_sample2 = rpc.declare({ object: 'luci.example', method: 'get_sample2' }); diff --git a/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-typedsection.js b/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-typedsection.js index 58958054ac..5196f6645d 100644 --- a/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-typedsection.js +++ b/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc-jsonmap-typedsection.js @@ -15,7 +15,7 @@ in that directory will be the value for the object key in the declared map. Permissions to make these calls must be granted in /usr/share/rpcd/acl.d via a file named the same as the application package name (luci-app-example) */ -var load_sample2 = rpc.declare({ +const load_sample2 = rpc.declare({ object: 'luci.example', method: 'get_sample2' }); diff --git a/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc.js b/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc.js index cf5885b5a2..d04e1e66db 100644 --- a/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc.js +++ b/applications/luci-app-example/htdocs/luci-static/resources/view/example/rpc.js @@ -15,13 +15,13 @@ in that directory will be the value for the object key in the declared map. Permissions to make these calls must be granted in /usr/share/rpcd/acl.d via a file named the same as the application package name (luci-app-example) */ -var load_sample1 = rpc.declare({ +const load_sample1 = rpc.declare({ object: 'luci.example', method: 'get_sample1' }); // Out of the box, this one will be blocked by the framework because there is // no ACL granting permission. -var load_sample3 = rpc.declare({ +const load_sample3 = rpc.declare({ object: 'luci.example', method: 'get_sample3' }); diff --git a/applications/luci-app-frpc/htdocs/luci-static/resources/view/frpc.js b/applications/luci-app-frpc/htdocs/luci-static/resources/view/frpc.js index a0fb34beb6..c3207e517f 100644 --- a/applications/luci-app-frpc/htdocs/luci-static/resources/view/frpc.js +++ b/applications/luci-app-frpc/htdocs/luci-static/resources/view/frpc.js @@ -138,7 +138,7 @@ function defOpts(s, opts, params) { } } -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-frps/htdocs/luci-static/resources/view/frps.js b/applications/luci-app-frps/htdocs/luci-static/resources/view/frps.js index 27136134f4..6b408cb303 100644 --- a/applications/luci-app-frps/htdocs/luci-static/resources/view/frps.js +++ b/applications/luci-app-frps/htdocs/luci-static/resources/view/frps.js @@ -91,7 +91,7 @@ function defOpts(s, opts, params) { } } -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js b/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js index 37675c5b83..4705390d49 100644 --- a/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js +++ b/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js @@ -43,37 +43,37 @@ var pkg = { }, }; -var getInitList = rpc.declare({ +const getInitList = rpc.declare({ object: "luci." + pkg.Name, method: "getInitList", params: ["name"], }); -var getInitStatus = rpc.declare({ +const getInitStatus = rpc.declare({ object: "luci." + pkg.Name, method: "getInitStatus", params: ["name"], }); -var getPlatformSupport = rpc.declare({ +const getPlatformSupport = rpc.declare({ object: "luci." + pkg.Name, method: "getPlatformSupport", params: ["name"], }); -var getProviders = rpc.declare({ +const getProviders = rpc.declare({ object: "luci." + pkg.Name, method: "getProviders", params: ["name"], }); -var getRuntime = rpc.declare({ +const getRuntime = rpc.declare({ object: "luci." + pkg.Name, method: "getRuntime", params: ["name"], }); -var _setInitAction = rpc.declare({ +const _setInitAction = rpc.declare({ object: "luci." + pkg.Name, method: "setInitAction", params: ["name", "action"], diff --git a/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/overview.js b/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/overview.js index 7126d5938d..943d9ac732 100644 --- a/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/overview.js +++ b/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/overview.js @@ -5,7 +5,7 @@ 'require rpc'; 'require poll'; -var callKeepalivedStatus = rpc.declare({ +const callKeepalivedStatus = rpc.declare({ object: 'keepalived', method: 'dump', expect: { }, diff --git a/applications/luci-app-keepalived/htdocs/luci-static/resources/view/status/include/35_keepalived.js b/applications/luci-app-keepalived/htdocs/luci-static/resources/view/status/include/35_keepalived.js index 4f47d14980..cf870ece92 100644 --- a/applications/luci-app-keepalived/htdocs/luci-static/resources/view/status/include/35_keepalived.js +++ b/applications/luci-app-keepalived/htdocs/luci-static/resources/view/status/include/35_keepalived.js @@ -3,7 +3,7 @@ 'require uci'; 'require rpc'; -var callKeepalivedStatus = rpc.declare({ +const callKeepalivedStatus = rpc.declare({ object: 'keepalived', method: 'dump', expect: { }, diff --git a/applications/luci-app-ledtrig-usbport/htdocs/luci-static/resources/view/system/led-trigger/usbport.js b/applications/luci-app-ledtrig-usbport/htdocs/luci-static/resources/view/system/led-trigger/usbport.js index 7491b71236..8e05c30bb4 100644 --- a/applications/luci-app-ledtrig-usbport/htdocs/luci-static/resources/view/system/led-trigger/usbport.js +++ b/applications/luci-app-ledtrig-usbport/htdocs/luci-static/resources/view/system/led-trigger/usbport.js @@ -4,7 +4,7 @@ 'require uci'; 'require form'; -var callUSB = rpc.declare({ +const callUSB = rpc.declare({ object: 'luci', method: 'getUSBDevices', expect: { 'ports': [] } diff --git a/applications/luci-app-libreswan/htdocs/luci-static/resources/view/libreswan/overview.js b/applications/luci-app-libreswan/htdocs/luci-static/resources/view/libreswan/overview.js index 399e55af97..970b85872a 100644 --- a/applications/luci-app-libreswan/htdocs/luci-static/resources/view/libreswan/overview.js +++ b/applications/luci-app-libreswan/htdocs/luci-static/resources/view/libreswan/overview.js @@ -4,7 +4,7 @@ 'require form'; 'require poll'; -var callLibreswanStatus = rpc.declare({ +const callLibreswanStatus = rpc.declare({ object: 'libreswan', method: 'status', expect: { }, diff --git a/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/config.js b/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/config.js index a0f3bd1265..32f18035bc 100644 --- a/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/config.js +++ b/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/config.js @@ -13,7 +13,7 @@ 'require uci'; 'require tools.widgets as widgets'; -var callInitList = rpc.declare({ +const callInitList = rpc.declare({ object: 'luci', method: 'getInitList', params: [ 'name' ], @@ -25,7 +25,7 @@ var callInitList = rpc.declare({ } }); -var callInitAction = rpc.declare({ +const callInitAction = rpc.declare({ object: 'luci', method: 'setInitAction', params: [ 'name', 'action' ], diff --git a/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js b/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js index 05d8f6e2a2..d087653b53 100644 --- a/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js +++ b/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js @@ -12,7 +12,7 @@ 'require dom'; 'require poll'; -var callLLDPStatus = rpc.declare({ +const callLLDPStatus = rpc.declare({ object: 'luci.lldpd', method: 'getStatus', expect: {} diff --git a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js index c60ac7afa2..a0261544d7 100644 --- a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js +++ b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js @@ -3,7 +3,7 @@ 'require view'; 'require rpc'; -var callMwan3Status = rpc.declare({ +const callMwan3Status = rpc.declare({ object: 'mwan3', method: 'status', expect: { }, diff --git a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js index 0fc11550e9..c5b1cb4c0b 100644 --- a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js +++ b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js @@ -2,7 +2,7 @@ 'require baseclass'; 'require rpc'; -var callMwan3Status = rpc.declare({ +const callMwan3Status = rpc.declare({ object: 'mwan3', method: 'status', expect: { }, diff --git a/applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js b/applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js index e837fbf2a9..49349437ad 100644 --- a/applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js +++ b/applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js @@ -5,7 +5,7 @@ 'require view'; 'require tools.widgets as widgets'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js b/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js index dcb2c4e707..650ee460a4 100644 --- a/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js +++ b/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js @@ -7,7 +7,7 @@ 'require rpc'; 'require dom'; -var callNetworkRrdnsLookup = rpc.declare({ +const callNetworkRrdnsLookup = rpc.declare({ object: 'network.rrdns', method: 'lookup', params: [ 'addrs', 'timeout', 'limit' ], diff --git a/applications/luci-app-olsr-services/htdocs/luci-static/resources/view/freifunk-services/services.js b/applications/luci-app-olsr-services/htdocs/luci-static/resources/view/freifunk-services/services.js index 57bd83d93f..74800dfc77 100644 --- a/applications/luci-app-olsr-services/htdocs/luci-static/resources/view/freifunk-services/services.js +++ b/applications/luci-app-olsr-services/htdocs/luci-static/resources/view/freifunk-services/services.js @@ -3,13 +3,13 @@ 'require view'; 'require poll'; -var getOlsrd4Services = rpc.declare({ +const getOlsrd4Services = rpc.declare({ object: 'olsr-services', method: 'services4', expect: {} }); -var getOlsrd6Services = rpc.declare({ +const getOlsrd6Services = rpc.declare({ object: 'olsr-services', method: 'services6', expect: {} diff --git a/applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js b/applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js index d79ee985c9..007d202c24 100644 --- a/applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js +++ b/applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js @@ -87,7 +87,7 @@ var css = ' \ var isReadonlyView = !L.hasViewPermission() || null; -var callMountPoints = rpc.declare({ +const callMountPoints = rpc.declare({ object: 'luci', method: 'getMountPoints', expect: { result: [] } diff --git a/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js b/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js index 09f746eaa9..19c66ab58d 100644 --- a/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js +++ b/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js @@ -32,37 +32,37 @@ var pkg = { }, }; -var getGateways = rpc.declare({ +const getGateways = rpc.declare({ object: "luci." + pkg.Name, method: "getGateways", params: ["name"], }); -var getInitList = rpc.declare({ +const getInitList = rpc.declare({ object: "luci." + pkg.Name, method: "getInitList", params: ["name"], }); -var getInitStatus = rpc.declare({ +const getInitStatus = rpc.declare({ object: "luci." + pkg.Name, method: "getInitStatus", params: ["name"], }); -var getInterfaces = rpc.declare({ +const getInterfaces = rpc.declare({ object: "luci." + pkg.Name, method: "getInterfaces", params: ["name"], }); -var getPlatformSupport = rpc.declare({ +const getPlatformSupport = rpc.declare({ object: "luci." + pkg.Name, method: "getPlatformSupport", params: ["name"], }); -var _setInitAction = rpc.declare({ +const _setInitAction = rpc.declare({ object: "luci." + pkg.Name, method: "setInitAction", params: ["name", "action"], diff --git a/applications/luci-app-qos/htdocs/luci-static/resources/view/qos/qos.js b/applications/luci-app-qos/htdocs/luci-static/resources/view/qos/qos.js index 7fe08484d4..4f679c0564 100644 --- a/applications/luci-app-qos/htdocs/luci-static/resources/view/qos/qos.js +++ b/applications/luci-app-qos/htdocs/luci-static/resources/view/qos/qos.js @@ -5,7 +5,7 @@ 'require tools.widgets as widgets'; 'require view'; -var callHostHints = rpc.declare({ +const callHostHints = rpc.declare({ object: 'luci-rpc', method: 'getHostHints', expect: { '': {} } diff --git a/applications/luci-app-smartdns/htdocs/luci-static/resources/view/smartdns/smartdns.js b/applications/luci-app-smartdns/htdocs/luci-static/resources/view/smartdns/smartdns.js index 191e57e58d..37f63fcc6a 100644 --- a/applications/luci-app-smartdns/htdocs/luci-static/resources/view/smartdns/smartdns.js +++ b/applications/luci-app-smartdns/htdocs/luci-static/resources/view/smartdns/smartdns.js @@ -27,7 +27,7 @@ 'require ui'; var conf = 'smartdns'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-squid/htdocs/luci-static/resources/view/squid.js b/applications/luci-app-squid/htdocs/luci-static/resources/view/squid.js index a89c61f7b8..8688cc4134 100644 --- a/applications/luci-app-squid/htdocs/luci-static/resources/view/squid.js +++ b/applications/luci-app-squid/htdocs/luci-static/resources/view/squid.js @@ -6,7 +6,7 @@ 'require uci'; 'require view'; -var getCompileTimeOptions = rpc.declare({ +const getCompileTimeOptions = rpc.declare({ object: 'luci.squid', method: 'getCompileTimeOptions', expect: { options: [] } diff --git a/applications/luci-app-tor/htdocs/luci-static/resources/view/tor/tor-hs.js b/applications/luci-app-tor/htdocs/luci-static/resources/view/tor/tor-hs.js index ef8368ec1c..8007fe518c 100644 --- a/applications/luci-app-tor/htdocs/luci-static/resources/view/tor/tor-hs.js +++ b/applications/luci-app-tor/htdocs/luci-static/resources/view/tor/tor-hs.js @@ -4,7 +4,7 @@ 'require rpc'; 'require uci'; -var callTorHsList = rpc.declare({ +const callTorHsList = rpc.declare({ object: 'tor-hs-rpc', method: 'list-hs', }); diff --git a/applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js b/applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js index 0ba84a9b52..87583b9122 100644 --- a/applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js +++ b/applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js @@ -6,7 +6,7 @@ 'require form'; 'require tools.widgets as widgets'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: [ 'name' ], diff --git a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js index 77d9152ecd..bc5ebce8ab 100644 --- a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js +++ b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js @@ -170,7 +170,7 @@ function collectWlanAPInfos(compactconnectioninfo_table_entries, wlanAPInfos) { } }; -var callNetworkRrdnsLookup = rpc.declare({ +const callNetworkRrdnsLookup = rpc.declare({ object: 'network.rrdns', method: 'lookup', params: [ 'addrs', 'timeout', 'limit' ], diff --git a/applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js b/applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js index 577d0eee39..27dece5414 100644 --- a/applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js +++ b/applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js @@ -5,7 +5,7 @@ 'require uci'; 'require view'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], diff --git a/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js b/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js index 7113c4119e..d546309f0e 100644 --- a/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js +++ b/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js @@ -11,7 +11,7 @@ var RefreshIfaces = ""; var RefreshTabs = ['s', 't', '5', 'h', 'd', 'm', 'y']; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: [ 'name' ], diff --git a/applications/luci-app-xfrpc/htdocs/luci-static/resources/view/xfrpc.js b/applications/luci-app-xfrpc/htdocs/luci-static/resources/view/xfrpc.js index 97154f045f..a523dc2548 100644 --- a/applications/luci-app-xfrpc/htdocs/luci-static/resources/view/xfrpc.js +++ b/applications/luci-app-xfrpc/htdocs/luci-static/resources/view/xfrpc.js @@ -5,7 +5,7 @@ 'require rpc'; 'require tools.widgets as widgets'; -var callServiceList = rpc.declare({ +const callServiceList = rpc.declare({ object: 'service', method: 'list', params: ['name'], -- 2.30.2