Repository: ambari Updated Branches: refs/heads/trunk 08e5eef44 -> 0c67a83ce
AMBARI-11322. Graph Zoom in tooltip should be consistent on different pages.(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c67a83c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c67a83c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c67a83c Branch: refs/heads/trunk Commit: 0c67a83cecce659fa365a0abbc9ac8bc26983ead Parents: 08e5eef Author: Xi Wang <[email protected]> Authored: Thu May 21 17:21:45 2015 -0700 Committer: Xi Wang <[email protected]> Committed: Thu May 21 17:35:50 2015 -0700 ---------------------------------------------------------------------- ambari-web/app/views/common/widget/graph_widget_view.js | 8 ++++++++ ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js | 2 +- ambari-web/app/views/main/dashboard/cluster_metrics/load.js | 2 +- .../app/views/main/dashboard/cluster_metrics/memory.js | 2 +- .../app/views/main/dashboard/cluster_metrics/network.js | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0c67a83c/ambari-web/app/views/common/widget/graph_widget_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js b/ambari-web/app/views/common/widget/graph_widget_view.js index b81e019..321cb91 100644 --- a/ambari-web/app/views/common/widget/graph_widget_view.js +++ b/ambari-web/app/views/common/widget/graph_widget_view.js @@ -321,6 +321,14 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, { didInsertElement: function () { this.loadData(); + var self = this; + Em.run.next(function () { + if (self.get('isPreview')) { + App.tooltip(this.$("[rel='ZoomInTooltip']"), 'disable'); + } else { + App.tooltip(this.$("[rel='ZoomInTooltip']"), {placement : 'left'}); + } + }); }.observes('parentView.data') }) }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/0c67a83c/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js b/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js index 1917cbb..b61c07a 100644 --- a/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js +++ b/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js @@ -33,7 +33,7 @@ App.ChartClusterMetricsCPU = App.ChartLinearTimeView.extend({ title: Em.I18n.t('dashboard.clusterMetrics.cpu'), yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter, - isTimePagingDisable: true, + isTimePagingDisable: false, transformToSeries: function (jsonData) { var seriesArray = []; var idle = null; http://git-wip-us.apache.org/repos/asf/ambari/blob/0c67a83c/ambari-web/app/views/main/dashboard/cluster_metrics/load.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/cluster_metrics/load.js b/ambari-web/app/views/main/dashboard/cluster_metrics/load.js index 5052836..7e06b2c 100644 --- a/ambari-web/app/views/main/dashboard/cluster_metrics/load.js +++ b/ambari-web/app/views/main/dashboard/cluster_metrics/load.js @@ -31,7 +31,7 @@ App.ChartClusterMetricsLoad = App.ChartLinearTimeView.extend({ id: "cluster-metrics-load", ajaxIndex: 'dashboard.cluster_metrics.load', - isTimePagingDisable: true, + isTimePagingDisable: false, renderer: 'line', title: Em.I18n.t('dashboard.clusterMetrics.load'), http://git-wip-us.apache.org/repos/asf/ambari/blob/0c67a83c/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js b/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js index 393f12f..510c6b0 100644 --- a/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js +++ b/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js @@ -31,7 +31,7 @@ App.ChartClusterMetricsMemory = App.ChartLinearTimeView.extend({ ajaxIndex: 'dashboard.cluster_metrics.memory', - isTimePagingDisable: true, + isTimePagingDisable: false, title: Em.I18n.t('dashboard.clusterMetrics.memory'), yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, renderer: 'line', http://git-wip-us.apache.org/repos/asf/ambari/blob/0c67a83c/ambari-web/app/views/main/dashboard/cluster_metrics/network.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/cluster_metrics/network.js b/ambari-web/app/views/main/dashboard/cluster_metrics/network.js index b4c9f76..8c8fe77 100644 --- a/ambari-web/app/views/main/dashboard/cluster_metrics/network.js +++ b/ambari-web/app/views/main/dashboard/cluster_metrics/network.js @@ -32,7 +32,7 @@ App.ChartClusterMetricsNetwork = App.ChartLinearTimeView.extend({ ajaxIndex: 'dashboard.cluster_metrics.network', - isTimePagingDisable: true, + isTimePagingDisable: false, title: Em.I18n.t('dashboard.clusterMetrics.network'), yAxisFormatter: App.ChartLinearTimeView.BytesFormatter, renderer: 'line',
