ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [32/63] [abbrv] ambari git commit: AMBARI-21344. Add Services Using Repository ID (alexantonenko)
Date Fri, 30 Jun 2017 13:38:22 GMT
AMBARI-21344. Add Services Using Repository ID (alexantonenko)


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

Branch: refs/heads/branch-feature-logsearch-ui
Commit: 08dd492e5fb801355be8e2dcd895d9cb09d3dd3c
Parents: 4522cf5
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Mon Jun 26 17:44:29 2017 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Tue Jun 27 11:05:14 2017 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step8_controller.js      | 16 ++++++----------
 ambari-web/app/models/stack.js                      |  4 +++-
 2 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/08dd492e/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index fa44a24..42519e0 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -913,6 +913,9 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
         installerController.postVersionDefinitionFileStep8(versionData.isXMLdata, versionData.data).done(function
(versionInfo) {
           if (versionInfo.id && versionInfo.stackName && versionInfo.stackVersion)
{
             var selectedStack = App.Stack.find().findProperty('isSelected', true);
+            if (selectedStack) {
+              selectedStack.set('versionInfoId', versionInfo.id);
+            }
             installerController.updateRepoOSInfo(versionInfo, selectedStack).done(function()
{
               self._startDeploy();
             });
@@ -1011,20 +1014,13 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
    * @method createSelectedServicesData
    */
   createSelectedServicesData: function () {
-
-    var isInstaller = this.get('isInstaller')
     var selectedStack;
     if (this.get('isInstaller')) {
       selectedStack = App.Stack.find().findProperty('isSelected', true);
     }
-
-    return this.get('selectedServices').map(function (_service) {
-      if (selectedStack) {
-        return {"ServiceInfo": { "service_name": _service.get('serviceName'), "desired_repository_version":
selectedStack.get('repositoryVersion') }};
-      } else {
-        return {"ServiceInfo": { "service_name": _service.get('serviceName') }};
-      }
-    });
+    return this.get('selectedServices').map(service => selectedStack ?
+      {"ServiceInfo": { "service_name": service.get('serviceName'), "desired_repository_version_id":
selectedStack.get('versionInfoId') }} :
+      {"ServiceInfo": { "service_name": service.get('serviceName') }});
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/08dd492e/ambari-web/app/models/stack.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack.js b/ambari-web/app/models/stack.js
index 47d1c44..657ee5c 100644
--- a/ambari-web/app/models/stack.js
+++ b/ambari-web/app/models/stack.js
@@ -34,6 +34,8 @@ App.Stack = DS.Model.extend({
   operatingSystems: DS.hasMany('App.OperatingSystem'),
   isSelected: DS.attr('boolean', {defaultValue: false}),
 
+  versionInfoId: null,
+
   stackNameVersion: Em.computed.concat('-', 'stackName', 'stackVersion'),
 
   isPatch: Em.computed.equal('type', 'PATCH'),
@@ -81,4 +83,4 @@ App.Stack = DS.Model.extend({
 });
 
 
-App.Stack.FIXTURES = [];
\ No newline at end of file
+App.Stack.FIXTURES = [];


Mime
View raw message