http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/service/services/yarn.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/yarn.hbs b/ambari-web/app/templates/main/service/services/yarn.hbs index c29bbcc..cd61ee7 100644 --- a/ambari-web/app/templates/main/service/services/yarn.hbs +++ b/ambari-web/app/templates/main/service/services/yarn.hbs @@ -22,14 +22,14 @@ <td class="summary-label"><a href="#" {{action filterHosts view.nodeManagerComponent}}>{{t dashboard.services.yarn.nodeManagers}}</a></td> <td> - {{#if App.router.clusterController.isComponentsStateLoaded}} + {{#if App.router.clusterController.isServiceContentFullyLoaded}} <span> {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nodeManagersStarted" totalComponentsBinding="view.service.nodeManagersTotal"}} {{view.liveComponents}}/{{view.totalComponents}} {{/view}} </span>{{t common.started}} {{else}} - {{t common.noData}} + {{t common.loading.eclipses}} {{/if}} </td> </tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js index d796441..dead76e 100644 --- a/ambari-web/app/views.js +++ b/ambari-web/app/views.js @@ -245,30 +245,6 @@ require('views/main/service/info/menu'); require('views/main/service/info/summary'); require('views/main/service/info/configs'); require('views/main/service/info/metric_graphs_view'); -require('views/main/service/info/metrics/hdfs/jvm_threads'); -require('views/main/service/info/metrics/hdfs/jvm_heap'); -require('views/main/service/info/metrics/hdfs/io'); -require('views/main/service/info/metrics/hdfs/rpc'); -require('views/main/service/info/metrics/hdfs/file_operations'); -require('views/main/service/info/metrics/hdfs/gc'); -require('views/main/service/info/metrics/hdfs/space_utilization'); -require('views/main/service/info/metrics/hdfs/block_status'); -require('views/main/service/info/metrics/yarn/gc'); -require('views/main/service/info/metrics/yarn/jvm_threads'); -require('views/main/service/info/metrics/yarn/jvm_heap'); -require('views/main/service/info/metrics/yarn/rpc'); -require('views/main/service/info/metrics/yarn/allocated'); -require('views/main/service/info/metrics/yarn/allocated_container'); -require('views/main/service/info/metrics/yarn/apps_current_states'); -require('views/main/service/info/metrics/yarn/apps_finished_states'); -require('views/main/service/info/metrics/yarn/nms'); -require('views/main/service/info/metrics/yarn/qmr'); -require('views/main/service/info/metrics/hbase/cluster_requests'); -require('views/main/service/info/metrics/hbase/regionserver_rw_requests'); -require('views/main/service/info/metrics/hbase/regionserver_regions'); -require('views/main/service/info/metrics/hbase/regionserver_queuesize'); -require('views/main/service/info/metrics/hbase/hlog_split_time'); -require('views/main/service/info/metrics/hbase/hlog_split_size'); require('views/main/service/info/metrics/ambari_metrics/master_average_load'); require('views/main/service/info/metrics/ambari_metrics/regionserver_base'); require('views/main/service/info/metrics/ambari_metrics/regionserver_store_files'); http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/dashboard/widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widget.js b/ambari-web/app/views/main/dashboard/widget.js index b63e89f..4ab8ec5 100644 --- a/ambari-web/app/views/main/dashboard/widget.js +++ b/ambari-web/app/views/main/dashboard/widget.js @@ -106,6 +106,12 @@ App.DashboardWidgetView = Em.View.extend({ thresh2: null, /** + * @type {Boolean} + * @default false + */ + isDataLoadedBinding: 'App.router.clusterController.isServiceContentFullyLoaded', + + /** * @type {Em.Object} * @class */ http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/dashboard/widgets/links_widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/links_widget.js b/ambari-web/app/views/main/dashboard/widgets/links_widget.js index 1aabdcb..e9dfdca 100644 --- a/ambari-web/app/views/main/dashboard/widgets/links_widget.js +++ b/ambari-web/app/views/main/dashboard/widgets/links_widget.js @@ -41,7 +41,7 @@ App.LinkDashboardWidgetView = App.DashboardWidgetView.extend({ this.set('webUrl', this.calcWebUrl()); }, calcWebUrl: function() { - if (this.get('model')) { + if (this.get('model') && this.get('model').get(this.get('modelField'))) { return "http://" + this.get('model').get(this.get('modelField')).get('publicHostName') + ':' + this.get('port'); } return ''; http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js b/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js index 5559a94..ead0d47 100644 --- a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js +++ b/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js @@ -26,29 +26,31 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({ model_type: 'hdfs', widgetHtmlId: 'widget-nn-cpu', cpuWio: null, - nnHostName:"", + nnHostName: "", intervalId: null, - willDestroyElement: function() { + willDestroyElement: function () { clearInterval(this.get("intervalId")); }, - didInsertElement: function() { + didInsertElement: function () { this._super(); var self = this, - intervalId; - if (App.get('isHaEnabled')) { - this.set('nnHostName', this.get('model').get('activeNameNode.hostName')); - }else{ - this.set('nnHostName', this.get('model').get('nameNode.hostName')); - } - if (this.get('nnHostName')) { - this.getValue(); - intervalId = setInterval(function () { - self.getValue() - }, App.componentsUpdateInterval); - this.set('intervalId', intervalId); - } + intervalId; + App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () { + if (App.get('isHaEnabled')) { + self.set('nnHostName', self.get('model').get('activeNameNode.hostName')); + } else { + self.set('nnHostName', self.get('model').get('nameNode.hostName')); + } + if (self.get('nnHostName')) { + self.getValue(); + intervalId = setInterval(function () { + self.getValue() + }, App.componentsUpdateInterval); + self.set('intervalId', intervalId); + } + }); }, getValue: function () { @@ -72,14 +74,14 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({ this.calc(); }, - calcHiddenInfo: function() { + calcHiddenInfo: function () { var value = this.get('cpuWio'); var obj1; - if( value == null) { + if (value == null) { obj1 = Em.I18n.t('services.service.summary.notAvailable'); } else { - value = value >= 100 ? 100: value; + value = value >= 100 ? 100 : value; obj1 = (value + 0).toFixed(2) + '%'; } var result = []; @@ -88,7 +90,7 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({ return result; }, - calcIsPieExists: function() { + calcIsPieExists: function () { return (!Em.isNone(this.get('cpuWio'))); }, @@ -97,6 +99,6 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({ value = value >= 100 ? 100 : value; var percent = (value + 0).toFixed(1); var percent_precise = (value + 0).toFixed(2); - return [ percent, percent_precise]; + return [percent, percent_precise]; } }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js index b8f3c7d..64bc775 100644 --- a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js +++ b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js @@ -27,7 +27,7 @@ App.DataNodeComponentView = App.HostComponentView.extend(App.Decommissionable, { * @returns {$.ajax} */ getDNDecommissionStatus: function () { - // always get datanode decommission statue from active namenode (if NN HA enabled) + // always get datanode decommission status from active namenode (if NN HA enabled) var hdfs = App.HDFSService.find().objectAt(0); var activeNNHostName = (!hdfs.get('snameNode') && hdfs.get('activeNameNode')) ? hdfs.get('activeNameNode.hostName') : hdfs.get('nameNode.hostName'); return App.ajax.send({ http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/host/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js index 06e3d09..d70951d 100644 --- a/ambari-web/app/views/main/host/summary.js +++ b/ambari-web/app/views/main/host/summary.js @@ -118,7 +118,7 @@ App.MainHostSummaryView = Em.View.extend({ */ installedServices: function () { return App.Service.find().mapProperty('serviceName'); - }.property('App.router.clusterController.dataLoadList.serviceMetrics'), + }.property('App.router.clusterController.dataLoadList.services'), /** * List of installed masters and slaves http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js b/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js deleted file mode 100644 index 78d5f6f..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing HBase Cluster Requests - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHBASE_ClusterRequests = App.ChartLinearTimeView.extend({ - id: "service-metrics-hbase-cluster-requests", - title: Em.I18n.t('services.service.info.metrics.hbase.clusterRequests'), - - ajaxIndex: 'service.metrics.hbase.cluster_requests', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.master) { - for ( var name in jsonData.metrics.hbase.master) { - var displayName; - var seriesData = jsonData.metrics.hbase.master[name]; - switch (name) { - case "cluster_requests": - displayName = Em.I18n.t('services.service.info.metrics.hbase.clusterRequests.displayNames.requestCount'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js b/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js deleted file mode 100644 index 15d6fcb..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing HBase Cluster Requests - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHBASE_HlogSplitSize = App.ChartLinearTimeView.extend({ - id: "service-metrics-hbase-hlog-split-size", - title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitSize'), - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - - ajaxIndex: 'service.metrics.hbase.hlog_split_size', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.master) { - for ( var name in jsonData.metrics.hbase.master) { - var displayName; - var seriesData = jsonData.metrics.hbase.master[name]; - switch (name) { - case "splitSize_avg_time": - displayName = Em.I18n.t('services.service.info.metrics.hbase.hlogSplitSize.displayNames.splitSize'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js b/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js deleted file mode 100644 index 01e7a28..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing HBase Cluster Requests - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHBASE_HlogSplitTime = App.ChartLinearTimeView.extend({ - id: "service-metrics-hbase-hlog-split-time", - title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitTime'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.hbase.hlog_split_time', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.master) { - for ( var name in jsonData.metrics.hbase.master) { - var displayName; - var seriesData = jsonData.metrics.hbase.master[name]; - switch (name) { - case "splitTime_avg_time": - displayName = Em.I18n.t('services.service.info.metrics.hbase.hlogSplitTime.displayNames.splitTime'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js b/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js deleted file mode 100644 index 9136de0..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing HBase Cluster Requests - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHBASE_RegionServerQueueSize = App.ChartLinearTimeView.extend({ - id: "service-metrics-hbase-regionserver-queuesize", - title: Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize'), - renderer: 'line', - ajaxIndex: 'service.metrics.hbase.regionserver_queuesize', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.regionserver) { - for ( var name in jsonData.metrics.hbase.regionserver) { - var displayName; - var seriesData = jsonData.metrics.hbase.regionserver[name]; - switch (name) { - case "compactionQueueSize": - displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize.displayNames.compactionQueueSize'); - break; - case "flushQueueSize": - displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize.displayNames.flushQueueSize'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js b/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js deleted file mode 100644 index 421bc08..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing HBase Cluster Requests - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHBASE_RegionServerRegions = App.ChartLinearTimeView.extend({ - id: "service-metrics-hbase-regionserver-regions", - title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRegions'), - - ajaxIndex: 'service.metrics.hbase.regionserver_regions', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.regionserver) { - for ( var name in jsonData.metrics.hbase.regionserver) { - var displayName; - var seriesData = jsonData.metrics.hbase.regionserver[name]; - switch (name) { - case "regions": - displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerRegions.displayNames.regions'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js b/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js deleted file mode 100644 index 7df350c..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing HBase Cluster Requests - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHBASE_RegionServerReadWriteRequests = App.ChartLinearTimeView.extend({ - id: "service-metrics-hbase-regionserver-rw-requests", - renderer: 'line', - ajaxIndex: 'service.metrics.hbase.regionserver_rw_requests', - yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('req', - App.ChartLinearTimeView.DefaultFormatter), - title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests.2'), - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.regionserver) { - for ( var name in jsonData.metrics.hbase.regionserver) { - var displayName; - var seriesData = jsonData.metrics.hbase.regionserver[name]; - switch (name) { - case "writeRequestsCount": - displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests.displayNames.writeRequests'); - break; - case "readRequestsCount": - displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests.displayNames.readRequests'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js b/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js deleted file mode 100644 index c46ee2f..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_BlockStatus = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-block-status", - title: Em.I18n.t('services.service.info.metrics.hdfs.blockStatus'), - renderer: 'line', - - ajaxIndex: 'service.metrics.hdfs.block_status', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem) { - for ( var name in jsonData.metrics.dfs.FSNamesystem) { - var displayName; - var seriesData = jsonData.metrics.dfs.FSNamesystem[name]; - switch (name) { - case "PendingReplicationBlocks": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.blockStatus.displayNames.pendingReplicationBlocks'); - break; - case "UnderReplicatedBlocks": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.blockStatus.displayNames.underReplicatedBlocks'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js b/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js deleted file mode 100644 index ceae042..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_FileOperations = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-file-operations", - title: Em.I18n.t('services.service.info.metrics.hdfs.fileOperations'), - renderer: 'line', - - ajaxIndex: 'service.metrics.hdfs.file_operations', - yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('ops', - App.ChartLinearTimeView.DefaultFormatter), - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.namenode) { - for ( var name in jsonData.metrics.dfs.namenode) { - var displayName; - var seriesData = jsonData.metrics.dfs.namenode[name]; - switch (name) { - case "FileInfoOps": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.fileOperations.displayNames.fileInformationOperations'); - break; - case "DeleteFileOps": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.fileOperations.displayNames.deleteFileOperations'); - break; - case "CreateFileOps": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.fileOperations.displayNames.createFileOperations'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js b/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js deleted file mode 100644 index a97e81a..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_GC = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-gc", - title: Em.I18n.t('services.service.info.metrics.hdfs.gc'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.hdfs.gc', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.jvm) { - for ( var name in jsonData.metrics.jvm) { - var displayName; - var seriesData = jsonData.metrics.jvm[name]; - switch (name) { - case "gcTimeMillis": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.gc.displayNames.gcTimeMillis'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/io.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/io.js b/ambari-web/app/views/main/service/info/metrics/hdfs/io.js deleted file mode 100644 index eb12849..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/io.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_IO = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-io", - title: Em.I18n.t('services.service.info.metrics.hdfs.io'), - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - renderer: 'line', - - ajaxIndex: 'service.metrics.hdfs.io', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.datanode) { - for ( var name in jsonData.metrics.dfs.datanode) { - var displayName; - var seriesData = jsonData.metrics.dfs.datanode[name]; - switch (name) { - case "bytes_written": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.io.displayNames.bytesWritten'); - break; - case "bytes_read": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.io.displayNames.bytesRead'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js b/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js deleted file mode 100644 index bb9300b..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_JVMHeap = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-jvm-heap", - title: Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap'), - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - renderer: 'line', - - ajaxIndex: 'service.metrics.hdfs.jvm_heap', - - transformToSeries: function (jsonData) { - var seriesArray = []; - var MB = Math.pow(2, 20); - if (jsonData && jsonData.metrics && jsonData.metrics.jvm) { - for ( var name in jsonData.metrics.jvm) { - var displayName; - var seriesData = jsonData.metrics.jvm[name]; - switch (name) { - case "memHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memHeapCommittedM'); - break; - case "memNonHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memNonHeapUsedM'); - break; - case "memHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memHeapUsedM'); - break; - case "memNonHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memNonHeapCommittedM'); - break; - default: - break; - } - if (seriesData) { - var s = this.transformData(seriesData, displayName); - for (var i = 0; i < s.data.length; i++) { - s.data[i].y *= MB; - } - seriesArray.push(s); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js b/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js deleted file mode 100644 index ae9118b..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_JVMThreads = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-jvm-threads", - title: Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads'), - renderer: 'line', - - ajaxIndex: 'service.metrics.hdfs.jvm_threads', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.jvm) { - for ( var name in jsonData.metrics.jvm) { - var displayName; - var seriesData = jsonData.metrics.jvm[name]; - switch (name) { - case "threadsBlocked": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsBlocked'); - break; - case "threadsWaiting": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsWaiting'); - break; - case "threadsTimedWaiting": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsTimedWaiting'); - break; - case "threadsRunnable": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsRunnable'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js b/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js deleted file mode 100644 index df5baaa..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_RPC = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-rpc", - title: Em.I18n.t('services.service.info.metrics.hdfs.rpc'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.hdfs.rpc', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.rpc) { - for ( var name in jsonData.metrics.rpc) { - var displayName; - var seriesData = jsonData.metrics.rpc[name]; - switch (name) { - case "RpcQueueTime_avg_time": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.rpc.displayNames.rpcQueueTimeAvgTime'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js b/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js deleted file mode 100644 index 42c7c06..0000000 --- a/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsHDFS_SpaceUtilization = App.ChartLinearTimeView.extend({ - id: "service-metrics-hdfs-space-utilization", - title: Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization'), - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - renderer: 'line', - ajaxIndex: 'service.metrics.hdfs.space_utilization', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem) { - for ( var name in jsonData.metrics.dfs.FSNamesystem) { - var displayName; - var seriesData = jsonData.metrics.dfs.FSNamesystem[name]; - switch (name) { - case "CapacityRemaining": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityRemaining'); - break; - case "CapacityUsed": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityUsed'); - break; - case "CapacityTotal": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityTotal'); - break; - case "CapacityNonDFSUsed": - displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityNonDFSUsed'); - break; - default: - break; - } - if (seriesData) { - var s = this.transformData(seriesData, displayName); - seriesArray.push(s); - } - } - } - return seriesArray; - } -}); http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js b/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js deleted file mode 100644 index e7f922a..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_AllocatedMemory = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-queue-allocated", - title: Em.I18n.t('services.service.info.metrics.yarn.allocated.memory'), - renderer: 'line', - ajaxIndex: 'service.metrics.yarn.queue.allocated', - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - - transformToSeries: function (jsonData) { - var seriesArray = []; - var MB = Math.pow(2, 20); - if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) { - for (var name in jsonData.metrics.yarn.Queue.root) { - var displayName = null; - var seriesData = jsonData.metrics.yarn.Queue.root[name]; - switch (name) { - case "AvailableMB": - displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.available'); - break; - case "PendingMB": - displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.pending'); - break; - case "AllocatedMB": - displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.allocated'); - break; - default: - break; - } - if (seriesData && displayName) { - var s = this.transformData(seriesData, displayName); - for (var i = 0; i < s.data.length; i++) { - s.data[i].y *= MB; - } - seriesArray.push(s); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js b/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js deleted file mode 100644 index 942d1b4..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_AllocatedContainer = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-queue-allocated-container", - title: Em.I18n.t('services.service.info.metrics.yarn.allocated.container'), - renderer: 'line', - ajaxIndex: 'service.metrics.yarn.queue.allocated.container', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) { - for (var name in jsonData.metrics.yarn.Queue.root) { - var displayName = null; - var seriesData = jsonData.metrics.yarn.Queue.root[name]; - switch (name) { - case "ReservedContainers": - displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.reserved'); - break; - case "PendingContainers": - displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.pending'); - break; - case "AllocatedContainers": - displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.allocated'); - break; - default: - break; - } - if (seriesData != null && displayName) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js b/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js deleted file mode 100644 index cf97ebd..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_ApplicationCurrentStates = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-apps-current-states", - title: Em.I18n.t('services.service.info.metrics.yarn.apps.states.current.title'), - renderer: 'line', - ajaxIndex: 'service.metrics.yarn.queue.apps.states.current', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) { - for (var name in jsonData.metrics.yarn.Queue.root) { - var displayName = null; - var seriesData = jsonData.metrics.yarn.Queue.root[name]; - switch (name) { - case "AppsPending": - displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.pending'); - break; - case "AppsRunning": - displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.running'); - break; - default: - break; - } - if (seriesData != null && displayName) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js b/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js deleted file mode 100644 index 0bcc489..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_ApplicationFinishedStates = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-apps-finished-states", - title: Em.I18n.t('services.service.info.metrics.yarn.apps.states.finished.title'), - renderer: 'line', - ajaxIndex: 'service.metrics.yarn.queue.apps.states.finished', - yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('apps', - App.ChartLinearTimeView.DefaultFormatter), - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) { - for (var name in jsonData.metrics.yarn.Queue.root) { - var displayName = null; - var seriesData = jsonData.metrics.yarn.Queue.root[name]; - switch (name) { - case "AppsCompleted": - displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.completed'); - break; -// case "AppsFailed": -// displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.failed'); -// break; - case "AppsKilled": - displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.killed'); - break; - case "AppsSubmitted": - displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.submitted'); - break; - default: - break; - } - if (seriesData != null && displayName) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/gc.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/gc.js b/ambari-web/app/views/main/service/info/metrics/yarn/gc.js deleted file mode 100644 index 265a56d..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/gc.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_GC = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-gc", - title: Em.I18n.t('services.service.info.metrics.yarn.gc'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.yarn.gc', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.jvm) { - for ( var name in jsonData.metrics.jvm) { - var displayName; - var seriesData = jsonData.metrics.jvm[name]; - switch (name) { - case "gcTimeMillis": - displayName = Em.I18n.t('services.service.info.metrics.yarn.gc.displayNames.gcTimeMillis'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js b/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js deleted file mode 100644 index 70fd89c..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_JVMHeap = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-jvm-heap", - title: Em.I18n.t('services.service.info.metrics.yarn.jvmHeap'), - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - renderer: 'line', - - ajaxIndex: 'service.metrics.yarn.jobs_heap', - - transformToSeries: function (jsonData) { - var seriesArray = []; - var MB = Math.pow(2, 20); - if (jsonData && jsonData.metrics && jsonData.metrics.jvm) { - for ( var name in jsonData.metrics.jvm) { - var displayName; - var seriesData = jsonData.metrics.jvm[name]; - switch (name) { - case "memHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapCommittedM'); - break; - case "memNonHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapUsedM'); - break; - case "memHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapUsedM'); - break; - case "memNonHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapCommittedM'); - break; - default: - break; - } - if (seriesData) { - var s = this.transformData(seriesData, displayName); - for (var i = 0; i < s.data.length; i++) { - s.data[i].y *= MB; - } - seriesArray.push(s); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js b/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js deleted file mode 100644 index aeb8601..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_JVMThreads = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-jvm-threads", - title: Em.I18n.t('services.service.info.metrics.yarn.jvmThreads'), - renderer: 'line', - - ajaxIndex: 'service.metrics.yarn.jobs_threads', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.jvm) { - for ( var name in jsonData.metrics.jvm) { - var displayName; - var seriesData = jsonData.metrics.jvm[name]; - switch (name) { - case "threadsBlocked": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsBlocked'); - break; - case "threadsWaiting": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsWaiting'); - break; - case "threadsTimedWaiting": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsTimedWaiting'); - break; - case "threadsRunnable": - displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsRunnable'); - break; - default: - break; - } - - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/nms.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/nms.js b/ambari-web/app/views/main/service/info/metrics/yarn/nms.js deleted file mode 100644 index 14cc2a8..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/nms.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_NMS = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-node-manager-statuses", - title: Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses'), - renderer: 'line', - ajaxIndex: 'service.metrics.yarn.node.manager.statuses', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.yarn && jsonData.metrics.yarn.ClusterMetrics) { - for (var name in jsonData.metrics.yarn.ClusterMetrics) { - var displayName; - var seriesData = jsonData.metrics.yarn.ClusterMetrics[name]; - switch (name) { - case "NumActiveNMs": - displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active'); - break; - case "NumDecommissionedNMs": - displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned'); - break; - case "NumLostNMs": - displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost'); - break; - case "NumRebootedNMs": - displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted'); - break; - case "NumUnhealthyNMs": - displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy'); - break; - default: - break; - } - if (seriesData != null) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js b/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js deleted file mode 100644 index 077df4b..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); -var objUtils = require('utils/object_utils'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_QMR = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-queue-memory-resource", - title: Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource'), - renderer: 'line', - ajaxIndex: 'service.metrics.yarn.queue.memory.resource', - yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter, - - getDataForAjaxRequest: function () { - var data = this._super(); - var svc = App.YARNService.find().objectAt(0); - var queueNames = []; - if (svc != null) { - queueNames = svc.get('childQueueNames'); - } - data.queueNames = queueNames; - return data; - }, - - transformToSeries: function (jsonData) { - var self = this; - var seriesArray = []; - var MB = Math.pow(2, 20); - var svc = App.YARNService.find().objectAt(0); - var queueNames = []; - if (svc != null) { - queueNames = svc.get('childQueueNames'); - } - if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue) { - queueNames.forEach(function (qName) { - var qPath = qName.replace(/\//g, '.'); - var displayName; - var allocatedData = Em.get(jsonData.metrics.yarn.Queue, qPath + '.AllocatedMB'); - var availableData = Em.get(jsonData.metrics.yarn.Queue, qPath + '.AvailableMB'); - displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayName').format(qName); - var seriesData = null; - if (allocatedData != null && availableData != null) { - if (typeof allocatedData == "number" && typeof availableData == "number") { - seriesData = (availableData == 0 && allocatedData == 0) ? 0 : (allocatedData * 100) / (allocatedData + availableData); - } else if (allocatedData.length > 0 && availableData.length > 0) { - seriesData = []; - for ( var c = 0; c < Math.min(availableData.length, allocatedData.length); c++) { - var allocDivAvail = (availableData[c][0] == 0 && allocatedData[c][0] == 0) ? 0 : (allocatedData[c][0] * 100) / (availableData[c][0] + allocatedData[c][0]); - seriesData.push([allocDivAvail, allocatedData[c][1] ]); - } - } else { - console.log("Skipping data series for Queue " + qName); - } - } - if (seriesData != null) { - seriesArray.push(self.transformData(seriesData, displayName)); - } - }); - } - return seriesArray; - } -}); http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js b/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js deleted file mode 100644 index 1e4ecf4..0000000 --- a/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -var App = require('app'); - -/** - * @class - * - * This is a view for showing cluster CPU metrics - * - * @extends App.ChartLinearTimeView - * @extends Ember.Object - * @extends Ember.View - */ -App.ChartServiceMetricsYARN_RPC = App.ChartLinearTimeView.extend({ - id: "service-metrics-yarn-rpc", - title: Em.I18n.t('services.service.info.metrics.yarn.rpc'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.yarn.rpc', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.rpc) { - for ( var name in jsonData.metrics.rpc) { - var displayName; - var seriesData = jsonData.metrics.rpc[name]; - switch (name) { - case "RpcQueueTime_avg_time": - displayName = Em.I18n.t('services.service.info.metrics.yarn.rpc.displayNames.RpcQueueTimeAvgTime'); - break; - default: - break; - } - if (seriesData) { - seriesArray.push(this.transformData(seriesData, displayName)); - } - } - } - return seriesArray; - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/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 83e503f..42adf76 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -521,7 +521,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, { }.property('App.router.clusterController.gangliaUrl', 'service.serviceName'), didInsertElement: function () { - var svcName = this.get('service.serviceName'); + var svcName = this.get('controller.content.serviceName'); var isMetricsSupported = svcName != 'STORM' || App.get('isStormMetricsSupported'); this.get('controller').getActiveWidgetLayout(); @@ -530,7 +530,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, { } if (svcName && isMetricsSupported) { - var allServices = require('data/service_graph_config').getServiceGraphConfig(); + var allServices = require('data/service_graph_config'); this.constructGraphObjects(allServices[svcName.toLowerCase()]); } // adjust the summary table height http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/services/hdfs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js index d70b454..e180ee8 100644 --- a/ambari-web/app/views/main/service/services/hdfs.js +++ b/ambari-web/app/views/main/service/services/hdfs.js @@ -63,9 +63,6 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ didInsertElement: function() { App.tooltip($("[rel='tooltip']")); }, - dataNodesLive: function () { - return this.get('service.dataNodesStarted'); - }.property('service.dataNodesStarted'), dataNodesDead: function () { return this.get('service.dataNodesInstalled'); }.property('service.dataNodesInstalled'), @@ -129,21 +126,6 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ percent.toFixed(1)); }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapMax'), - summaryHeader: function () { - var text = this.t("dashboard.services.hdfs.summary"); - var service = this.get('service'); - var liveCount = service.get('dataNodesStarted'); - var totalCount = service.get('dataNodesTotal'); - var total = service.get('capacityTotal') + 0; - var remaining = service.get('capacityRemaining') + 0; - var used = total - remaining; - var percent = total > 0 ? ((used * 100) / total).toFixed(1) : 0; - if (percent == "NaN" || percent < 0) { - percent = Em.I18n.t('services.service.summary.notAvailable') + " "; - } - return text.format(liveCount, totalCount, percent); - }.property('service.dataNodesStarted', 'service.dataNodesTotal', 'service.capacityUsed', 'service.capacityTotal'), - dfsUsedDisk: function () { var text = this.t("dashboard.services.hdfs.capacityUsed"); var total = this.get('service.capacityTotal');
