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>
Tue, 15 Feb 2022 23:36:09 +0000 (00:36 +0100)
Fixes: #5465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0ad54e4a7ca8f9b526442954b12a6b04e5c7403c)

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(), {});
        },