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

AMBARI-6414. need ability to retry repos (alexantonenko)

Alex Antonenko 11 лет назад
Родитель
Сommit
b69f06e005

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

@@ -379,6 +379,7 @@ Em.I18n.translations = {
   'installer.step1.attentionNeeded':'<b>Attention:</b> Repository URLs are REQUIRED before you can proceed.',
   'installer.step1.attentionNeeded':'<b>Attention:</b> Repository URLs are REQUIRED before you can proceed.',
   'installer.step1.invalidURLAttention': '<b>Attention:</b> Please make sure all repository URLs are valid before proceeding.',
   'installer.step1.invalidURLAttention': '<b>Attention:</b> Please make sure all repository URLs are valid before proceeding.',
   'installer.step1.checkAtLeastOneAttention': '<b>Attention:</b> Please check at least one repository.',
   'installer.step1.checkAtLeastOneAttention': '<b>Attention:</b> Please check at least one repository.',
+  'installer.step1.retryRepoUrls': 'Click <b>here</b> to retry.',
 
 
   'installer.step2.header':'Install Options',
   'installer.step2.header':'Install Options',
   'installer.step2.body':'Enter the list of hosts to be included in the cluster and provide your SSH key.',
   'installer.step2.body':'Enter the list of hosts to be included in the cluster and provide your SSH key.',

+ 4 - 1
ambari-web/app/templates/wizard/step1.hbs

@@ -102,7 +102,10 @@
             <div class="alert">{{t installer.step1.attentionNeeded}}</div>
             <div class="alert">{{t installer.step1.attentionNeeded}}</div>
           {{/if}}
           {{/if}}
           {{#if view.invalidUrlExist}}
           {{#if view.invalidUrlExist}}
-            <div class="alert">{{t installer.step1.invalidURLAttention}}</div>
+            <div class="alert">
+              {{t installer.step1.invalidURLAttention}}
+              <a href="javascript:void(null)" {{action "retryRepoUrls" target="view"}}>{{t installer.step1.retryRepoUrls}}</a>
+            </div>
           {{/if}}
           {{/if}}
           {{#if view.allRepoUnchecked}}
           {{#if view.allRepoUnchecked}}
             <div class="alert">{{t installer.step1.checkAtLeastOneAttention}}</div>
             <div class="alert">{{t installer.step1.checkAtLeastOneAttention}}</div>

+ 7 - 0
ambari-web/app/views/wizard/step1_view.js

@@ -171,6 +171,13 @@ App.WizardStep1View = Em.View.extend({
     this.set('isRLCollapsed', !this.get('isRLCollapsed'));
     this.set('isRLCollapsed', !this.get('isRLCollapsed'));
   },
   },
 
 
+  /**
+   * Onclick handler for recheck repos urls. Used in Advanced Repository Options.
+   */
+  retryRepoUrls: function () {
+    App.router.get('installerController').checkRepoURL();
+  },
+
   /**
   /**
    * Format repo values and set it to <code>allRepositories</code>
    * Format repo values and set it to <code>allRepositories</code>
    * @method loadRepositories
    * @method loadRepositories