Repository: ambari
Updated Branches:
  refs/heads/trunk a3b691482 -> 326d5928c


AMBARI-10906. Show Phoenix Query Servers link and status in HBase summary panel 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 326d5928cf546557597fc3c787dd945e3bd950bd
Parents: a3b6914
Author: Alex Antonenko <hiv...@gmail.com>
Authored: Tue May 5 07:58:16 2015 +0300
Committer: Alex Antonenko <hiv...@gmail.com>
Committed: Tue May 5 07:58:26 2015 +0300

----------------------------------------------------------------------
 .../app/mappers/components_state_mapper.js      |  5 ++++
 .../app/mappers/service_metrics_mapper.js       |  5 +++-
 ambari-web/app/messages.js                      |  3 +++
 ambari-web/app/models/service/hbase.js          |  3 +++
 .../templates/main/service/services/hbase.hbs   | 15 ++++++++++++
 .../app/views/main/service/services/hbase.js    | 24 +++++++++++++++++++-
 6 files changed, 53 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/mappers/components_state_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/components_state_mapper.js 
b/ambari-web/app/mappers/components_state_mapper.js
index ee3bccf..1359dc3 100644
--- a/ambari-web/app/mappers/components_state_mapper.js
+++ b/ambari-web/app/mappers/components_state_mapper.js
@@ -63,6 +63,11 @@ App.componentsStateMapper = App.QuickDataMapper.create({
       region_servers_installed: 'INSTALLED_PATH',
       region_servers_total: 'TOTAL_PATH'
     },
+    'PHOENIX_QUERY_SERVER': {
+      phoenix_servers_started: 'STARTED_PATH',
+      phoenix_servers_installed: 'INSTALLED_PATH',
+      phoenix_servers_total: 'TOTAL_PATH'
+    },
     'GANGLIA_MONITOR': {
       ganglia_monitors_started: 'STARTED_PATH',
       ganglia_monitors_installed: 'INSTALLED_PATH',

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js 
b/ambari-web/app/mappers/service_metrics_mapper.js
index f6e0756..9be798a 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -112,7 +112,10 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     heap_memory_max: 'masterComponent.ServiceComponentInfo.HeapMemoryMax',
     region_servers_started: 'region_servers_started',
     region_servers_installed: 'region_servers_installed',
-    region_servers_total: 'region_servers_total'
+    region_servers_total: 'region_servers_total',
+    phoenix_servers_started: 'phoenix_servers_started',
+    phoenix_servers_installed: 'phoenix_servers_installed',
+    phoenix_servers_total: 'phoenix_servers_total'
   },
   stormConfig: {
     total_tasks: 'restApiComponent.tasksTotal',

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 652c415..f999a2c 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1442,6 +1442,7 @@ Em.I18n.translations = {
   'services.service.summary.nodeManagersLive':'NodeManagers Live',
   'services.service.summary.TrackersLive':'Trackers Live',
   'services.service.summary.RegionServersLIVE':'RegionServers Live',
+  'services.service.summary.PhoenixServersLIVE':'Phoenix Query servers Live',
   'services.service.summary.GangliaMonitorsLIVE':'Ganglia Monitors Live',
   'services.service.summary.SupervisorsLIVE':'Supervisors Live',
   'services.service.summary.nameNode':'NameNode Web UI',
@@ -2409,6 +2410,8 @@ Em.I18n.translations = {
   'dashboard.services.hbase.averageLoadPerServer':'{0} regions per 
RegionServer',
   'dashboard.services.hbase.regionServers':'RegionServers',
   'dashboard.services.hbase.regionServersSummary':'{0} live / {1} total',
+  'dashboard.services.hbase.phoenixServers':'Phoenix Query Servers',
+  'dashboard.services.hbase.phoenixServersSummary':'{0} live / {1} total',
   'dashboard.services.hbase.chart.label':'Request Count',
   'dashboard.services.hbase.version':'Version',
   'dashboard.services.hbase.masterWebUI':'Master Web UI',

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/models/service/hbase.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/hbase.js 
b/ambari-web/app/models/service/hbase.js
index 6955f22..662577f 100644
--- a/ambari-web/app/models/service/hbase.js
+++ b/ambari-web/app/models/service/hbase.js
@@ -25,6 +25,9 @@ App.HBaseService = App.Service.extend({
   regionServersStarted: DS.attr('number'),
   regionServersInstalled: DS.attr('number'),
   regionServersTotal: DS.attr('number'),
+  phoenixServersStarted: DS.attr('number'),
+  phoenixServersInstalled: DS.attr('number'),
+  phoenixServersTotal: DS.attr('number'),
   masterStartTime: DS.attr('number'),
   masterActiveTime: DS.attr('number'),
   averageLoad: DS.attr('number'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/templates/main/service/services/hbase.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs 
b/ambari-web/app/templates/main/service/services/hbase.hbs
index e70e218..5503929 100644
--- a/ambari-web/app/templates/main/service/services/hbase.hbs
+++ b/ambari-web/app/templates/main/service/services/hbase.hbs
@@ -31,6 +31,21 @@
       {{t services.service.summary.RegionServersLIVE}}
   </td>
 </tr>
+<!-- PhoenixServers -->
+{{#if view.showPhoenixInfo}}
+  <tr>
+      <td class="summary-label"><a href="#" {{action filterHosts 
view.regionServerComponent}}>{{t dashboard.services.hbase.phoenixServers}}</a>
+      </td>
+      <td>
+      <span>
+        {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.service.phoenixServersStarted" 
totalComponentsBinding="view.service.phoenixServersTotal"}}
+          {{view.liveComponents}}/{{view.totalComponents}}
+        {{/view}}
+      </span>
+        {{t services.service.summary.PhoenixServersLIVE}}
+      </td>
+  </tr>
+{{/if}}
 <!-- Regions in Transition -->
 <tr>
   <td class="summary-label">{{t 
dashboard.services.hbase.regions.transition}}</td>

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/views/main/service/services/hbase.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hbase.js 
b/ambari-web/app/views/main/service/services/hbase.js
index e27197f..f4c5194 100644
--- a/ambari-web/app/views/main/service/services/hbase.js
+++ b/ambari-web/app/views/main/service/services/hbase.js
@@ -47,6 +47,23 @@ App.MainDashboardServiceHbaseView = 
App.MainDashboardServiceView.extend({
     }
   }.property("service"),
 
+  phoenixServersText: function () {
+    if (this.get('service.phoenixServersTotal') == 0) {
+      return '';
+    } else if (this.get('service.phoenixServersTotal') > 1) {
+      return Em.I18n.t('services.service.summary.viewHosts');
+    } else {
+      return Em.I18n.t('services.service.summary.viewHost');
+    }
+  }.property("service"),
+
+  showPhoenixInfo: function () {
+    if (this.get('service.phoenixServersTotal') > 0) {
+      return true;
+    }
+    return false;
+  }.property("service"),
+
   /**
    * One(!) active master component
    */
@@ -120,6 +137,11 @@ App.MainDashboardServiceHbaseView = 
App.MainDashboardServiceView.extend({
       componentName: 'HBASE_REGIONSERVER'
     });
     //return this.get('service.regionServers').objectAt(0);
-  }.property()
+  }.property(),
 
+  phoenixServerComponent: function () {
+    return Em.Object.create({
+      componentName: 'PHOENIX_QUERY_SERVER'
+    });
+  }.property()
 });
\ No newline at end of file

Reply via email to