From 595f21380e242664eba9e9aabb7098248d794996 Mon Sep 17 00:00:00 2001 From: Chris Roberson Date: Wed, 22 Apr 2020 14:50:44 -0400 Subject: [PATCH] Ensure time picker is actually disabled (#63709) (#64216) Co-authored-by: Elastic Machine Co-authored-by: Elastic Machine --- .../plugins/monitoring/public/directives/main/index.html | 3 ++- .../legacy/plugins/monitoring/public/directives/main/index.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/monitoring/public/directives/main/index.html b/x-pack/legacy/plugins/monitoring/public/directives/main/index.html index bb34cf6f5bb63..f5c4bf5c757af 100644 --- a/x-pack/legacy/plugins/monitoring/public/directives/main/index.html +++ b/x-pack/legacy/plugins/monitoring/public/directives/main/index.html @@ -4,7 +4,8 @@ name="monitoringMain.navName" app-name="'monitoring'" show-search-bar="true" - show-date-picker="true" + show-auto-refresh-only="!monitoringMain.datePicker.enableTimeFilter" + show-date-picker="monitoringMain.datePicker.enableTimeFilter" date-range-from="monitoringMain.datePicker.timeRange.from" date-range-to="monitoringMain.datePicker.timeRange.to" is-refresh-paused="monitoringMain.datePicker.refreshInterval.pause" diff --git a/x-pack/legacy/plugins/monitoring/public/directives/main/index.js b/x-pack/legacy/plugins/monitoring/public/directives/main/index.js index 2505f651d9803..4e09225cb85e8 100644 --- a/x-pack/legacy/plugins/monitoring/public/directives/main/index.js +++ b/x-pack/legacy/plugins/monitoring/public/directives/main/index.js @@ -138,6 +138,7 @@ export class MonitoringMainController { } this.datePicker = { + enableTimeFilter: timefilter.isTimeRangeSelectorEnabled(), timeRange: timefilter.getTime(), refreshInterval: timefilter.getRefreshInterval(), onRefreshChange: ({ isPaused, refreshInterval }, skipSet = false) => {