You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/08/29 19:01:46 UTC
git commit: AMBARI-7086. FE: Slave and client validation errors
should be shown in dialog. (Max Shepel via akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 7f889c5a7 -> 85ccaede3
AMBARI-7086. FE: Slave and client validation errors should be shown in dialog. (Max Shepel via akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85ccaede
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85ccaede
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85ccaede
Branch: refs/heads/trunk
Commit: 85ccaede3603382f72daa03ed135e0454e591e04
Parents: 7f889c5
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Aug 29 19:52:01 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Aug 29 19:52:01 2014 +0300
----------------------------------------------------------------------
.../app/controllers/wizard/step6_controller.js | 22 ++++++++++-
ambari-web/app/messages.js | 5 +++
ambari-web/app/styles/application.less | 4 +-
ambari-web/app/templates/wizard/step6.hbs | 27 +++----------
.../wizard/step6/step6_issues_popup.hbs | 41 ++++++++++++++++++++
ambari-web/app/templates/wizard/step7.hbs | 2 +-
6 files changed, 76 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/85ccaede/ambari-web/app/controllers/wizard/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js
index cdf64cf..5abdec6 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -126,6 +126,13 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
}.property('generalWarningMessages', 'generalWarningMessages.@each'),
/**
+ * true if validation has any general (which is not related with concrete host) error or warning message
+ */
+ anyGeneralIssues: function () {
+ return this.get('anyGeneralErrors') || this.get('anyGeneralWarnings');
+ }.property('anyGeneralErrors', 'anyGeneralWarnings'),
+
+ /**
* true if validation has any error message (general or host specific)
*/
anyErrors: function() {
@@ -139,6 +146,17 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
return this.get('anyGeneralWarnings') || this.get('hosts').some(function(h) { return h.get('warnMessages').length > 0; });
}.property('anyGeneralWarnings', 'hosts.@each.warnMessages'),
+ openSlavesAndClientsIssues: function () {
+ App.ModalPopup.show({
+ header: Em.I18n.t('installer.step6.validationSlavesAndClients.popup.header'),
+ bodyClass: Em.View.extend({
+ controller: this,
+ templateName: require('templates/wizard/step6/step6_issues_popup')
+ }),
+ secondary: null
+ });
+ },
+
/**
* Verify condition that at least one checkbox of each component was checked
* @method clearError
@@ -616,7 +634,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
var anyGeneralClientErrors = false; // any error/warning for any client component (under "CLIENT" alias)
var validationData = validationUtils.filterNotInstalledComponents(data);
- validationData.filterProperty('type', 'host-component').forEach(function (item) {
+ validationData.filterProperty('type', 'host-component').filter(function (i) {
+ return !(i['component-name'] && App.StackServiceComponent.find().findProperty('componentName', i['component-name']).get('isMaster'));
+ }).forEach(function (item) {
var checkboxWithIssue = null;
var isGeneralClientValidationItem = clientComponents.contains(item['component-name']); // it is an error/warning for any client component (under "CLIENT" alias)
var host = self.get('hosts').find(function (h) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/85ccaede/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 5b6d20c..6a93c0a 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -628,6 +628,11 @@ Em.I18n.translations = {
'installer.step6.error.mustSelectOneForSlaveHost': 'You must assign at least one slave/client component to each host with no master component',
'installer.step6.validationIssuesAttention.header': 'Validation Issues',
'installer.step6.validationIssuesAttention': 'Slave and Client component assignments have issues that need attention.',
+ 'installer.step6.validationSlavesAndClients.hasIssues': 'Your slave and client assignment has issues. ',
+ 'installer.step6.validationSlavesAndClients.click': 'Click',
+ 'installer.step6.validationSlavesAndClients.forDetails': ' for details.',
+ 'installer.step6.validationSlavesAndClients.popup.header': 'Assign Slaves and Clients Issues',
+ 'installer.step6.validationSlavesAndClients.popup.body': 'Assignment of slave and client components has the following issues',
'installer.step7.header':'Customize Services',
'installer.step7.body':'We have come up with recommended configurations for the services you selected. Customize them as you see fit.',
http://git-wip-us.apache.org/repos/asf/ambari/blob/85ccaede/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index fa85ce6..3a63981 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -794,7 +794,7 @@ h1 {
a.deselected {
}
i.icon-asterisks {
- color: #FF4B4B;
+ color: #00688B;
}
}
#step6 {
@@ -5626,7 +5626,7 @@ li.break {
}
i.icon-asterisks {
- color: #FF4B4B;
+ color: #00688B;
}
.rickshaw_legend {
http://git-wip-us.apache.org/repos/asf/ambari/blob/85ccaede/ambari-web/app/templates/wizard/step6.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step6.hbs b/ambari-web/app/templates/wizard/step6.hbs
index e3e26bf..7b0c38a 100644
--- a/ambari-web/app/templates/wizard/step6.hbs
+++ b/ambari-web/app/templates/wizard/step6.hbs
@@ -20,27 +20,12 @@
<h2>{{view.title}}</h2>
<div class="alert alert-info">{{{view.label}}}</div>
- {{#if anyGeneralErrors}}
- <div class="alert alert-error">
- <ul>
- {{#if errorMessage}}
- <li>{{errorMessage}}</li>
- {{/if}}
- {{#each msg in controller.generalErrorMessages}}
- <li>{{msg}}</li>
- {{/each}}
- </ul>
- </div>
- {{/if}}
-
- {{#if anyGeneralWarnings}}
- <div class="alert alert-warning">
- <ul>
- {{#each msg in controller.generalWarningMessages}}
- <li>{{msg}}</li>
- {{/each}}
- </ul>
- </div>
+ {{#if anyGeneralIssues}}
+ <div class="alert alert-error">
+ {{t installer.step6.validationSlavesAndClients.hasIssues}}
+ <a href="javascript:void(null);" {{action openSlavesAndClientsIssues target="controller"}}>{{t installer.step6.validationSlavesAndClients.click}}</a>
+ {{t installer.step6.validationSlavesAndClients.forDetails}}
+ </div>
{{/if}}
<div class="pre-scrollable">
http://git-wip-us.apache.org/repos/asf/ambari/blob/85ccaede/ambari-web/app/templates/wizard/step6/step6_issues_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step6/step6_issues_popup.hbs b/ambari-web/app/templates/wizard/step6/step6_issues_popup.hbs
new file mode 100644
index 0000000..12adf0c
--- /dev/null
+++ b/ambari-web/app/templates/wizard/step6/step6_issues_popup.hbs
@@ -0,0 +1,41 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+<p>{{t installer.step6.validationSlavesAndClients.popup.body}}</p>
+{{#if anyGeneralErrors}}
+ <div class="alert alert-error">
+ <ul>
+ {{#if errorMessage}}
+ <li>{{errorMessage}}</li>
+ {{/if}}
+ {{#each msg in controller.generalErrorMessages}}
+ <li>{{msg}}</li>
+ {{/each}}
+ </ul>
+ </div>
+{{/if}}
+
+{{#if anyGeneralWarnings}}
+ <div class="alert alert-warning">
+ <ul>
+ {{#each msg in controller.generalWarningMessages}}
+ <li>{{msg}}</li>
+ {{/each}}
+ </ul>
+ </div>
+{{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/85ccaede/ambari-web/app/templates/wizard/step7.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step7.hbs b/ambari-web/app/templates/wizard/step7.hbs
index 4d59338..46bc3e2 100644
--- a/ambari-web/app/templates/wizard/step7.hbs
+++ b/ambari-web/app/templates/wizard/step7.hbs
@@ -17,7 +17,7 @@
}}
<div id="serviceConfig">
- <h2>{{t installer.step7.header}}</h2>
+ <h2>{{t installer.step7.header}}{{controller.finnalyLoaded}}</h2>
<div class="alert alert-info">
{{t installer.step7.body}}