This is an automated email from the ASF dual-hosted git repository. jialiang pushed a commit to branch zccc in repository https://gitbox.apache.org/repos/asf/ambari.git
commit c7b1939fb05e919c05a6860c15df783923762b9d Author: jialiang <[email protected]> AuthorDate: Sat Aug 31 09:00:13 2024 +0800 fix page error caussed by google api upgrade --- ambari-web/app/locales/default_messages.js | 2 ++ ambari-web/app/locales/zh/messages.js | 2 ++ ambari-web/app/mappers/components_state_mapper.js | 5 +++++ ambari-web/app/mappers/service_metrics_mapper.js | 3 +++ ambari-web/app/models/service/hbase.js | 3 +++ .../app/templates/main/service/services/hbase.hbs | 19 +++++++++++++++++++ ambari-web/app/utils/helper.js | 1 + ambari-web/app/views/main/service/services/hbase.js | 9 +++++++++ 8 files changed, 44 insertions(+) diff --git a/ambari-web/app/locales/default_messages.js b/ambari-web/app/locales/default_messages.js index 917d3839ba..b1d7b03cd0 100644 --- a/ambari-web/app/locales/default_messages.js +++ b/ambari-web/app/locales/default_messages.js @@ -3201,6 +3201,8 @@ var messages_ambari = { 'dashboard.services.hbase.averageLoadPerServer':'{0} regions per RegionServer', 'dashboard.services.hbase.regionServers':'RegionServers', 'dashboard.services.hbase.regionServersSummary':'{0} live / {1} total', + 'dashboard.services.hbase.hbaseRestGateways':'Hbase Rest Gateways', + 'dashboard.services.hbase.hbaseRestGatewaysSummary':'{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', diff --git a/ambari-web/app/locales/zh/messages.js b/ambari-web/app/locales/zh/messages.js index 27fa93bae5..8c95664a77 100644 --- a/ambari-web/app/locales/zh/messages.js +++ b/ambari-web/app/locales/zh/messages.js @@ -2591,6 +2591,8 @@ Em.I18n.translations = { "dashboard.services.hbase.regionServersSummary": "{0} live/ {1}合计", "dashboard.services.hbase.restServers": "HBaseRESTServer", "dashboard.services.hbase.restServersSummary": "{0} live/ {1}合计", + 'dashboard.services.hbase.hbaseRestGateways':'Hbase Rest Gateways', + 'dashboard.services.hbase.hbaseRestGatewaysSummary':'{0} live / {1} 合计', "dashboard.services.hbase.phoenixServers": "Phoenix Query Servers", "dashboard.services.hbase.phoenixServersSummary": "{0} live/ {1}合计", "dashboard.services.hbase.chart.label": "请求数", diff --git a/ambari-web/app/mappers/components_state_mapper.js b/ambari-web/app/mappers/components_state_mapper.js index fb1213840f..4b82f81273 100644 --- a/ambari-web/app/mappers/components_state_mapper.js +++ b/ambari-web/app/mappers/components_state_mapper.js @@ -82,6 +82,11 @@ App.componentsStateMapper = App.QuickDataMapper.create({ region_servers_installed: 'INSTALLED_PATH', region_servers_total: 'TOTAL_PATH' }, + 'HBASE_REST_GATEWAY': { + rest_gateways_started: 'STARTED_PATH', + rest_gateways_installed: 'INSTALLED_PATH', + rest_gateways_total: 'TOTAL_PATH' + }, 'PHOENIX_QUERY_SERVER': { phoenix_servers_started: 'STARTED_PATH', phoenix_servers_installed: 'INSTALLED_PATH', diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js index 7da550d6b1..c1cb19dece 100644 --- a/ambari-web/app/mappers/service_metrics_mapper.js +++ b/ambari-web/app/mappers/service_metrics_mapper.js @@ -147,6 +147,9 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({ region_servers_started: 'region_servers_started', region_servers_installed: 'region_servers_installed', region_servers_total: 'region_servers_total', + rest_gateways_started: 'rest_gateways_started', + rest_gateways_installed: 'rest_gateways_installed', + rest_gateways_total: 'rest_gateways_total', phoenix_servers_started: 'phoenix_servers_started', phoenix_servers_installed: 'phoenix_servers_installed', phoenix_servers_total: 'phoenix_servers_total' diff --git a/ambari-web/app/models/service/hbase.js b/ambari-web/app/models/service/hbase.js index 09378fc7c1..184a857c8c 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({ phoenixServersStarted: DS.attr('number'), phoenixServersInstalled: DS.attr('number'), phoenixServersTotal: DS.attr('number'), + restGatewaysStarted: DS.attr('number'), + restGatewaysInstalled: DS.attr('number'), + restGatewaysTotal: DS.attr('number'), masterStartTime: DS.attr('number'), masterActiveTime: DS.attr('number'), averageLoad: DS.attr('number'), diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs b/ambari-web/app/templates/main/service/services/hbase.hbs index 581099b3e0..fe0cbe775f 100644 --- a/ambari-web/app/templates/main/service/services/hbase.hbs +++ b/ambari-web/app/templates/main/service/services/hbase.hbs @@ -48,6 +48,25 @@ </div> </div> {{/if}} + {{! HbaseRestGateways }} + {{#if view.isHbaseRestGatewayCreated}} + <div {{bindAttr class=":row :component :col-md-3 view.hbaseRestGatewayComponent.componentName"}}> + <div class="summary-value main-info"> + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.restGatewaysStarted" totalComponentsBinding="view.service.restGatewaysTotal"}} + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/if}} + {{/view}} + </span> + {{t common.live}} + </div> + <div class="summary-label"> + <a + href="#" {{action filterHosts view.hbaseRestGatewayComponent}}>{{t dashboard.services.hbase.hbaseRestGateways}}</a> + </div> + </div> + {{/if}} {{! PhoenixServers }} {{#if view.isPhoenixQueryServerCreated}} <div {{bindAttr class=":row :component :col-md-3 view.phoenixServerComponent.componentName"}}> diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js index d05724d4d4..40aa043dfd 100644 --- a/ambari-web/app/utils/helper.js +++ b/ambari-web/app/utils/helper.js @@ -590,6 +590,7 @@ App.format = { 'GLUSTERFS': 'GLUSTERFS', 'HBASE': 'HBase', 'HBASE_REGIONSERVER': 'RegionServer', + 'HBASE_REST_GATEWAY': 'RestGateway', 'HCAT': 'HCat Client', 'HDFS': 'HDFS', 'HISTORYSERVER': 'History Server', diff --git a/ambari-web/app/views/main/service/services/hbase.js b/ambari-web/app/views/main/service/services/hbase.js index fd889a99d0..bb39be9f00 100644 --- a/ambari-web/app/views/main/service/services/hbase.js +++ b/ambari-web/app/views/main/service/services/hbase.js @@ -49,6 +49,7 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({ regionServesText: Em.computed.countBasedMessage('service.regionServersTotal', '', Em.I18n.t('services.service.summary.viewHost'), Em.I18n.t('services.service.summary.viewHosts')), phoenixServersText: Em.computed.countBasedMessage('service.phoenixServersTotal', '', Em.I18n.t('services.service.summary.viewHost'), Em.I18n.t('services.service.summary.viewHosts')), + hbaseRestGatewaysText: Em.computed.countBasedMessage('service.restGatewaysTotal', '', Em.I18n.t('services.service.summary.viewHost'), Em.I18n.t('services.service.summary.viewHosts')), /** * One(!) active master component @@ -86,6 +87,9 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({ phoenixServerComponent: Em.Object.create({ componentName: 'PHOENIX_QUERY_SERVER' }), + hbaseRestGatewayComponent: Em.Object.create({ + componentName: 'HBASE_REST_GATEWAY' + }), isRegionServerCreated: function () { return this.isServiceComponentCreated('HBASE_REGIONSERVER'); @@ -93,5 +97,10 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({ isPhoenixQueryServerCreated: function () { return this.isServiceComponentCreated('PHOENIX_QUERY_SERVER'); + }.property('App.router.clusterController.isComponentsStateLoaded'), + + isHbaseRestGatewayCreated: function () { + return this.isServiceComponentCreated('HBASE_REST_GATEWAY'); }.property('App.router.clusterController.isComponentsStateLoaded') + }); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
