ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: Revert "AMBARI-14085 Services loaded in model unsorted. (atkach)"
Date Mon, 21 Dec 2015 22:35:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ea195cb28 -> 9a591a5e2


Revert "AMBARI-14085 Services loaded in model unsorted. (atkach)"

This reverts commit 54fa239e20d5f8ed723b448602bccfcc6cfd64c0.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a591a5e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a591a5e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a591a5e

Branch: refs/heads/trunk
Commit: 9a591a5e2642f44d652c82b8415f36e59bc66149
Parents: ea195cb
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Dec 21 14:29:11 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Dec 21 14:34:04 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/mappers/service_mapper.js  |  2 --
 ambari-web/app/views/main/service/menu.js | 12 ++++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9a591a5e/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index 9c21789..e62ab33 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -16,7 +16,6 @@
  */
 
 var App = require('app');
-var misc = require('utils/misc');
 
 App.serviceMapper = App.QuickDataMapper.create({
   model: App.Service,
@@ -56,7 +55,6 @@ App.serviceMapper = App.QuickDataMapper.create({
         App.serviceMetricsMapper.mapExtendedModel(item);
         return self.parseIt(item, self.get('config'));
       });
-      parsedCacheServices = misc.sortByOrder(App.StackService.find().mapProperty('serviceName'),
parsedCacheServices);
       App.store.loadMany(this.get('model'), parsedCacheServices);
       App.store.commit();
       this.set('initialAppLoad', true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a591a5e/ambari-web/app/views/main/service/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/menu.js b/ambari-web/app/views/main/service/menu.js
index e70dea2..524fde3 100644
--- a/ambari-web/app/views/main/service/menu.js
+++ b/ambari-web/app/views/main/service/menu.js
@@ -22,10 +22,12 @@ var misc = require('utils/misc');
 App.MainServiceMenuView = Em.CollectionView.extend({
   disabledServices: [],
 
-  content: function () {
-    return App.router.get('mainServiceController.content').filter(function(item){
+  content:function () {
+    var items = App.router.get('mainServiceController.content').filter(function(item){
       return !this.get('disabledServices').contains(item.get('id'));
     }, this);
+    var stackServices = App.StackService.find().mapProperty('serviceName');
+    return misc.sortByOrder(stackServices, items);
   }.property('App.router.mainServiceController.content', 'App.router.mainServiceController.content.length'),
 
   didInsertElement:function () {
@@ -122,10 +124,12 @@ App.MainServiceMenuView = Em.CollectionView.extend({
 App.TopNavServiceMenuView = Em.CollectionView.extend({
   disabledServices: [],
 
-  content: function () {
-    return App.router.get('mainServiceController.content').filter(function (item) {
+  content:function () {
+    var items = App.router.get('mainServiceController.content').filter(function(item){
       return !this.get('disabledServices').contains(item.get('id'));
     }, this);
+    var stackServices = App.StackService.find().mapProperty('serviceName');
+    return misc.sortByOrder(stackServices, items);
   }.property('App.router.mainServiceController.content', 'App.router.mainServiceController.content.length'),
 
   didInsertElement:function () {


Mime
View raw message