Browse Source

AMBARI-7363 Recommendations: ui changes for usability. (ababiichuk)

aBabiichuk 10 years ago
parent
commit
4bcf111f1f

+ 5 - 0
ambari-web/app/controllers/main/service/info/configs.js

@@ -146,6 +146,11 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       attributeName: 'isValid',
       attributeValue: false,
       caption: 'common.combobox.dropdown.issues'
+    },
+    {
+      attributeName: 'warn',
+      attributeValue: true,
+      caption: 'common.combobox.dropdown.warnings'
     }
   ],
 

+ 5 - 0
ambari-web/app/controllers/wizard/step7_controller.js

@@ -220,6 +220,11 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, {
       attributeName: 'isValid',
       attributeValue: false,
       caption: 'common.combobox.dropdown.issues'
+    },
+    {
+      attributeName: 'warn',
+      attributeValue: true,
+      caption: 'common.combobox.dropdown.warnings'
     }
   ],
 

+ 2 - 1
ambari-web/app/messages.js

@@ -658,7 +658,7 @@ Em.I18n.translations = {
   'installer.step7.popup.validation.request.failed.body': 'Config validaition failed.',
   '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.popup.validation.warning.errorDescription': ' value is less than the recommended default of ',
   'installer.step7.oozie.database.new': 'New Derby Database',
   'installer.step7.hive.database.new': 'New MySQL Database',
 
@@ -2263,6 +2263,7 @@ Em.I18n.translations = {
   'common.combobox.dropdown.final': 'Final properties',
   'common.combobox.dropdown.changed': 'Changed properties',
   'common.combobox.dropdown.issues': 'Show property issues',
+  'common.combobox.dropdown.warnings': 'Show property warnings',
 
   'quick.links.error.label': 'Hostname is undefined',
   'quick.links.publicHostName': '{0} ({1})',

+ 1 - 0
ambari-web/app/mixins/common/serverValidator.js

@@ -274,6 +274,7 @@ App.ServerValidatorMixin = Em.Mixin.create({
       // Motivation: for server-side validation warnings and EVEN errors allow user to continue wizard
       return App.ModalPopup.show({
         header: Em. I18n.t('installer.step7.popup.validation.warning.header'),
+        classNames: ['sixty-percent-width-modal'],
         primary: Em.I18n.t('common.proceedAnyway'),
         onPrimary: function () {
           this.hide();

+ 5 - 0
ambari-web/app/styles/application.less

@@ -2203,6 +2203,11 @@ width:100%;
   overflow-y: auto;
 }
 
+.limited-height-2 {
+  max-height: 250px;
+  overflow-y: auto;
+}
+
 .task-detail-info {
   .task-detail-log-info {
     max-height: 340px;

+ 32 - 3
ambari-web/app/templates/common/configs/config_recommendation_popup.hbs

@@ -17,12 +17,41 @@
 }}
 
 <p>{{t installer.step7.popup.validation.warning.body}}</p>
-<div class="alert alert-warning">
+<div id="config-validation-warnings" class="limited-height-2">
+  <table class="table no-borders">
+    <thead>
+    <tr>
+      <th>
+        {{t common.service}}
+      </th>
+      <th>
+        {{t common.property}}
+      </th>
+      <th>
+        {{t common.description}}
+      </th>
+    </tr>
+    </thead>
+    <tbody>
     {{#each service in stepConfigs}}
       {{#each property in service.configs}}
         {{#if property.warn}}
-          <strong>{{property.displayName}}</strong>: {{property.warnMessage}}<br />
+          <tr>
+            <td>
+              {{property.serviceName}}
+            </td>
+            <td>
+              {{property.displayName}}
+            </td>
+            <td>
+              <strong>{{property.description}}:</strong><br/>
+              <strong>{{property.value}}</strong>{{t installer.step7.popup.validation.warning.errorDescription}}
+              <strong>{{property.defaultValue}}</strong>
+            </td>
+          </tr>
         {{/if}}
       {{/each}}
     {{/each}}
-</div>
+    </tbody>
+  </table>
+</div>

+ 23 - 21
ambari-web/app/templates/wizard/step6/step6_issues_popup.hbs

@@ -17,25 +17,27 @@
 }}
 
 <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}}
+<div class="limited-height-2">
+  {{#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}}
+  {{#if anyGeneralWarnings}}
+    <div class="alert alert-warning">
+      <ul>
+        {{#each msg in controller.generalWarningMessages}}
+          <li>{{msg}}</li>
+        {{/each}}
+      </ul>
+    </div>
+  {{/if}}
+</div>