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/01 20:07:01 UTC
ambari git commit: AMBARI-16977 VDF: couple UI bugs in Install Wiz
(zhewang)
Repository: ambari
Updated Branches:
refs/heads/trunk 7d1223232 -> e2dd1261e
AMBARI-16977 VDF: couple UI bugs in Install Wiz (zhewang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e2dd1261
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e2dd1261
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e2dd1261
Branch: refs/heads/trunk
Commit: e2dd1261e99bc71306ad91aa7b1e75ce144af0bc
Parents: 7d12232
Author: Zhe (Joe) Wang <zh...@apache.org>
Authored: Wed Jun 1 13:06:26 2016 -0700
Committer: Zhe (Joe) Wang <zh...@apache.org>
Committed: Wed Jun 1 13:06:26 2016 -0700
----------------------------------------------------------------------
.../src/main/resources/ui/admin-web/app/styles/main.css | 6 ++++++
.../app/views/stackVersions/stackVersionPage.html | 4 ++--
ambari-web/app/controllers/wizard/step1_controller.js | 10 ++++++++--
ambari-web/app/messages.js | 2 +-
ambari-web/app/styles/application.less | 3 +++
ambari-web/app/templates/wizard/step1.hbs | 2 +-
ambari-web/test/controllers/wizard/step1_test.js | 2 +-
7 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index a8539e8..4f2812f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -1607,6 +1607,12 @@ thead.view-permission-header > tr > th {
#upload-definition-file-panel .dropdown-menu li a {
cursor: pointer;
}
+
+#upload-definition-file-panel .disabled span {
+ opacity: 0.7;
+ cursor: default;
+}
+
.register-version-options {
padding-left: 25px;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
index 6134535..83f54fd 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
@@ -99,9 +99,9 @@
<div id="upload-definition-file-panel" ng-if="createController">
- <div class="col-sm-12 big-radio clearfix">
+ <div class="col-sm-12 big-radio clearfix" ng-class="{'disabled' : networkLost || useRedhatSatellite}">
<input type="radio" ng-model="selectedOption.index" value="1" ng-change="togglePublicLocalOptionSelect()" ng-disabled="networkLost || useRedhatSatellite">
- {{'versions.usePublic' | translate}}
+ <span>{{'versions.usePublic' | translate}}</span>
<a id="public-disabled-link" href="javascript:void(0);" ng-if="networkLost" ng-click="showPublicRepoDisabledDialog()">{{'versions.networkIssues.networkLost'| translate}}</a>
</div>
<div class="col-sm-12 big-radio clearfix">
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/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 b648b82..5ff34bd 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -185,7 +185,13 @@ App.WizardStep1Controller = Em.Controller.extend({
*/
onNetworkIssuesExist: function() {
if (this.get('networkIssuesExist')) {
- this.useLocalRepo();
+ this.get('content.stacks').forEach(function (stack) {
+ stack.setProperties({
+ usePublicRepo: false,
+ useLocalRepo: true
+ });
+ stack.cleanReposBaseUrls();
+ });
}
}.observes('networkIssuesExist'),
@@ -282,7 +288,7 @@ App.WizardStep1Controller = Em.Controller.extend({
controller: this,
- header: Em.I18n.t('installer.step1.changeVersion.title'),
+ header: Em.I18n.t('installer.step1.addVersion.title'),
primary: Em.I18n.t('installer.step1.useLocalRepo.readButton'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index d71b99b..ffc6eb2 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -554,7 +554,7 @@ Em.I18n.translations = {
'installer.step1.header':'Select Version',
'installer.step1.body':'Select the software version and method of delivery for your cluster. Using a Public Repository requires Internet connectivity. Using a Local Repository requires you have configured the software in a repository available in your network.',
- 'installer.step1.changeVersion.title':'Change Version',
+ 'installer.step1.addVersion.title':'Add Version',
'installer.step1.changeVersion.defaultVersion':'Default Version Definition',
'installer.step1.selectUseRepoOptions.public':'Use Public Repository',
'installer.step1.selectUseRepoOptions.public.networkLost.button':'Not Available',
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 8a76dfb..5ee09cc 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6246,6 +6246,9 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox {
.big-radio {
font-weight: bold;
padding: 5px 15px;
+ &.disabled>span{
+ opacity: 0.7;
+ }
}
#public-disabled-link {
margin-left: 10px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/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 e076d66..a7636c1 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -76,7 +76,7 @@
{{! left tabs end }}
{{! Public Repository radio }}
- <label class="radio big-radio">
+ <label {{bindAttr class=":radio :big-radio :public-radio networkIssuesExist:disabled"}}>
{{view view.usePublicRepoRadioButton}} {{t installer.step1.selectUseRepoOptions.public}}
{{#if networkIssuesExist}}
<a id="public-disabled-link" {{action "openPublicOptionDisabledWindow" target="view"}}>{{t installer.step1.selectUseRepoOptions.public.networkLost}}</a>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2dd1261/ambari-web/test/controllers/wizard/step1_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step1_test.js b/ambari-web/test/controllers/wizard/step1_test.js
index 01344cb..c06db26 100644
--- a/ambari-web/test/controllers/wizard/step1_test.js
+++ b/ambari-web/test/controllers/wizard/step1_test.js
@@ -59,7 +59,7 @@ var stacks = [
];
function getController() {
- return App.WizardStep1Controller.create({content: Em.Object.create({stacks: stacks})});
+ return App.WizardStep1Controller.create({content: Em.Object.create({stacks: stacks}), onNetworkIssuesExist: Em.K});
}
describe('App.WizardStep1Controller', function () {