ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-4926 Storm: Update summary panel with status info. (Denys Buzhor via atkach)
Date Mon, 03 Mar 2014 20:15:15 GMT
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 <atkach@hortonworks.com>
Authored: Mon Mar 3 22:15:08 2014 +0200
Committer: atkach <atkach@hortonworks.com>
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 @@
     </span> {{t services.service.summary.SupervisorsLIVE}}
   </td>
 </tr>
+<tr>
+  <td>
+    {{t services.service.summary.storm.freeslots}}
+  </td>
+  <td>
+    {{view.service.freeSlots}} / {{view.service.totalSlots}} ({{view.freeSlotsPercentage}}%
free)
+  </td>
+</tr>
+<tr>
+  <td>
+    {{t services.service.summary.storm.tasks}}
+  </td>
+  <td>
+    {{view.service.totalTasks}}
+  </td>
+</tr>
+<tr>
+  <td>
+    {{t services.service.summary.storm.executors}}
+  </td>
+  <td>
+    {{view.service.totalExecutors}}
+  </td>
+</tr>
+<tr>
+  <td>
+    {{t services.service.summary.storm.topologies}}
+  </td>
+  <td>
+    {{view.service.topologies}}
+  </td>
+</tr>
+<tr>
+  <td>
+    {{t services.service.summary.storm.nimbus.uptime}}
+  </td>
+  <td>
+    {{view.nimbusUptimeFormatted}}
+  </td>
+</tr>
+
+

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;
       }


Mime
View raw message