Преглед изворни кода

HUE-6077 [frontend] Linked editor list to parametrized home

Enrico Berti пре 8 година
родитељ
комит
44d008d

+ 3 - 0
desktop/core/src/desktop/templates/hue.mako

@@ -777,6 +777,9 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
           { url: '/notebook/editor', app: function (ctx) {
             page('/notebook?' + ctx.querystring);
           }},
+          { url: '/notebook/notebooks', app: function (ctx) {
+            page('/home?' + ctx.querystring);
+          }},
           { url: '/oozie/editor/bundle/*', app: 'oozie_bundle' },
           { url: '/oozie/editor/coordinator/*', app: 'oozie_coordinator' },
           { url: '/oozie/editor/workflow/*', app: 'oozie_workflow' },

+ 2 - 2
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -266,7 +266,7 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
         </a>
         <!-- /ko -->
 
-        <a class="btn" data-bind="attr: { 'href': '${ url('notebook:notebooks') }?type=' + editorType(), 'title':  editorMode() ? '${ _('Queries') }' : '${ _('Notebooks') }'  }" rel="tooltip" data-placement="bottom">
+        <a class="btn" data-bind="hueLink: '${ url('notebook:notebooks') }?type=' + editorType(), attr: { 'title':  editorMode() ? '${ _('Queries') }' : '${ _('Notebooks') }'  }" rel="tooltip" data-placement="bottom">
           <i class="fa fa-tags"></i>
         </a>
 
@@ -279,7 +279,7 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
         <ul class="nav editor-nav">
           <li class="app-header">
             <!-- ko if: editorMode -->
-              <a data-bind="attr: { href: '${ url('notebook:editor') }?type=' + editorType(), title: editorTypeTitle() + '${ _(' Editor') }' }" style="cursor: pointer">
+              <a data-bind="hueLink: '${ url('notebook:editor') }?type=' + editorType(), attr: { 'title': editorTypeTitle() + '${ _(' Editor') }'}" style="cursor: pointer">
               <!-- ko template: { name: 'app-icon-template', data: { icon: editorType() } } --><!-- /ko -->
               <!-- ko if: editorType() == 'impala' -->
                 Impala