summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-10 22:52:52 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-10 22:52:52 +0200
commit65d28a4ac92a4806b5ad836a2dbbe8bc4e87207b (patch)
treef334dbffa83fe37d717e27df443dd22164e01d7a /modules/luci-base/htdocs/luci-static
parentbd713f870a974d46b214d07d85ac4a895d85a122 (diff)
luci-base: uci.js: let internal RPC functions reject on errors
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/uci.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/uci.js b/modules/luci-base/htdocs/luci-static/resources/uci.js
index f381e0b649..adec6fb88d 100644
--- a/modules/luci-base/htdocs/luci-static/resources/uci.js
+++ b/modules/luci-base/htdocs/luci-static/resources/uci.js
@@ -31,44 +31,50 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ {
object: 'uci',
method: 'get',
params: [ 'config' ],
- expect: { values: { } }
+ expect: { values: { } },
+ reject: true
}),
-
callOrder: rpc.declare({
object: 'uci',
method: 'order',
- params: [ 'config', 'sections' ]
+ params: [ 'config', 'sections' ],
+ reject: true
}),
callAdd: rpc.declare({
object: 'uci',
method: 'add',
params: [ 'config', 'type', 'name', 'values' ],
- expect: { section: '' }
+ expect: { section: '' },
+ reject: true
}),
callSet: rpc.declare({
object: 'uci',
method: 'set',
- params: [ 'config', 'section', 'values' ]
+ params: [ 'config', 'section', 'values' ],
+ reject: true
}),
callDelete: rpc.declare({
object: 'uci',
method: 'delete',
- params: [ 'config', 'section', 'options' ]
+ params: [ 'config', 'section', 'options' ],
+ reject: true
}),
callApply: rpc.declare({
object: 'uci',
method: 'apply',
- params: [ 'timeout', 'rollback' ]
+ params: [ 'timeout', 'rollback' ],
+ reject: true
}),
callConfirm: rpc.declare({
object: 'uci',
- method: 'confirm'
+ method: 'confirm',
+ reject: true
}),