http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/mapreduce_slots.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/mapreduce_slots.js b/ambari-web/app/views/main/dashboard/widgets/mapreduce_slots.js deleted file mode 100644 index 40c613f..0000000 --- a/ambari-web/app/views/main/dashboard/widgets/mapreduce_slots.js +++ /dev/null @@ -1,87 +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'); - -App.MapReduceSlotsView = App.DashboardWidgetView.extend({ - - templateName: require('templates/main/dashboard/widgets/mapreduce_slots'), - title: Em.I18n.t('dashboard.widgets.MapReduceSlots'), - id:'10', - - isProgressBar: true, - model_type: 'mapreduce', - hiddenInfo: function () { - var result = []; - if(this.get('isViewExist')) { - var line1 = "Map: " + this.get('model.mapSlotsOccupied') + " Occupied / " + this.get('model.mapSlotsReserved') + " Reserved / " + this.get('model.mapSlots') + " Total"; - result.pushObject(line1); - var line2 = "Reduce: " + this.get('model.reduceSlotsOccupied') + " Occupied / " + this.get('model.reduceSlotsReserved') + " Reserved / " + this.get('model.reduceSlots') + " Total"; - result.pushObject(line2); - } - else { - result.pushObject('MapReduce Not Started'); - } - return result; - }.property('isViewExist', 'map_display_text', 'reduce_display_text'), - isViewExist: function () { - return this.get('model.mapSlotsOccupied') != null && this.get('model.mapSlotsReserved') != null && this.get('model.reduceSlotsOccupied') != null && this.get('model.reduceSlotsReserved') != null; - }.property('model.mapSlotsReserved', 'model.mapSlotsOccupied', 'model.reduceSlotsReserved', 'model.reduceSlotsOccupied'), - - map_occupied: function () { - if (this.get('model.mapSlotsOccupied')) { - return "width: " + ((this.get('model.mapSlotsOccupied'))*100/(this.get('model.mapSlots'))).toString() + "%"; - } else { - return "width: 0%"; - } - }.property('model.mapSlotsOccupied','model.mapSlots'), - map_reserved: function () { - if (this.get('model.mapSlotsReserved')) { - return "width: " + ((this.get('model.mapSlotsReserved'))*100/(this.get('model.mapSlots'))).toString() + "%"; - } else { - return "width: 0%"; - } - }.property('model.mapSlotsReserved','model.mapSlots'), - map_display_text: function () { - return this.get('model.mapSlotsOccupied') + "/" + this.get('model.mapSlotsReserved') + "/" + this.get('model.mapSlots'); - }.property('model.mapSlotsReserved','model.mapSlotsOccupied','model.mapSlots'), - - - reduce_occupied: function () { - if (this.get('model.reduceSlotsOccupied')) { - return "width: " + ((this.get('model.reduceSlotsOccupied'))*100/(this.get('model.reduceSlots'))).toString() + "%"; - } else { - return "width: 0%"; - } - }.property('model.reduceSlotsOccupied','model.reduceSlots'), - reduce_reserved: function () { - if (this.get('model.reduceSlotsReserved')) { - return "width: " + ((this.get('model.reduceSlotsReserved'))*100/(this.get('model.reduceSlots'))).toString() + "%"; - } else { - return "width: 0%"; - } - }.property('model.reduceSlotsReserved','model.reduceSlots'), - reduce_display_text: function () { - return this.get('model.reduceSlotsOccupied') + "/" + this.get('model.reduceSlotsReserved') + "/" + this.get('model.reduceSlots'); - }.property('model.reduceSlotsReserved','model.reduceSlotsOccupied','model.reduceSlots') - -}); - -App.MapReduceSlotsView.reopenClass({ - class: 'span4p8' -}); \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/metrics_cpu.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/metrics_cpu.js b/ambari-web/app/views/main/dashboard/widgets/metrics_cpu.js index 7bc7620..72ef1c2 100644 --- a/ambari-web/app/views/main/dashboard/widgets/metrics_cpu.js +++ b/ambari-web/app/views/main/dashboard/widgets/metrics_cpu.js @@ -21,7 +21,7 @@ var App = require('app'); App.ChartClusterMetricsCPUWidgetView = App.ClusterMetricsDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.clusterMetrics.cpu'), - id: '13', + id: '8', content: App.ChartClusterMetricsCPU.extend({ noTitleUnderGraph: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/metrics_load.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/metrics_load.js b/ambari-web/app/views/main/dashboard/widgets/metrics_load.js index 80360a7..c357934 100644 --- a/ambari-web/app/views/main/dashboard/widgets/metrics_load.js +++ b/ambari-web/app/views/main/dashboard/widgets/metrics_load.js @@ -21,7 +21,7 @@ var App = require('app'); App.ChartClusterMetricsLoadWidgetView = App.ClusterMetricsDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.clusterMetrics.load'), - id: '14', + id: '9', content: App.ChartClusterMetricsLoad.extend({ noTitleUnderGraph: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/metrics_memory.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/metrics_memory.js b/ambari-web/app/views/main/dashboard/widgets/metrics_memory.js index 4a30dcc..659d647 100644 --- a/ambari-web/app/views/main/dashboard/widgets/metrics_memory.js +++ b/ambari-web/app/views/main/dashboard/widgets/metrics_memory.js @@ -21,7 +21,7 @@ var App = require('app'); App.ChartClusterMetricsMemoryWidgetView = App.ClusterMetricsDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.clusterMetrics.memory'), - id: '11', + id: '6', content: App.ChartClusterMetricsMemory.extend({ noTitleUnderGraph: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/metrics_network.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/metrics_network.js b/ambari-web/app/views/main/dashboard/widgets/metrics_network.js index d82784e..40fdb0b 100644 --- a/ambari-web/app/views/main/dashboard/widgets/metrics_network.js +++ b/ambari-web/app/views/main/dashboard/widgets/metrics_network.js @@ -21,7 +21,7 @@ var App = require('app'); App.ChartClusterMetricsNetworkWidgetView = App.ClusterMetricsDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.clusterMetrics.network'), - id: '12', + id: '7', content: App.ChartClusterMetricsNetwork.extend({ noTitleUnderGraph: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/namenode_uptime.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_uptime.js b/ambari-web/app/views/main/dashboard/widgets/namenode_uptime.js index 60ad42d..e55f871 100644 --- a/ambari-web/app/views/main/dashboard/widgets/namenode_uptime.js +++ b/ambari-web/app/views/main/dashboard/widgets/namenode_uptime.js @@ -21,7 +21,7 @@ var App = require('app'); App.NameNodeUptimeView = App.UptimeTextDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.widgets.NameNodeUptime'), - id: '15', + id: '10', model_type: 'hdfs', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js b/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js index 66bedfe..a7d0e42 100644 --- a/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js +++ b/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js @@ -21,7 +21,7 @@ var App = require('app'); App.NodeManagersLiveView = App.TextDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.widgets.NodeManagersLive'), - id: '26', + id: '19', model_type: 'yarn', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js b/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js index 4b28671..3e165f6 100644 --- a/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js +++ b/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js @@ -22,7 +22,7 @@ var numberUtils = require('utils/number_utils'); App.ResourceManagerHeapPieChartView = App.PieChartDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.widgets.ResourceManagerHeap'), - id: '24', + id: '17', model_type: 'yarn', modelFieldMax: 'jvmMemoryHeapMax', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js b/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js index cb7ab84..370ed6e 100644 --- a/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js +++ b/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js @@ -22,7 +22,7 @@ var date = require('utils/date'); App.ResourceManagerUptimeView = App.UptimeTextDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.widgets.ResourceManagerUptime'), - id: '25', + id: '18', model_type: 'yarn', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js index 91bf496..7b3180f 100644 --- a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js +++ b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js @@ -21,7 +21,7 @@ var App = require('app'); App.SuperVisorUpView = App.TextDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.widgets.SuperVisorUp'), - id: '28', + id: '21', isPieChart: false, isText: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/tasktracker_live.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/tasktracker_live.js b/ambari-web/app/views/main/dashboard/widgets/tasktracker_live.js deleted file mode 100644 index 28a4596..0000000 --- a/ambari-web/app/views/main/dashboard/widgets/tasktracker_live.js +++ /dev/null @@ -1,166 +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'); - -App.TaskTrackerUpView = App.TextDashboardWidgetView.extend({ - - title: Em.I18n.t('dashboard.widgets.TaskTrackerUp'), - id: '8', - - model_type: 'mapreduce', - - hiddenInfo: function () { - var svc = this.get('model'); - var liveCount = svc.get('taskTrackersStarted'); - var totalCount = svc.get('taskTrackersTotal'); - var result = []; - result.pushObject(liveCount + " live"); - result.pushObject(totalCount + " total"); - return result; - }.property('model.taskTrackersTotal', 'model.taskTrackersStarted'), - - thresh1: 40, - thresh2: 70, - maxValue: 100, - - data: function () { - if (!this.get('model.taskTrackersTotal')) { - return -1; - } else { - return (this.get('model.taskTrackersStarted') / this.get('model.taskTrackersTotal')).toFixed(2) * 100; - } - }.property('model.taskTrackersTotal', 'model.taskTrackersStarted'), - - content: function () { - return this.get('model.taskTrackersStarted') + "/" + this.get('model.taskTrackersTotal'); - }.property('model.taskTrackersTotal', 'model.taskTrackersStarted'), - - editWidget: function (event) { - var parent = this; - var max_tmp = parseFloat(parent.get('maxValue')); - var configObj = Ember.Object.create({ - thresh1: parent.get('thresh1') + '', - thresh2: parent.get('thresh2') + '', - hintInfo: Em.I18n.t('dashboard.widgets.hintInfo.hint1').format(max_tmp), - isThresh1Error: false, - isThresh2Error: false, - errorMessage1: "", - errorMessage2: "", - maxValue: max_tmp, - observeNewThresholdValue: function () { - var thresh1 = this.get('thresh1'); - var thresh2 = this.get('thresh2'); - if (thresh1.trim() != "") { - if (isNaN(thresh1) || thresh1 > max_tmp || thresh1 < 0) { - this.set('isThresh1Error', true); - this.set('errorMessage1', 'Invalid! Enter a number between 0 - ' + max_tmp); - } else if (this.get('isThresh2Error') === false && parseFloat(thresh2)<= parseFloat(thresh1)){ - this.set('isThresh1Error', true); - this.set('errorMessage1', 'Threshold 1 should be smaller than threshold 2 !'); - } else { - this.set('isThresh1Error', false); - this.set('errorMessage1', ''); - } - } else { - this.set('isThresh1Error', true); - this.set('errorMessage1', 'This is required'); - } - - if (thresh2.trim() != "") { - if (isNaN(thresh2) || thresh2 > max_tmp || thresh2 < 0) { - this.set('isThresh2Error', true); - this.set('errorMessage2', 'Invalid! Enter a number between 0 - ' + max_tmp); - } else { - this.set('isThresh2Error', false); - this.set('errorMessage2', ''); - } - } else { - this.set('isThresh2Error', true); - this.set('errorMessage2', 'This is required'); - } - - // update the slider handles and color - if (this.get('isThresh1Error') === false && this.get('isThresh2Error') === false) { - $("#slider-range").slider('values', 0 , parseFloat(thresh1)); - $("#slider-range").slider('values', 1 , parseFloat(thresh2)); - } - }.observes('thresh1', 'thresh2') - }); - - var browserVerion = this.getInternetExplorerVersion(); - App.ModalPopup.show({ - header: Em.I18n.t('dashboard.widgets.popupHeader'), - classNames: [ 'sixty-percent-width-modal-edit-widget'], - bodyClass: Ember.View.extend({ - templateName: require('templates/main/dashboard/edit_widget_popup'), - configPropertyObj: configObj - }), - primary: Em.I18n.t('common.apply'), - onPrimary: function() { - configObj.observeNewThresholdValue(); - if (!configObj.isThresh1Error && !configObj.isThresh2Error) { - parent.set('thresh1', parseFloat(configObj.get('thresh1')) ); - parent.set('thresh2', parseFloat(configObj.get('thresh2')) ); - if (!App.get('testMode')) { - //save to persit - var big_parent = parent.get('parentView'); - big_parent.getUserPref(big_parent.get('persistKey')); - var oldValue = big_parent.get('currentPrefObject'); - oldValue.threshold[parseInt(parent.id)] = [configObj.get('thresh1'), configObj.get('thresh2')]; - big_parent.postUserPref(big_parent.get('persistKey'),oldValue); - } - this.hide(); - } - }, - - didInsertElement: function () { - var handlers = [configObj.get('thresh1'), configObj.get('thresh2')]; - var colors = ['#B80000', '#FF8E00', '#95A800']; //color red, orange, green - - if (browserVerion == -1 || browserVerion > 9) { - configObj.set('isIE9', false); - configObj.set('isGreenOrangeRed', false); - $("#slider-range").slider({ - range: true, - min: 0, - max: max_tmp, - values: handlers, - create: function (event, ui) { - parent.updateColors(handlers, colors); - }, - slide: function (event, ui) { - parent.updateColors(ui.values, colors); - configObj.set('thresh1', ui.values[0] + ''); - configObj.set('thresh2', ui.values[1] + ''); - }, - change: function (event, ui) { - parent.updateColors(ui.values, colors); - } - }); - - - } else { - configObj.set('isIE9', true); - configObj.set('isGreenOrangeRed', false); - } - } - }); - } - -}); http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/yarn_links.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/yarn_links.js b/ambari-web/app/views/main/dashboard/widgets/yarn_links.js index cbd74b8..d7b6488 100644 --- a/ambari-web/app/views/main/dashboard/widgets/yarn_links.js +++ b/ambari-web/app/views/main/dashboard/widgets/yarn_links.js @@ -21,7 +21,7 @@ var App = require('app'); App.YARNLinksView = App.LinkDashboardWidgetView.extend({ templateName: require('templates/main/dashboard/widgets/yarn_links'), title: Em.I18n.t('dashboard.widgets.YARNLinks'), - id: '30', + id: '23', model_type: 'yarn', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js b/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js index c96cf47..6a86b56 100644 --- a/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js +++ b/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js @@ -22,7 +22,7 @@ var numberUtils = require('utils/number_utils'); App.YARNMemoryPieChartView = App.PieChartDashboardWidgetView.extend({ title: Em.I18n.t('dashboard.widgets.YARNMemory'), - id: '27', + id: '20', widgetHtmlId: 'widget-yarn-memory', model_type: 'yarn', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/host/hosts_table_menu_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/hosts_table_menu_view.js b/ambari-web/app/views/main/host/hosts_table_menu_view.js index 819cd8e..99fd783 100644 --- a/ambari-web/app/views/main/host/hosts_table_menu_view.js +++ b/ambari-web/app/views/main/host/hosts_table_menu_view.js @@ -51,12 +51,6 @@ App.HostTableMenuView = Em.View.extend({ componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }), Em.Object.create({ - serviceName: 'MAPREDUCE', - componentName: 'TASKTRACKER', - masterComponentName: 'JOBTRACKER', - componentNameFormatted: Em.I18n.t('dashboard.services.mapreduce.taskTrackers') - }), - Em.Object.create({ serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js deleted file mode 100644 index 8a09eaf..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/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.ChartServiceMetricsMapReduce_GC = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-gc", - title: Em.I18n.t('services.service.info.metrics.mapreduce.gc'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.mapreduce.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.mapreduce.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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js deleted file mode 100644 index a4fea38..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js +++ /dev/null @@ -1,68 +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.ChartServiceMetricsMapReduce_JobsStatus = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-jobs-status", - title: Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus'), - renderer: 'line', - - ajaxIndex: 'service.metrics.mapreduce.jobs_status', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) { - for ( var name in jsonData.metrics.mapred.jobtracker) { - var displayName; - var seriesData = jsonData.metrics.mapred.jobtracker[name]; - switch (name) { - case "jobs_running": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsRunning'); - break; - case "jobs_failed": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsFailed'); - break; - case "jobs_completed": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsCompleted'); - break; - case "jobs_preparing": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsPreparing'); - break; - case "jobs_submitted": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsSubmitted'); - 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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js deleted file mode 100644 index d1dd7ab..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/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.ChartServiceMetricsMapReduce_JVMHeap = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-jvm-heap", - title: Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap'), - yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, - renderer: 'line', - - ajaxIndex: 'service.metrics.mapreduce.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.mapreduce.jvmHeap.displayNames.memHeapCommittedM'); - break; - case "memNonHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap.displayNames.memNonHeapUsedM'); - break; - case "memHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap.displayNames.memHeapUsedM'); - break; - case "memNonHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js deleted file mode 100644 index d62c242..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/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.ChartServiceMetricsMapReduce_JVMThreads = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-jvm-threads", - title: Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads'), - renderer: 'line', - - ajaxIndex: 'service.metrics.mapreduce.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.mapreduce.jvmThreads.displayNames.threadsBlocked'); - break; - case "threadsWaiting": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads.displayNames.threadsWaiting'); - break; - case "threadsTimedWaiting": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads.displayNames.threadsTimedWaiting'); - break; - case "threadsRunnable": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js deleted file mode 100644 index dbb5bef..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.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.ChartServiceMetricsMapReduce_MapSlots = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-map-slots", - title: Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots'), - renderer: 'line', - - ajaxIndex: 'service.metrics.mapreduce.map_slots', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) { - for ( var name in jsonData.metrics.mapred.jobtracker) { - var displayName; - var seriesData = jsonData.metrics.mapred.jobtracker[name]; - switch (name) { - case "reserved_map_slots": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots.displayNames.reservedMapSlots'); - break; - case "occupied_map_slots": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots.displayNames.occupiedMapSlots'); - 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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js deleted file mode 100644 index c8d2d43..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.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.ChartServiceMetricsMapReduce_ReduceSlots = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-reduce-slots", - title: Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots'), - renderer: 'line', - - ajaxIndex: 'service.metrics.mapreduce.reduce_slots', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) { - for ( var name in jsonData.metrics.mapred.jobtracker) { - var displayName; - var seriesData = jsonData.metrics.mapred.jobtracker[name]; - switch (name) { - case "reserved_reduce_slots": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots.displayNames.reservedReduceSlots'); - break; - case "occupied_reduce_slots": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots.displayNames.occupiedReduceSlots'); - 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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js deleted file mode 100644 index 3740873..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/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.ChartServiceMetricsMapReduce_RPC = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-rpc", - title: Em.I18n.t('services.service.info.metrics.mapreduce.rpc'), - yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, - - ajaxIndex: 'service.metrics.mapreduce.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.mapreduce.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/bd3a0bb7/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js b/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js deleted file mode 100644 index f46fb59..0000000 --- a/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.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.ChartServiceMetricsMapReduce_TasksRunningWaiting = App.ChartLinearTimeView.extend({ - id: "service-metrics-mapreduce-tasks-running-waiting", - title: Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting'), - renderer: 'line', - - ajaxIndex: 'service.metrics.mapreduce.tasks_running_waiting', - - transformToSeries: function (jsonData) { - var seriesArray = []; - if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) { - for ( var name in jsonData.metrics.mapred.jobtracker) { - var displayName; - var seriesData = jsonData.metrics.mapred.jobtracker[name]; - switch (name) { - case "running_maps": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.runningMaps'); - break; - case "running_reduces": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.runningReduces'); - break; - case "waiting_maps": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.waitingMaps'); - break; - case "waiting_reduces": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.waitingReduces'); - 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/bd3a0bb7/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 index 9ce2d1d..70fd89c 100644 --- 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 @@ -28,7 +28,7 @@ var App = require('app'); */ App.ChartServiceMetricsYARN_JVMHeap = App.ChartLinearTimeView.extend({ id: "service-metrics-yarn-jvm-heap", - title: Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap'), + title: Em.I18n.t('services.service.info.metrics.yarn.jvmHeap'), yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, renderer: 'line', @@ -43,16 +43,16 @@ App.ChartServiceMetricsYARN_JVMHeap = App.ChartLinearTimeView.extend({ var seriesData = jsonData.metrics.jvm[name]; switch (name) { case "memHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap.displayNames.memHeapCommittedM'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapCommittedM'); break; case "memNonHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap.displayNames.memNonHeapUsedM'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapUsedM'); break; case "memHeapUsedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap.displayNames.memHeapUsedM'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapUsedM'); break; case "memNonHeapCommittedM": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap.displayNames.memNonHeapCommittedM'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapCommittedM'); break; default: break; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/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 index 445ecc7..aeb8601 100644 --- 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 @@ -28,7 +28,7 @@ var App = require('app'); */ App.ChartServiceMetricsYARN_JVMThreads = App.ChartLinearTimeView.extend({ id: "service-metrics-yarn-jvm-threads", - title: Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads'), + title: Em.I18n.t('services.service.info.metrics.yarn.jvmThreads'), renderer: 'line', ajaxIndex: 'service.metrics.yarn.jobs_threads', @@ -41,16 +41,16 @@ App.ChartServiceMetricsYARN_JVMThreads = App.ChartLinearTimeView.extend({ var seriesData = jsonData.metrics.jvm[name]; switch (name) { case "threadsBlocked": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads.displayNames.threadsBlocked'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsBlocked'); break; case "threadsWaiting": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads.displayNames.threadsWaiting'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsWaiting'); break; case "threadsTimedWaiting": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads.displayNames.threadsTimedWaiting'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsTimedWaiting'); break; case "threadsRunnable": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads.displayNames.threadsRunnable'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsRunnable'); break; default: break; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/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 index cdbb8ecb..1e4ecf4 100644 --- a/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js +++ b/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js @@ -28,7 +28,7 @@ var App = require('app'); */ App.ChartServiceMetricsYARN_RPC = App.ChartLinearTimeView.extend({ id: "service-metrics-yarn-rpc", - title: Em.I18n.t('services.service.info.metrics.mapreduce.rpc'), + title: Em.I18n.t('services.service.info.metrics.yarn.rpc'), yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter, ajaxIndex: 'service.metrics.yarn.rpc', @@ -41,7 +41,7 @@ App.ChartServiceMetricsYARN_RPC = App.ChartLinearTimeView.extend({ var seriesData = jsonData.metrics.rpc[name]; switch (name) { case "RpcQueueTime_avg_time": - displayName = Em.I18n.t('services.service.info.metrics.mapreduce.rpc.displayNames.RpcQueueTimeAvgTime'); + displayName = Em.I18n.t('services.service.info.metrics.yarn.rpc.displayNames.RpcQueueTimeAvgTime'); break; default: break; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/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 7146f1c..f96fb9a 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -42,7 +42,6 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, { return { HBASE: App.MainDashboardServiceHbaseView, HDFS: App.MainDashboardServiceHdfsView, - MAPREDUCE: App.MainDashboardServiceMapreduceView, STORM: App.MainDashboardServiceStormView, YARN: App.MainDashboardServiceYARNView, FLUME: Em.View.extend({ @@ -200,9 +199,6 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, { case 'yarn': svc = App.YARNService.find().objectAt(0); break; - case 'mapreduce': - svc = App.MapReduceService.find().objectAt(0); - break; case 'hbase': svc = App.HBaseService.find().objectAt(0); break; @@ -460,9 +456,6 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, { case 'hdfs': gangliaUrl += "/?r=hour&cs=&ce=&m=&s=by+name&c=HDPSlaves&tab=m&vn="; break; - case 'mapreduce': - gangliaUrl += "/?r=hour&cs=&ce=&m=&s=by+name&c=HDPJobTracker&tab=m&vn="; - break; case 'hbase': gangliaUrl += "?r=hour&cs=&ce=&m=&s=by+name&c=HDPHBaseMaster&tab=m&vn="; break; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/service/item.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js index c0bcd73..daae98f 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -338,9 +338,6 @@ App.MainServiceItemView = Em.View.extend({ case 'yarn': svc = App.YARNService.find().objectAt(0); break; - case 'mapreduce': - svc = App.MapReduceService.find().objectAt(0); - break; case 'hbase': svc = App.HBaseService.find().objectAt(0); break; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/app/views/main/service/services/mapreduce.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/services/mapreduce.js b/ambari-web/app/views/main/service/services/mapreduce.js deleted file mode 100644 index 4b30b98..0000000 --- a/ambari-web/app/views/main/service/services/mapreduce.js +++ /dev/null @@ -1,134 +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 date = require('utils/date'); -var numberUtils = require('utils/number_utils'); - -App.MainDashboardServiceMapreduceView = App.MainDashboardServiceView.extend({ - templateName: require('templates/main/service/services/mapreduce'), - serviceName: 'MAPREDUCE', - jobTrackerWebUrl: function () { - return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : this.get('service').get('jobTracker').get('publicHostName')) + ":50030"; - }.property('service.jobTracker'), - - Chart: App.ChartLinearView.extend({ - data: function () { - return this.get('_parentView.data.chart'); - }.property('_parentView.data.chart') - }), - - jobTrackerUptime: function () { - var uptime = this.get('service').get('jobTrackerStartTime'); - if (uptime && uptime > 0){ - var diff = App.dateTime() - uptime; - if (diff < 0) { - diff = 0; - } - var formatted = date.timingFormat(diff); - return this.t('dashboard.services.uptime').format(formatted); - - } - return this.t('services.service.summary.notRunning'); - }.property("service.jobTrackerStartTime"), - - summaryHeader: function () { - var svc = this.get('service'); - var liveCount = svc.get('aliveTrackers').get('length'); - var allCount = svc.get('taskTrackersTotal'); - var runningCount = svc.get('jobsRunning'); - if (runningCount === null) { - runningCount = 'n/a'; - } - var template = this.t('dashboard.services.mapreduce.summary'); - return template.format(liveCount, allCount, runningCount); - }.property('service.aliveTrackers', 'service.taskTrackersTotal', 'service.jobsRunning'), - - trackersText: function () { - if (this.get('service').get('taskTrackersTotal') == 0) { - return ''; - } else if (this.get('service').get('taskTrackersTotal') > 1){ - return Em.I18n.t('services.service.summary.viewHosts'); - }else{ - return Em.I18n.t('services.service.summary.viewHost'); - } - }.property("service.taskTrackersTotal"), - - trackersSummary: function () { - var svc = this.get('service'); - var liveCount = svc.get('taskTrackersStarted'); - var totalCount = svc.get('taskTrackersTotal'); - var template = this.t('dashboard.services.mapreduce.trackersSummary'); - return template.format(liveCount, totalCount); - }.property('service.taskTrackersTotal', 'service.taskTrackersStarted'), - - trackersHeapSummary: function () { - var heapUsed = this.get('service').get('jobTrackerHeapUsed'); - var heapMax = this.get('service').get('jobTrackerHeapMax'); - var percent = heapMax > 0 ? 100 * heapUsed / heapMax : 0; - return this.t('dashboard.services.mapreduce.jobTrackerHeapSummary').format(numberUtils.bytesToSize(heapUsed, 1, "parseFloat"), numberUtils.bytesToSize(heapMax, 1, "parseFloat"), percent.toFixed(1)); - }.property('service.jobTrackerHeapUsed', 'service.jobTrackerHeapMax'), - - jobsSummary: function () { - var svc = this.get('service'); - var template = this.t('dashboard.services.mapreduce.jobsSummary'); - return template.format(this.formatUnavailable(svc.get('jobsSubmitted')), this.formatUnavailable(svc.get('jobsCompleted'))); - }.property('service.jobsSubmitted', 'service.jobsCompleted'), - - mapSlotsSummary: function () { - var svc = this.get('service'); - var template = this.t('dashboard.services.mapreduce.mapSlotsSummary'); - return template.format(this.formatUnavailable(svc.get('mapSlotsOccupied')), this.formatUnavailable(svc.get('mapSlotsReserved'))); - }.property('service.mapSlotsOccupied', 'service.mapSlotsReserved'), - - reduceSlotsSummary: function () { - var svc = this.get('service'); - var template = this.t('dashboard.services.mapreduce.reduceSlotsSummary'); - return template.format(this.formatUnavailable(svc.get('reduceSlotsOccupied')), this.formatUnavailable(svc.get('reduceSlotsReserved'))); - }.property('service.reduceSlotsOccupied', 'service.reduceSlotsReserved'), - - mapTasksSummary: function () { - var svc = this.get('service'); - var template = this.t('dashboard.services.mapreduce.tasksSummary'); - return template.format(this.formatUnavailable(svc.get('mapsRunning')), this.formatUnavailable(svc.get('mapsWaiting'))); - }.property('service.mapsRunning', 'service.mapsWaiting'), - - reduceTasksSummary: function () { - var svc = this.get('service'); - var template = this.t('dashboard.services.mapreduce.tasksSummary'); - return template.format(this.formatUnavailable(svc.get('reducesRunning')), this.formatUnavailable(svc.get('reducesWaiting'))); - }.property('service.reducesRunning', 'service.reducesWaiting'), - - slotsCapacitySummary: function () { - var mapSlots = this.get('service').get('mapSlots'); - var reduceSlots = this.get('service').get('reduceSlots'); - var liveNodeCount = this.get('service').get('aliveTrackers').get('length'); - if(liveNodeCount != 0){ - var avg = (mapSlots + reduceSlots) / liveNodeCount; - }else{ - avg = Em.I18n.t('services.service.summary.notAvailable') + " "; - } - return this.t('dashboard.services.mapreduce.slotCapacitySummary').format(mapSlots, reduceSlots, avg); - }.property('service.mapSlots', 'service.reduceSlots', 'service.aliveTrackers'), - - taskTrackerComponent: function () { - return Em.Object.create({ - componentName: 'TASKTRACKER' - }); - //return this.get('service.taskTrackers').objectAt(0); - }.property() -}); http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/global/cluster_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/global/cluster_controller_test.js b/ambari-web/test/controllers/global/cluster_controller_test.js index 31582fe..1130370 100644 --- a/ambari-web/test/controllers/global/cluster_controller_test.js +++ b/ambari-web/test/controllers/global/cluster_controller_test.js @@ -247,84 +247,6 @@ describe('App.clusterController', function () { }); }); - describe('#setNagiosUrl()', function () { - beforeEach(function () { - controller.set('nagiosUrl', null); - }); - - it('testMode = true', function () { - App.testMode = true; - controller.setNagiosUrl(); - expect(controller.get('nagiosUrl')).to.equal('http://nagiosserver/nagios'); - expect(controller.get('isNagiosUrlLoaded')).to.be.true; - - }); - it('Cluster is not loaded', function () { - App.testMode = false; - controller.set('isLoaded', false); - controller.setNagiosUrl(); - expect(controller.get('nagiosUrl')).to.equal(null); - }); - it('GANGLIA_SERVER component is absent', function () { - controller.set('isLoaded', true); - App.testMode = false; - sinon.stub(App.HostComponent, 'find', function(){ - return []; - }); - controller.setNagiosUrl(); - expect(controller.get('nagiosUrl')).to.equal(null); - App.HostComponent.find.restore(); - }); - it('Ganglia Server host is "NAGIOS_host"', function () { - controller.set('isLoaded', true); - App.testMode = false; - sinon.stub(App.HostComponent, 'find', function(){ - return [Em.Object.create({ - componentName: 'NAGIOS_SERVER', - hostName: 'NAGIOS_host' - })]; - }); - sinon.spy(App.ajax, 'send'); - controller.setNagiosUrl(); - expect(App.ajax.send.calledOnce).to.be.true; - expect(controller.get('isNagiosUrlLoaded')).to.be.false; - App.ajax.send.restore(); - App.HostComponent.find.restore(); - }); - }); - - describe('#nagiosWebProtocol', function () { - var testCases = [ - { - title: 'if ambariProperties is null then nagiosWebProtocol should be "http"', - data: null, - result: 'http' - }, - { - title: 'if ambariProperties is empty object then nagiosWebProtocol should be "http"', - data: {}, - result: 'http' - }, - { - title: 'if nagios.https is false then nagiosWebProtocol should be "http"', - data: {'nagios.https': false}, - result: 'http' - }, - { - title: 'if nagios.https is true then nagiosWebProtocol should be "http"', - data: {'nagios.https': true}, - result: 'https' - } - ]; - - testCases.forEach(function (test) { - it(test.title, function () { - controller.set('ambariProperties', test.data); - expect(controller.get('nagiosWebProtocol')).to.equal(test.result); - }); - }); - }); - describe('#gangliaWebProtocol', function () { var testCases = [ { @@ -395,40 +317,4 @@ describe('App.clusterController', function () { }); }); - describe('#setNagiosUrlSuccessCallback()', function () { - - it('Query return no hosts', function () { - controller.setNagiosUrlSuccessCallback({items: []}); - expect(controller.get('nagiosUrl')).to.equal(null); - expect(controller.get('isNagiosUrlLoaded')).to.be.true; - }); - it('App.singleNodeInstall is true', function () { - controller.reopen({ - nagiosWebProtocol: 'http' - }); - App.set('singleNodeInstall', true); - App.set('singleNodeAlias', 'localhost'); - controller.setNagiosUrlSuccessCallback({items: [{ - Hosts: { - public_host_name: 'host1' - } - }]}); - expect(controller.get('nagiosUrl')).to.equal('http://localhost:42080/nagios'); - expect(controller.get('isNagiosUrlLoaded')).to.be.true; - }); - it('App.singleNodeInstall is false', function () { - controller.reopen({ - nagiosWebProtocol: 'http' - }); - App.set('singleNodeInstall', false); - App.set('singleNodeAlias', 'localhost'); - controller.setNagiosUrlSuccessCallback({items: [{ - Hosts: { - public_host_name: 'host1' - } - }]}); - expect(controller.get('nagiosUrl')).to.equal('http://host1/nagios'); - expect(controller.get('isNagiosUrlLoaded')).to.be.true; - }); - }); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/global/update_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/global/update_controller_test.js b/ambari-web/test/controllers/global/update_controller_test.js index 5bd239b..977f02c 100644 --- a/ambari-web/test/controllers/global/update_controller_test.js +++ b/ambari-web/test/controllers/global/update_controller_test.js @@ -170,20 +170,6 @@ describe('App.UpdateController', function () { "ServiceComponentInfo/RegionsInTransition"] }, { - title: 'MAPREDUCE service', - services: [ - { - ServiceInfo: { - service_name: 'MAPREDUCE' - } - } - ], - result: ["ServiceComponentInfo/AliveNodes," + - "ServiceComponentInfo/GrayListedNodes," + - "ServiceComponentInfo/BlackListedNodes," + - "ServiceComponentInfo/jobtracker/*,"] - }, - { title: 'STORM service', services: [ { http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce_test.js b/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce_test.js deleted file mode 100644 index d54b837..0000000 --- a/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce_test.js +++ /dev/null @@ -1,37 +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'); -require('controllers/main/charts/heatmap_metrics/heatmap_metric'); -require('controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce'); - -describe('App.MainChartHeatmapMapreduceMetrics', function () { - - describe('#metricMapper()', function () { - var mainChartHeatmapMapreduceMetrics = App.MainChartHeatmapMapreduceMetrics.create(); - - it('launch metricMapperWithTransform() method', function () { - sinon.stub(mainChartHeatmapMapreduceMetrics, 'metricMapperWithTransform', Em.K); - mainChartHeatmapMapreduceMetrics.set('defaultMetric', 'metric1'); - mainChartHeatmapMapreduceMetrics.set('transformValue', 'value1'); - - mainChartHeatmapMapreduceMetrics.metricMapper({'json': 'json'}); - expect(mainChartHeatmapMapreduceMetrics.metricMapperWithTransform.calledWith({'json': 'json'}, 'metric1', 'value1')).to.be.true; - mainChartHeatmapMapreduceMetrics.metricMapperWithTransform.restore(); - }); - }); -}); http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/main/host/details_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js index 7fc0dd0..277c7e7 100644 --- a/ambari-web/test/controllers/main/host/details_test.js +++ b/ambari-web/test/controllers/main/host/details_test.js @@ -1004,10 +1004,6 @@ describe('App.MainHostDetailsController', function () { controller.runDecommission('host1', 'YARN'); expect(controller.doDecommission.calledWith('host1', 'YARN', "RESOURCEMANAGER", "NODEMANAGER")).to.be.true; }); - it('MAPREDUCE service', function () { - controller.runDecommission('host1', 'MAPREDUCE'); - expect(controller.doDecommission.calledWith('host1', 'MAPREDUCE', "JOBTRACKER", "TASKTRACKER")).to.be.true; - }); it('HBASE service', function () { sinon.stub(controller, 'warnBeforeDecommission', Em.K); controller.runDecommission('host1', 'HBASE'); @@ -1020,13 +1016,11 @@ describe('App.MainHostDetailsController', function () { beforeEach(function () { sinon.stub(controller, "doRecommissionAndStart", Em.K); - sinon.stub(controller, "doRecommissionAndRestart", Em.K); sinon.stub(controller, "showBackgroundOperationsPopup", Em.K); }); afterEach(function () { controller.doRecommissionAndStart.restore(); - controller.doRecommissionAndRestart.restore(); controller.showBackgroundOperationsPopup.restore(); }); @@ -1040,11 +1034,6 @@ describe('App.MainHostDetailsController', function () { expect(controller.doRecommissionAndStart.calledWith('host1', 'YARN', "RESOURCEMANAGER", "NODEMANAGER")).to.be.true; expect(controller.showBackgroundOperationsPopup.calledOnce).to.be.true; }); - it('MAPREDUCE service', function () { - controller.runRecommission('host1', 'MAPREDUCE'); - expect(controller.doRecommissionAndRestart.calledWith('host1', 'MAPREDUCE', "JOBTRACKER", "TASKTRACKER")).to.be.true; - expect(controller.showBackgroundOperationsPopup.calledOnce).to.be.true; - }); it('HBASE service', function () { controller.runRecommission('host1', 'HBASE'); expect(controller.doRecommissionAndStart.calledWith('host1', 'HBASE', "HBASE_MASTER", "HBASE_REGIONSERVER")).to.be.true; @@ -1219,13 +1208,6 @@ describe('App.MainHostDetailsController', function () { }); }); - describe('#doRecommissionAndRestart()', function () { - it('Query should be sent', function () { - controller.doRecommissionAndRestart('', '', '', ''); - expect(App.ajax.send.calledOnce).to.be.true; - }); - }); - describe('#doAction()', function () { beforeEach(function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/main/service/add_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/service/add_controller_test.js b/ambari-web/test/controllers/main/service/add_controller_test.js index 95e4b2c..01f992c 100644 --- a/ambari-web/test/controllers/main/service/add_controller_test.js +++ b/ambari-web/test/controllers/main/service/add_controller_test.js @@ -92,7 +92,7 @@ describe('App.AddServiceController', function() { res: { "context": Em.I18n.t('requestInfo.installServices'), "ServiceInfo": {"state": "INSTALLED"}, - "urlParams": "ServiceInfo/service_name.in(OOZIE,HDFS,YARN,MAPREDUCE,MAPREDUCE2)" + "urlParams": "ServiceInfo/service_name.in(OOZIE,HDFS,YARN,MAPREDUCE2)" } }]; tests.forEach(function(t){ http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/main/service/info/config_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/service/info/config_test.js b/ambari-web/test/controllers/main/service/info/config_test.js index f160f71..fa01511 100644 --- a/ambari-web/test/controllers/main/service/info/config_test.js +++ b/ambari-web/test/controllers/main/service/info/config_test.js @@ -731,58 +731,6 @@ describe("App.MainServiceInfoConfigsController", function () { }); }); - describe("when service name is MAPREDUCE", function() { - beforeEach(function() { - mainServiceInfoConfigsController.set('content', Ember.Object.create ({ serviceName: 'MAPREDUCE' })); - }); - - var tests = [ - { - it: "should set dirChanged to false if none of the properties exist", - expect: false, - config: Ember.Object.create ({}) - }, - { - it: "should set dirChanged to true if mapred.local.dir is not default", - expect: true, - config: Ember.Object.create ({ - name: 'mapred.local.dir', - isNotDefaultValue: true - }) - }, - { - it: "should set dirChanged to false if mapred.local.dir is default", - expect: false, - config: Ember.Object.create ({ - name: 'mapred.local.dir', - isNotDefaultValue: false - }) - }, - { - it: "should set dirChanged to true if mapred.system.dir is not default", - expect: true, - config: Ember.Object.create ({ - name: 'mapred.system.dir', - isNotDefaultValue: true - }) - }, - { - it: "should set dirChanged to false if mapred.system.dir is default", - expect: false, - config: Ember.Object.create ({ - name: 'mapred.system.dir', - isNotDefaultValue: false - }) - } - ]; - - tests.forEach(function(test) { - it(test.it, function() { - mainServiceInfoConfigsController.set('stepConfigs', [Ember.Object.create ({ configs: [test.config], serviceName: 'MAPREDUCE' })]); - expect(mainServiceInfoConfigsController.isDirChanged()).to.equal(test.expect); - }) - }); - }); }); describe("#addDynamicProperties", function() { http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/wizard/step4_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step4_test.js b/ambari-web/test/controllers/wizard/step4_test.js index 133512e..9d12275 100644 --- a/ambari-web/test/controllers/wizard/step4_test.js +++ b/ambari-web/test/controllers/wizard/step4_test.js @@ -24,7 +24,7 @@ require('controllers/wizard/step4_controller'); describe('App.WizardStep4Controller', function () { var services = [ - 'HDFS', 'MAPREDUCE', 'NAGIOS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SCOOP', 'ZOOKEEPER', + 'HDFS', 'NAGIOS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SCOOP', 'ZOOKEEPER', 'YARN', 'MAPREDUCE2', 'FALCON', 'TEZ', 'STORM' ]; @@ -93,11 +93,6 @@ describe('App.WizardStep4Controller', function () { controller.setEach('isSelected', false); expect(controller.get('isMinimum')).to.equal(true); }); - - it('should return false if at least one service is selected, except disabled', function () { - controller.findProperty('serviceName', 'MAPREDUCE').set('isSelected', true); - expect(controller.get('isMinimum')).to.equal(false); - }); }); describe('#selectAll()', function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/controllers/wizard/step6_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step6_test.js b/ambari-web/test/controllers/wizard/step6_test.js index 3f9d3f8..1445481 100644 --- a/ambari-web/test/controllers/wizard/step6_test.js +++ b/ambari-web/test/controllers/wizard/step6_test.js @@ -23,10 +23,6 @@ require('controllers/wizard/step6_controller'); var controller, services = [ Em.Object.create({ - serviceName: 'MAPREDUCE', - isSelected: true - }), - Em.Object.create({ serviceName: 'YARN', isSelected: true }), http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/models/alert_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/models/alert_test.js b/ambari-web/test/models/alert_test.js index 48d06b5..b82040d 100644 --- a/ambari-web/test/models/alert_test.js +++ b/ambari-web/test/models/alert_test.js @@ -61,11 +61,6 @@ var alert, ], serviceTypeCases = [ { - type: 'MAPREDUCE', - name: 'MapReduce', - link: '#/main/services/MAPREDUCE/summary' - }, - { type: 'HDFS', name: 'HDFS', link: '#/main/services/HDFS/summary' http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/models/service_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/models/service_test.js b/ambari-web/test/models/service_test.js index a289825..f93f0e0 100644 --- a/ambari-web/test/models/service_test.js +++ b/ambari-web/test/models/service_test.js @@ -71,10 +71,6 @@ var service, configurable: true }, { - name: 'MAPREDUCE', - configurable: true - }, - { name: 'MAPREDUCE2', configurable: true }, http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/service_components.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/service_components.js b/ambari-web/test/service_components.js index 27e198c..efa4f66 100644 --- a/ambari-web/test/service_components.js +++ b/ambari-web/test/service_components.js @@ -19,73 +19,6 @@ module.exports = { "items" : [ { - "StackServices" : { - "comments" : "Apache Hadoop Distributed Processing Framework", - "service_name" : "MAPREDUCE", - "display_name" : "MapReduce", - "service_version" : "1.2.0.1.3.3.0", - "stack_name" : "HDP", - "stack_version" : "1.3.2", - "required_services" : [ - "YARN" - ] - }, - "serviceComponents" : [ - { - "StackServiceComponents" : { - "component_category" : "MASTER", - "component_name" : "HISTORYSERVER", - "display_name" : "History Server", - "is_client" : false, - "is_master" : true, - "service_name" : "MAPREDUCE", - "stack_name" : "HDP", - "stack_version" : "1.3.2" - }, - "dependencies": [] - }, - { - "StackServiceComponents" : { - "component_category" : "MASTER", - "component_name" : "JOBTRACKER", - "display_name" : "JobTracker", - "is_client" : false, - "is_master" : true, - "service_name" : "MAPREDUCE", - "stack_name" : "HDP", - "stack_version" : "1.3.2" - }, - "dependencies": [] - }, - { - "StackServiceComponents" : { - "component_category" : "CLIENT", - "component_name" : "MAPREDUCE_CLIENT", - "display_name" : "MapReduce Client", - "is_client" : true, - "is_master" : false, - "service_name" : "MAPREDUCE", - "stack_name" : "HDP", - "stack_version" : "1.3.2" - }, - "dependencies": [] - }, - { - "StackServiceComponents" : { - "component_category" : "SLAVE", - "component_name" : "TASKTRACKER", - "display_name" : "TaskTracker", - "is_client" : false, - "is_master" : false, - "service_name" : "MAPREDUCE", - "stack_name" : "HDP", - "stack_version" : "1.3.2" - }, - "dependencies": [] - } - ] - }, - { "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/FALCON", "StackServices" : { "comments" : "Data management and processing platform", http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/utils/batch_scheduled_requests_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/utils/batch_scheduled_requests_test.js b/ambari-web/test/utils/batch_scheduled_requests_test.js index 8407fcf..11ba710 100644 --- a/ambari-web/test/utils/batch_scheduled_requests_test.js +++ b/ambari-web/test/utils/batch_scheduled_requests_test.js @@ -33,7 +33,6 @@ describe('batch_scheduled_requests', function() { var tests = [ {serviceName: 'HDFS', componentName: 'DATANODE'}, {serviceName: 'YARN', componentName: 'NODEMANAGER'}, - {serviceName: 'MAPREDUCE', componentName: 'TASKTRACKER'}, {serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER'}, {serviceName: 'STORM', componentName: 'SUPERVISOR'}, {serviceName: 'SOME_INVALID_SERVICE', componentName: null} http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/utils/helper_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/utils/helper_test.js b/ambari-web/test/utils/helper_test.js index 24852b3..8f00372 100644 --- a/ambari-web/test/utils/helper_test.js +++ b/ambari-web/test/utils/helper_test.js @@ -251,8 +251,6 @@ describe('utils/helper', function() { 'KERBEROS_SERVER': 'Kerberos Server', 'MAPREDUCE2_CLIENT': 'MapReduce2 Client', 'MAPREDUCE2_SERVICE_CHECK': 'MapReduce2 Service Check', - 'MAPREDUCE_CLIENT': 'MapReduce Client', - 'MAPREDUCE_SERVICE_CHECK': 'MapReduce Service Check', 'MYSQL_SERVER': 'MySQL Server', 'NAGIOS_SERVER': 'Nagios Server', 'NAMENODE': 'NameNode', http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/views/common/chart/linear_time_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/common/chart/linear_time_test.js b/ambari-web/test/views/common/chart/linear_time_test.js index d581a6f..929a667 100644 --- a/ambari-web/test/views/common/chart/linear_time_test.js +++ b/ambari-web/test/views/common/chart/linear_time_test.js @@ -132,20 +132,17 @@ describe('App.ChartLinearTimeView', function () { describe("#getDataForAjaxRequest()", function() { var services = { yarnService: [], - hdfsService: [], - mapreduceService: [] + hdfsService: [] }; beforeEach(function(){ sinon.stub(App.HDFSService, 'find', function(){return services.hdfsService}); sinon.stub(App.YARNService, 'find', function(){return services.yarnService}); - sinon.stub(App.MapReduceService, 'find', function(){return services.mapreduceService}); sinon.stub(App, 'dateTime').returns(1000); chartLinearTimeView.set('content', null); }); afterEach(function(){ App.HDFSService.find.restore(); App.YARNService.find.restore(); - App.MapReduceService.find.restore(); App.dateTime.restore(); }); @@ -159,7 +156,6 @@ describe('App.ChartLinearTimeView', function () { stepSeconds: 15, hostName: 'host1', nameNodeName: '', - jobTrackerNode: '', resourceManager: '' }); }); @@ -175,7 +171,6 @@ describe('App.ChartLinearTimeView', function () { stepSeconds: 15, hostName: '', nameNodeName: 'host1', - jobTrackerNode: '', resourceManager: '' }); services.hdfsService = []; @@ -192,28 +187,10 @@ describe('App.ChartLinearTimeView', function () { stepSeconds: 15, hostName: '', nameNodeName: 'host1', - jobTrackerNode: '', resourceManager: '' }); services.hdfsService = []; }); - it("get jobTracker host", function() { - services.mapreduceService = [ - Em.Object.create({ - jobTracker: {hostName: 'host1'} - }) - ]; - expect(chartLinearTimeView.getDataForAjaxRequest()).to.be.eql({ - toSeconds: 1, - fromSeconds: -3599, - stepSeconds: 15, - hostName: '', - nameNodeName: '', - jobTrackerNode: 'host1', - resourceManager: '' - }); - services.mapreduceService = []; - }); it("get resourceManager host", function() { services.yarnService = [ Em.Object.create({ @@ -226,7 +203,6 @@ describe('App.ChartLinearTimeView', function () { stepSeconds: 15, hostName: '', nameNodeName: '', - jobTrackerNode: '', resourceManager: 'host1' }); services.yarnService = []; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/views/common/quick_link_view_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/common/quick_link_view_test.js b/ambari-web/test/views/common/quick_link_view_test.js index d0ae499..90b3da4 100644 --- a/ambari-web/test/views/common/quick_link_view_test.js +++ b/ambari-web/test/views/common/quick_link_view_test.js @@ -116,38 +116,6 @@ describe('App.QuickViewLinks', function () { host_components: [ { HostRoles: { - component_name: 'JOBTRACKER' - } - } - ], - Hosts: { - public_host_name: 'host1' - } - }, - { - host_components: [ - { - HostRoles: { - component_name: 'HISTORYSERVER' - } - } - ], - Hosts: { - public_host_name: 'host2' - } - } - ] - }, - serviceName: 'MAPREDUCE', - hosts: ['host1', 'host2'] - }, - { - response: { - items: [ - { - host_components: [ - { - HostRoles: { component_name: 'STORM_UI_SERVER' } } @@ -195,7 +163,7 @@ describe('App.QuickViewLinks', function () { ] }); }, - title: 'service with master component, except HDFS, HBase, MapReduce, YARN and Storm' + title: 'service with master component, except HDFS, HBase, YARN and Storm' }, { response: { http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3a0bb7/ambari-web/test/views/main/dashboard/widgets/jobtracker_rpc_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/main/dashboard/widgets/jobtracker_rpc_test.js b/ambari-web/test/views/main/dashboard/widgets/jobtracker_rpc_test.js deleted file mode 100644 index 3f85408..0000000 --- a/ambari-web/test/views/main/dashboard/widgets/jobtracker_rpc_test.js +++ /dev/null @@ -1,107 +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'); - -require('messages'); -require('views/main/dashboard/widgets/jobtracker_rpc'); -require('views/main/dashboard/widgets/text_widget'); -require('views/main/dashboard/widget'); - -describe('App.JobTrackerRpcView', function() { - - var tests = [ - { - model: { - jobTrackerRpc: 1 - }, - e: { - isRed: false, - isOrange: true, - isGreen: false, - isNA: false, - content: '1.00 ms', - data: '1.00' - } - }, - { - model: { - jobTrackerRpc: 10 - }, - e: { - isRed: true, - isOrange: false, - isGreen: false, - isNA: false, - content: '10.00 ms', - data: '10.00' - } - }, - { - model: { - jobTrackerRpc: 0 - }, - e: { - isRed: false, - isOrange: false, - isGreen: true, - isNA: false, - content: '0 ms', - data: 0 - } - }, - { - model: { - jobTrackerRpc: null - }, - e: { - isRed: false, - isOrange: false, - isGreen: true, - isNA: true, - content: Em.I18n.t('services.service.summary.notAvailable'), - data: null - } - } - ]; - - tests.forEach(function(test) { - describe('jobTrackerRpc - ' + test.model.jobTrackerRpc, function() { - var jobTrackerRpcView = App.JobTrackerRpcView.create({model_type:null, model: test.model}); - it('content', function() { - expect(jobTrackerRpcView.get('content')).to.equal(test.e.content); - }); - it('data', function() { - expect(jobTrackerRpcView.get('data')).to.equal(test.e.data); - }); - it('isRed', function() { - expect(jobTrackerRpcView.get('isRed')).to.equal(test.e.isRed); - }); - it('isOrange', function() { - expect(jobTrackerRpcView.get('isOrange')).to.equal(test.e.isOrange); - }); - it('isGreen', function() { - expect(jobTrackerRpcView.get('isGreen')).to.equal(test.e.isGreen); - }); - it('isNA', function() { - expect(jobTrackerRpcView.get('isNA')).to.equal(test.e.isNA); - }); - }); - }); - -});
