ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject git commit: AMBARI-6228. host checks 'Show Report' link is missing from dialog.(xiwang)
Date Sat, 21 Jun 2014 00:17:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1857a4555 -> 1e906dd0e


AMBARI-6228. host checks 'Show Report' link is missing from dialog.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e906dd0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e906dd0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e906dd0

Branch: refs/heads/trunk
Commit: 1e906dd0e484d8cb333fe3fe37d6ae11cc5de809
Parents: 1857a45
Author: Xi Wang <xiwang@apache.org>
Authored: Fri Jun 20 12:45:23 2014 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Fri Jun 20 17:14:35 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  4 +++
 .../wizard/step3/step3_host_warnings_popup.hbs  |  2 +-
 .../wizard/step3/hostWarningPopupBody_view.js   | 26 ++++++++++++++++----
 3 files changed, 26 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1e906dd0/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 2cf9ff8..39580b3 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -453,6 +453,10 @@ Em.I18n.translations = {
   'installer.step3.hostWarningsPopup.report':'Show Report',
   'installer.step3.hostWarningsPopup.report.header': '<p style="font-family: monospace">######################################<br>#
Host Checks Report<br>#<br># Generated: ',
   'installer.step3.hostWarningsPopup.report.hosts': '<br>######################################<br><br>######################################<br>#
Hosts<br>#<br># A space delimited list of hosts which have issues.<br>#
Provided so that administrators can easily copy hostnames into scripts, email etc.<br>######################################<br>HOSTS<br>',
+  'installer.step3.hostWarningsPopup.report.jdk': '<br><br>######################################<br>#
JDK Check <br>#<br># A newline delimited list of JDK issues.<br>######################################<br>JDK
ISSUES<br>',
+  'installer.step3.hostWarningsPopup.report.disk': '<br><br>######################################<br>#
Disk <br>#<br># A newline delimited list of disk issues.<br>######################################<br>DISK
ISSUES<br>',
+  'installer.step3.hostWarningsPopup.report.repositories': '<br><br>######################################<br>#
Repositories <br>#<br># A newline delimited list of repositories issues.<br>######################################<br>REPOSITORIES
ISSUES<br>',
+  'installer.step3.hostWarningsPopup.report.hostNameResolution': '<br><br>######################################<br>#
Hostname Resolution<br>#<br># A space delimited list of host names on which hostname
resolution failed.<br>######################################<br>HOSTNAME RESOLUTION
ISSUES<br>',
   'installer.step3.hostWarningsPopup.report.firewall': '<br><br>######################################<br>#
Firewall<br>#<br># A newline delimited list of firewall issues.<br>######################################<br>FIREWALL<br>',
   'installer.step3.hostWarningsPopup.report.fileFolders': '<br><br>######################################<br>#
Files and Folders<br>#<br># A space delimited list of files and folders which
should not exist.<br># Provided so that administrators can easily copy paths into scripts,
email etc.<br># Example: rm -r /etc/hadoop /etc/hbase<br>######################################<br>FILES
AND FOLDERS<br>',
   'installer.step3.hostWarningsPopup.report.reverseLookup': '<br><br>######################################<br>#
Reverse Lookup<br># <br># The hostname was not found in the reverse DNS lookup.
This may result in incorrect behavior. <br># Please check the DNS setup and fix the
issue.<br>######################################<br>REVERSE LOOKUP<br>',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1e906dd0/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs b/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs
index b16edb4..a9dfd59 100644
--- a/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs
+++ b/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs
@@ -25,7 +25,7 @@
     <div class="span7">
       {{t common.hosts}}&nbsp;{{view view.hostSelectView}}
     </div>
-    {{#if view.categoryWarnings.length}}
+    {{#if view.totalWarningsCount}}
       <div class="span3 offset2">
         <a href="javascript:void(null)" title="Show Details" {{action openWarningsInDialog
target="view"}}
            class="task-detail-open-dialog"><i

http://git-wip-us.apache.org/repos/asf/ambari/blob/1e906dd0/ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js b/ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js
index 06ce91b..77d85b4 100644
--- a/ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js
+++ b/ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js
@@ -134,7 +134,7 @@ App.WizardStep3HostWarningPopupBody = Em.View.extend({
   categoryWarnings: function () {
     var warningsByHost = this.get('warningsByHost');
     if (Em.isNone(warningsByHost)) return [];
-    return warningsByHost.findProperty('name', this.get('category')).warnings
+    return warningsByHost.findProperty('name', this.get('category')).warnings;
   }.property('warningsByHost', 'category'),
 
   /**
@@ -286,6 +286,7 @@ App.WizardStep3HostWarningPopupBody = Em.View.extend({
   warningsNotice: function () {
     var issuesNumber = this.get('warnings.length') + this.get('bodyController.repoCategoryWarnings.length')
+ this.get('bodyController.diskCategoryWarnings.length')
       + this.get('bodyController.jdkCategoryWarnings.length') + this.get('bodyController.hostCheckWarnings.length');
+    this.set('totalWarningsCount', issuesNumber);
     var issues = issuesNumber + ' ' + (issuesNumber.length === 1 ? Em.I18n.t('installer.step3.hostWarningsPopup.issue')
: Em.I18n.t('installer.step3.hostWarningsPopup.issues'));
     var hostsCnt = this.warningHostsNamesCount();
     var hosts = hostsCnt + ' ' + (hostsCnt === 1 ? Em.I18n.t('installer.step3.hostWarningsPopup.host')
: Em.I18n.t('installer.step3.hostWarningsPopup.hosts'));
@@ -298,12 +299,26 @@ App.WizardStep3HostWarningPopupBody = Em.View.extend({
    */
   contentInDetails: function () {
     var content = this.get('content');
-    var warningsByHost = this.get('warningsByHost').slice();
-    warningsByHost.shift();
     var newContent = '';
     newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.header') + new Date;
     newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.hosts');
-    newContent += warningsByHost.filterProperty('warnings.length').mapProperty('name').join('
');
+    newContent += this.get('hostNamesWithWarnings').join(' ');
+    if (content.findProperty('category', 'jdk').warnings.length) {
+      newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.jdk');
+      newContent += content.findProperty('category', 'jdk').warnings[0].hosts.join('<br>');
+    }
+    if (content.findProperty('category', 'disk').warnings.length) {
+      newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.disk');
+      newContent += content.findProperty('category', 'disk').warnings[0].hosts.join('<br>');
+    }
+    if (content.findProperty('category', 'repositories').warnings.length) {
+      newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.repositories');
+      newContent += content.findProperty('category', 'repositories').warnings[0].hosts.join('<br>');
+    }
+    if (content.findProperty('category', 'hostNameResolution').warnings.length) {
+      newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.hostNameResolution');
+      newContent += content.findProperty('category', 'hostNameResolution').warnings[0].hosts.join('
');
+    }
     if (content.findProperty('category', 'firewall').warnings.length) {
       newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.firewall');
       newContent += content.findProperty('category', 'firewall').warnings.mapProperty('name').join('<br>');
@@ -341,7 +356,7 @@ App.WizardStep3HostWarningPopupBody = Em.View.extend({
     }
     newContent += '</p>';
     return newContent;
-  }.property('content', 'warningsByHost'),
+  }.property('content', 'warningsByHost', 'bodyController.jdkCategoryWarnings', 'bodyController.repoCategoryWarnings',
'bodyController.diskCategoryWarnings', 'bodyController.hostCheckWarnings'),
 
   didInsertElement: function () {
     Em.run.next(this, function () {
@@ -426,6 +441,7 @@ App.WizardStep3HostWarningPopupBody = Em.View.extend({
         }
       });
     }
+    this.set('hostNamesWithWarnings', Em.keys(hostNameMap));
     return Em.keys(hostNameMap).length;
   },
 


Mime
View raw message