Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4C33310F4E for ; Mon, 3 Mar 2014 20:15:16 +0000 (UTC) Received: (qmail 99764 invoked by uid 500); 3 Mar 2014 20:15:15 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 99730 invoked by uid 500); 3 Mar 2014 20:15:15 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 99723 invoked by uid 99); 3 Mar 2014 20:15:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 20:15:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5B8C4934243; Mon, 3 Mar 2014 20:15:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: <2c1c001195954e529d7cd1686efa3e6f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-4926 Storm: Update summary panel with status info. (Denys Buzhor via atkach) Date: Mon, 3 Mar 2014 20:15:15 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 30ceedab4 -> b05ae04ba AMBARI-4926 Storm: Update summary panel with status info. (Denys Buzhor via atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b05ae04b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b05ae04b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b05ae04b Branch: refs/heads/trunk Commit: b05ae04bad69467b921e2e9925bf3abe74fe9a0a Parents: 30ceeda Author: atkach Authored: Mon Mar 3 22:15:08 2014 +0200 Committer: atkach Committed: Mon Mar 3 22:15:08 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/messages.js | 5 +++ .../templates/main/dashboard/service/storm.hbs | 42 ++++++++++++++++++++ .../app/views/main/dashboard/service/storm.js | 14 ++++++- .../app/views/main/service/info/summary.js | 3 ++ 4 files changed, 63 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/b05ae04b/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 260aa9f..0f205ec 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1054,6 +1054,11 @@ Em.I18n.translations = { 'services.service.summary.notRunning':'Not Running', 'services.service.summary.notAvailable':'n/a', 'services.service.summary.diskInfoBar.used':'used', + 'services.service.summary.storm.freeslots': 'Free slots', + 'services.service.summary.storm.executors': 'Executors', + 'services.service.summary.storm.tasks': 'Tasks', + 'services.service.summary.storm.nimbus.uptime': 'Nimbus uptime', + 'services.service.summary.storm.topologies': 'Topologies', 'services.service.info.metrics.flume.channelFillPercent':'Channel Fill Percentage', 'services.service.info.metrics.flume.channelSize':'Channel Size', http://git-wip-us.apache.org/repos/asf/ambari/blob/b05ae04b/ambari-web/app/templates/main/dashboard/service/storm.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/dashboard/service/storm.hbs b/ambari-web/app/templates/main/dashboard/service/storm.hbs index 49cc1c9..298e0fe 100644 --- a/ambari-web/app/templates/main/dashboard/service/storm.hbs +++ b/ambari-web/app/templates/main/dashboard/service/storm.hbs @@ -31,3 +31,45 @@ {{t services.service.summary.SupervisorsLIVE}} + + + {{t services.service.summary.storm.freeslots}} + + + {{view.service.freeSlots}} / {{view.service.totalSlots}} ({{view.freeSlotsPercentage}}% free) + + + + + {{t services.service.summary.storm.tasks}} + + + {{view.service.totalTasks}} + + + + + {{t services.service.summary.storm.executors}} + + + {{view.service.totalExecutors}} + + + + + {{t services.service.summary.storm.topologies}} + + + {{view.service.topologies}} + + + + + {{t services.service.summary.storm.nimbus.uptime}} + + + {{view.nimbusUptimeFormatted}} + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/b05ae04b/ambari-web/app/views/main/dashboard/service/storm.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/storm.js b/ambari-web/app/views/main/dashboard/service/storm.js index 94132bf..f01f3f1 100644 --- a/ambari-web/app/views/main/dashboard/service/storm.js +++ b/ambari-web/app/views/main/dashboard/service/storm.js @@ -17,6 +17,7 @@ */ var App = require('app'); +var date = require('utils/date'); App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({ templateName: require('templates/main/dashboard/service/storm'), @@ -33,5 +34,16 @@ App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({ totalComponents: function() { return this.get('parentView.superVisorComponents').length; }.property('parentView.superVisorComponents.length') - }) + }), + + freeSlotsPercentage: function() { + return Math.round(this.get('service.freeSlots')/this.get('service.totalSlots')*100); + }.property('service.freeSlots', 'service.totalSlots'), + + nimbusUptimeFormatted: function() { + if (this.get('service.nimbusUptime') > 0) { + return date.timingFormat(this.get('service.nimbusUptime')*1000); + } + return Em.I18n.t('services.service.summary.notRunning'); + }.property('service.nimbusUptime') }); http://git-wip-us.apache.org/repos/asf/ambari/blob/b05ae04b/ambari-web/app/views/main/service/info/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js index 735d859..45aa433 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -280,6 +280,9 @@ App.MainServiceInfoSummaryView = Em.View.extend({ case 'flume': svc = App.FlumeService.find().objectAt(0); break; + case 'storm': + svc = App.StormService.find().objectAt(0); + break; default: break; }