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 17:39:51 UTC

git commit: AMBARI-7083. Recommendations: dialog text needs adjustment. (Max Shepel via akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 1d8e5497f -> 7f889c5a7


AMBARI-7083. Recommendations: dialog text needs adjustment. (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/7f889c5a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f889c5a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f889c5a

Branch: refs/heads/trunk
Commit: 7f889c5a79c26ea9dc28e09d6e6e154d4af08680
Parents: 1d8e549
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Aug 29 18:37:28 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Aug 29 18:37:28 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  3 ++-
 ambari-web/app/mixins/common/serverValidator.js | 20 +++++++++++---
 .../configs/config_recommendation_popup.hbs     | 28 ++++++++++++++++++++
 3 files changed, 47 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f889c5a/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index bc8736e..5b6d20c 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -650,7 +650,8 @@ Em.I18n.translations = {
   'installer.step7.popup.validation.failed.header': 'Validation failed.',
   'installer.step7.popup.validation.failed.body': 'Some services are not properly configured. You have to change the highlighted configs according to the recommended values.',
   'installer.step7.popup.validation.request.failed.body': 'Config validaition failed.',
-  'installer.step7.popup.validation.warning.body': 'Some services are not properly configured. Recommended to change the highlighted configs. Are you sure you want to proceed witout changing configs?',
+  'installer.step7.popup.validation.warning.header': 'Configurations',
+  'installer.step7.popup.validation.warning.body': 'Some service configurations are not configured properly. We recommend you review and change the highlighted configuration values. Are you sure you want to proceed without correcting configurations?',
 
   'installer.step7.oozie.database.new': 'New Derby Database',
   'installer.step7.hive.database.new': 'New MySQL Database',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f889c5a/ambari-web/app/mixins/common/serverValidator.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js
index 71169c5..b520071 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -264,14 +264,28 @@ App.ServerValidatorMixin = Em.Mixin.create({
    * @returns {*}
    */
   warnUser: function(deferred) {
+    var self = this;
     if (this.get('configValidationFailed')) {
       deferred.reject();
       return App.showAlertPopup(Em.I18n.t('installer.step7.popup.validation.failed.header'), Em.I18n.t('installer.step7.popup.validation.request.failed.body'));
     } else if (this.get('configValidationWarning') || this.get('configValidationError')) {
       // Motivation: for server-side validation warnings and EVEN errors allow user to continue wizard
-      return App.showConfirmationPopup(function () { deferred.resolve(); },
-          Em.I18n.t('installer.step7.popup.validation.warning.body'),
-          function () { deferred.reject(); });
+      return App.ModalPopup.show({
+        header: Em. I18n.t('installer.step7.popup.validation.warning.header'),
+        primary: Em.I18n.t('common.proceedAnyway'),
+        onPrimary: function () {
+          this.hide();
+          deferred.resolve();
+        },
+        onSecondary: function () {
+          this.hide();
+          deferred.reject();
+        },
+        bodyClass: Em.View.extend({
+          controller: self,
+          templateName: require('templates/common/configs/config_recommendation_popup')
+        })
+      });
     } else {
       deferred.resolve();
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f889c5a/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs b/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
new file mode 100644
index 0000000..1f47d6e
--- /dev/null
+++ b/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
@@ -0,0 +1,28 @@
+{{!
+* 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.step7.popup.validation.warning.body}}</p>
+<div class="alert alert-warning">
+    {{#each service in stepConfigs}}
+      {{#each property in service.configs}}
+        {{#if property.warn}}
+          <strong>{{property.displayName}}</strong>: {{property.warnMessage}}<br />
+        {{/if}}
+      {{/each}}
+    {{/each}}
+</div>