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>
Fri, 3 Apr 2020 11:27:20 +0000 (13:27 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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%>