瀏覽代碼

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

Romain 6 年之前
父節點
當前提交
d84d04110f
共有 1 個文件被更改,包括 10 次插入8 次删除
  1. 10 8
      desktop/core/src/desktop/js/ko/components/ko.sidebar.js

+ 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(