<feed xmlns='http://www.w3.org/2005/Atom'>
<title>luci/modules/luci-base/htdocs/luci-static/resources/rpc.js, branch es6</title>
<subtitle>LuCI - OpenWrt Configuration Interface</subtitle>
<id>http://x-nagi.com/cgit/luci/atom?h=es6</id>
<link rel='self' href='http://x-nagi.com/cgit/luci/atom?h=es6'/>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/'/>
<updated>2023-09-26T07:36:25Z</updated>
<entry>
<title>luci-base: convert JavaScript code to ES6 style</title>
<updated>2023-09-26T07:36:25Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2023-08-31T15:03:49Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=4c7a3925b83d45e61cb7610614cb8b04705d1ec5'/>
<id>urn:sha1:4c7a3925b83d45e61cb7610614cb8b04705d1ec5</id>
<content type='text'>
Convert existing JavaScript code in LuCI base to utilize ES6 standard
features such as spread arguments, arrow functions, object method
declarations etc.

This makes the code somewhat easier to follow and slightly smaller.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: Fix typos in JsDocs</title>
<updated>2023-09-23T07:39:34Z</updated>
<author>
<name>Sergey Ponomarev</name>
<email>stokito@gmail.com</email>
</author>
<published>2023-09-23T07:39:34Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=7744ad0075bda689346a3868f36a57c8b53b23c8'/>
<id>urn:sha1:7744ad0075bda689346a3868f36a57c8b53b23c8</id>
<content type='text'>
In some places argument name was renamed but in the JsDoc it's remain old.

Added more typing for string enum fields like:

 @param {string} [type=text]

replaced with:

 @param {"blob"|"text"|"blob"} [type=text]

Signed-off-by: Sergey Ponomarev &lt;stokito@gmail.com&gt;
</content>
</entry>
<entry>
<title>luci-base: don't append object.method to the RPC url</title>
<updated>2020-09-23T14:54:18Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2020-09-23T11:57:30Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=b17ec0926d9519da7d5cd22a60c05c93bcc8292c'/>
<id>urn:sha1:b17ec0926d9519da7d5cd22a60c05c93bcc8292c</id>
<content type='text'>
It was a cosmetic feature that doesn't work anymore with the latest
uhttpd ubus API. Adding RESTful API resulted in treating URL part
following the /ubus/ as the new API request.

Suggested-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Fixes: #4465
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: rpc.js: add ability to reject nonzero ubus statuses</title>
<updated>2020-04-10T20:50:41Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2020-04-10T20:50:41Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=bd713f870a974d46b214d07d85ac4a895d85a122'/>
<id>urn:sha1:bd713f870a974d46b214d07d85ac4a895d85a122</id>
<content type='text'>
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 &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: harmonize JS class naming and requesting</title>
<updated>2020-04-02T19:51:20Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2020-04-02T19:40:50Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=711f75927849fade74f79e4b198b3a839d9d4fbc'/>
<id>urn:sha1:711f75927849fade74f79e4b198b3a839d9d4fbc</id>
<content type='text'>
 - Make builtin classes available via `require` to allow view code to
   request external and internal classes in a consistent manner without
   having to know which classes are builtin and which not

 - Make base classes request any used class explicitely instead of
   relying on implicitly set up L.{dom,view,Poll,Request,Class} aliases

 - Consistently convert class names to lower case in JSdoc to match
   the names used in `require` statements

 - Deprecate L.{dom,view,Poll,Request,Class} aliases

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: luci.js, rpc.js, uci.js, network.js: add JSDoc annotations</title>
<updated>2019-10-02T06:59:41Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2019-10-02T06:59:00Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=b2809cebd8009e7a68e2ad7da95b6335e1e9527b'/>
<id>urn:sha1:b2809cebd8009e7a68e2ad7da95b6335e1e9527b</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: rpc.js: increase default timeout to 20s, allow batch prevention</title>
<updated>2019-09-21T08:23:37Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2019-09-21T08:21:15Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=21d1266c53d07f02c3b24314c62e86f2fa82fe9b'/>
<id>urn:sha1:21d1266c53d07f02c3b24314c62e86f2fa82fe9b</id>
<content type='text'>
Support a new option "nobatch: true" in rpc.declare() which prevents the
underlying RPC call from being batched with other calls.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: rpc.js: fix list requests, handle aborted http requests</title>
<updated>2019-09-12T12:02:06Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2019-09-12T12:02:06Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=473bd2741bd9c57ab5e6c73671138df8f99792fe'/>
<id>urn:sha1:473bd2741bd9c57ab5e6c73671138df8f99792fe</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: rpc.js: revamp error handling, add interceptor support</title>
<updated>2019-09-11T07:25:11Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2019-09-11T07:25:11Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=f141433f5e38153e9dfbb8b320dfa70db1a47cf2'/>
<id>urn:sha1:f141433f5e38153e9dfbb8b320dfa70db1a47cf2</id>
<content type='text'>
Add two new functions L.rpc.addInterceptor() and L.rpc.removeInterceptor()
which allow to register and remove interceptor functions which are invoked
before the rpc reply result promise is fulfilled.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: rpc.js: add getStatusText() call</title>
<updated>2019-09-10T13:28:16Z</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2019-09-03T17:17:20Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/luci/commit/?id=aef4bc3a23529425b8036be2baed4327efaf85bb'/>
<id>urn:sha1:aef4bc3a23529425b8036be2baed4327efaf85bb</id>
<content type='text'>
The new function allows translating an ubus return code into a human
readable error message.

Also report the called object and method on ubus rpc errors.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
