luci-mod-status: use LuCI.ui.instantiateView() to load index view
authorJo-Philipp Wich <jo@mein.io>
Fri, 3 Apr 2020 11:27:20 +0000 (13:27 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f9d61213fbfde66ffc6f8ca0e112d6445c6c4695)

modules/luci-mod-status/luasrc/view/admin_status/index.htm

index 8e00564da4985b27dd230620c22c120793b268a7..7d7a42c2e354c2eca25ba24e7759d33bcac83db3 100644 (file)
@@ -69,9 +69,10 @@ function renderBadge(icon, title) {
 -%>
 </div>
 
-<script type="text/javascript">L.require('view.status.index').catch(function(err) {
-       dom.content(document.querySelector('#view'), null);
-       L.error(err);
-});</script>
+<script type="text/javascript">
+       L.require('ui').then(function(ui) {
+               ui.instantiateView('status/index');
+       });
+</script>
 
 <%+footer%>