Sfoglia il codice sorgente

AMBARI-5558 Navigating back from Host page to Heatmaps page is broken. (Buzhor Denys via ababiichuk)

aBabiichuk 11 anni fa
parent
commit
2947c7adaa
2 ha cambiato i file con 3 aggiunte e 15 eliminazioni
  1. 0 10
      ambari-web/app/routes/main.js
  2. 3 5
      ambari-web/app/views/main/dashboard.js

+ 0 - 10
ambari-web/app/routes/main.js

@@ -85,11 +85,6 @@ module.exports = Em.Route.extend({
     connectOutlets: function (router, context) {
       router.get('mainController').connectOutlet('mainDashboard');
     },
-    enter: function (router) {
-      Em.run.next(function () {
-        router.transitionTo('widgets');
-      });
-    },
     index: Em.Route.extend({
       route: '/',
       redirectsTo: 'widgets'
@@ -111,11 +106,6 @@ module.exports = Em.Route.extend({
         router.set('mainDashboardController.selectedCategory', 'charts');
         router.get('mainDashboardController').connectOutlet('mainCharts');
       },
-      enter: function (router) {
-        Em.run.next(function () {
-          router.transitionTo('heatmap');
-        });
-      },
       index: Ember.Route.extend({
         route: '/',
         redirectsTo: 'heatmap'

+ 3 - 5
ambari-web/app/views/main/dashboard.js

@@ -27,19 +27,17 @@ App.MainDashboardView = Em.View.extend({
   categories: function() {
     var items = [{
       name: 'widgets',
-      url: 'dashboard.index',
+      url: 'dashboard.widgets',
       label: Em.I18n.t('dashboard.widgets.title'),
       isActive: function () {
-        debugger;
         return 'widgets' === this.get('selected');
       }.property('selected')
     },
     {
       name: 'charts',
-      url: 'dashboard.charts',
+      url: 'dashboard.charts.heatmap',
       label: Em.I18n.t('dashboard.heatmaps.title'),
       isActive: function () {
-        debugger;
         return 'charts' === this.get('selected');
       }.property('selected')
     }];
@@ -52,4 +50,4 @@ App.MainDashboardView = Em.View.extend({
       return this.get('item') === this.get('parentView.selected');
     }.property('item', 'parentView.selected')
   })
-});
+});