diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-18 19:57:00 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-18 23:25:22 +0200 |
commit | a0db2abea3ceae24f376af31ffb7ca5e76d19da6 (patch) | |
tree | d98bf268fe29be77463b7a9eeef1c41f97d5196c | |
parent | 44ee2235711a7d46952e46b7c3b276260ab350e3 (diff) |
luci-mod-status: index.js: skip includes which failed loading
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js index 15dcbe638..da08ec12c 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js @@ -10,7 +10,10 @@ function invokeIncludesLoad(includes) { for (var i = 0; i < includes.length; i++) { if (typeof(includes[i].load) == 'function') { - tasks.push(includes[i].load()); + tasks.push(includes[i].load().catch(L.bind(function() { + this.failed = true; + }, includes[i]))); + has_load = true; } else { @@ -29,6 +32,9 @@ function startPolling(includes, containers) { for (var i = 0; i < includes.length; i++) { var content = null; + if (includes[i].failed) + continue; + if (typeof(includes[i].render) == 'function') content = includes[i].render(results ? results[i] : null); else if (includes[i].content != null) |