Просмотр исходного кода

AMBARI-3799. Advanced repo UI cleanup. (xiwang via yusaku)

Yusaku Sako 11 лет назад
Родитель
Сommit
6b9bca7d97

+ 1 - 1
ambari-web/app/controllers/installer.js

@@ -426,7 +426,7 @@ App.InstallerController = App.WizardController.extend({
     var selectedStack = this.get('content.stacks').findProperty('isSelected', true);
     var selectedStack = this.get('content.stacks').findProperty('isSelected', true);
     if (selectedStack && selectedStack.operatingSystems) {
     if (selectedStack && selectedStack.operatingSystems) {
       var os = selectedStack.operatingSystems.findProperty('osType', osType);
       var os = selectedStack.operatingSystems.findProperty('osType', osType);
-      os.validation = 'icon-remove';
+      os.validation = 'icon-exclamation-sign';
       selectedStack.set('reload', !selectedStack.get('reload'));
       selectedStack.set('reload', !selectedStack.get('reload'));
       this.set('validationCnt', this.get('validationCnt') - 1);
       this.set('validationCnt', this.get('validationCnt') - 1);
       this.set('invalidCnt', this.get('invalidCnt') + 1);
       this.set('invalidCnt', this.get('invalidCnt') + 1);

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

@@ -370,10 +370,10 @@ Em.I18n.translations = {
     '<div class="alert alert-warn"><b>Note</b>: To clean up in interactive mode, remove <b>--silent</b> option. To clean up all resources, including <i>users</i>, remove <b>--skip=users</b> option. Use <b>--help</b> for a list of available options.</div>',
     '<div class="alert alert-warn"><b>Note</b>: To clean up in interactive mode, remove <b>--silent</b> option. To clean up all resources, including <i>users</i>, remove <b>--skip=users</b> option. Use <b>--help</b> for a list of available options.</div>',
   'installer.step3.hostWarningsPopup.summary':'{0} on {1}',
   'installer.step3.hostWarningsPopup.summary':'{0} on {1}',
   'installer.step3.hostWarningsPopup.firewall':'Firewall Issues',
   'installer.step3.hostWarningsPopup.firewall':'Firewall Issues',
-  'installer.step3.hostWarningsPopup.repositories':'Repositories Issues',
+  'installer.step3.hostWarningsPopup.repositories':'Repository Issues',
   'installer.step3.hostWarningsPopup.repositories.name':'Repository for OS not available',
   'installer.step3.hostWarningsPopup.repositories.name':'Repository for OS not available',
   'installer.step3.hostWarningsPopup.repositories.context':'Host ({0}) has a {1} OS type, But the repositories chosen in "Select Stack" step was {2}.',
   'installer.step3.hostWarningsPopup.repositories.context':'Host ({0}) has a {1} OS type, But the repositories chosen in "Select Stack" step was {2}.',
-  'installer.step3.hostWarningsPopup.repositories.message':'The following registered hosts have different Operating System types from the local repositories chosen in "Select Stack" step. You can go back to "Select Stack" step to select another os group OR remove related host.',
+  'installer.step3.hostWarningsPopup.repositories.message':'The following registered hosts have different Operating System types from the available Repositories chosen in "Select Stack" step. You can go back to "Select Stack" step to select another OS repository <b>or</b> remove the host.',
   'installer.step3.hostWarningsPopup.firewall.message':'Firewall is running on the following hosts. Please configure the firewall to allow communications on the ports documented in the <i>Configuring Ports</i> section of  the <a target=\"_blank\" href=\"http://incubator.apache.org/ambari/current/installing-hadoop-using-ambari/content/\">Ambari documentation</a>',
   'installer.step3.hostWarningsPopup.firewall.message':'Firewall is running on the following hosts. Please configure the firewall to allow communications on the ports documented in the <i>Configuring Ports</i> section of  the <a target=\"_blank\" href=\"http://incubator.apache.org/ambari/current/installing-hadoop-using-ambari/content/\">Ambari documentation</a>',
   'installer.step3.hostWarningsPopup.firewall.name':'<i>iptables</i> Running',
   'installer.step3.hostWarningsPopup.firewall.name':'<i>iptables</i> Running',
   'installer.step3.hostWarningsPopup.process':'Process Issues',
   'installer.step3.hostWarningsPopup.process':'Process Issues',

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

@@ -4845,6 +4845,10 @@ i.icon-asterisks {
         padding-top: 0px;
         padding-top: 0px;
         padding-left: 4px;
         padding-left: 4px;
         padding-right: 4px;
         padding-right: 4px;
+        .icon-exclamation-sign {
+          color: #b94a48;
+        }
+
       }
       }
       .clearAll-icon {
       .clearAll-icon {
         width: 2%;
         width: 2%;

+ 7 - 7
ambari-web/app/templates/wizard/step1.hbs

@@ -42,15 +42,15 @@
       <div  class="accordion-body collapse in">
       <div  class="accordion-body collapse in">
         <div class="accordion-inner">
         <div class="accordion-inner">
           <div class="alert alert-info">{{t installer.step1.advancedRepo.message}}</div>
           <div class="alert alert-info">{{t installer.step1.advancedRepo.message}}</div>
-          <div class="alert alert-danger">{{t installer.step1.advancedRepo.importantMassage}}</div>
+          <div class="alert alert-warning">{{t installer.step1.advancedRepo.importantMassage}}</div>
 
 
           <table class="table">
           <table class="table">
             <thead>
             <thead>
             <tr>
             <tr>
               <th></th>
               <th></th>
               <th class="os">{{t common.os}}</th>
               <th class="os">{{t common.os}}</th>
-              <th class="url">{{t installer.step1.advancedRepo.localRepo.column.baseUrl}}</th>
               <th class="validations"></th>
               <th class="validations"></th>
+              <th class="url">{{t installer.step1.advancedRepo.localRepo.column.baseUrl}}</th>
               <th class="actions"></th>
               <th class="actions"></th>
             </tr>
             </tr>
             </thead>
             </thead>
@@ -69,6 +69,11 @@
                       </tbody>
                       </tbody>
                     </table>
                     </table>
                   </td>
                   </td>
+                  <td class="validation-results">
+                    {{#if repoGroup.validation}}
+                      <i {{bindAttr class="repoGroup.validation"}}></i>
+                    {{/if}}
+                  </td>
                   <td  {{bindAttr class=":url-results repoGroup.checked::disabled-textfield repoGroup.empty-error:textfield-error repoGroup.invalid-error:textfield-error"}}>
                   <td  {{bindAttr class=":url-results repoGroup.checked::disabled-textfield repoGroup.empty-error:textfield-error repoGroup.invalid-error:textfield-error"}}>
                     {{view Ember.TextField valueBinding="repoGroup.baseUrl"}}
                     {{view Ember.TextField valueBinding="repoGroup.baseUrl"}}
                   </td>
                   </td>
@@ -79,11 +84,6 @@
                       </a>
                       </a>
                     {{/if}}
                     {{/if}}
                   </td>
                   </td>
-                  <td class="validation-results">
-                    {{#if repoGroup.validation}}
-                      <i {{bindAttr class="repoGroup.validation"}}></i>
-                    {{/if}}
-                  </td>
                   <td class="action-results">
                   <td class="action-results">
                     {{#if repoGroup.undo}}
                     {{#if repoGroup.undo}}
                       <a {{action "undoGroupLocalRepository" repoGroup target="view" }}>
                       <a {{action "undoGroupLocalRepository" repoGroup target="view" }}>

+ 3 - 3
ambari-web/app/views/wizard/step1_view.js

@@ -54,7 +54,7 @@ App.WizardStep1View = Em.View.extend({
   }.property('emptyRepoExist', 'allRepoUnchecked', 'invalidUrlExist'),
   }.property('emptyRepoExist', 'allRepoUnchecked', 'invalidUrlExist'),
   invalidUrlExist: function () {
   invalidUrlExist: function () {
     var selectedStack = this.get('controller.content.stacks').findProperty('isSelected', true);
     var selectedStack = this.get('controller.content.stacks').findProperty('isSelected', true);
-    var invalidExist = this.get('allRepositoriesGroup').filterProperty('validation', 'icon-remove').length != 0;
+    var invalidExist = this.get('allRepositoriesGroup').filterProperty('validation', 'icon-exclamation-sign').length != 0;
     return (selectedStack.get('invalidCnt') > 0) && invalidExist;
     return (selectedStack.get('invalidCnt') > 0) && invalidExist;
   }.property('controller.content.stacks.@each.invalidCnt', 'allRepositoriesGroup.@each.validation'),
   }.property('controller.content.stacks.@each.invalidCnt', 'allRepositoriesGroup.@each.validation'),
   allRepoUnchecked: function () {
   allRepoUnchecked: function () {
@@ -62,7 +62,7 @@ App.WizardStep1View = Em.View.extend({
   }.property('allRepositoriesGroup.@each.checked'),
   }.property('allRepositoriesGroup.@each.checked'),
   totalErrorCnt: function () {
   totalErrorCnt: function () {
     var emptyCnt = this.get('allRepositoriesGroup').filterProperty('empty-error', true).length;
     var emptyCnt = this.get('allRepositoriesGroup').filterProperty('empty-error', true).length;
-    var invalidCnt = this.get('allRepositoriesGroup').filterProperty('validation', 'icon-remove').length;
+    var invalidCnt = this.get('allRepositoriesGroup').filterProperty('validation', 'icon-exclamation-sign').length;
     if (this.get('allRepoUnchecked')) {
     if (this.get('allRepoUnchecked')) {
       return 1;
       return 1;
     } else if ( emptyCnt || invalidCnt) {
     } else if ( emptyCnt || invalidCnt) {
@@ -144,7 +144,7 @@ App.WizardStep1View = Em.View.extend({
     group.set('baseUrl', os.baseUrl);
     group.set('baseUrl', os.baseUrl);
     group.set('defaultBaseUrl', os.defaultBaseUrl);
     group.set('defaultBaseUrl', os.defaultBaseUrl);
     group.set('empty-error', !os.baseUrl);
     group.set('empty-error', !os.baseUrl);
-    group.set('invalid-error', os.validation == 'icon-remove');
+    group.set('invalid-error', os.validation == 'icon-exclamation-sign');
     group.set('validation', os.validation);
     group.set('validation', os.validation);
     group.set('undo', os.baseUrl != os.defaultBaseUrl);
     group.set('undo', os.baseUrl != os.defaultBaseUrl);
     group.set('clearAll', os.baseUrl);
     group.set('clearAll', os.baseUrl);