projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d07235
)
luci-base: form.js: allow secondary configs to fail loading
author
Jo-Philipp Wich
<jo@mein.io>
Tue, 28 Apr 2020 07:46:22 +0000
(09:46 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000
(19:40 +0200)
Ref: https://forum.openwrt.org/t/luci-rpc-error/61760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit
17ffc84a2903c2354543cd0fb575a82e36e076fd
)
modules/luci-base/htdocs/luci-static/resources/form.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/form.js
b/modules/luci-base/htdocs/luci-static/resources/form.js
index 01c9ba8cdf7f93e6c0d1d89f32bc3567ac981ac5..c1331fb34593e220a4efda01cebc27f1b81ca485 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/form.js
@@
-520,8
+520,16
@@
var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
* an error.
*/
load: function() {
- return this.data.load(this.parsechain || [ this.config ])
- .then(this.loadChildren.bind(this));
+ var loadTasks = [],
+ configs = this.parsechain || [ this.config ];
+
+ loadTasks.push.apply(loadTasks, configs.map(L.bind(function(config, i) {
+ return i ? L.resolveDefault(this.data.load(config)) : this.data.load(config);
+ }, this)));
+
+ return Promise.all(loadTasks).then(L.bind(function(res) {
+ return this.loadChildren();
+ }, this));
},
/**