From 6d6242c153c26ee14b2dccef7fd86fc56e6aefca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 7 May 2019 12:18:08 +0200 Subject: [PATCH] BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (#16918) * BarGauge: switched to beta and updated beta notice design * Updated snapshot --- .../panel_editor/VisualizationTab.tsx | 14 ++++--- .../settings/DataSourceSettingsPage.tsx | 9 ++++- .../DataSourceSettingsPage.test.tsx.snap | 40 +++++++++++++++---- .../app/features/plugins/PluginStateInfo.tsx | 36 ++++++++++++----- public/app/plugins/panel/bargauge/plugin.json | 2 +- 5 files changed, 74 insertions(+), 27 deletions(-) diff --git a/public/app/features/dashboard/panel_editor/VisualizationTab.tsx b/public/app/features/dashboard/panel_editor/VisualizationTab.tsx index 0cfa96da2a4..eb7bad65242 100644 --- a/public/app/features/dashboard/panel_editor/VisualizationTab.tsx +++ b/public/app/features/dashboard/panel_editor/VisualizationTab.tsx @@ -185,11 +185,14 @@ export class VisualizationTab extends PureComponent { ); } else { return ( -
- -
{meta.name}
- -
+ <> +
+ +
{meta.name}
+ +
+ + ); } }; @@ -237,7 +240,6 @@ export class VisualizationTab extends PureComponent { onClose={this.onCloseVizPicker} /> - {this.renderPanelOptions()} diff --git a/public/app/features/datasources/settings/DataSourceSettingsPage.tsx b/public/app/features/datasources/settings/DataSourceSettingsPage.tsx index 1ef8fef7026..f06e66b98de 100644 --- a/public/app/features/datasources/settings/DataSourceSettingsPage.tsx +++ b/public/app/features/datasources/settings/DataSourceSettingsPage.tsx @@ -185,7 +185,14 @@ export class DataSourceSettingsPage extends PureComponent {
{this.isReadOnly() && this.renderIsReadOnlyMessage()} - + {dataSourceMeta.state && ( +
+ + +
+ )} - +
+ + +
- +
+ + +
- This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource.
- = props => { return null; } - return
{text}
; + const theme = useContext(ThemeContext); + + const styles = css` + background: linear-gradient(to bottom, ${theme.colors.blueBase}, ${theme.colors.blueShade}); + color: ${theme.colors.gray7}; + white-space: nowrap; + border-radius: 3px; + text-shadow: none; + font-size: 13px; + padding: 4px 8px; + margin-left: 16px; + `; + + return ( + +
+ {props.state} +
+
+ ); }; export default PluginStateinfo; diff --git a/public/app/plugins/panel/bargauge/plugin.json b/public/app/plugins/panel/bargauge/plugin.json index aa7fc94212e..607da8c007a 100644 --- a/public/app/plugins/panel/bargauge/plugin.json +++ b/public/app/plugins/panel/bargauge/plugin.json @@ -2,7 +2,7 @@ "type": "panel", "name": "Bar Gauge", "id": "bargauge", - "state": "alpha", + "state": "beta", "dataFormats": ["time_series"],