From 556829eda9bd9c06fa77b7acacdbbcfb14aeecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 8 May 2017 11:17:29 +0200 Subject: [PATCH] table: began table options redesign --- public/app/plugins/panel/table/editor.html | 141 +++++++++++---------- public/app/plugins/panel/table/editor.ts | 5 +- public/sass/components/_tabs.scss | 9 ++ 3 files changed, 85 insertions(+), 70 deletions(-) diff --git a/public/app/plugins/panel/table/editor.html b/public/app/plugins/panel/table/editor.html index 561645b7118..657771d8338 100644 --- a/public/app/plugins/panel/table/editor.html +++ b/public/app/plugins/panel/table/editor.html @@ -52,58 +52,62 @@ -
-
-
Column Styles
-
+
+ Style Rules + +
+ + + +
+ +
+
+
+ + +
+
+ +
+ +
+
+
+
+ + +
+
+ +
+
Date options
+
+ + +
+
+ +
+
String options
+ +
+ +
+ +
+
Number options
+
- - -
-
- -
- -
-
-
- - -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
- -
- -
-
-
-
- -
-
@@ -113,22 +117,23 @@
+
+
+ +
+
Thresholds & Coloring
+
+
+ + +
-
-
-
-
-
-
- - -
@@ -140,19 +145,17 @@ -
-
-
+
+
+
-
-
-
- -
+ +
+
diff --git a/public/app/plugins/panel/table/editor.ts b/public/app/plugins/panel/table/editor.ts index 9f36c88c986..fca7b8a90fb 100644 --- a/public/app/plugins/panel/table/editor.ts +++ b/public/app/plugins/panel/table/editor.ts @@ -21,10 +21,12 @@ export class TablePanelEditorCtrl { addColumnSegment: any; unitFormats: any; getColumnNames: any; + activeStyleIndex: number; /** @ngInject */ constructor($scope, private $q, private uiSegmentSrv) { $scope.editor = this; + this.activeStyleIndex = 0; this.panelCtrl = $scope.ctrl; this.panel = this.panelCtrl.panel; this.transformers = transformers; @@ -111,12 +113,13 @@ export class TablePanelEditorCtrl { decimals: 2, colors: ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], colorMode: null, - pattern: '/.*/', + pattern: '', dateFormat: 'YYYY-MM-DD HH:mm:ss', thresholds: [], }; this.panel.styles.push(angular.copy(columnStyleDefaults)); + this.activeStyleIndex = this.panel.styles.length-1; } removeColumnStyle(style) { diff --git a/public/sass/components/_tabs.scss b/public/sass/components/_tabs.scss index 2426f70afee..32e395c4d73 100644 --- a/public/sass/components/_tabs.scss +++ b/public/sass/components/_tabs.scss @@ -68,3 +68,12 @@ top: 1px; } } + +.form-tabs-wrapper { + @include brand-bottom-border(); + @include clearfix(); +} + +.form-tabs-content { + padding: $spacer*2 $spacer; +}