Updated Branches: refs/heads/trunk b62c675be -> e059591f7
AMBARI-3265. Add alert for iptables on host checks on the UI. (srimanth) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/e059591f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/e059591f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/e059591f Branch: refs/heads/trunk Commit: e059591f7ed174f05e1ef17a90409264dbe4ad6d Parents: b62c675 Author: Srimanth Gunturi <[email protected]> Authored: Tue Sep 17 15:23:59 2013 -0700 Committer: Srimanth Gunturi <[email protected]> Committed: Tue Sep 17 15:44:59 2013 -0700 ---------------------------------------------------------------------- .../app/controllers/wizard/step3_controller.js | 46 ++++++++++++++++---- ambari-web/app/messages.js | 5 +++ .../wizard/step3_host_warnings_popup.hbs | 4 +- 3 files changed, 44 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e059591f/ambari-web/app/controllers/wizard/step3_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index 527ae96..b439941 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -867,6 +867,25 @@ App.WizardStep3Controller = Em.Controller.extend({ } host.warnings.push(warning); } + + var firewallRunning = _host.Hosts.last_agent_env.iptablesIsRunning; + if (firewallRunning!==null && firewallRunning) { + var name = Em.I18n.t('installer.step3.hostWarningsPopup.firewall.name'); + warning = warnings.filterProperty('category', 'firewall').findProperty('name', name); + if (warning) { + warning.hosts.push(_host.Hosts.host_name); + warning.onSingleHost = false; + } else { + warning = { + name: name, + hosts: [_host.Hosts.host_name], + category: 'firewall', + onSingleHost: true + } + warnings.push(warning); + } + host.warnings.push(warning); + } hosts.push(host); }, this); @@ -978,15 +997,24 @@ App.WizardStep3Controller = Em.Controller.extend({ content: function () { var categoryWarnings = this.get('categoryWarnings'); return [ - Ember.Object.create({ - warnings: categoryWarnings.filterProperty('category', 'processes'), - title: Em.I18n.t('installer.step3.hostWarningsPopup.process'), - message: Em.I18n.t('installer.step3.hostWarningsPopup.processes.message'), - type: Em.I18n.t('common.process'), - emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.processes'), - action: Em.I18n.t('installer.step3.hostWarningsPopup.action.running'), - category: 'process' - }), + Ember.Object.create({ + warnings: categoryWarnings.filterProperty('category', 'firewall'), + title: Em.I18n.t('installer.step3.hostWarningsPopup.firewall'), + message: Em.I18n.t('installer.step3.hostWarningsPopup.firewall.message'), + type: Em.I18n.t('common.issues'), + emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.firewall'), + action: Em.I18n.t('installer.step3.hostWarningsPopup.action.running'), + category: 'firewall' + }), + Ember.Object.create({ + warnings: categoryWarnings.filterProperty('category', 'processes'), + title: Em.I18n.t('installer.step3.hostWarningsPopup.process'), + message: Em.I18n.t('installer.step3.hostWarningsPopup.processes.message'), + type: Em.I18n.t('common.process'), + emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.processes'), + action: Em.I18n.t('installer.step3.hostWarningsPopup.action.running'), + category: 'process' + }), Ember.Object.create({ warnings: categoryWarnings.filterProperty('category', 'packages'), title: Em.I18n.t('installer.step3.hostWarningsPopup.package'), http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e059591f/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 600e053..5a7015a 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -98,6 +98,7 @@ Em.I18n.translations = { 'common.clients':'Clients', 'common.user': 'User', 'common.users': 'Users', + 'common.issues': 'Issues', 'common.os':'OS', 'common.memory':'Memory', 'common.maximum':'Maximum', @@ -347,6 +348,9 @@ Em.I18n.translations = { 'installer.step3.hostWarningsPopup.checks': 'Host Checks found', 'installer.step3.hostWarningsPopup.notice':'After manually resolving the issues, click <b>Rerun Checks</b>.<br>To manually resolve issues on <b>each host</b> run the HostCleanup script (Python 2.6 or greater is required):<br><div class="code-snippet">python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py</div>', 'installer.step3.hostWarningsPopup.summary':'{0} on {1}', + 'installer.step3.hostWarningsPopup.firewall':'Firewall Issues', + '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.process':'Process Issues', 'installer.step3.hostWarningsPopup.processes.message':'The following processes should not be running', 'installer.step3.hostWarningsPopup.fileAndFolder':'File and Folder Issues', @@ -369,6 +373,7 @@ Em.I18n.translations = { 'installer.step3.hostWarningsPopup.empty.users':'unwanted users', 'installer.step3.hostWarningsPopup.empty.services':'unwanted services', 'installer.step3.hostWarningsPopup.empty.misc':'issues', + 'installer.step3.hostWarningsPopup.empty.firewall':'firewalls running', 'installer.step3.hostWarningsPopup.action.exists':'Exists on', 'installer.step3.hostWarningsPopup.action.notRunning':'Not running on', 'installer.step3.hostWarningsPopup.action.installed':'Installed on', http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e059591f/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs b/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs index 59e2062..abb174f 100644 --- a/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs +++ b/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs @@ -56,7 +56,7 @@ <table> <thead> <tr> - <th colspan="2">{{category.message}}</th> + <th colspan="2">{{{category.message}}}</th> </tr> <tr> <th colspan="2"><b>{{category.type}}</b></th> @@ -65,7 +65,7 @@ <tbody> {{#each warning in category.warnings}} <tr> - <td class="warning-name" {{bindAttr data-original-title="warning.command"}} >{{warning.name}}</td> + <td class="warning-name" {{bindAttr data-original-title="warning.command"}} >{{{warning.name}}}</td> {{#if warning.version}} <td class="package-version">{{warning.version}}</td> {{/if}}
