ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-17176 VDF: include default version definition in list, even if Internet Access is available (zhewang)
Date Mon, 13 Jun 2016 21:12:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 3535972f1 -> 0525d2aeb


AMBARI-17176 VDF: include default version definition in list, even if Internet Access is available
(zhewang)


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

Branch: refs/heads/branch-2.4
Commit: 0525d2aebcd61887acefcbb66b234af7177069ea
Parents: 3535972
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Mon Jun 13 14:11:09 2016 -0700
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Mon Jun 13 14:12:10 2016 -0700

----------------------------------------------------------------------
 .../controllers/stackVersions/StackVersionsCreateCtrl.js    | 9 +--------
 ambari-web/app/controllers/wizard/step1_controller.js       | 8 +-------
 ambari-web/app/templates/wizard/step1.hbs                   | 2 +-
 3 files changed, 3 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0525d2ae/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index 5433bd6..cc42abb 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -543,14 +543,7 @@ angular.module('ambariAdminConsole')
       return item.isSelected === true;
     });
     angular.forEach(versions, function (item, index) {
-      var isPublicVersionsExist = false;
-      // If public VDF exists for a stack then default base stack version should be hidden
-      if (item.stackDefault) {
-        isPublicVersionsExist = versions.find(function(_version){
-          return (item.stackNameVersion === _version.stackNameVersion && !_version.stackDefault);
-        });
-      }
-      item.visible = (item.stackNameVersion === activeStackId.stackNameVersion) &&
!isPublicVersionsExist;
+      item.visible = (item.stackNameVersion === activeStackId.stackNameVersion);
     });
     $scope.activeStackVersion = versions.filter(function(item){
       return item.visible;

http://git-wip-us.apache.org/repos/asf/ambari/blob/0525d2ae/ambari-web/app/controllers/wizard/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js b/ambari-web/app/controllers/wizard/step1_controller.js
index 3af28de..a1ebad8 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -24,7 +24,6 @@ var arrayUtils = require('utils/array_utils');
  * @property {string} stackName
  * @property {App.Stack[]} stacks
  * @property {boolean} isSelected
- * @property {boolean} defaultStackAllowedToSelect
  */
 
 /**
@@ -33,12 +32,7 @@ var arrayUtils = require('utils/array_utils');
 var StackType = Em.Object.extend({
   stackName: '',
   stacks: [],
-  isSelected: Em.computed.someBy('stacks', 'isSelected', true),
-  defaultStackAllowedToSelect: Em.computed.equal('stacks.length', 1),
-  visibleStacks: function () {
-    var stacks = this.get('stacks');
-    return this.get('defaultStackAllowedToSelect') ? stacks : stacks.filterProperty('stackDefault',
false);
-  }.property('defaultStackAllowedToSelect', 'stacks.[]')
+  isSelected: Em.computed.someBy('stacks', 'isSelected', true)
 });
 
 App.WizardStep1Controller = Em.Controller.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/0525d2ae/ambari-web/app/templates/wizard/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step1.hbs b/ambari-web/app/templates/wizard/step1.hbs
index 59ff21b..e1ffb08 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -39,7 +39,7 @@
                   <div class="btn-group">
                     <button type="button" data-toggle="dropdown" class="btn dropdown-toggle
btn-info">{{controller.selectedStack.displayName}} <span class="caret"></span></button>
                     <ul class="dropdown-menu">
-                      {{#each stack in selectedStackType.visibleStacks}}
+                      {{#each stack in selectedStackType.stacks}}
                         <li>
                           {{!view view.stackRadioButton stackBinding="stack"}}
                           <a href="#" {{action "changeVersion" stack target="controller"}}>{{stack.displayName}}


Mime
View raw message