You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by zh...@apache.org on 2016/06/13 21:11:30 UTC
ambari git commit: AMBARI-17176 VDF: include default version
definition in list, even if Internet Access is available (zhewang)
Repository: ambari
Updated Branches:
refs/heads/trunk bb87fe175 -> 8fbfdc218
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/8fbfdc21
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8fbfdc21
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8fbfdc21
Branch: refs/heads/trunk
Commit: 8fbfdc218c6c7459174957123aa5f537bae4eb11
Parents: bb87fe1
Author: Zhe (Joe) Wang <zh...@apache.org>
Authored: Mon Jun 13 14:11:09 2016 -0700
Committer: Zhe (Joe) Wang <zh...@apache.org>
Committed: Mon Jun 13 14:11:09 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/8fbfdc21/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/8fbfdc21/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/8fbfdc21/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}}