Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65C6C10348 for ; Tue, 2 Jul 2013 17:32:34 +0000 (UTC) Received: (qmail 69318 invoked by uid 500); 2 Jul 2013 17:32:34 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 69267 invoked by uid 500); 2 Jul 2013 17:32:33 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 69260 invoked by uid 99); 2 Jul 2013 17:32:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 17:32:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 17:32:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7CFF82388A02; Tue, 2 Jul 2013 17:32:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1499030 - in /incubator/ambari/trunk/ambari-web/app: controllers/wizard/step3_controller.js messages.js templates/wizard/step3_host_warnings_popup.hbs Date: Tue, 02 Jul 2013 17:32:08 -0000 To: ambari-commits@incubator.apache.org From: srimanth@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130702173208.7CFF82388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: srimanth Date: Tue Jul 2 17:32:07 2013 New Revision: 1499030 URL: http://svn.apache.org/r1499030 Log: AMBARI-2540. Host Check UI: Show details action should provide appropriate content. (Aleksandr Kovalenko via srimanth) Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step3_controller.js incubator/ambari/trunk/ambari-web/app/messages.js incubator/ambari/trunk/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step3_controller.js URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step3_controller.js?rev=1499030&r1=1499029&r2=1499030&view=diff ============================================================================== --- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step3_controller.js (original) +++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step3_controller.js Tue Jul 2 17:32:07 2013 @@ -915,31 +915,36 @@ App.WizardStep3Controller = Em.Controlle warnings: categoryWarnings.filterProperty('category', 'processes'), title: Em.I18n.t('installer.step3.hostWarningsPopup.processes'), message: Em.I18n.t('installer.step3.hostWarningsPopup.processes.message'), - type: Em.I18n.t('common.process') + type: Em.I18n.t('common.process'), + category: 'process' }, { warnings: categoryWarnings.filterProperty('category', 'packages'), title: Em.I18n.t('installer.step3.hostWarningsPopup.packages'), message: Em.I18n.t('installer.step3.hostWarningsPopup.packages.message'), - type: Em.I18n.t('common.package') + type: Em.I18n.t('common.package'), + category: 'package' }, { warnings: categoryWarnings.filterProperty('category', 'fileFolders'), title: Em.I18n.t('installer.step3.hostWarningsPopup.fileFolders'), message: Em.I18n.t('installer.step3.hostWarningsPopup.fileFolders.message'), - type: Em.I18n.t('common.path') + type: Em.I18n.t('common.path'), + category: 'fileFolders' }, { warnings: categoryWarnings.filterProperty('category', 'services'), title: Em.I18n.t('installer.step3.hostWarningsPopup.services'), message: Em.I18n.t('installer.step3.hostWarningsPopup.services.message'), - type: Em.I18n.t('common.service') + type: Em.I18n.t('common.service'), + category: 'service' }, { warnings: categoryWarnings.filterProperty('category', 'users'), title: Em.I18n.t('installer.step3.hostWarningsPopup.users'), message: Em.I18n.t('installer.step3.hostWarningsPopup.users.message'), - type: Em.I18n.t('common.user') + type: Em.I18n.t('common.user'), + category: 'user' } ] }.property('category', 'warningsByHost'), @@ -952,38 +957,44 @@ App.WizardStep3Controller = Em.Controlle /** * generate detailed content to show it in new window */ - contentInDetails: function(){ + contentInDetails: function () { var content = this.get('content'); + var warningsByHost = this.get('warningsByHost').slice(); + warningsByHost.shift(); var newContent = ''; - if(content.hostName == 'All Hosts'){ - newContent += '

'+Em.I18n.t('installer.step3.warningsWindow.allHosts')+'

'; - } else { - newContent += '

' + Em.I18n.t('installer.step3.warningsWindow.warningsOn') + content.hostName + '

'; + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.header') + new Date; + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.hosts'); + newContent += warningsByHost.mapProperty('name').join(' '); + if (content.findProperty('category', 'fileFolders').warnings.length) { + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.fileFolders'); + newContent += content.findProperty('category', 'fileFolders').warnings.mapProperty('name').join(' ') + Em.I18n.t('installer.step3.hostWarningsPopup.report.folder'); + } + if (content.findProperty('category', 'process').warnings.length) { + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.process'); + content.findProperty('category', 'process').warnings.forEach(function (process, i) { + process.hosts.forEach(function (host, j) { + if (!!i || !!j) { + newContent += ','; + } + newContent += '(' + host + ',' + process.user + ',' + process.pid + ')'; + }); + }); } - newContent += '
' + Em.I18n.t('installer.step3.warningsWindow.directoriesAndFiles') + '
'; - content.directoriesFiles.filterProperty('isWarn', true).forEach(function(path){ - newContent += path.name + ' ' - }); - if(content.directoriesFiles.filterProperty('isWarn', true).length == 0){ - newContent += Em.I18n.t('installer.step3.warningsWindow.noWarnings'); + if (content.findProperty('category', 'package').warnings.length) { + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.package'); + newContent += content.findProperty('category', 'package').warnings.mapProperty('name').join(' '); } - newContent += '

PACKAGES
'; - content.packages.filterProperty('isWarn', true).forEach(function(_package){ - newContent += _package.name + ' ' - }); - if(content.packages.filterProperty('isWarn', true).length == 0){ - newContent += Em.I18n.t('installer.step3.warningsWindow.noWarnings'); + if (content.findProperty('category', 'service').warnings.length) { + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.service'); + newContent += content.findProperty('category', 'service').warnings.mapProperty('name').join(' '); } - newContent += '

PROCESSES
'; - content.processes.filterProperty('isWarn', true).forEach(function(process, index){ - newContent += '(' + content.hostName + ',' + process.pid + ',' + process.user + ')'; - newContent += (index != (content.processes.filterProperty('isWarn', true).length-1)) ? ',' : ''; - }) - if(content.processes.filterProperty('isWarn', true).length == 0){ - newContent += Em.I18n.t('installer.step3.warningsWindow.noWarnings'); + if (content.findProperty('category', 'user').warnings.length) { + newContent += Em.I18n.t('installer.step3.hostWarningsPopup.report.user'); + newContent += content.findProperty('category', 'user').warnings.mapProperty('name').join(' '); } + newContent += '

'; return newContent; - }.property('content'), + }.property('content', 'warningsByHost'), /** * open new browser tab with detailed content */ Modified: incubator/ambari/trunk/ambari-web/app/messages.js URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1499030&r1=1499029&r2=1499030&view=diff ============================================================================== --- incubator/ambari/trunk/ambari-web/app/messages.js (original) +++ incubator/ambari/trunk/ambari-web/app/messages.js Tue Jul 2 17:32:07 2013 @@ -309,7 +309,15 @@ Em.I18n.translations = { 'installer.step3.hosts.remove.popup.body':'Are you sure you want to remove the selected host(s)?', 'installer.step3.hostInformation.popup.header':'Error in retrieving host Information', 'installer.step3.hostInformation.popup.body' : 'All bootstrapped hosts registered but unable to retrieve cpu and memory related information', - 'installer.step3.hostWarningsPopup.details':'Show Details', + 'installer.step3.hostWarningsPopup.report':'Show Report', + 'installer.step3.hostWarningsPopup.report.header': '

######################################
# Host Checks Report
#
# Generated: ', + 'installer.step3.hostWarningsPopup.report.hosts': '
######################################

######################################
# Hosts
#
# A space delimited list of hosts which have issues.
# Provided so that administrators can easily copy hostnames into scripts, email etc.
######################################
HOSTS
', + 'installer.step3.hostWarningsPopup.report.fileFolders': '

######################################
# Files and Folders
#
# A space delimited list of files and folders which should not exist.
# Provided so that administrators can easily copy paths into scripts, email etc.
# Example: rm -r /etc/hadoop /etc/hbase /etc/some\\ /folder
######################################
FILES AND FOLDERS
', + 'installer.step3.hostWarningsPopup.report.process': '

######################################
# Processes
#
# A comma separated list of process tuples which should not be running.
# Provided so that administrators can easily copy paths into scripts, email etc.
######################################
PROCESSES
', + 'installer.step3.hostWarningsPopup.report.package': '

######################################
# Packages
#
# A space delimited list of software packages which should be uninstalled.
# Provided so that administrators can easily copy paths into scripts, email etc.
# Example: yum remove hadoop-hdfs nagios
######################################
PACKAGES
', + 'installer.step3.hostWarningsPopup.report.service': '

######################################
# Services
#
# A space delimited list of services which should be up and running.
# Provided so that administrators can easily copy paths into scripts, email etc.
# Example: services start ntpd httpd
######################################
SERVICES
', + 'installer.step3.hostWarningsPopup.report.user': '

######################################
# Users
#
# A space delimited list of users who should not exist.
# Provided so that administrators can easily copy paths into scripts, email etc.
# Example: userdel hdfs
######################################
USERS
', + 'installer.step3.hostWarningsPopup.report.folder': '\\ /folder', 'installer.step3.hostWarningsPopup.notice':'The following issues were detected on some hosts. Click the Rerun Checks button after manually resolve the issues. To resolve the warnings, run /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py on each host.', 'installer.step3.hostWarningsPopup.summary':'{0} issues on {1} hosts', 'installer.step3.hostWarningsPopup.processes':'process issues', Modified: incubator/ambari/trunk/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs?rev=1499030&r1=1499029&r2=1499030&view=diff ============================================================================== --- incubator/ambari/trunk/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs (original) +++ incubator/ambari/trunk/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs Tue Jul 2 17:32:07 2013 @@ -31,7 +31,7 @@

{{t installer.step3.hostWarningsPopup.details}} + class="icon-external-link"> {{t installer.step3.hostWarningsPopup.report}}