Pārlūkot izejas kodu

HUE-8758 [ui] Base sidebar home link properties with cluster config API

Romain 6 gadi atpakaļ
vecāks
revīzija
d84d04110f

+ 10 - 8
desktop/core/src/desktop/js/ko/components/ko.sidebar.js

@@ -312,14 +312,16 @@ class Sidebar {
         }
 
         const browserItems = [];
-        browserItems.push(
-          new SidebarItem({
-            displayName: I18n('Documents'),
-            url: '/home/',
-            icon: 'documents',
-            type: 'home'
-          })
-        );
+        if (appConfig['home']) {
+          browserItems.push(
+            new SidebarItem({
+              displayName: appConfig['home']['buttonName'],
+              url: appConfig['home']['page'],
+              icon: 'documents',
+              type: appConfig['home']['name']
+            })
+          );
+        }
         if (appConfig['browser'] && appConfig['browser']['interpreters']) {
           appConfig['browser']['interpreters'].forEach(browser => {
             browserItems.push(