luci-mod-status: disable DSL status if not present
authorJo-Philipp Wich <jo@mein.io>
Thu, 28 Oct 2021 12:46:27 +0000 (14:46 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 28 Oct 2021 12:46:27 +0000 (14:46 +0200)
Fixes: #5465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js

index 714086f0d7ce878d74db34b590606be8509d6e61..ed47758f4fd0a7df91ccb2cd0727964bdc72e701 100644 (file)
@@ -44,6 +44,9 @@ return baseclass.extend({
        title: _('DSL'),
 
        load: function() {
+               if (!L.hasSystemFeature('dsl'))
+                       return Promise.reject();
+
                return L.resolveDefault(callDSLMetrics(), {});
        },