luci-base: rpc.js: add ability to reject nonzero ubus statuses
authorJo-Philipp Wich <jo@mein.io>
Fri, 10 Apr 2020 20:50:41 +0000 (22:50 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
commita149076a3d8aa4cc8bdf37237f8c8bf238c31c78
treedba8c342c359a454edf1e87911ccbef42b0ac3d8
parent0633974a269e866430a479bcc5f55da94a5cee8a
luci-base: rpc.js: add ability to reject nonzero ubus statuses

Add a new declare option `reject` which makes the generated RPC call
function reject with an error in case the remote ubus call returned
a non-zero status.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bd713f870a974d46b214d07d85ac4a895d85a122)
modules/luci-base/htdocs/luci-static/resources/rpc.js