You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/05/01 19:30:53 UTC
git commit: AMBARI-5643. Add Services is disabled after upgrading the
stack from HDP-2.0 to HDP-2.1. (jaimin)
Repository: ambari
Updated Branches:
refs/heads/trunk 84c101fa5 -> b0d850eb9
AMBARI-5643. Add Services is disabled after upgrading the stack from HDP-2.0 to HDP-2.1. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0d850eb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0d850eb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0d850eb
Branch: refs/heads/trunk
Commit: b0d850eb91b50eacdcc715223747df6c961ddaba
Parents: 84c101f
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu May 1 10:28:36 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu May 1 10:28:36 2014 -0700
----------------------------------------------------------------------
ambari-web/app/controllers/main/service.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b0d850eb/ambari-web/app/controllers/main/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service.js b/ambari-web/app/controllers/main/service.js
index df8c9f7..05884ac 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -20,6 +20,7 @@ var App = require('app');
App.MainServiceController = Em.ArrayController.extend({
name:'mainServiceController',
+ stackServices: [],
content: function(){
if(!App.router.get('clusterController.isLoaded')){
return [];
@@ -36,15 +37,14 @@ App.MainServiceController = Em.ArrayController.extend({
isAllServicesInstalled: function() {
if (!this.get('content.content')) return false;
- var availableServices = App.db.getServices();
- if (!availableServices) {
+ if (!this.get('stackServices').length) {
this.loadAvailableServices();
- availableServices = App.db.getServices();
}
if (!App.supports.hue) {
- availableServices = availableServices.without('HUE');
+ var stackServices = this.get('stackServices').without('HUE');
+ this.set('stackServices',stackServices);
}
- return this.get('content.content').length == availableServices.length;
+ return this.get('content.content').length == this.get('stackServices').length;
}.property('content.content.@each', 'content.content.length'),
loadAvailableServices: function() {
@@ -68,7 +68,7 @@ App.MainServiceController = Em.ArrayController.extend({
data.push(entry.StackServices.service_name);
}
}
- App.db.setServices(data);
+ this.set('stackServices',data);
},
isStartAllDisabled: function(){