From bd589b61bd6ad19ad06b98f5d317bf6323b58b44 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Fri, 7 Dec 2018 15:18:43 +0100 Subject: [PATCH 1/3] removed side menu from display options, kept overrides in display options, moved thresholds and time regions to its own section in visualization --- public/app/features/panel/panel_editor_tab.ts | 7 ++- public/app/plugins/panel/graph/module.ts | 1 + .../app/plugins/panel/graph/tab_display.html | 52 ++++--------------- .../graph/tab_thresholds_time_regions.html | 2 + .../plugins/panel/graph/thresholds_form.html | 1 - .../panel/graph/time_regions_form.html | 3 +- 6 files changed, 19 insertions(+), 47 deletions(-) create mode 100644 public/app/plugins/panel/graph/tab_thresholds_time_regions.html diff --git a/public/app/features/panel/panel_editor_tab.ts b/public/app/features/panel/panel_editor_tab.ts index e9365cc1cfc..52d427c54bf 100644 --- a/public/app/features/panel/panel_editor_tab.ts +++ b/public/app/features/panel/panel_editor_tab.ts @@ -12,7 +12,12 @@ function panelEditorTab(dynamicDirectiveSrv) { }, directive: scope => { const pluginId = scope.ctrl.pluginId; - const tabName = scope.editorTab.title.toLowerCase().replace(' ', '-'); + const tabName = scope.editorTab.title + .toLowerCase() + .replace(' ', '-') + .replace('&', '') + .replace(' ', '') + .replace(' ', '-'); if (directiveCache[pluginId]) { if (directiveCache[pluginId][tabName]) { diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index 24c8825e883..75e82115ca1 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -138,6 +138,7 @@ class GraphCtrl extends MetricsPanelCtrl { this.addEditorTab('Display options', 'public/app/plugins/panel/graph/tab_display.html'); this.addEditorTab('Axes', axesEditorComponent); this.addEditorTab('Legend', 'public/app/plugins/panel/graph/tab_legend.html'); + this.addEditorTab('Thresholds & Time Regions', 'public/app/plugins/panel/graph/tab_thresholds_time_regions.html'); this.subTabIndex = 0; } diff --git a/public/app/plugins/panel/graph/tab_display.html b/public/app/plugins/panel/graph/tab_display.html index d407f30ffc8..2ed600aac70 100644 --- a/public/app/plugins/panel/graph/tab_display.html +++ b/public/app/plugins/panel/graph/tab_display.html @@ -1,28 +1,5 @@ -
- -
+
Draw Modes
@@ -89,9 +66,7 @@
-
-
Series specific overrides Regex match example: /server[0-3]/i
@@ -110,35 +85,26 @@
- +
- +
- +
+
+ +
- -
- -
- -
- -
- -
- -
diff --git a/public/app/plugins/panel/graph/tab_thresholds_time_regions.html b/public/app/plugins/panel/graph/tab_thresholds_time_regions.html new file mode 100644 index 00000000000..1ee603f5d36 --- /dev/null +++ b/public/app/plugins/panel/graph/tab_thresholds_time_regions.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/app/plugins/panel/graph/thresholds_form.html b/public/app/plugins/panel/graph/thresholds_form.html index 81877150a47..99e2f530c8d 100644 --- a/public/app/plugins/panel/graph/thresholds_form.html +++ b/public/app/plugins/panel/graph/thresholds_form.html @@ -1,5 +1,4 @@
-
Thresholds

Visual thresholds options disabled. Visit the Alert tab update your thresholds.
diff --git a/public/app/plugins/panel/graph/time_regions_form.html b/public/app/plugins/panel/graph/time_regions_form.html index 7292c53ec80..3330085e3a8 100644 --- a/public/app/plugins/panel/graph/time_regions_form.html +++ b/public/app/plugins/panel/graph/time_regions_form.html @@ -1,5 +1,4 @@

-
Time regions All configured time regions refers to UTC time
@@ -58,7 +57,7 @@
\ No newline at end of file From 3d0c54a946670eecf60c8bc6e101c2bcb464573c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 7 Dec 2018 12:13:23 -0800 Subject: [PATCH 2/3] logs style polish --- public/sass/_variables.light.scss | 6 +++--- public/sass/components/_toggle_button_group.scss | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/sass/_variables.light.scss b/public/sass/_variables.light.scss index 31f61a2c196..dd84b7af869 100644 --- a/public/sass/_variables.light.scss +++ b/public/sass/_variables.light.scss @@ -62,7 +62,7 @@ $critical: #ec2128; // ------------------------- $body-bg: $gray-7; -$page-bg: $gray-6; +$page-bg: $gray-7; $body-color: $gray-1; $text-color: $gray-1; $text-color-strong: $dark-2; @@ -402,6 +402,6 @@ $panel-grid-placeholder-shadow: 0 0 4px $blue-light; $logs-color-unkown: $gray-5; // toggle-group -$button-toggle-group-btn-active-bg: linear-gradient(90deg, $yellow, $red); -$button-toggle-group-btn-active-shadow: inset 0 0 4px $black; +$button-toggle-group-btn-active-bg: $brand-primary; +$button-toggle-group-btn-active-shadow: inset 0 0 4px $white; $button-toggle-group-btn-seperator-border: 1px solid $gray-6; diff --git a/public/sass/components/_toggle_button_group.scss b/public/sass/components/_toggle_button_group.scss index 73ebf61778e..ae1bb621d16 100644 --- a/public/sass/components/_toggle_button_group.scss +++ b/public/sass/components/_toggle_button_group.scss @@ -8,13 +8,13 @@ font-weight: $font-weight-semi-bold; font-size: $font-size-sm; border-radius: 0; - color: $text-color; border-right: $button-toggle-group-btn-seperator-border; &.active { background: $button-toggle-group-btn-active-bg; box-shadow: $button-toggle-group-btn-active-shadow; border-right: 0; + color: $white; &:hover { cursor: default; From 1bb535bbe34047ec9887677eb8f405cc3c69dee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 8 Dec 2018 12:54:36 +0100 Subject: [PATCH 3/3] minor style change --- .../dashboard/dashgrid/TimeRangeOptions.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/TimeRangeOptions.tsx b/public/app/features/dashboard/dashgrid/TimeRangeOptions.tsx index 8c6830cf1db..00371fa960b 100644 --- a/public/app/features/dashboard/dashgrid/TimeRangeOptions.tsx +++ b/public/app/features/dashboard/dashgrid/TimeRangeOptions.tsx @@ -1,4 +1,4 @@ -import React, { PureComponent } from 'react'; +import React, { PureComponent } from 'react'; import { Switch } from 'app/core/components/Switch/Switch'; import { Input } from 'app/core/components/Form'; import { isValidTimeSpan } from 'app/core/utils/rangeutil'; @@ -64,12 +64,7 @@ export class TimeRangeOptions extends PureComponent {
- - - - Override relative time - Last {
- - - Add time shift - Amount {
-
- - - -