Преглед изворни кода

AMBARI-2321. Host Checks warning should force a popup when the user tries to move on without viewing it first. (Oleg Nechiporenko via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1490766 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako пре 12 година
родитељ
комит
6ff3dd0738
2 измењених фајлова са 14 додато и 2 уклоњено
  1. 13 2
      ambari-web/app/controllers/wizard/step3_controller.js
  2. 1 0
      ambari-web/app/messages.js

+ 13 - 2
ambari-web/app/controllers/wizard/step3_controller.js

@@ -522,8 +522,19 @@ App.WizardStep3Controller = Em.Controller.extend({
 
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
-      this.set('content.hosts', this.get('bootHosts'));
-      App.router.send('next');
+        if(this.get('isHostHaveWarnings')) {
+            var self = this;
+            App.showConfirmationPopup(
+                function(){
+                    self.set('content.hosts', self.get('bootHosts'));
+                    App.router.send('next');
+                },
+                Em.I18n.t('installer.step3.hostWarningsPopup.hostHasWarnings'));
+        }
+        else {
+              this.set('content.hosts', this.get('bootHosts'));
+              App.router.send('next');
+        }
     }
   },
 

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

@@ -319,6 +319,7 @@ Em.I18n.translations = {
   'installer.step3.hostWarningsPopup.runningOnOneHost':'WARN: running on 1 host',
   'installer.step3.hostWarningsPopup.runningOnManyHost':'WARN: running on {0} hosts',
   'installer.step3.hostWarningsPopup.rerunChecks':'Rerun Checks',
+  'installer.step3.hostWarningsPopup.hostHasWarnings':'Warning: Host checks failed on some of your hosts. It is highly recommended that you fix these problems first before proceeding to prevent potentially major problems with cluster installation. Are you sure you want to ignore these warnings and proceed?',
   'installer.step3.warningsWindow.allHosts':'Warnings across all hosts',
   'installer.step3.warningsWindow.warningsOn':'Warnings on ',
   'installer.step3.warningsWindow.directoriesAndFiles':'DIRECTORIES AND FILES',