summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs/luci-static/resources/view
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-08-09 15:32:16 +0200
committerFlorian Eckert <fe@dev.tdt.de>2021-09-03 13:17:24 +0200
commit4e29821a4ef2c599176368528217de53b154b4a1 (patch)
tree3ecaa0f9934b65c1b1d17de7a6f88b3c5d1335f9 /modules/luci-mod-status/htdocs/luci-static/resources/view
parent9b7cf08c0e585b08f2c4daf546c9ad839b084bf3 (diff)
luci-mod-status: set default value if no route records found
If no entries for the status tables are available. Then add the following default entry 'No entries available' This looks better, because not only the table header is displayed. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static/resources/view')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js24
1 files changed, 18 insertions, 6 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js
index 27a5bdf90d..9b9b06e223 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js
@@ -225,12 +225,24 @@ return view.extend({
])
]);
- cbi_update_table(neigh4tbl, this.parseNeigh(ip4neigh, networks, false));
- cbi_update_table(route4tbl, this.parseRoute(ip4route, networks, false));
- cbi_update_table(rule4tbl, this.parseRule(ip4rule, networks, false));
- cbi_update_table(neigh6tbl, this.parseNeigh(ip6neigh, networks, true));
- cbi_update_table(route6tbl, this.parseRoute(ip6route, networks, true));
- cbi_update_table(rule6tbl, this.parseRule(ip6rule, networks, false));
+ cbi_update_table(neigh4tbl, this.parseNeigh(ip4neigh, networks, false),
+ E('em', _('No entries available'))
+ );
+ cbi_update_table(route4tbl, this.parseRoute(ip4route, networks, false),
+ E('em', _('No entries available'))
+ );
+ cbi_update_table(rule4tbl, this.parseRule(ip4rule, networks, false),
+ E('em', _('No entries available'))
+ );
+ cbi_update_table(neigh6tbl, this.parseNeigh(ip6neigh, networks, true),
+ E('em', _('No entries available'))
+ );
+ cbi_update_table(route6tbl, this.parseRoute(ip6route, networks, true),
+ E('em', _('No entries available'))
+ );
+ cbi_update_table(rule6tbl, this.parseRule(ip6rule, networks, false),
+ E('em', _('No entries available'))
+ );
var view = E([], [
E('h2', {}, [ _('Routing') ]),