From 8b4eefa768a1ab5d9a5948fba971835b6e45aa0e Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Fri, 15 Feb 2019 20:43:51 +0300 Subject: [PATCH 01/56] Initial commit --- .../src/components/Piechart/Piechart.tsx | 60 ++++++++++++++++++ packages/grafana-ui/src/components/index.ts | 1 + .../plugins/panel/piechart/PiechartPanel.tsx | 43 +++++++++++++ .../panel/piechart/PiechartPanelOptions.tsx | 30 +++++++++ .../plugins/panel/piechart/ValueOptions.tsx | 42 ++++++++++++ .../piechart/img/piechart_logo_large.png | Bin 0 -> 3723 bytes .../piechart/img/piechart_logo_small.png | Bin 0 -> 2629 bytes public/app/plugins/panel/piechart/module.tsx | 4 ++ public/app/plugins/panel/piechart/plugin.json | 18 ++++++ public/app/plugins/panel/piechart/types.ts | 7 ++ 10 files changed, 205 insertions(+) create mode 100644 packages/grafana-ui/src/components/Piechart/Piechart.tsx create mode 100644 public/app/plugins/panel/piechart/PiechartPanel.tsx create mode 100644 public/app/plugins/panel/piechart/PiechartPanelOptions.tsx create mode 100644 public/app/plugins/panel/piechart/ValueOptions.tsx create mode 100644 public/app/plugins/panel/piechart/img/piechart_logo_large.png create mode 100644 public/app/plugins/panel/piechart/img/piechart_logo_small.png create mode 100644 public/app/plugins/panel/piechart/module.tsx create mode 100644 public/app/plugins/panel/piechart/plugin.json create mode 100644 public/app/plugins/panel/piechart/types.ts diff --git a/packages/grafana-ui/src/components/Piechart/Piechart.tsx b/packages/grafana-ui/src/components/Piechart/Piechart.tsx new file mode 100644 index 00000000000..c57d4c43ce8 --- /dev/null +++ b/packages/grafana-ui/src/components/Piechart/Piechart.tsx @@ -0,0 +1,60 @@ +import React, { PureComponent } from 'react'; + +import { GrafanaThemeType } from '../../types'; +import { Themeable } from '../../index'; + +export interface Props extends Themeable { + height: number; + width: number; + + unit: string; + value: number; + pieType: string; + format: string; + stat: string; + strokeWidth: number; +} + +export class Piechart extends PureComponent { + canvasElement: any; + + static defaultProps = { + pieType: 'pie', + format: 'short', + valueName: 'current', + strokeWidth: 1, + theme: GrafanaThemeType.Dark, + }; + + componentDidMount() { + this.draw(); + } + + componentDidUpdate() { + this.draw(); + } + + draw() { + // const { width, height, theme, value } = this.props; + } + + render() { + const { height, width } = this.props; + + return ( +
+
(this.canvasElement = element)} + /> +
+ ); + } +} + +export default Piechart; diff --git a/packages/grafana-ui/src/components/index.ts b/packages/grafana-ui/src/components/index.ts index 86ce9347dad..329cbbfc9ba 100644 --- a/packages/grafana-ui/src/components/index.ts +++ b/packages/grafana-ui/src/components/index.ts @@ -24,3 +24,4 @@ export { ValueMappingsEditor } from './ValueMappingsEditor/ValueMappingsEditor'; export { Gauge } from './Gauge/Gauge'; export { Switch } from './Switch/Switch'; export { EmptySearchResult } from './EmptySearchResult/EmptySearchResult'; +export { Piechart } from './Piechart/Piechart'; diff --git a/public/app/plugins/panel/piechart/PiechartPanel.tsx b/public/app/plugins/panel/piechart/PiechartPanel.tsx new file mode 100644 index 00000000000..c3c15b35598 --- /dev/null +++ b/public/app/plugins/panel/piechart/PiechartPanel.tsx @@ -0,0 +1,43 @@ +// Libraries +import React, { PureComponent } from 'react'; + +// Services & Utils +import { processTimeSeries, ThemeContext } from '@grafana/ui'; + +// Components +import { Piechart } from '@grafana/ui'; + +// Types +import { PiechartOptions } from './types'; +import { PanelProps, NullValueMode, TimeSeriesValue } from '@grafana/ui/src/types'; + +interface Props extends PanelProps {} + +export class PiechartPanel extends PureComponent { + render() { + const { panelData, width, height, options } = this.props; + + let value: TimeSeriesValue; + + if (panelData.timeSeries) { + const vmSeries = processTimeSeries({ + timeSeries: panelData.timeSeries, + nullValueMode: NullValueMode.Null, + }); + + if (vmSeries[0]) { + value = vmSeries[0].stats[options.stat]; + } else { + value = null; + } + } else if (panelData.tableData) { + value = panelData.tableData.rows[0].find(prop => prop > 0); + } + + return ( + + {theme => } + + ); + } +} diff --git a/public/app/plugins/panel/piechart/PiechartPanelOptions.tsx b/public/app/plugins/panel/piechart/PiechartPanelOptions.tsx new file mode 100644 index 00000000000..43d7c2ab23d --- /dev/null +++ b/public/app/plugins/panel/piechart/PiechartPanelOptions.tsx @@ -0,0 +1,30 @@ +import React, { PureComponent } from 'react'; +import { PanelOptionsProps, PanelOptionsGrid } from '@grafana/ui'; + +import ValueOptions from './ValueOptions'; +import { PiechartOptions } from './types'; + +export const defaultProps = { + options: { + pieType: 'pie', + unit: 'short', + stat: 'current', + strokeWidth: 1, + }, +}; + +export default class PiechartPanelOptions extends PureComponent> { + static defaultProps = defaultProps; + + render() { + const { onChange, options } = this.props; + + return ( + <> + + + + + ); + } +} diff --git a/public/app/plugins/panel/piechart/ValueOptions.tsx b/public/app/plugins/panel/piechart/ValueOptions.tsx new file mode 100644 index 00000000000..e83e4686d13 --- /dev/null +++ b/public/app/plugins/panel/piechart/ValueOptions.tsx @@ -0,0 +1,42 @@ +import React, { PureComponent } from 'react'; +import { FormLabel, PanelOptionsProps, PanelOptionsGroup, Select } from '@grafana/ui'; +import UnitPicker from 'app/core/components/Select/UnitPicker'; +import { PiechartOptions } from './types'; + +const statOptions = [ + { value: 'min', label: 'Min' }, + { value: 'max', label: 'Max' }, + { value: 'avg', label: 'Average' }, + { value: 'current', label: 'Current' }, + { value: 'total', label: 'Total' }, +]; + +const labelWidth = 6; + +export default class ValueOptions extends PureComponent> { + onUnitChange = unit => this.props.onChange({ ...this.props.options, unit: unit.value }); + + onStatChange = stat => this.props.onChange({ ...this.props.options, stat: stat.value }); + + render() { + const { stat, unit } = this.props.options; + + return ( + +
+ Stat + option.value === pieType)} + /> +
+
+ +
+
+ ); + } +} diff --git a/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx b/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx index c221ab31cd4..72021da4890 100644 --- a/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx +++ b/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx @@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; import { PanelEditorProps, PanelOptionsGrid } from '@grafana/ui'; import PiechartValueEditor from './PiechartValueEditor'; +import { PiechartOptionsBox } from './PiechartOptionsBox'; import { PiechartOptions, PiechartValueOptions } from './types'; export default class PiechartPanelEditor extends PureComponent> { @@ -12,12 +13,13 @@ export default class PiechartPanelEditor extends PureComponent + ); diff --git a/public/app/plugins/panel/piechart/PiechartValueEditor.tsx b/public/app/plugins/panel/piechart/PiechartValueEditor.tsx index a2f02f554fe..614f0602bd8 100644 --- a/public/app/plugins/panel/piechart/PiechartValueEditor.tsx +++ b/public/app/plugins/panel/piechart/PiechartValueEditor.tsx @@ -37,7 +37,11 @@ export default class PiechartValueEditor extends PureComponent { return (
- Stat + Unit + +
+
+ Value option.value === pieType)} + value={pieChartOptions.find(option => option.value === pieType)} />
diff --git a/public/app/plugins/panel/piechart/PiechartPanel.tsx b/public/app/plugins/panel/piechart/PieChartPanel.tsx similarity index 81% rename from public/app/plugins/panel/piechart/PiechartPanel.tsx rename to public/app/plugins/panel/piechart/PieChartPanel.tsx index 355e0af944f..14e251ddffe 100644 --- a/public/app/plugins/panel/piechart/PiechartPanel.tsx +++ b/public/app/plugins/panel/piechart/PieChartPanel.tsx @@ -5,20 +5,20 @@ import React, { PureComponent } from 'react'; import { processTimeSeries, ThemeContext } from '@grafana/ui'; // Components -import { Piechart, PiechartDataPoint } from '@grafana/ui'; +import { PieChart, PieChartDataPoint } from '@grafana/ui'; // Types -import { PiechartOptions } from './types'; +import { PieChartOptions } from './types'; import { PanelProps, NullValueMode } from '@grafana/ui/src/types'; -interface Props extends PanelProps {} +interface Props extends PanelProps {} -export class PiechartPanel extends PureComponent { +export class PieChartPanel extends PureComponent { render() { const { panelData, width, height, options } = this.props; const { valueOptions } = options; - const datapoints: PiechartDataPoint[] = []; + const datapoints: PieChartDataPoint[] = []; if (panelData.timeSeries) { const vmSeries = processTimeSeries({ timeSeries: panelData.timeSeries, @@ -41,7 +41,7 @@ export class PiechartPanel extends PureComponent { return ( {theme => ( - > { + onValueOptionsChanged = (valueOptions: PieChartValueOptions) => + this.props.onOptionsChange({ + ...this.props.options, + valueOptions, + }); + + render() { + const { onOptionsChange, options } = this.props; + + return ( + <> + + + + + + ); + } +} diff --git a/public/app/plugins/panel/piechart/PiechartValueEditor.tsx b/public/app/plugins/panel/piechart/PieChartValueEditor.tsx similarity index 86% rename from public/app/plugins/panel/piechart/PiechartValueEditor.tsx rename to public/app/plugins/panel/piechart/PieChartValueEditor.tsx index 44b70b340a9..19d035d13f9 100644 --- a/public/app/plugins/panel/piechart/PiechartValueEditor.tsx +++ b/public/app/plugins/panel/piechart/PieChartValueEditor.tsx @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import { FormLabel, PanelOptionsGroup, Select, UnitPicker } from '@grafana/ui'; -import { PiechartValueOptions } from './types'; +import { PieChartValueOptions } from './types'; const statOptions = [ { value: 'min', label: 'Min' }, @@ -13,11 +13,11 @@ const statOptions = [ const labelWidth = 6; export interface Props { - options: PiechartValueOptions; - onChange: (valueOptions: PiechartValueOptions) => void; + options: PieChartValueOptions; + onChange: (valueOptions: PieChartValueOptions) => void; } -export default class PiechartValueEditor extends PureComponent { +export default class PieChartValueEditor extends PureComponent { onUnitChange = unit => this.props.onChange({ ...this.props.options, diff --git a/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx b/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx deleted file mode 100644 index c08dcb490e8..00000000000 --- a/public/app/plugins/panel/piechart/PiechartPanelEditor.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React, { PureComponent } from 'react'; -import { PanelEditorProps, PanelOptionsGrid } from '@grafana/ui'; - -import PiechartValueEditor from './PiechartValueEditor'; -import { PiechartOptionsBox } from './PiechartOptionsBox'; -import { PiechartOptions, PiechartValueOptions } from './types'; - -export default class PiechartPanelEditor extends PureComponent> { - onValueOptionsChanged = (valueOptions: PiechartValueOptions) => - this.props.onOptionsChange({ - ...this.props.options, - valueOptions, - }); - - render() { - const { onOptionsChange, options } = this.props; - - return ( - <> - - - - - - ); - } -} diff --git a/public/app/plugins/panel/piechart/module.tsx b/public/app/plugins/panel/piechart/module.tsx index 11737de9a08..3e0ef90dc6c 100644 --- a/public/app/plugins/panel/piechart/module.tsx +++ b/public/app/plugins/panel/piechart/module.tsx @@ -1,10 +1,10 @@ import { ReactPanelPlugin } from '@grafana/ui'; -import PiechartPanelEditor from './PiechartPanelEditor'; -import { PiechartPanel } from './PiechartPanel'; -import { PiechartOptions, defaults } from './types'; +import PieChartPanelEditor from './PieChartPanelEditor'; +import { PieChartPanel } from './PieChartPanel'; +import { PieChartOptions, defaults } from './types'; -export const reactPanel = new ReactPanelPlugin(PiechartPanel); +export const reactPanel = new ReactPanelPlugin(PieChartPanel); -reactPanel.setEditor(PiechartPanelEditor); +reactPanel.setEditor(PieChartPanelEditor); reactPanel.setDefaults(defaults); diff --git a/public/app/plugins/panel/piechart/types.ts b/public/app/plugins/panel/piechart/types.ts index 84e2377f8b5..5ec9bae516b 100644 --- a/public/app/plugins/panel/piechart/types.ts +++ b/public/app/plugins/panel/piechart/types.ts @@ -1,20 +1,20 @@ -import { PiechartType } from '@grafana/ui'; +import { PieChartType } from '@grafana/ui'; -export interface PiechartOptions { - pieType: PiechartType; +export interface PieChartOptions { + pieType: PieChartType; strokeWidth: number; - valueOptions: PiechartValueOptions; + valueOptions: PieChartValueOptions; // TODO: Options for Legend / Combine components } -export interface PiechartValueOptions { +export interface PieChartValueOptions { unit: string; stat: string; } -export const defaults: PiechartOptions = { - pieType: PiechartType.PIE, +export const defaults: PieChartOptions = { + pieType: PieChartType.PIE, strokeWidth: 1, valueOptions: { unit: 'short', From 7bc741c4e24e6884019c4f97ed3247692fc2d496 Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Fri, 8 Mar 2019 13:51:25 +0300 Subject: [PATCH 34/56] piechart -> pieChart --- public/app/features/plugins/built_in_plugins.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/plugins/built_in_plugins.ts b/public/app/features/plugins/built_in_plugins.ts index 3e5b52e1555..06f7b8bddc1 100644 --- a/public/app/features/plugins/built_in_plugins.ts +++ b/public/app/features/plugins/built_in_plugins.ts @@ -26,7 +26,7 @@ import * as tablePanel from 'app/plugins/panel/table/module'; import * as singlestatPanel from 'app/plugins/panel/singlestat/module'; import * as gettingStartedPanel from 'app/plugins/panel/gettingstarted/module'; import * as gaugePanel from 'app/plugins/panel/gauge/module'; -import * as piechartPanel from 'app/plugins/panel/piechart/module'; +import * as pieChartPanel from 'app/plugins/panel/piechart/module'; const builtInPlugins = { 'app/plugins/datasource/graphite/module': graphitePlugin, @@ -57,7 +57,7 @@ const builtInPlugins = { 'app/plugins/panel/singlestat/module': singlestatPanel, 'app/plugins/panel/gettingstarted/module': gettingStartedPanel, 'app/plugins/panel/gauge/module': gaugePanel, - 'app/plugins/panel/piechart/module': piechartPanel, + 'app/plugins/panel/piechart/module': pieChartPanel, }; export default builtInPlugins; From b8fcd3d9626df2a74da8868f1b032f42ec966072 Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Fri, 8 Mar 2019 15:17:04 +0300 Subject: [PATCH 35/56] Improve rendering --- .../src/components/PieChart/PieChart.tsx | 35 ++++++++-------- public/sass/components/_panel_piechart.scss | 41 +++++++++++-------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.tsx index 4686063d186..fa8810335d8 100644 --- a/packages/grafana-ui/src/components/PieChart/PieChart.tsx +++ b/packages/grafana-ui/src/components/PieChart/PieChart.tsx @@ -27,6 +27,9 @@ export interface Props extends Themeable { export class PieChart extends PureComponent { containerElement: any; + svgElement: any; + tooltipElement: any; + tooltipValueElement: any; static defaultProps = { pieType: 'pie', @@ -58,12 +61,10 @@ export class PieChart extends PureComponent { const outerRadius = radius - radius / 10; const innerRadius = pieType === PieChartType.PIE ? 0 : radius - radius / 3; - select('.piechart-container svg').remove(); - const svg = select('.piechart-container') - .append('svg') + const svg = select(this.svgElement) + .html('') .attr('width', width) .attr('height', height) - .attr('class', 'shadow') .append('g') .attr('transform', `translate(${width / 2},${height / 2})`); @@ -85,20 +86,18 @@ export class PieChart extends PureComponent { .style('stroke', (d: any, idx: number) => colors[idx]) .style('stroke-width', `${strokeWidth}px`) .on('mouseover', (d: any, idx: any) => { - select('#tooltip') - .style('opacity', 1) - .select('#tooltip-value') - // TODO: show percents - .text(`${names[idx]} (${data[idx]})`); + select(this.tooltipElement).style('opacity', 1); + // TODO: show percents + select(this.tooltipValueElement).text(`${names[idx]} (${data[idx]})`); }) .on('mousemove', () => { - select('#tooltip') + select(this.tooltipElement) // TODO: right position .style('top', `${event.pageY}px`) .style('left', `${event.pageX}px`); }) .on('mouseout', () => { - select('#tooltip').style('opacity', 0); + select(this.tooltipElement).style('opacity', 0); }); } @@ -113,13 +112,17 @@ export class PieChart extends PureComponent { style={{ height: `${height * 0.9}px`, width: `${Math.min(width, height * 1.3)}px`, - top: '10px', - margin: 'auto', }} - /> -
+ > + (this.svgElement = element)} /> +
+
(this.tooltipElement = element)}>
-
+
(this.tooltipValueElement = element)} + />
diff --git a/public/sass/components/_panel_piechart.scss b/public/sass/components/_panel_piechart.scss index a762e7b6257..8f98f60658b 100644 --- a/public/sass/components/_panel_piechart.scss +++ b/public/sass/components/_panel_piechart.scss @@ -4,9 +4,14 @@ width: 100%; height: 100%; - svg { - width: 100%; - height: 100%; + .piechart-container { + top: 10px; + margin: auto; + + svg { + width: 100%; + height: 100%; + } } .piechart-tooltip { @@ -15,21 +20,23 @@ background-color: #141414; color: #d8d9da; opacity: 0; - } + position: absolute; + width: 300px; - .piechart-tooltip .piechart-tooltip-time { - text-align: center; - position: relative; - top: -3px; - padding: 0.2rem; - font-weight: bold; - color: #d8d9da; - } + .piechart-tooltip-time { + text-align: center; + position: relative; + top: -3px; + padding: 0.2rem; + font-weight: bold; + color: #d8d9da; - .piechart-tooltip .piechart-tooltip-value { - display: table-cell; - font-weight: bold; - padding-left: 15px; - text-align: right; + .piechart-tooltip-value { + display: table-cell; + font-weight: bold; + padding-left: 15px; + text-align: right; + } + } } } From a7bd8d503d8315632e57d2db64554e0803ca5c86 Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Fri, 8 Mar 2019 15:47:15 +0300 Subject: [PATCH 36/56] Simple storybook --- .../components/PieChart/PieChart.story.tsx | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/grafana-ui/src/components/PieChart/PieChart.story.tsx diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.story.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.story.tsx new file mode 100644 index 00000000000..4c31d7a0365 --- /dev/null +++ b/packages/grafana-ui/src/components/PieChart/PieChart.story.tsx @@ -0,0 +1,42 @@ +import { storiesOf } from '@storybook/react'; +import { number, text, object } from '@storybook/addon-knobs'; +import { PieChart, PieChartType } from './PieChart'; +import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; +import { renderComponentWithTheme } from '../../utils/storybook/withTheme'; + +const getKnobs = () => { + return { + datapoints: object('datapoints', [ + { + value: 100, + name: '100', + color: '#7EB26D', + }, + { + value: 200, + name: '200', + color: '#6ED0E0', + }, + ]), + pieType: text('pieType', PieChartType.PIE), + strokeWidth: number('strokeWidth', 1), + unit: text('unit', 'ms'), + }; +}; + +const PieChartStories = storiesOf('UI/PieChart/PieChart', module); + +PieChartStories.addDecorator(withCenteredStory); + +PieChartStories.add('Pie type: pie', () => { + const { datapoints, pieType, strokeWidth, unit } = getKnobs(); + + return renderComponentWithTheme(PieChart, { + width: 200, + height: 400, + datapoints, + pieType, + strokeWidth, + unit, + }); +}); From 2bd64d2c31d7ab0e1cc240502771fbf89d85653e Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Wed, 13 Mar 2019 19:44:18 +0300 Subject: [PATCH 37/56] Improve tooltip look --- public/sass/components/_panel_piechart.scss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/sass/components/_panel_piechart.scss b/public/sass/components/_panel_piechart.scss index 8f98f60658b..f9041d5de51 100644 --- a/public/sass/components/_panel_piechart.scss +++ b/public/sass/components/_panel_piechart.scss @@ -21,12 +21,10 @@ color: #d8d9da; opacity: 0; position: absolute; - width: 300px; .piechart-tooltip-time { text-align: center; position: relative; - top: -3px; padding: 0.2rem; font-weight: bold; color: #d8d9da; @@ -34,7 +32,7 @@ .piechart-tooltip-value { display: table-cell; font-weight: bold; - padding-left: 15px; + padding: 15px; text-align: right; } } From d36b07bd68dde8774eb1a1189f7ecbdb2edb774f Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Thu, 14 Mar 2019 18:09:24 +0300 Subject: [PATCH 38/56] Add "No data points" message --- .../src/components/PieChart/PieChart.tsx | 58 ++++++++++++------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.tsx index fa8810335d8..ee1cf28021e 100644 --- a/packages/grafana-ui/src/components/PieChart/PieChart.tsx +++ b/packages/grafana-ui/src/components/PieChart/PieChart.tsx @@ -50,6 +50,10 @@ export class PieChart extends PureComponent { draw() { const { datapoints, pieType, strokeWidth } = this.props; + if (datapoints.length === 0) { + return; + } + const data = datapoints.map(datapoint => datapoint.value); const names = datapoints.map(datapoint => datapoint.name); const colors = datapoints.map(datapoint => datapoint.color); @@ -102,31 +106,41 @@ export class PieChart extends PureComponent { } render() { - const { height, width } = this.props; + const { height, width, datapoints } = this.props; - return ( -
-
(this.containerElement = element)} - className="piechart-container" - style={{ - height: `${height * 0.9}px`, - width: `${Math.min(width, height * 1.3)}px`, - }} - > - (this.svgElement = element)} /> -
-
(this.tooltipElement = element)}> -
-
(this.tooltipValueElement = element)} - /> + if (datapoints.length > 0) { + return ( +
+
(this.containerElement = element)} + className="piechart-container" + style={{ + height: `${height * 0.9}px`, + width: `${Math.min(width, height * 1.3)}px`, + }} + > + (this.svgElement = element)} /> +
+
(this.tooltipElement = element)}> +
+
(this.tooltipValueElement = element)} + /> +
-
- ); + ); + } else { + return ( +
+
+ No data points +
+
+ ); + } } } From 4ba5217a087ff710486a2ed00d136fd4fd0a4d67 Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Thu, 14 Mar 2019 18:18:40 +0300 Subject: [PATCH 39/56] Right tooltip position --- packages/grafana-ui/src/components/PieChart/PieChart.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.tsx index ee1cf28021e..1fc86b60956 100644 --- a/packages/grafana-ui/src/components/PieChart/PieChart.tsx +++ b/packages/grafana-ui/src/components/PieChart/PieChart.tsx @@ -96,8 +96,7 @@ export class PieChart extends PureComponent { }) .on('mousemove', () => { select(this.tooltipElement) - // TODO: right position - .style('top', `${event.pageY}px`) + .style('top', `${event.pageY - height / 2}px`) .style('left', `${event.pageX}px`); }) .on('mouseout', () => { From dbec66b3d63b4b5b6b1c8fde68472c4f78f34bdb Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Thu, 14 Mar 2019 18:40:44 +0300 Subject: [PATCH 40/56] Tooltip: show percent instead of value --- packages/grafana-ui/src/components/PieChart/PieChart.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.tsx index 1fc86b60956..68b6ed11c72 100644 --- a/packages/grafana-ui/src/components/PieChart/PieChart.tsx +++ b/packages/grafana-ui/src/components/PieChart/PieChart.tsx @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react'; import { select, pie, arc, event } from 'd3'; +import { sum } from 'lodash'; import { GrafanaThemeType } from '../../types'; import { Themeable } from '../../index'; @@ -58,6 +59,9 @@ export class PieChart extends PureComponent { const names = datapoints.map(datapoint => datapoint.name); const colors = datapoints.map(datapoint => datapoint.color); + const total = sum(data) || 1; + const percents = data.map((item: number) => (item / total) * 100); + const width = this.containerElement.offsetWidth; const height = this.containerElement.offsetHeight; const radius = Math.min(width, height) / 2; @@ -91,8 +95,7 @@ export class PieChart extends PureComponent { .style('stroke-width', `${strokeWidth}px`) .on('mouseover', (d: any, idx: any) => { select(this.tooltipElement).style('opacity', 1); - // TODO: show percents - select(this.tooltipValueElement).text(`${names[idx]} (${data[idx]})`); + select(this.tooltipValueElement).text(`${names[idx]} (${percents[idx].toFixed(2)}%)`); }) .on('mousemove', () => { select(this.tooltipElement) From 9e57195b1d4fc3e7f70d2ceabd325e6f3c5b8969 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Wed, 20 Mar 2019 09:48:19 +0100 Subject: [PATCH 41/56] removed dashboard variables, removed headings-font-family variable, created theme variables for links and z-index, removed unused class in _panel_editor and _dashboard --- .../src/themes/_variables.scss.tmpl.ts | 25 +++++++------------ packages/grafana-ui/src/themes/default.ts | 15 ++++++++++- packages/grafana-ui/src/types/theme.ts | 13 ++++++++++ public/sass/_variables.generated.scss | 9 +------ public/sass/base/_type.scss | 1 - public/sass/components/_panel_editor.scss | 12 +++------ public/sass/components/_panel_logs.scss | 3 +-- public/sass/components/_tabbed_view.scss | 2 +- public/sass/pages/_dashboard.scss | 9 ++----- public/sass/pages/_explore.scss | 16 ++++++------ 10 files changed, 52 insertions(+), 53 deletions(-) diff --git a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts index 16f4a20d139..89568ec7f6c 100644 --- a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts +++ b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts @@ -110,7 +110,6 @@ $font-size-h4: ${theme.typography.heading.h4} !default; $font-size-h5: ${theme.typography.heading.h5} !default; $font-size-h6: ${theme.typography.heading.h6} !default; -$headings-font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; $headings-line-height: ${theme.typography.lineHeight.sm} !default; // Components @@ -130,8 +129,8 @@ $page-sidebar-margin: 56px; // Links // ------------------------- -$link-decoration: none !default; -$link-hover-decoration: none !default; +$link-decoration: ${theme.typography.link.decoration} !default; +$link-hover-decoration: ${theme.typography.link.hoverDecoration} !default; // Tables // @@ -166,13 +165,13 @@ $form-icon-danger: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www // ------------------------- // Used for a bird's eye view of components dependent on the z-axis // Try to avoid customizing these :) -$zindex-dropdown: 1000; -$zindex-navbar-fixed: 1020; -$zindex-sidemenu: 1025; -$zindex-tooltip: 1030; -$zindex-modal-backdrop: 1040; -$zindex-modal: 1050; -$zindex-typeahead: 1060; +$zindex-dropdown: ${theme.zIndex.dropdown}; +$zindex-navbar-fixed: ${theme.zIndex.navbarFixed}; +$zindex-sidemenu: ${theme.zIndex.sidemenu}; +$zindex-tooltip: ${theme.zIndex.tooltip}; +$zindex-modal-backdrop: ${theme.zIndex.modalBackdrop}; +$zindex-modal: ${theme.zIndex.modal}; +$zindex-typeahead: ${theme.zIndex.typeahead}; // Buttons // @@ -196,12 +195,6 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; // sidemenu $side-menu-width: 60px; -// dashboard -$dashboard-padding: 10px * 2; -$panel-horizontal-padding: 10; -$panel-vertical-padding: 5; -$panel-padding: 0px $panel-horizontal-padding + 0px $panel-vertical-padding + 0px $panel-horizontal-padding + 0px; - // tabs $tabs-padding: 10px 15px 9px; diff --git a/packages/grafana-ui/src/themes/default.ts b/packages/grafana-ui/src/themes/default.ts index 2dc50a7a5b1..934fa7634d1 100644 --- a/packages/grafana-ui/src/themes/default.ts +++ b/packages/grafana-ui/src/themes/default.ts @@ -4,7 +4,7 @@ const theme: GrafanaThemeCommons = { name: 'Grafana Default', typography: { fontFamily: { - sansSerif: "'Roboto', Helvetica, Arial, sans-serif", + sansSerif: "'Roboto', 'Helvetica Neue', Arial, sans-serif", monospace: "Menlo, Monaco, Consolas, 'Courier New', monospace", }, size: { @@ -34,6 +34,10 @@ const theme: GrafanaThemeCommons = { md: 4 / 3, lg: 1.5, }, + link: { + decoration: 'none', + hoverDecoration: 'none', + }, }, breakpoints: { xs: '0', @@ -66,6 +70,15 @@ const theme: GrafanaThemeCommons = { horizontal: 10, vertical: 5, }, + zIndex: { + dropdown: '1000', + navbarFixed: '1020', + sidemenu: '1025', + tooltip: '1030', + modalBackdrop: '1040', + modal: '1050', + typeahead: '1060', + }, }; export default theme; diff --git a/packages/grafana-ui/src/types/theme.ts b/packages/grafana-ui/src/types/theme.ts index 4da0ba8218c..fcc427541e6 100644 --- a/packages/grafana-ui/src/types/theme.ts +++ b/packages/grafana-ui/src/types/theme.ts @@ -46,6 +46,10 @@ export interface GrafanaThemeCommons { h5: string; h6: string; }; + link: { + decoration: string; + hoverDecoration: string; + }; }; spacing: { d: string; @@ -71,6 +75,15 @@ export interface GrafanaThemeCommons { horizontal: number; vertical: number; }; + zIndex: { + dropdown: string; + navbarFixed: string; + sidemenu: string; + tooltip: string; + modalBackdrop: string; + modal: string; + typeahead: string; + }; } export interface GrafanaTheme extends GrafanaThemeCommons { diff --git a/public/sass/_variables.generated.scss b/public/sass/_variables.generated.scss index 21fc602b8ba..340e56c8b78 100644 --- a/public/sass/_variables.generated.scss +++ b/public/sass/_variables.generated.scss @@ -90,7 +90,7 @@ $grid-gutter-width: 30px !default; // Typography // ------------------------- -$font-family-sans-serif: 'Roboto', Helvetica, Arial, sans-serif; +$font-family-sans-serif: 'Roboto', 'Helvetica Neue', Arial, sans-serif; $font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace; $font-size-root: 14px !default; @@ -113,7 +113,6 @@ $font-size-h4: 18px !default; $font-size-h5: 16px !default; $font-size-h6: 14px !default; -$headings-font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; $headings-line-height: 1.1 !default; // Components @@ -199,12 +198,6 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; // sidemenu $side-menu-width: 60px; -// dashboard -$dashboard-padding: 10px * 2; -$panel-horizontal-padding: 10; -$panel-vertical-padding: 5; -$panel-padding: 0px $panel-horizontal-padding + 0px $panel-vertical-padding + 0px $panel-horizontal-padding + 0px; - // tabs $tabs-padding: 10px 15px 9px; diff --git a/public/sass/base/_type.scss b/public/sass/base/_type.scss index 9efae56d5e4..479e0d6c9cd 100644 --- a/public/sass/base/_type.scss +++ b/public/sass/base/_type.scss @@ -110,7 +110,6 @@ h6, .h5, .h6 { margin-bottom: $space-sm; - font-family: $headings-font-family; font-weight: $font-weight-regular; line-height: $headings-line-height; color: $headings-color; diff --git a/public/sass/components/_panel_editor.scss b/public/sass/components/_panel_editor.scss index 8acf98be1b2..6df1cc60f60 100644 --- a/public/sass/components/_panel_editor.scss +++ b/public/sass/components/_panel_editor.scss @@ -9,14 +9,14 @@ &--edit { height: 40%; - margin: 0 $dashboard-padding; + margin: 0 $space-md; } &--view { flex: 1 1 0; height: 90%; - margin: 0 $dashboard-padding; - padding-top: $dashboard-padding; + margin: 0 $space-md; + padding-top: $space-md; } } @@ -80,11 +80,7 @@ } .submenu-controls { - padding: 0 $dashboard-padding $space-sm $dashboard-padding; - } - - .panel-editor-container__panel { - margin: 0 $dashboard-padding; + padding: 0 $space-md $space-sm $space-md; } .search-container { diff --git a/public/sass/components/_panel_logs.scss b/public/sass/components/_panel_logs.scss index 22c82461e85..4e2bc86d960 100644 --- a/public/sass/components/_panel_logs.scss +++ b/public/sass/components/_panel_logs.scss @@ -3,8 +3,7 @@ $column-horizontal-spacing: 10px; .logs-panel-options { display: flex; background-color: $page-bg; - padding: $panel-padding; - padding-top: 10px; + padding: $space-sm $space-md $space-sm $space-md; border-radius: $border-radius; margin: $space-md 0 $space-sm; border: $panel-border; diff --git a/public/sass/components/_tabbed_view.scss b/public/sass/components/_tabbed_view.scss index 6abadfa465b..e58b37711d0 100644 --- a/public/sass/components/_tabbed_view.scss +++ b/public/sass/components/_tabbed_view.scss @@ -13,7 +13,7 @@ .tabbed-view-header { box-shadow: $page-header-shadow; border-bottom: 1px solid $page-header-border-color; - padding: 0 $dashboard-padding; + padding: 0 $space-md; @include clearfix(); } diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index c02c9227d29..c189df07f4a 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -1,5 +1,5 @@ .dashboard-container { - padding: $dashboard-padding $dashboard-padding 0 $dashboard-padding; + padding: $space-md $space-md 0 $space-md; width: 100%; height: 100%; box-sizing: border-box; @@ -78,7 +78,7 @@ div.flot-text { } .panel-content { - padding: $panel-padding; + padding: 0 $space-md $space-sm $space-md; height: calc(100% - 27px); position: relative; @@ -260,7 +260,6 @@ div.flot-text { } .dashboard-header { - font-family: $headings-font-family; font-size: $font-size-h3; text-align: center; overflow: hidden; @@ -273,10 +272,6 @@ div.flot-text { } } -.panel-full-edit { - padding-top: $dashboard-padding; -} - .dashboard-loading { height: 60vh; display: flex; diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index 60c1a600014..b610ac62534 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -31,7 +31,7 @@ flex-flow: row wrap; justify-content: flex-start; height: auto; - padding: 0 $dashboard-padding; + padding: 0 $space-md; border-bottom: 1px solid #0000; transition-duration: 0.35s; transition-timing-function: ease-in-out; @@ -91,7 +91,7 @@ } .explore-toolbar-content-item:first-child { - padding-left: $dashboard-padding; + padding-left: $space-md; margin-right: auto; } @@ -142,7 +142,7 @@ @media only screen and (max-width: 544px) { .explore-toolbar-header-title { .navbar-page-btn { - margin-left: $dashboard-padding; + margin-left: $space-md; } } } @@ -156,7 +156,7 @@ } .explore-container { - padding: $dashboard-padding; + padding: $space-md; } .explore-wrapper { @@ -172,16 +172,14 @@ } .explore-panel__body { - padding: $panel-padding; + padding: 0 $space-md $space-sm $space-md; } .explore-panel__header { - padding: $panel-padding; - padding-top: 5px; - padding-bottom: 0; + padding: $space-sm $space-md 0 $space-md; display: flex; cursor: pointer; - margin-bottom: 5px; + margin-bottom: $space-sm; transition: all 0.1s linear; } From 2a53be050cba90ec4f6da555a9a92005d1167580 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Wed, 20 Mar 2019 10:29:28 +0100 Subject: [PATCH 42/56] fixed snapshot for test --- .../__snapshots__/ThresholdsEditor.test.tsx.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap index 2bc5ee56d4d..6c67b5ec546 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap +++ b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap @@ -195,7 +195,7 @@ exports[`Render should render with base threshold 1`] = ` "typography": Object { "fontFamily": Object { "monospace": "Menlo, Monaco, Consolas, 'Courier New', monospace", - "sansSerif": "'Roboto', Helvetica, Arial, sans-serif", + "sansSerif": "'Roboto', 'Helvetica Neue', Arial, sans-serif", }, "heading": Object { "h1": "28px", @@ -339,7 +339,7 @@ exports[`Render should render with base threshold 1`] = ` "typography": Object { "fontFamily": Object { "monospace": "Menlo, Monaco, Consolas, 'Courier New', monospace", - "sansSerif": "'Roboto', Helvetica, Arial, sans-serif", + "sansSerif": "'Roboto', 'Helvetica Neue', Arial, sans-serif", }, "heading": Object { "h1": "28px", From 7fcb9777c094a4f734d7bc2a84d8281000b58e28 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Wed, 20 Mar 2019 10:49:34 +0100 Subject: [PATCH 43/56] removed empty space in snapshot --- .../__snapshots__/ThresholdsEditor.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap index 6c67b5ec546..60a8c10492a 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap +++ b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap @@ -195,7 +195,7 @@ exports[`Render should render with base threshold 1`] = ` "typography": Object { "fontFamily": Object { "monospace": "Menlo, Monaco, Consolas, 'Courier New', monospace", - "sansSerif": "'Roboto', 'Helvetica Neue', Arial, sans-serif", + "sansSerif": "'Roboto', 'Helvetica Neue', Arial, sans-serif", }, "heading": Object { "h1": "28px", From 67e802c59561078a96664c3f97bc317c40aeb0f3 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Wed, 20 Mar 2019 11:13:19 +0100 Subject: [PATCH 44/56] more fixes to snapshot --- .../ThresholdsEditor.test.tsx.snap | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap index 60a8c10492a..bb7fca08f17 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap +++ b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap @@ -211,6 +211,10 @@ exports[`Render should render with base threshold 1`] = ` "sm": 1.1, "xs": 1, }, + "link": Object { + "decoration": "none", + "hoverDecoration": "none", + }, "size": Object { "base": "13px", "lg": "18px", @@ -224,6 +228,15 @@ exports[`Render should render with base threshold 1`] = ` "regular": 400, "semibold": 500, }, + "zIndex": Object { + "dropdown": "1000", + "modal": "1050", + "modalBackdrop": "1040", + "navbarFixed": "1020", + "sidemenu": "1025", + "tooltip": "1030", + "typeahead": "1060", + }, }, } } @@ -355,6 +368,10 @@ exports[`Render should render with base threshold 1`] = ` "sm": 1.1, "xs": 1, }, + "link": Object { + "decoration": "none", + "hoverDecoration": "none", + }, "size": Object { "base": "13px", "lg": "18px", @@ -368,6 +385,15 @@ exports[`Render should render with base threshold 1`] = ` "regular": 400, "semibold": 500, }, + "zIndex": Object { + "dropdown": "1000", + "modal": "1050", + "modalBackdrop": "1040", + "navbarFixed": "1020", + "sidemenu": "1025", + "tooltip": "1030", + "typeahead": "1060", + }, }, } } From 6471f6feb0299d3a67031a1e84e9a90a952ad0fd Mon Sep 17 00:00:00 2001 From: ijin08 Date: Wed, 20 Mar 2019 11:37:45 +0100 Subject: [PATCH 45/56] more fixes to snapshot --- .../ThresholdsEditor.test.tsx.snap | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap index bb7fca08f17..7487a10f363 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap +++ b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap @@ -228,15 +228,15 @@ exports[`Render should render with base threshold 1`] = ` "regular": 400, "semibold": 500, }, - "zIndex": Object { - "dropdown": "1000", - "modal": "1050", - "modalBackdrop": "1040", - "navbarFixed": "1020", - "sidemenu": "1025", - "tooltip": "1030", - "typeahead": "1060", - }, + }, + "zIndex": Object { + "dropdown": "1000", + "modal": "1050", + "modalBackdrop": "1040", + "navbarFixed": "1020", + "sidemenu": "1025", + "tooltip": "1030", + "typeahead": "1060", }, } } @@ -385,15 +385,15 @@ exports[`Render should render with base threshold 1`] = ` "regular": 400, "semibold": 500, }, - "zIndex": Object { - "dropdown": "1000", - "modal": "1050", - "modalBackdrop": "1040", - "navbarFixed": "1020", - "sidemenu": "1025", - "tooltip": "1030", - "typeahead": "1060", - }, + }, + "zIndex": Object { + "dropdown": "1000", + "modal": "1050", + "modalBackdrop": "1040", + "navbarFixed": "1020", + "sidemenu": "1025", + "tooltip": "1030", + "typeahead": "1060", }, } } From e4e553b5a2713d2451c5edf6fa333dde0548a09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 20 Mar 2019 19:14:10 +0100 Subject: [PATCH 46/56] Merge with master, and updated logo and name --- .../src/components/PieChart/PieChart.tsx | 2 -- .../plugins/panel/piechart/PieChartPanel.tsx | 6 ++-- .../panel/piechart/img/icon_piechart.svg | 29 ++++++++++++++++++ .../piechart/img/piechart_logo_large.png | Bin 3723 -> 0 bytes .../piechart/img/piechart_logo_small.png | Bin 2629 -> 0 bytes public/app/plugins/panel/piechart/plugin.json | 6 ++-- public/app/plugins/panel/piechart/types.ts | 2 -- 7 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 public/app/plugins/panel/piechart/img/icon_piechart.svg delete mode 100644 public/app/plugins/panel/piechart/img/piechart_logo_large.png delete mode 100644 public/app/plugins/panel/piechart/img/piechart_logo_small.png diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.tsx index 68b6ed11c72..3310a967264 100644 --- a/packages/grafana-ui/src/components/PieChart/PieChart.tsx +++ b/packages/grafana-ui/src/components/PieChart/PieChart.tsx @@ -145,5 +145,3 @@ export class PieChart extends PureComponent { } } } - -export default PieChart; diff --git a/public/app/plugins/panel/piechart/PieChartPanel.tsx b/public/app/plugins/panel/piechart/PieChartPanel.tsx index 14e251ddffe..5082b162f96 100644 --- a/public/app/plugins/panel/piechart/PieChartPanel.tsx +++ b/public/app/plugins/panel/piechart/PieChartPanel.tsx @@ -15,13 +15,13 @@ interface Props extends PanelProps {} export class PieChartPanel extends PureComponent { render() { - const { panelData, width, height, options } = this.props; + const { data, width, height, options } = this.props; const { valueOptions } = options; const datapoints: PieChartDataPoint[] = []; - if (panelData.timeSeries) { + if (data) { const vmSeries = processTimeSeries({ - timeSeries: panelData.timeSeries, + data, nullValueMode: NullValueMode.Null, }); diff --git a/public/app/plugins/panel/piechart/img/icon_piechart.svg b/public/app/plugins/panel/piechart/img/icon_piechart.svg new file mode 100644 index 00000000000..49da58abec6 --- /dev/null +++ b/public/app/plugins/panel/piechart/img/icon_piechart.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/app/plugins/panel/piechart/img/piechart_logo_large.png b/public/app/plugins/panel/piechart/img/piechart_logo_large.png deleted file mode 100644 index 21b7ab40145bdd8dd7fc08bfb4612a1c37d8bf5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3723 zcmV;64s`K}P)zisL95b z&`C`NEl_PEbTHJd6G3WKwxQLOP6D+Oj{FI457-^MoBR~0kH-EJ3PYL<2s#RuC!9a&yI7Dj z5(4&4l(lW71zw2)2?3$@>}M^(;G}0H5Hd#{G-`F_3r%@gu{1Z?mgHc;e1Kzr4?^OQ z@u}CX`xeal@*2qB8HViT0mxoTL+&zbH?M0Qjsqc1aFT5Ml3!*mwA&`K2|5{Rkv`{vDY3;6E_&)=3$dAUHrG z>^u=jx7T1o)c`_)@W|J*^43j}8W(}|)pan7HI#|BPQduTPiVoB0}8LfgggKdrsyZC zWsaho$Ki<$Ss98iCW2`XHiR+$uRa({y)K$H1x$i%V{V7hA(vsG`u7OAfehmLZ3tqb zdJ?iZ^JKq+4Z)1Q@p}HDAa+R=`8iFti;l}gP@fit&hf@E| z@AA7^sE^zS!pL_4S0KcY7PIe}F7+Fp6cflc>MQqvkZp|fdB${(rtC*w&x(0U+^#>d zt05&$d^+VBPUI=G85E;Fa|{TnUn}o7P(x~>7Ss^IpS0RBU6Mr@sD~ZAsjB%6V}Bx; zt`4h(NUItW=R@2df4>I9OlCi^O$>$OjsW3ig~)<6D!kWS6BE<5^Z~Kv6}6%zl11$( zNX=B)FkNb20#>v{va20hvp{O1)47d{Y-@>`hIG`l!*MO?s02tsJ8)vcrK?h{hiyv! z=5<+9wE9#_LI&n4%12h0t_I+#SiPrnsHUnI%=MBZF6`S21L=errw2}j-5XV;e^@YY3jHA;&KPNR}$8mX&*AkJ)$%d z9M@3bB9}CMFt(Tx9F${!3(5_4O>H<1LTDi?^EmYx`jB?3K-y>tC4FrKq|jN*8UPyD5#L!HU=3hs!W0gk*bZzaaKcbr+!-;0qxhY2Z-`;XqfbC{ zWC4OIkZ}S+Zg#L3DmTsMfs_o)fQApbr6evdEMwXEJ=#mzhbF)bj-3!t7Y;92zQJH% z=r$C>YwEc5^jW=%$;F}`-cm(v&{nF`FZ15~7#iNVT1XPv_boI7Qs~`% zYb02`(Ap^E;S5cf!qH5U?7-nf6Nm*df}ooWtD-U1=_9Q3M;Qd%T9LZ+Ff{%q%_rai zT_D_Y0$Kk24G9*{v2P-5z{w~bqXUPJ+rt$C$q4314}#Hml?8#9U}hW^?LNovTE$z9 zkVgHgAmzY7S^v2JYXIF4FoP4O>L(_lDmc_(N|m79YKK_`?j;13KMT(Sqds?i(I*e* z{ULy(gLxUw;2leF`V^DGm2gBjcC`-wW}O)X?6}bt3*gSGFpM)t?3IWn3)Q_>(GE0O zZixvTTTYjM_)H~1gI5qf|I_y%Fj6SMuIHCri$J=ljwRlRs{2%Wh}(TFdN~VyqT8);cE?1>T5XdAE9g#U>r7sfVlty7`u0#r{>6t zgf#50|8N>6^B>d})EWagXLa^P^dO8dZP0M6eu}EkC5=+Sq#60t|4Jck|rYc~}x-z2K=UPBinRvAbYRYd1^5Up! z=K>L>T%+V5?fl5Y>=@(!Y7x$%m&lZuM$*}z69))B-XhJda9@ejz?bB~1H(j@esqmRCn$L9vG9pSij^0!DqV0wRWyew(e6 zw@OSEo_sf%svSDfRD|9GI<|1ZbD8PFT2eKcE3wbDOjh9nPTlm+vEyLqJd-Q&8+ZX! zbK9f5(LjxpJ(MJ7M1QjI;71^h_%|!2?&AM+wL=d`ns=uD`Hhm=7bZ~s`E0$K~ zoXN<|3z@CfkRx`0BzZI9HWbtf)DDBvNSyZ@v7C87;(DbOOc>oRtso2`2T586 zLZyd7jC^#kYDy!plZ|{UH&GktSV4R%t<34arOH3_9%*hg)b{gc%dMQmPHCjGbkrLP z9^0wbCSOV`sC|M%-*2^+#Y=+!&(T5W&6b_g2>OLBdHc1{Ev5d(^U{ijk4o4ELSbTp zPu85wN$i$JcIJX*f7i~^P}sB53VxQ5geHuh_iHxfy7>+~IN+R?*e#7zGWkX)XYr)8 zGWX4!qBHL{1ZeaoIUdKgq@2=7rQ%0vMMpc*WdqUD5+OYGv@}wwcwJh-&#P@LOYx4` zYDq<>G_t9Z(nzIZQd-$mZfONeBy-h{JjDep&H>S?0ma|WTbc;rMrou{aig??+H}|9 z%bGPgSAfuo#&{=f=1pd)?G;2vJqc?$7Yq4r7>&?PoT& zMadOD9s~HtjXXTo9DsVMv^0WRB$P(BqEDjo#SXqS(wPr}*YZW?PtcbP6vx4Gc730) zbNnaU_L1LgQX(gu4~#xVgn_G~Lh3LX2VS?`^C^2cimR1y9SE-2<+bPAe=X6TRg{gZ zR%)U7NM=Kxm@3V191C2*2@tHW=DFhHo$H^Bb{K67dy?;9Jh{4qwiW9lGh{reL(SJCG9{e46}; zYZJM=up6rRM|gqTStRo;Yo`PGssw@Ow!JjkD!CRn#FJr4W~)alH2woFR3*_88v|@SmEgNwPXioAh`oa+RH7N(LF$jXM;6vV*_=Ww` z3JB*{cIbgo{LF*w)Y@p>htno0#oB2G;GDk6ltIAcq&-j9?)zpZ2uzf~v=|+WX6-(9 zs*CfJA!#%Ff3t?%KC+fxBc4_ZSI39mu;4n%;XJeMTu(~*7svz`N>or$*cBT)? p3YbhacYIB1Qj?lY1NpxI0|2nop0tA1{uC-<8#O|a5V1iZK!9!WXj+8qh>9TP$2!m!_z~Gw z9jK6~Z4pF*nygzQiV}f0Zm1Kd#&#XYPGV=c=kC4hd(Y0y&g{;*>mKQNz3(~SJ?A^$ zJu`M5tc^7=4>RAvJS6TL%JX^5yO?(>kBu;&W&W1Bf8m@Ma%iz-if`SsxMF1jB2X2(*nc+t^m|cg8&DQ-vM<5DoYR%d&9x#nZn)vT2 z02%fJkb(@~Z-`Xwv_z*aADW*igqHn5XxP5`RU>C^L*I!d+YjAXb2rpJb0Bg5*3=}- zpFaz8r$=G-%qV?%SU7S>8}ry&0}&Qk5TZ}86^BD@MOyHg7|RN%eEezd2+H&uLoog4 zA^tl#o+$Hf=Dl9OBar5?b%~S=Q2@qADsc#@yfr8mme{2vwe&~mgUtCHvv_~A9 zkxd{Bkp)^Qu-b>{P&o$x%VDhyGo=350MvZ`8LMoKiZ<;#5QadyReiAM`z0{^s*$w} zNM)E2ba>4 zVLgB#4GGjHGdu$k zR=WcRzg|F4GlPK9ATr!F5VB1sY`uXXt?s!FPNa&pTS;;|Alg;2ge@}Hh|vpyhLVL> z#0?N3wIon15u+0d%)9oB0}SlQO( zmfCIygq97RU*7~DB`c|Kgwpzl)rVTFfH1^(En&N#or8`aUx%@Gme(}^D+}{{>;9jg zev8jFtSUgw`(~=VVwYE-H?qjxZpf0WhO-JB;^5q3ar}bQOZPJGQzIHso(Qi;P&@>W zHpcw8jJtr81&+J=lnmMHCR4D*?q$F7GHI%4r+^tM!>^r4?v;>r`j z$Tlb#Fa|z<{+yfOF@`~LJ1dS~ZXaYk0}_ZPqQ|8s_XNu92POw38=%PGarMcp(rxhS zaa--H;#&zweI6l7rMLJ11Z*5qjPh}WA9=CVoQYPMY~SKI&Sx#oY#jW%xxM#glL;X= zBYk6}8zqVZJkX9VjA1lt$534TVDb8}k3Z!1eW zhLHNesV~%-6D=Y0Xj8ShCsdquP{7-nE;V?%Z-}}I{@Djj`1#`|9N(jXktfnSF|e3B zaIaQ8bGPom$=Cu6UAn<#Y<#E9;5)@gVcH=UulfVh;AvG_9Zx+hXc^o>=w1X!y=nnMAkY7-?$mz;VtpoO&i<=;1>`+fEmG+C9=r_@ zzUgB|tlXig8ct0v!4L!FS$2E>T^9M-g-cJ%xl6=EYI{ktIf z{DL9C853Z|4M8|^)_))-K1j+4$=ZzZ7k&F41oio|GqiQ?6P=;c=511*_i61F6(F`d zKeIu}vVby!;P$pp86kOrl$zuPtuqW(e+=q3Xj^r8HcG!H3VXh?iW!-Z))a_QRT%kU zmu?SwONa`y61iZK%dD9=hct-+m?@R9t7j}pJuU~(9U63?VbwouiZ z;+v~LjY)fG)wQ(&tkywD-)JfgPBUzBg=U{JGoT+TZ5mio#+)8~u7 zT&CF?3s{WvxxIRE-t*@lJ~ugXaP!p?1D+}>w)_kP;n$T(8^4GEp-pS4>68eP zq)wDa@JBvrZ6SHUNOWI$undCv?yiZzjTUADkpCWj=|~)9?tx3l%`t=Z4sQK{idpxf+l%J=L=MwZdxkxie3S| zwtEe&Rq-IF(v{HKB|69n$PHd>YkmPIPa6r|?MZ^8D%HugTLm-UW`ZP#x-hl4!c+gV zTQ^xsXv_xEDjyYXuV1bC-&fu3$P0G%i4BGD?#eQ6s|sJ_iI&AMH`(S+nF{kI@(kXU%J0kv!(J-fRC=!2qF6 z#^`s!j~>(Y1!l`PhiU2T)OZG*FE7;U@H>B-)`GT?&;!a=T9eS3m?T*n3EpNa!SNPH z_Bse16a>4{kamUnRVj%v{ZIV+IxmqorAME?Gw!2rAlaQm3~+a;|m1jjitme zB`C_`1+|oUJH@uTy)q7h&I<$D_TFV_sLC#Jt*ll4`QtV$g>suIG&`_cYXSm_tZfAaRwZHx zK-%1bkS-9Qd_jy7+1LJem66#c_}z_pN@%_qmIHQ>BikjCGB`ccSXu=)E> zES0BZJ~-Nk8{__$d8od2%@0IUBwAnH@_R@YDYW_fD}ioAZaN!$;m nAmcGXdh#D>jAiox|1ZD*SsLtC_D4`000000NkvXXu0mjf{`2T@ diff --git a/public/app/plugins/panel/piechart/plugin.json b/public/app/plugins/panel/piechart/plugin.json index 56299e4aa52..cf9ac759653 100644 --- a/public/app/plugins/panel/piechart/plugin.json +++ b/public/app/plugins/panel/piechart/plugin.json @@ -1,6 +1,6 @@ { "type": "panel", - "name": "PieChart", + "name": "PieChart v2", "id": "piechart", "state": "alpha", @@ -12,8 +12,8 @@ "url": "https://grafana.com" }, "logos": { - "small": "img/piechart_logo_small.png", - "large": "img/piechart_logo_large.png" + "small": "img/icon_piechart.svg", + "large": "img/icon_piechart.svg" } } } diff --git a/public/app/plugins/panel/piechart/types.ts b/public/app/plugins/panel/piechart/types.ts index 5ec9bae516b..45682f31d5e 100644 --- a/public/app/plugins/panel/piechart/types.ts +++ b/public/app/plugins/panel/piechart/types.ts @@ -3,9 +3,7 @@ import { PieChartType } from '@grafana/ui'; export interface PieChartOptions { pieType: PieChartType; strokeWidth: number; - valueOptions: PieChartValueOptions; - // TODO: Options for Legend / Combine components } export interface PieChartValueOptions { From 742a76e4c5bc00228e81e00da152a5f24308d4ac Mon Sep 17 00:00:00 2001 From: Joshua Woodward Date: Wed, 20 Mar 2019 12:24:54 -0700 Subject: [PATCH 47/56] Update PLUGIN_DEV.md --- PLUGIN_DEV.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PLUGIN_DEV.md b/PLUGIN_DEV.md index 47743e5fbf9..7b9eea8d37f 100644 --- a/PLUGIN_DEV.md +++ b/PLUGIN_DEV.md @@ -27,3 +27,8 @@ If you think we missed exposing a crucial lib or Grafana component let us know b The angular directive `` is now deprecated (will still work for a version more) but we recommend plugin authors to upgrade to new `` +## Changes in v6.0 + +### DashboardSrv.ts + +If you utilize [DashboardSrv](https://github.com/grafana/grafana/commit/8574dca081002f36e482b572517d8f05fd44453f#diff-1ab99561f9f6a10e1fafcddc39bc1d65) in your plugin code, `dash` was renamed to `dashboard` From 80d64752244ec44562738bc0dbf1cdc50d96ea83 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 20 Mar 2019 12:50:58 -0700 Subject: [PATCH 48/56] maintain query order --- .../plugins/datasource/testdata/datasource.ts | 56 ++++++++++++++----- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/public/app/plugins/datasource/testdata/datasource.ts b/public/app/plugins/datasource/testdata/datasource.ts index 8ed9217a5c2..7d4c0407021 100644 --- a/public/app/plugins/datasource/testdata/datasource.ts +++ b/public/app/plugins/datasource/testdata/datasource.ts @@ -1,8 +1,13 @@ import _ from 'lodash'; -import TableModel from 'app/core/table_model'; -import { DataSourceApi, DataQueryOptions } from '@grafana/ui'; +import { DataSourceApi, DataQueryOptions, TableData, TimeSeries } from '@grafana/ui'; import { TestDataQuery, Scenario } from './types'; +type TestData = TimeSeries | TableData; + +export interface TestDataRegistry { + [key: string]: TestData[]; +} + export class TestDataDatasource implements DataSourceApi { id: number; @@ -42,24 +47,49 @@ export class TestDataDatasource implements DataSourceApi { }, }) .then(res => { - const data = []; + const data: TestData[] = []; + // The results are not in the order we asked for them if (res.data.results) { + const byRefID: TestDataRegistry = {}; + _.forEach(res.data.results, queryRes => { + const refId = queryRes.refId || 'Result' + data.length + 1; + const qdata: TestData[] = []; + byRefID[refId] = qdata; + if (queryRes.tables) { for (const table of queryRes.tables) { - const model = new TableModel(); - model.rows = table.rows; - model.columns = table.columns; - - data.push(model); + qdata.push(table as TableData); } } - for (const series of queryRes.series) { - data.push({ - target: series.name, - datapoints: series.points, - }); + if (queryRes.series) { + for (const series of queryRes.series) { + qdata.push({ + target: series.name, + datapoints: series.points, + }); + } + } + }); + + // Return them in the order they were asked for + queries.forEach(q => { + const found = byRefID[q.refId]; + if (found) { + for (const d of found) { + data.push(d); + byRefID[q.refId] = null; + } + } + }); + + // In case there are items left over + _.forEach(byRefID, v => { + if (v) { + for (const d of v) { + data.push(d); + } } }); } From c91e5a2db4fc4894519c507752ae5c14ab234de7 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 20 Mar 2019 14:50:46 -0700 Subject: [PATCH 49/56] cleaner version --- .../plugins/datasource/testdata/datasource.ts | 51 ++++++------------- 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/public/app/plugins/datasource/testdata/datasource.ts b/public/app/plugins/datasource/testdata/datasource.ts index 7d4c0407021..8b785682ce1 100644 --- a/public/app/plugins/datasource/testdata/datasource.ts +++ b/public/app/plugins/datasource/testdata/datasource.ts @@ -49,49 +49,28 @@ export class TestDataDatasource implements DataSourceApi { .then(res => { const data: TestData[] = []; - // The results are not in the order we asked for them - if (res.data.results) { - const byRefID: TestDataRegistry = {}; - - _.forEach(res.data.results, queryRes => { - const refId = queryRes.refId || 'Result' + data.length + 1; - const qdata: TestData[] = []; - byRefID[refId] = qdata; - - if (queryRes.tables) { - for (const table of queryRes.tables) { - qdata.push(table as TableData); + // Returns data in the order it was asked for. + // if the response has data with different refId, it is ignored + for (let i = 0; i < queries.length; i++) { + const query = queries[i]; + const results = res.data.results[query.refId]; + if (results) { + if (results.tables) { + for (const table of results.tables) { + data.push(table as TableData); } } - if (queryRes.series) { - for (const series of queryRes.series) { - qdata.push({ + if (results.series) { + for (const series of results.series) { + data.push({ target: series.name, datapoints: series.points, }); } } - }); - - // Return them in the order they were asked for - queries.forEach(q => { - const found = byRefID[q.refId]; - if (found) { - for (const d of found) { - data.push(d); - byRefID[q.refId] = null; - } - } - }); - - // In case there are items left over - _.forEach(byRefID, v => { - if (v) { - for (const d of v) { - data.push(d); - } - } - }); + } else { + console.warn('No Results for:', query); + } } return { data: data }; From 85b0df551cd77909fd03de609f4fc6d4f4137d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 21 Mar 2019 08:01:44 +0100 Subject: [PATCH 50/56] Minor refactoring of testdata query order PR #16122 --- .../plugins/datasource/testdata/datasource.ts | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/public/app/plugins/datasource/testdata/datasource.ts b/public/app/plugins/datasource/testdata/datasource.ts index 8b785682ce1..dd3d7320801 100644 --- a/public/app/plugins/datasource/testdata/datasource.ts +++ b/public/app/plugins/datasource/testdata/datasource.ts @@ -51,25 +51,19 @@ export class TestDataDatasource implements DataSourceApi { // Returns data in the order it was asked for. // if the response has data with different refId, it is ignored - for (let i = 0; i < queries.length; i++) { - const query = queries[i]; + for (const query of queries) { const results = res.data.results[query.refId]; - if (results) { - if (results.tables) { - for (const table of results.tables) { - data.push(table as TableData); - } - } - if (results.series) { - for (const series of results.series) { - data.push({ - target: series.name, - datapoints: series.points, - }); - } - } - } else { + if (!results) { console.warn('No Results for:', query); + continue; + } + + for (const table of results.tables || []) { + data.push(table as TableData); + } + + for (const series of results.series || []) { + data.push({ target: series.name, datapoints: series.points }); } } From 9008fcc790605d20b85db2b4d11d35fa87e0c5b3 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 21 Mar 2019 10:25:20 +0100 Subject: [PATCH 51/56] fix(prometheus): Change aligment of range queries (#16110) - future alignment cause issues with rate charts and the display of last values - this change modifies the alignment to use the last available aligned end date and no longer possibly requests data from the future --- .../features/datasources/prometheus.md | 64 ++++++++++--------- .../datasource/prometheus/datasource.ts | 14 +++- .../prometheus/specs/datasource.test.ts | 16 ++--- 3 files changed, 52 insertions(+), 42 deletions(-) diff --git a/docs/sources/features/datasources/prometheus.md b/docs/sources/features/datasources/prometheus.md index 0a5c087803f..ace419df2c1 100644 --- a/docs/sources/features/datasources/prometheus.md +++ b/docs/sources/features/datasources/prometheus.md @@ -19,22 +19,22 @@ Grafana includes built-in support for Prometheus. 1. Open the side menu by clicking the Grafana icon in the top header. 2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`. 3. Click the `+ Add data source` button in the top header. -4. Select `Prometheus` from the *Type* dropdown. +4. Select `Prometheus` from the _Type_ dropdown. > NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization. ## Data source options -Name | Description ------------- | ------------- -*Name* | The data source name. This is how you refer to the data source in panels & queries. -*Default* | Default data source means that it will be pre-selected for new panels. -*Url* | The http protocol, ip and port of you Prometheus server (default port is usually 9090) -*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. -*Basic Auth* | Enable basic authentication to the Prometheus data source. -*User* | Name of your Prometheus user -*Password* | Database user's password -*Scrape interval* | This will be used as a lower limit for the Prometheus step query parameter. Default value is 15s. +| Name | Description | +| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| _Name_ | The data source name. This is how you refer to the data source in panels & queries. | +| _Default_ | Default data source means that it will be pre-selected for new panels. | +| _Url_ | The http protocol, ip and port of you Prometheus server (default port is usually 9090) | +| _Access_ | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | +| _Basic Auth_ | Enable basic authentication to the Prometheus data source. | +| _User_ | Name of your Prometheus user | +| _Password_ | Database user's password | +| _Scrape interval_ | This will be used as a lower limit for the Prometheus step query parameter. Default value is 15s. | ## Query editor @@ -43,14 +43,17 @@ Open a graph in edit mode by click the title > Edit (or by pressing `e` key whil {{< docs-imagebox img="/img/docs/v45/prometheus_query_editor_still.png" animated-gif="/img/docs/v45/prometheus_query_editor.gif" >}} -Name | Description -------- | -------- -*Query expression* | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). -*Legend format* | Controls the name of the time series, using name or pattern. For example `{{hostname}}` will be replaced with label value for the label `hostname`. -*Min step* | Set a lower limit for the Prometheus step option. Step controls how big the jumps are when the Prometheus query engine performs range queries. Sadly there is no official prometheus documentation to link to for this very important option. -*Resolution* | Controls the step option. Small steps create high-resolution graphs but can be slow over larger time ranges, lowering the resolution can speed things up. `1/2` will try to set step option to generate 1 data point for every other pixel. A value of `1/10` will try to set step option so there is a data point every 10 pixels. -*Metric lookup* | Search for metric names in this input field. -*Format as* | Switch between Table, Time series or Heatmap. Table format will only work in the Table panel. Heatmap format is suitable for displaying metrics having histogram type on Heatmap panel. Under the hood, it converts cumulative histogram to regular and sorts series by the bucket bound. +| Name | Description | +| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| _Query expression_ | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). | +| _Legend format_ | Controls the name of the time series, using name or pattern. For example `{{hostname}}` will be replaced with label value for the label `hostname`. | +| _Min step_ | Set a lower limit for the Prometheus step option. Step controls how big the jumps are when the Prometheus query engine performs range queries. Sadly there is no official prometheus documentation to link to for this very important option. | +| _Resolution_ | Controls the step option. Small steps create high-resolution graphs but can be slow over larger time ranges, lowering the resolution can speed things up. `1/2` will try to set step option to generate 1 data point for every other pixel. A value of `1/10` will try to set step option so there is a data point every 10 pixels. | +| _Metric lookup_ | Search for metric names in this input field. | +| _Format as_ | Switch between Table, Time series or Heatmap. Table format will only work in the Table panel. Heatmap format is suitable for displaying metrics having histogram type on Heatmap panel. Under the hood, it converts cumulative histogram to regular and sorts series by the bucket bound. | + +> NOTE: Grafana slightly modifies the request dates for queries to align them with the dynamically calculated step. +> This ensures consistent display of metrics data but can result in a small gap of data at the right edge of a graph. ## Templating @@ -63,19 +66,18 @@ types of template variables. ### Query variable -Variable of the type *Query* allows you to query Prometheus for a list of metrics, labels or label values. The Prometheus data source plugin +Variable of the type _Query_ allows you to query Prometheus for a list of metrics, labels or label values. The Prometheus data source plugin provides the following functions you can use in the `Query` input field. -Name | Description ----- | -------- -*label_names()* | Returns a list of label names. -*label_values(label)* | Returns a list of label values for the `label` in every metric. -*label_values(metric, label)* | Returns a list of label values for the `label` in the specified metric. -*metrics(metric)* | Returns a list of metrics matching the specified `metric` regex. -*query_result(query)* | Returns a list of Prometheus query result for the `query`. - -For details of *metric names*, *label names* and *label values* are please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). +| Name | Description | +| ----------------------------- | ----------------------------------------------------------------------- | +| _label_names()_ | Returns a list of label names. | +| _label_values(label)_ | Returns a list of label values for the `label` in every metric. | +| _label_values(metric, label)_ | Returns a list of label values for the `label` in the specified metric. | +| _metrics(metric)_ | Returns a list of metrics matching the specified `metric` regex. | +| _query_result(query)_ | Returns a list of Prometheus query result for the `query`. | +For details of _metric names_, _label names_ and _label values_ are please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). #### Using interval and range variables @@ -106,10 +108,10 @@ Regex: There are two syntaxes: -- `$` Example: rate(http_requests_total{job=~"$job"}[5m]) +- `$` Example: rate(http_requests_total{job=~"\$job"}[5m]) - `[[varname]]` Example: rate(http_requests_total{job=~"[[job]]"}[5m]) -Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the *Multi-value* or *Include all value* +Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the _Multi-value_ or _Include all value_ options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`. ## Annotations diff --git a/public/app/plugins/datasource/prometheus/datasource.ts b/public/app/plugins/datasource/prometheus/datasource.ts index bde56431683..d9855a4925a 100644 --- a/public/app/plugins/datasource/prometheus/datasource.ts +++ b/public/app/plugins/datasource/prometheus/datasource.ts @@ -224,7 +224,8 @@ export class PrometheusDatasource implements DataSourceApi { query.expr = this.templateSrv.replace(expr, scopedVars, this.interpolateQueryExpr); query.requestId = options.panelId + target.refId; - // Align query interval with step + // Align query interval with step to allow query caching and to ensure + // that about-same-time query results look the same. const adjusted = alignRange(start, end, query.step); query.start = adjusted.start; query.end = adjusted.end; @@ -497,8 +498,15 @@ export class PrometheusDatasource implements DataSourceApi { } } -export function alignRange(start, end, step) { - const alignedEnd = Math.ceil(end / step) * step; +/** + * Align query range to step. + * Rounds start and end down to a multiple of step. + * @param start Timestamp marking the beginning of the range. + * @param end Timestamp marking the end of the range. + * @param step Interval to align start and end with. + */ +export function alignRange(start: number, end: number, step: number): { end: number; start: number } { + const alignedEnd = Math.floor(end / step) * step; const alignedStart = Math.floor(start / step) * step; return { end: alignedEnd, diff --git a/public/app/plugins/datasource/prometheus/specs/datasource.test.ts b/public/app/plugins/datasource/prometheus/specs/datasource.test.ts index e509610e17a..fa1f65007bc 100644 --- a/public/app/plugins/datasource/prometheus/specs/datasource.test.ts +++ b/public/app/plugins/datasource/prometheus/specs/datasource.test.ts @@ -206,12 +206,12 @@ describe('PrometheusDatasource', () => { it('does align intervals that are a multiple of steps', () => { const range = alignRange(1, 4, 3); expect(range.start).toEqual(0); - expect(range.end).toEqual(6); + expect(range.end).toEqual(3); }); it('does align intervals that are not a multiple of steps', () => { const range = alignRange(1, 5, 3); expect(range.start).toEqual(0); - expect(range.end).toEqual(6); + expect(range.end).toEqual(3); }); }); @@ -360,7 +360,7 @@ describe('PrometheusDatasource', () => { }; // Interval alignment with step const urlExpected = - 'proxied/api/v1/query_range?query=' + encodeURIComponent('test{job="testjob"}') + '&start=60&end=240&step=60'; + 'proxied/api/v1/query_range?query=' + encodeURIComponent('test{job="testjob"}') + '&start=60&end=180&step=60'; beforeEach(async () => { const response = { @@ -788,7 +788,7 @@ describe('PrometheusDatasource', () => { interval: '5s', }; // times get rounded up to interval - const urlExpected = 'proxied/api/v1/query_range?query=test&start=50&end=450&step=50'; + const urlExpected = 'proxied/api/v1/query_range?query=test&start=50&end=400&step=50'; backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response)); ctx.ds = new PrometheusDatasource(instanceSettings, q, backendSrv as any, templateSrv, timeSrv); await ctx.ds.query(query); @@ -831,7 +831,7 @@ describe('PrometheusDatasource', () => { interval: '10s', }; // times get aligned to interval - const urlExpected = 'proxied/api/v1/query_range?query=test' + '&start=0&end=500&step=100'; + const urlExpected = 'proxied/api/v1/query_range?query=test' + '&start=0&end=400&step=100'; backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response)); ctx.ds = new PrometheusDatasource(instanceSettings, q, backendSrv as any, templateSrv, timeSrv); await ctx.ds.query(query); @@ -996,7 +996,7 @@ describe('PrometheusDatasource', () => { const urlExpected = 'proxied/api/v1/query_range?query=' + encodeURIComponent('rate(test[$__interval])') + - '&start=0&end=500&step=100'; + '&start=0&end=400&step=100'; backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response)); templateSrv.replace = jest.fn(str => str); ctx.ds = new PrometheusDatasource(instanceSettings, q, backendSrv as any, templateSrv, timeSrv); @@ -1041,7 +1041,7 @@ describe('PrometheusDatasource', () => { const urlExpected = 'proxied/api/v1/query_range?query=' + encodeURIComponent('rate(test[$__interval])') + - '&start=50&end=450&step=50'; + '&start=50&end=400&step=50'; templateSrv.replace = jest.fn(str => str); backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response)); @@ -1166,7 +1166,7 @@ describe('PrometheusDatasource for POST', () => { const dataExpected = { query: 'test{job="testjob"}', start: 1 * 60, - end: 3 * 60, + end: 2 * 60, step: 60, }; const query = { From 29e68ba1fc4ee9fb21a8924a5409aff683e89ea9 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Thu, 21 Mar 2019 11:10:44 +0100 Subject: [PATCH 52/56] brought back dashboard-padding and panel-padding variables, made dashboard-padding more specific --- packages/grafana-ui/src/themes/_variables.scss.tmpl.ts | 4 ++++ public/sass/_variables.generated.scss | 4 ++++ public/sass/pages/_dashboard.scss | 4 ++-- public/sass/pages/_explore.scss | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts index 89568ec7f6c..0c6ff640fe4 100644 --- a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts +++ b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts @@ -195,6 +195,10 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; // sidemenu $side-menu-width: 60px; +// dashboard +$dashboard-padding: $space-md $space-md 0 $space-md; +$panel-padding: 0 $space-md $space-sm $space-md; + // tabs $tabs-padding: 10px 15px 9px; diff --git a/public/sass/_variables.generated.scss b/public/sass/_variables.generated.scss index 340e56c8b78..cb0c8688ecc 100644 --- a/public/sass/_variables.generated.scss +++ b/public/sass/_variables.generated.scss @@ -198,6 +198,10 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; // sidemenu $side-menu-width: 60px; +// dashboard +$dashboard-padding: $space-md $space-md 0 $space-md; +$panel-padding: 0 $space-md $space-sm $space-md; + // tabs $tabs-padding: 10px 15px 9px; diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index c189df07f4a..42a5988efb4 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -1,5 +1,5 @@ .dashboard-container { - padding: $space-md $space-md 0 $space-md; + padding: $dashboard-padding; width: 100%; height: 100%; box-sizing: border-box; @@ -78,7 +78,7 @@ div.flot-text { } .panel-content { - padding: 0 $space-md $space-sm $space-md; + padding: $panel-padding; height: calc(100% - 27px); position: relative; diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index b610ac62534..666c5e4327c 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -156,7 +156,7 @@ } .explore-container { - padding: $space-md; + padding: $dashboard-padding; } .explore-wrapper { @@ -172,7 +172,7 @@ } .explore-panel__body { - padding: 0 $space-md $space-sm $space-md; + padding: $panel-padding; } .explore-panel__header { From 56251ca54627f9681c57e13fff0e129089946b95 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Thu, 21 Mar 2019 19:13:06 +0900 Subject: [PATCH 53/56] Update CloudWatch metrics/dimension list (#16102) update cloudWatch metrics/dimension list --- pkg/tsdb/cloudwatch/metric_find_query.go | 263 ++++++++++++----------- 1 file changed, 134 insertions(+), 129 deletions(-) diff --git a/pkg/tsdb/cloudwatch/metric_find_query.go b/pkg/tsdb/cloudwatch/metric_find_query.go index 83fafbd87b5..ae6dfcabb4d 100644 --- a/pkg/tsdb/cloudwatch/metric_find_query.go +++ b/pkg/tsdb/cloudwatch/metric_find_query.go @@ -40,137 +40,142 @@ var regionCache sync.Map func init() { metricsMap = map[string][]string{ - "AWS/AmazonMQ": {"CpuUtilization", "HeapUsage", "NetworkIn", "NetworkOut", "TotalMessageCount", "ConsumerCount", "EnqueueCount", "EnqueueTime", "ExpiredCount", "InflightCount", "DispatchCount", "DequeueCount", "MemoryUsage", "ProducerCount", "QueueSize"}, - "AWS/ApiGateway": {"4XXError", "5XXError", "CacheHitCount", "CacheMissCount", "Count", "IntegrationLatency", "Latency"}, - "AWS/ApplicationELB": {"ActiveConnectionCount", "ClientTLSNegotiationErrorCount", "HealthyHostCount", "HTTPCode_ELB_4XX_Count", "HTTPCode_ELB_5XX_Count", "HTTPCode_Target_2XX_Count", "HTTPCode_Target_3XX_Count", "HTTPCode_Target_4XX_Count", "HTTPCode_Target_5XX_Count", "IPv6ProcessedBytes", "IPv6RequestCount", "NewConnectionCount", "ProcessedBytes", "RejectedConnectionCount", "RequestCount", "RequestCountPerTarget", "TargetConnectionErrorCount", "TargetResponseTime", "TargetTLSNegotiationErrorCount", "UnHealthyHostCount"}, - "AWS/AutoScaling": {"GroupMinSize", "GroupMaxSize", "GroupDesiredCapacity", "GroupInServiceInstances", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"}, - "AWS/Billing": {"EstimatedCharges"}, - "AWS/CloudFront": {"Requests", "BytesDownloaded", "BytesUploaded", "TotalErrorRate", "4xxErrorRate", "5xxErrorRate"}, - "AWS/CloudSearch": {"SuccessfulRequests", "SearchableDocuments", "IndexUtilization", "Partitions"}, - "AWS/CloudHSM": {"HsmUnhealthy", "HsmTemperature", "HsmKeysSessionOccupied", "HsmKeysTokenOccupied", "HsmSslCtxsOccupied", "HsmSessionCount", "HsmUsersAvailable", "HsmUsersMax", "InterfaceEth2OctetsInput", "InterfaceEth2OctetsOutput"}, - "AWS/CodeBuild": {"BuildDuration", "Builds", "DownloadSourceDuration", "Duration", "FailedBuilds", "FinalizingDuration", "InstallDuration", "PostBuildDuration", "PreBuildDuration", "ProvisioningDuration", "QueuedDuration", "SubmittedDuration", "SucceededBuilds", "UploadArtifactsDuration"}, - "AWS/Connect": {"CallsBreachingConcurrencyQuota", "CallBackNotDialableNumber", "CallRecordingUploadError", "CallsPerInterval", "ConcurrentCalls", "ConcurrentCallsPercentage", "ContactFlowErrors", "ContactFlowFatalErrors", "LongestQueueWaitTime", "MissedCalls", "MisconfiguredPhoneNumbers", "PublicSigningKeyUsage", "QueueCapacityExceededError", "QueueSize", "ThrottledCalls", "ToInstancePacketLossRate"}, - "AWS/DMS": {"FreeableMemory", "WriteIOPS", "ReadIOPS", "WriteThroughput", "ReadThroughput", "WriteLatency", "ReadLatency", "SwapUsage", "NetworkTransmitThroughput", "NetworkReceiveThroughput", "FullLoadThroughputBandwidthSource", "FullLoadThroughputBandwidthTarget", "FullLoadThroughputRowsSource", "FullLoadThroughputRowsTarget", "CDCIncomingChanges", "CDCChangesMemorySource", "CDCChangesMemoryTarget", "CDCChangesDiskSource", "CDCChangesDiskTarget", "CDCThroughputBandwidthTarget", "CDCThroughputRowsSource", "CDCThroughputRowsTarget", "CDCLatencySource", "CDCLatencyTarget"}, - "AWS/DX": {"ConnectionState", "ConnectionBpsEgress", "ConnectionBpsIngress", "ConnectionPpsEgress", "ConnectionPpsIngress", "ConnectionCRCErrorCount", "ConnectionLightLevelTx", "ConnectionLightLevelRx"}, - "AWS/DynamoDB": {"ConditionalCheckFailedRequests", "ConsumedReadCapacityUnits", "ConsumedWriteCapacityUnits", "OnlineIndexConsumedWriteCapacity", "OnlineIndexPercentageProgress", "OnlineIndexThrottleEvents", "ProvisionedReadCapacityUnits", "ProvisionedWriteCapacityUnits", "ReadThrottleEvents", "ReturnedBytes", "ReturnedItemCount", "ReturnedRecordsCount", "SuccessfulRequestLatency", "SystemErrors", "TimeToLiveDeletedItemCount", "ThrottledRequests", "UserErrors", "WriteThrottleEvents"}, - "AWS/EBS": {"VolumeReadBytes", "VolumeWriteBytes", "VolumeReadOps", "VolumeWriteOps", "VolumeTotalReadTime", "VolumeTotalWriteTime", "VolumeIdleTime", "VolumeQueueLength", "VolumeThroughputPercentage", "VolumeConsumedReadWriteOps", "BurstBalance"}, - "AWS/EC2": {"CPUCreditUsage", "CPUCreditBalance", "CPUUtilization", "DiskReadOps", "DiskWriteOps", "DiskReadBytes", "DiskWriteBytes", "NetworkIn", "NetworkOut", "NetworkPacketsIn", "NetworkPacketsOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System"}, - "AWS/EC2/API": {"ClientErrors", "RequestLimitExceeded", "ServerErrors", "SuccessfulCalls"}, - "AWS/EC2Spot": {"AvailableInstancePoolsCount", "BidsSubmittedForCapacity", "EligibleInstancePoolCount", "FulfilledCapacity", "MaxPercentCapacityAllocation", "PendingCapacity", "PercentCapacityAllocation", "TargetCapacity", "TerminatingCapacity"}, - "AWS/ECS": {"CPUReservation", "MemoryReservation", "CPUUtilization", "MemoryUtilization"}, - "AWS/EFS": {"BurstCreditBalance", "ClientConnections", "DataReadIOBytes", "DataWriteIOBytes", "MetadataIOBytes", "TotalIOBytes", "PermittedThroughput", "PercentIOLimit"}, - "AWS/ELB": {"HealthyHostCount", "UnHealthyHostCount", "RequestCount", "Latency", "HTTPCode_ELB_4XX", "HTTPCode_ELB_5XX", "HTTPCode_Backend_2XX", "HTTPCode_Backend_3XX", "HTTPCode_Backend_4XX", "HTTPCode_Backend_5XX", "BackendConnectionErrors", "SurgeQueueLength", "SpilloverCount", "EstimatedALBActiveConnectionCount", "EstimatedALBConsumedLCUs", "EstimatedALBNewConnectionCount", "EstimatedProcessedBytes"}, - "AWS/ElastiCache": { - "CPUUtilization", "FreeableMemory", "NetworkBytesIn", "NetworkBytesOut", "SwapUsage", - "BytesUsedForCacheItems", "BytesReadIntoMemcached", "BytesWrittenOutFromMemcached", "CasBadval", "CasHits", "CasMisses", "CmdFlush", "CmdGet", "CmdSet", "CurrConnections", "CurrItems", "DecrHits", "DecrMisses", "DeleteHits", "DeleteMisses", "Evictions", "GetHits", "GetMisses", "IncrHits", "IncrMisses", "Reclaimed", - "BytesUsedForHash", "CmdConfigGet", "CmdConfigSet", "CmdTouch", "CurrConfig", "EvictedUnfetched", "ExpiredUnfetched", "SlabsMoved", "TouchHits", "TouchMisses", - "NewConnections", "NewItems", "UnusedMemory", - "BytesUsedForCache", "CacheHits", "CacheMisses", "CurrConnections", "Evictions", "HyperLogLogBasedCmds", "NewConnections", "Reclaimed", "ReplicationBytes", "ReplicationLag", "SaveInProgress", - "CurrItems", "GetTypeCmds", "HashBasedCmds", "KeyBasedCmds", "ListBasedCmds", "SetBasedCmds", "SetTypeCmds", "SortedSetBasedCmds", "StringBasedCmds", - }, - "AWS/ElasticBeanstalk": { - "EnvironmentHealth", - "ApplicationLatencyP10", "ApplicationLatencyP50", "ApplicationLatencyP75", "ApplicationLatencyP85", "ApplicationLatencyP90", "ApplicationLatencyP95", "ApplicationLatencyP99", "ApplicationLatencyP99.9", - "ApplicationRequests2xx", "ApplicationRequests3xx", "ApplicationRequests4xx", "ApplicationRequests5xx", "ApplicationRequestsTotal", - "CPUIdle", "CPUIowait", "CPUIrq", "CPUNice", "CPUSoftirq", "CPUSystem", "CPUUser", - "InstanceHealth", "InstancesDegraded", "InstancesInfo", "InstancesNoData", "InstancesOk", "InstancesPending", "InstancesSevere", "InstancesUnknown", "InstancesWarning", - "LoadAverage1min", "LoadAverage5min", - "RootFilesystemUtil", - }, - "AWS/ElasticMapReduce": {"IsIdle", "JobsRunning", "JobsFailed", - "MapTasksRunning", "MapTasksRemaining", "MapSlotsOpen", "RemainingMapTasksPerSlot", "ReduceTasksRunning", "ReduceTasksRemaining", "ReduceSlotsOpen", - "CoreNodesRunning", "CoreNodesPending", "LiveDataNodes", "TaskNodesRunning", "TaskNodesPending", "LiveTaskTrackers", - "S3BytesWritten", "S3BytesRead", "HDFSUtilization", "HDFSBytesRead", "HDFSBytesWritten", "MissingBlocks", "TotalLoad", - "BackupFailed", "MostRecentBackupDuration", "TimeSinceLastSuccessfulBackup", - "IsIdle", "ContainerAllocated", "ContainerReserved", "ContainerPending", "AppsCompleted", "AppsFailed", "AppsKilled", "AppsPending", "AppsRunning", "AppsSubmitted", - "CoreNodesRunning", "CoreNodesPending", "LiveDataNodes", "MRTotalNodes", "MRActiveNodes", "MRLostNodes", "MRUnhealthyNodes", "MRDecommissionedNodes", "MRRebootedNodes", - "S3BytesWritten", "S3BytesRead", "HDFSUtilization", "HDFSBytesRead", "HDFSBytesWritten", "MissingBlocks", "CorruptBlocks", "TotalLoad", "MemoryTotalMB", "MemoryReservedMB", "MemoryAvailableMB", "MemoryAllocatedMB", "PendingDeletionBlocks", "UnderReplicatedBlocks", "DfsPendingReplicationBlocks", "CapacityRemainingGB", - "HbaseBackupFailed", "MostRecentBackupDuration", "TimeSinceLastSuccessfulBackup"}, - "AWS/ES": {"ClusterStatus.green", "ClusterStatus.yellow", "ClusterStatus.red", "ClusterUsedSpace", "Nodes", "SearchableDocuments", "DeletedDocuments", "CPUCreditBalance", "CPUUtilization", "FreeStorageSpace", "JVMMemoryPressure", "AutomatedSnapshotFailure", "MasterCPUCreditBalance", "MasterCPUUtilization", "MasterFreeStorageSpace", "MasterJVMMemoryPressure", "ReadLatency", "WriteLatency", "ReadThroughput", "WriteThroughput", "DiskQueueDepth", "ReadIOPS", "WriteIOPS"}, - "AWS/Events": {"Invocations", "FailedInvocations", "TriggeredRules", "MatchedEvents", "ThrottledRules"}, - "AWS/Firehose": {"DeliveryToElasticsearch.Bytes", "DeliveryToElasticsearch.Records", "DeliveryToElasticsearch.Success", "DeliveryToRedshift.Bytes", "DeliveryToRedshift.Records", "DeliveryToRedshift.Success", "DeliveryToS3.Bytes", "DeliveryToS3.DataFreshness", "DeliveryToS3.Records", "DeliveryToS3.Success", "IncomingBytes", "IncomingRecords", "DescribeDeliveryStream.Latency", "DescribeDeliveryStream.Requests", "ListDeliveryStreams.Latency", "ListDeliveryStreams.Requests", "PutRecord.Bytes", "PutRecord.Latency", "PutRecord.Requests", "PutRecordBatch.Bytes", "PutRecordBatch.Latency", "PutRecordBatch.Records", "PutRecordBatch.Requests", "UpdateDeliveryStream.Latency", "UpdateDeliveryStream.Requests"}, - "AWS/IoT": {"PublishIn.Success", "PublishOut.Success", "Subscribe.Success", "Ping.Success", "Connect.Success", "GetThingShadow.Accepted"}, - "AWS/Kinesis": {"GetRecords.Bytes", "GetRecords.IteratorAge", "GetRecords.IteratorAgeMilliseconds", "GetRecords.Latency", "GetRecords.Records", "GetRecords.Success", "IncomingBytes", "IncomingRecords", "PutRecord.Bytes", "PutRecord.Latency", "PutRecord.Success", "PutRecords.Bytes", "PutRecords.Latency", "PutRecords.Records", "PutRecords.Success", "ReadProvisionedThroughputExceeded", "WriteProvisionedThroughputExceeded", "IteratorAgeMilliseconds", "OutgoingBytes", "OutgoingRecords"}, - "AWS/KinesisAnalytics": {"Bytes", "MillisBehindLatest", "Records", "Success"}, - "AWS/Lambda": {"Invocations", "Errors", "Duration", "Throttles", "IteratorAge"}, - "AWS/AppSync": {"Latency", "4XXError", "5XXError"}, - "AWS/Logs": {"IncomingBytes", "IncomingLogEvents", "ForwardedBytes", "ForwardedLogEvents", "DeliveryErrors", "DeliveryThrottling"}, - "AWS/ML": {"PredictCount", "PredictFailureCount"}, - "AWS/NATGateway": {"PacketsOutToDestination", "PacketsOutToSource", "PacketsInFromSource", "PacketsInFromDestination", "BytesOutToDestination", "BytesOutToSource", "BytesInFromSource", "BytesInFromDestination", "ErrorPortAllocation", "ActiveConnectionCount", "ConnectionAttemptCount", "ConnectionEstablishedCount", "IdleTimeoutCount", "PacketsDropCount"}, - "AWS/Neptune": {"CPUUtilization", "ClusterReplicaLag", "ClusterReplicaLagMaximum", "ClusterReplicaLagMinimum", "EngineUptime", "FreeableMemory", "FreeLocalStorage", "GremlinHttp1xx", "GremlinHttp2xx", "GremlinHttp4xx", "GremlinHttp5xx", "GremlinErrors", "GremlinRequests", "GremlinRequestsPerSec", "GremlinWebSocketSuccess", "GremlinWebSocketClientErrors", "GremlinWebSocketServerErrors", "GremlinWebSocketAvailableConnections", "Http1xx", "Http2xx", "Http4xx", "Http5xx", "Http100", "Http101", "Http200", "Http400", "Http403", "Http405", "Http413", "Http429", "Http500", "Http501", "LoaderErrors", "LoaderRequests", "NetworkReceiveThroughput", "NetworkThroughput", "NetworkTransmitThroughput", "SparqlHttp1xx", "SparqlHttp2xx", "SparqlHttp4xx", "SparqlHttp5xx", "SparqlErrors", "SparqlRequests", "SparqlRequestsPerSec", "StatusErrors", "StatusRequests", "VolumeBytesUsed", "VolumeReadIOPs", "VolumeWriteIOPs"}, - "AWS/NetworkELB": {"ActiveFlowCount", "ConsumedLCUs", "HealthyHostCount", "NewFlowCount", "ProcessedBytes", "TCP_Client_Reset_Count", "TCP_ELB_Reset_Count", "TCP_Target_Reset_Count", "UnHealthyHostCount"}, - "AWS/OpsWorks": {"cpu_idle", "cpu_nice", "cpu_system", "cpu_user", "cpu_waitio", "load_1", "load_5", "load_15", "memory_buffers", "memory_cached", "memory_free", "memory_swap", "memory_total", "memory_used", "procs"}, - "AWS/Redshift": {"CPUUtilization", "DatabaseConnections", "HealthStatus", "MaintenanceMode", "NetworkReceiveThroughput", "NetworkTransmitThroughput", "PercentageDiskSpaceUsed", "QueriesCompletedPerSecond", "QueryDuration", "QueryRuntimeBreakdown", "ReadIOPS", "ReadLatency", "ReadThroughput", "WLMQueriesCompletedPerSecond", "WLMQueryDuration", "WLMQueueLength", "WriteIOPS", "WriteLatency", "WriteThroughput"}, - "AWS/RDS": {"ActiveTransactions", "AuroraBinlogReplicaLag", "AuroraReplicaLag", "AuroraReplicaLagMaximum", "AuroraReplicaLagMinimum", "BinLogDiskUsage", "BlockedTransactions", "BufferCacheHitRatio", "BurstBalance", "CommitLatency", "CommitThroughput", "BinLogDiskUsage", "CPUCreditBalance", "CPUCreditUsage", "CPUUtilization", "DatabaseConnections", "DDLLatency", "DDLThroughput", "Deadlocks", "DeleteLatency", "DeleteThroughput", "DiskQueueDepth", "DMLLatency", "DMLThroughput", "EngineUptime", "FailedSqlStatements", "FreeableMemory", "FreeLocalStorage", "FreeStorageSpace", "InsertLatency", "InsertThroughput", "LoginFailures", "MaximumUsedTransactionIDs", "NetworkReceiveThroughput", "NetworkTransmitThroughput", "NetworkThroughput", "Queries", "ReadIOPS", "ReadLatency", "ReadThroughput", "ReplicaLag", "ResultSetCacheHitRatio", "SelectLatency", "SelectThroughput", "ServerlessDatabaseCapacity", "SwapUsage", "TotalConnections", "UpdateLatency", "UpdateThroughput", "VolumeBytesUsed", "VolumeReadIOPS", "VolumeWriteIOPS", "WriteIOPS", "WriteLatency", "WriteThroughput"}, - "AWS/Route53": {"ChildHealthCheckHealthyCount", "HealthCheckStatus", "HealthCheckPercentageHealthy", "ConnectionTime", "SSLHandshakeTime", "TimeToFirstByte"}, - "AWS/S3": {"BucketSizeBytes", "NumberOfObjects", "AllRequests", "GetRequests", "PutRequests", "DeleteRequests", "HeadRequests", "PostRequests", "ListRequests", "BytesDownloaded", "BytesUploaded", "4xxErrors", "5xxErrors", "FirstByteLatency", "TotalRequestLatency"}, - "AWS/SES": {"Bounce", "Complaint", "Delivery", "Reject", "Send", "Reputation.BounceRate", "Reputation.ComplaintRate"}, - "AWS/SNS": {"NumberOfMessagesPublished", "PublishSize", "NumberOfNotificationsDelivered", "NumberOfNotificationsFailed"}, - "AWS/SQS": {"NumberOfMessagesSent", "SentMessageSize", "NumberOfMessagesReceived", "NumberOfEmptyReceives", "NumberOfMessagesDeleted", "ApproximateAgeOfOldestMessage", "ApproximateNumberOfMessagesDelayed", "ApproximateNumberOfMessagesVisible", "ApproximateNumberOfMessagesNotVisible"}, - "AWS/States": {"ExecutionTime", "ExecutionThrottled", "ExecutionsAborted", "ExecutionsFailed", "ExecutionsStarted", "ExecutionsSucceeded", "ExecutionsTimedOut", "ActivityRunTime", "ActivityScheduleTime", "ActivityTime", "ActivitiesFailed", "ActivitiesHeartbeatTimedOut", "ActivitiesScheduled", "ActivitiesScheduled", "ActivitiesSucceeded", "ActivitiesTimedOut", "LambdaFunctionRunTime", "LambdaFunctionScheduleTime", "LambdaFunctionTime", "LambdaFunctionsFailed", "LambdaFunctionsHeartbeatTimedOut", "LambdaFunctionsScheduled", "LambdaFunctionsStarted", "LambdaFunctionsSucceeded", "LambdaFunctionsTimedOut"}, - "AWS/StorageGateway": {"CacheHitPercent", "CachePercentUsed", "CachePercentDirty", "CloudBytesDownloaded", "CloudDownloadLatency", "CloudBytesUploaded", "UploadBufferFree", "UploadBufferPercentUsed", "UploadBufferUsed", "QueuedWrites", "ReadBytes", "ReadTime", "TotalCacheSize", "WriteBytes", "WriteTime", "TimeSinceLastRecoveryPoint", "WorkingStorageFree", "WorkingStoragePercentUsed", "WorkingStorageUsed", - "CacheHitPercent", "CachePercentUsed", "CachePercentDirty", "ReadBytes", "ReadTime", "WriteBytes", "WriteTime", "QueuedWrites"}, - "AWS/SWF": {"DecisionTaskScheduleToStartTime", "DecisionTaskStartToCloseTime", "DecisionTasksCompleted", "StartedDecisionTasksTimedOutOnClose", "WorkflowStartToCloseTime", "WorkflowsCanceled", "WorkflowsCompleted", "WorkflowsContinuedAsNew", "WorkflowsFailed", "WorkflowsTerminated", "WorkflowsTimedOut", - "ActivityTaskScheduleToCloseTime", "ActivityTaskScheduleToStartTime", "ActivityTaskStartToCloseTime", "ActivityTasksCanceled", "ActivityTasksCompleted", "ActivityTasksFailed", "ScheduledActivityTasksTimedOutOnClose", "ScheduledActivityTasksTimedOutOnStart", "StartedActivityTasksTimedOutOnClose", "StartedActivityTasksTimedOutOnHeartbeat"}, - "AWS/VPN": {"TunnelState", "TunnelDataIn", "TunnelDataOut"}, - "Rekognition": {"SuccessfulRequestCount", "ThrottledCount", "ResponseTime", "DetectedFaceCount", "DetectedLabelCount", "ServerErrorCount", "UserErrorCount"}, - "WAF": {"AllowedRequests", "BlockedRequests", "CountedRequests"}, - "AWS/WorkSpaces": {"Available", "Unhealthy", "ConnectionAttempt", "ConnectionSuccess", "ConnectionFailure", "SessionLaunchTime", "InSessionLatency", "SessionDisconnect"}, - "KMS": {"SecondsUntilKeyMaterialExpiration"}, + "AWS/AmazonMQ": {"ConsumerCount", "CpuCreditBalance", "CpuUtilization", "CurrentConnectionsCount", "DequeueCount", "DispatchCount", "EnqueueCount", "EnqueueTime", "ExpiredCount", "HeapUsage", "InflightCount", "JournalFilesForFastRecovery", "JournalFilesForFullRecovery", "MemoryUsage", "NetworkIn", "NetworkOut", "OpenTransactionsCount", "ProducerCount", "QueueSize", "StorePercentUsage", "TotalConsumerCount", "TotalMessageCount", "TotalProducerCount"}, + "AWS/ApiGateway": {"4XXError", "5XXError", "CacheHitCount", "CacheMissCount", "Count", "IntegrationLatency", "Latency"}, + "AWS/AppStream": {"ActualCapacity", "AvailableCapacity", "CapacityUtilization", "DesiredCapacity", "InUseCapacity", "InsufficientCapacityError", "PendingCapacity", "RunningCapacity"}, + "AWS/AppSync": {"4XXError", "5XXError", "Latency"}, + "AWS/ApplicationELB": {"ActiveConnectionCount", "ClientTLSNegotiationErrorCount", "ConsumedLCUs", "ELBAuthError", "ELBAuthFailure", "ELBAuthLatency", "ELBAuthRefreshTokenSuccess", "ELBAuthSuccess", "ELBAuthUserClaimsSizeExceeded", "HTTPCode_ELB_3XX_Count", "HTTPCode_ELB_4XX_Count", "HTTPCode_ELB_5XX_Count", "HTTPCode_Target_2XX_Count", "HTTPCode_Target_3XX_Count", "HTTPCode_Target_4XX_Count", "HTTPCode_Target_5XX_Count", "HTTP_Fixed_Response_Count", "HTTP_Redirect_Count", "HTTP_Redirect_Url_Limit_Exceeded_Count", "HealthyHostCount", "IPv6ProcessedBytes", "IPv6RequestCount", "LambdaInternalError", "LambdaTargetProcessedBytes", "LambdaUserError", "NewConnectionCount", "NonStickyRequestCount", "ProcessedBytes", "RejectedConnectionCount", "RequestCount", "RequestCountPerTarget", "RuleEvaluations", "StandardProcessedBytes", "TargetConnectionErrorCount", "TargetResponseTime", "TargetTLSNegotiationErrorCount", "UnHealthyHostCount"}, + "AWS/AutoScaling": {"GroupDesiredCapacity", "GroupInServiceInstances", "GroupMaxSize", "GroupMinSize", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"}, + "AWS/Billing": {"EstimatedCharges"}, + "AWS/CloudFront": {"4xxErrorRate", "5xxErrorRate", "BytesDownloaded", "BytesUploaded", "Requests", "TotalErrorRate"}, + "AWS/CloudHSM": {"HsmKeysSessionOccupied", "HsmKeysTokenOccupied", "HsmSessionCount", "HsmSslCtxsOccupied", "HsmTemperature", "HsmUnhealthy", "HsmUsersAvailable", "HsmUsersMax", "InterfaceEth2OctetsInput", "InterfaceEth2OctetsOutput"}, + "AWS/CloudSearch": {"IndexUtilization", "Partitions", "SearchableDocuments", "SuccessfulRequests"}, + "AWS/CodeBuild": {"BuildDuration", "Builds", "DownloadSourceDuration", "Duration", "FailedBuilds", "FinalizingDuration", "InstallDuration", "PostBuildDuration", "PreBuildDuration", "ProvisioningDuration", "QueuedDuration", "SubmittedDuration", "SucceededBuilds", "UploadArtifactsDuration"}, + "AWS/Connect": {"CallBackNotDialableNumber", "CallRecordingUploadError", "CallsBreachingConcurrencyQuota", "CallsPerInterval", "ConcurrentCalls", "ConcurrentCallsPercentage", "ContactFlowErrors", "ContactFlowFatalErrors", "LongestQueueWaitTime", "MisconfiguredPhoneNumbers", "MissedCalls", "PublicSigningKeyUsage", "QueueCapacityExceededError", "QueueSize", "ThrottledCalls", "ToInstancePacketLossRate"}, + "AWS/DDoSProtection": {"AllowedRequests", "BlockedRequests", "CountedRequests", "DDoSAttackBitsPerSecond", "DDoSAttackPacketsPerSecond", "DDoSAttackRequestsPerSecond", "DDoSDetected", "PassedRequests"}, + "AWS/DMS": {"CDCChangesDiskSource", "CDCChangesDiskTarget", "CDCChangesMemorySource", "CDCChangesMemoryTarget", "CDCIncomingChanges", "CDCLatencySource", "CDCLatencyTarget", "CDCThroughputBandwidthTarget", "CDCThroughputRowsSource", "CDCThroughputRowsTarget", "FreeableMemory", "FullLoadThroughputBandwidthSource", "FullLoadThroughputBandwidthTarget", "FullLoadThroughputRowsSource", "FullLoadThroughputRowsTarget", "NetworkReceiveThroughput", "NetworkTransmitThroughput", "ReadIOPS", "ReadLatency", "ReadThroughput", "SwapUsage", "WriteIOPS", "WriteLatency", "WriteThroughput"}, + "AWS/DX": {"ConnectionBpsEgress", "ConnectionBpsIngress", "ConnectionCRCErrorCount", "ConnectionLightLevelRx", "ConnectionLightLevelTx", "ConnectionPpsEgress", "ConnectionPpsIngress", "ConnectionState"}, + "AWS/DynamoDB": {"ConditionalCheckFailedRequests", "ConsumedReadCapacityUnits", "ConsumedWriteCapacityUnits", "OnlineIndexConsumedWriteCapacity", "OnlineIndexPercentageProgress", "OnlineIndexThrottleEvents", "PendingReplicationCount", "ProvisionedReadCapacityUnits", "ProvisionedWriteCapacityUnits", "ReadThrottleEvents", "ReplicationLatency", "ReturnedBytes", "ReturnedItemCount", "ReturnedRecordsCount", "SuccessfulRequestLatency", "SystemErrors", "ThrottledRequests", "TimeToLiveDeletedItemCount", "UserErrors", "WriteThrottleEvents"}, + "AWS/EBS": {"BurstBalance", "VolumeConsumedReadWriteOps", "VolumeIdleTime", "VolumeQueueLength", "VolumeReadBytes", "VolumeReadOps", "VolumeThroughputPercentage", "VolumeTotalReadTime", "VolumeTotalWriteTime", "VolumeWriteBytes", "VolumeWriteOps"}, + "AWS/EC2": {"CPUCreditBalance", "CPUCreditUsage", "CPUSurplusCreditBalance", "CPUSurplusCreditsCharged", "CPUUtilization", "DiskReadBytes", "DiskReadOps", "DiskWriteBytes", "DiskWriteOps", "EBSByteBalance%", "EBSIOBalance%", "EBSReadBytes", "EBSReadOps", "EBSWriteBytes", "EBSWriteOps", "NetworkIn", "NetworkOut", "NetworkPacketsIn", "NetworkPacketsOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System"}, + "AWS/EC2/API": {"ClientErrors", "RequestLimitExceeded", "ServerErrors", "SuccessfulCalls"}, + "AWS/EC2Spot": {"AvailableInstancePoolsCount", "BidsSubmittedForCapacity", "EligibleInstancePoolCount", "FulfilledCapacity", "MaxPercentCapacityAllocation", "PendingCapacity", "PercentCapacityAllocation", "TargetCapacity", "TerminatingCapacity"}, + "AWS/ECS": {"CPUReservation", "CPUUtilization", "GPUReservation", "MemoryReservation", "MemoryUtilization"}, + "AWS/EFS": {"BurstCreditBalance", "ClientConnections", "DataReadIOBytes", "DataWriteIOBytes", "MetadataIOBytes", "PercentIOLimit", "PermittedThroughput", "TotalIOBytes"}, + "AWS/ELB": {"BackendConnectionErrors", "EstimatedALBActiveConnectionCount", "EstimatedALBConsumedLCUs", "EstimatedALBNewConnectionCount", "EstimatedProcessedBytes", "HTTPCode_Backend_2XX", "HTTPCode_Backend_3XX", "HTTPCode_Backend_4XX", "HTTPCode_Backend_5XX", "HTTPCode_ELB_4XX", "HTTPCode_ELB_5XX", "HealthyHostCount", "Latency", "RequestCount", "SpilloverCount", "SurgeQueueLength", "UnHealthyHostCount"}, + "AWS/ES": {"AutomatedSnapshotFailure", "CPUCreditBalance", "CPUUtilization", "ClusterIndexWritesBlocked", "ClusterStatus.green", "ClusterStatus.red", "ClusterStatus.yellow", "ClusterUsedSpace", "DeletedDocuments", "DiskQueueDepth", "ElasticsearchRequests", "FreeStorageSpace", "IndexingLatency", "IndexingRate", "InvalidHostHeaderRequests", "JVMGCOldCollectionCount", "JVMGCOldCollectionTime", "JVMGCYoungCollectionCount", "JVMGCYoungCollectionTime", "JVMMemoryPressure", "KMSKeyError", "KMSKeyInaccessible", "KibanaHealthyNodes", "MasterCPUCreditBalance", "MasterCPUUtilization", "MasterFreeStorageSpace", "MasterJVMMemoryPressure", "MasterReachableFromNode", "Nodes", "ReadIOPS", "ReadLatency", "ReadThroughput", "RequestCount", "SearchLatency", "SearchRate", "SearchableDocuments", "SysMemoryUtilization", "ThreadpoolBulkQueue", "ThreadpoolBulkRejected", "ThreadpoolBulkThreads", "ThreadpoolForce_mergeQueue", "ThreadpoolForce_mergeRejected", "ThreadpoolForce_mergeThreads", "ThreadpoolIndexQueue", "ThreadpoolIndexRejected", "ThreadpoolIndexThreads", "ThreadpoolSearchQueue", "ThreadpoolSearchRejected", "ThreadpoolSearchThreads", "WriteIOPS", "WriteLatency", "WriteThroughput"}, + "AWS/ElastiCache": {"ActiveDefragHits", "BytesReadIntoMemcached", "BytesUsedForCache", "BytesUsedForCacheItems", "BytesUsedForHash", "BytesWrittenOutFromMemcached", "CPUUtilization", "CacheHits", "CacheMisses", "CasBadval", "CasHits", "CasMisses", "CmdConfigGet", "CmdConfigSet", "CmdFlush", "CmdGet", "CmdSet", "CmdTouch", "CurrConfig", "CurrConnections", "CurrItems", "DecrHits", "DecrMisses", "DeleteHits", "DeleteMisses", "EngineCPUUtilization", "EvictedUnfetched", "Evictions", "ExpiredUnfetched", "FreeableMemory", "GetHits", "GetMisses", "GetTypeCmds", "HashBasedCmds", "HyperLogLogBasedCmds", "IncrHits", "IncrMisses", "KeyBasedCmds", "ListBasedCmds", "NetworkBytesIn", "NetworkBytesOut", "NewConnections", "NewItems", "Reclaimed", "ReplicationBytes", "ReplicationLag", "SaveInProgress", "SetBasedCmds", "SetTypeCmds", "SlabsMoved", "SortedSetBasedCmds", "StringBasedCmds", "SwapUsage", "TouchHits", "TouchMisses", "UnusedMemory"}, + "AWS/ElasticBeanstalk": {"ApplicationLatencyP10", "ApplicationLatencyP50", "ApplicationLatencyP75", "ApplicationLatencyP85", "ApplicationLatencyP90", "ApplicationLatencyP95", "ApplicationLatencyP99", "ApplicationLatencyP99.9", "ApplicationRequests2xx", "ApplicationRequests3xx", "ApplicationRequests4xx", "ApplicationRequests5xx", "ApplicationRequestsTotal", "CPUIdle", "CPUIowait", "CPUIrq", "CPUNice", "CPUSoftirq", "CPUSystem", "CPUUser", "EnvironmentHealth", "InstanceHealth", "InstancesDegraded", "InstancesInfo", "InstancesNoData", "InstancesOk", "InstancesPending", "InstancesSevere", "InstancesUnknown", "InstancesWarning", "LoadAverage1min", "LoadAverage5min", "RootFilesystemUtil"}, + "AWS/ElasticMapReduce": {"AppsCompleted", "AppsFailed", "AppsKilled", "AppsPending", "AppsRunning", "AppsSubmitted", "BackupFailed", "CapacityRemainingGB", "Cluster Status", "ContainerAllocated", "ContainerPending", "ContainerPendingRatio", "ContainerReserved", "CoreNodesPending", "CoreNodesRunning", "CorruptBlocks", "DfsPendingReplicationBlocks", "HBase", "HDFSBytesRead", "HDFSBytesWritten", "HDFSUtilization", "HbaseBackupFailed", "IO", "IsIdle", "JobsFailed", "JobsRunning", "LiveDataNodes", "LiveTaskTrackers", "MRActiveNodes", "MRDecommissionedNodes", "MRLostNodes", "MRRebootedNodes", "MRTotalNodes", "MRUnhealthyNodes", "Map/Reduce", "MapSlotsOpen", "MapTasksRemaining", "MapTasksRunning", "MemoryAllocatedMB", "MemoryAvailableMB", "MemoryReservedMB", "MemoryTotalMB", "MissingBlocks", "MostRecentBackupDuration", "Node Status", "PendingDeletionBlocks", "ReduceSlotsOpen", "ReduceTasksRemaining", "ReduceTasksRunning", "RemainingMapTasksPerSlot", "S3BytesRead", "S3BytesWritten", "TaskNodesPending", "TaskNodesRunning", "TimeSinceLastSuccessfulBackup", "TotalLoad", "UnderReplicatedBlocks", "YARNMemoryAvailablePercentage"}, + "AWS/ElasticTranscoder": {"Billed Audio Output", "Billed HD Output", "Billed SD Output", "Errors", "Jobs Completed", "Jobs Errored", "Outputs per Job", "Standby Time", "Throttles"}, + "AWS/Events": {"DeadLetterInvocations", "FailedInvocations", "Invocations", "MatchedEvents", "ThrottledRules", "TriggeredRules"}, + "AWS/FSx": {"DataReadBytes", "DataReadOperations", "DataWriteBytes", "DataWriteOperations", "FreeDataStorageCapacity", "MetadataOperations"}, + "AWS/Firehose": {"BackupToS3.Bytes", "BackupToS3.DataFreshness", "BackupToS3.Records", "BackupToS3.Success", "DataReadFromKinesisStream.Bytes", "DataReadFromKinesisStream.Records", "DeliveryToElasticsearch.Bytes", "DeliveryToElasticsearch.Records", "DeliveryToElasticsearch.Success", "DeliveryToRedshift.Bytes", "DeliveryToRedshift.Records", "DeliveryToRedshift.Success", "DeliveryToS3.Bytes", "DeliveryToS3.DataFreshness", "DeliveryToS3.Records", "DeliveryToS3.Success", "DeliveryToSplunk.Bytes", "DeliveryToSplunk.DataFreshness", "DeliveryToSplunk.Records", "DeliveryToSplunk.Success", "DescribeDeliveryStream.Latency", "DescribeDeliveryStream.Requests", "ExecuteProcessing.Duration", "ExecuteProcessing.Success", "FailedConversion.Bytes", "FailedConversion.Records", "IncomingBytes", "IncomingRecords", "KinesisMillisBehindLatest", "ListDeliveryStreams.Latency", "ListDeliveryStreams.Requests", "PutRecord.Bytes", "PutRecord.Latency", "PutRecord.Requests", "PutRecordBatch.Bytes", "PutRecordBatch.Latency", "PutRecordBatch.Records", "PutRecordBatch.Requests", "SucceedConversion.Bytes", "SucceedConversion.Records", "SucceedProcessing.Bytes", "SucceedProcessing.Records", "ThrottledDescribeStream", "ThrottledGetRecords", "ThrottledGetShardIterator", "UpdateDeliveryStream.Latency", "UpdateDeliveryStream.Requests"}, + "AWS/Glue": {"glue.driver.BlockManager.disk.diskSpaceUsed_MB", "glue.driver.ExecutorAllocationManager.executors.numberAllExecutors", "glue.driver.ExecutorAllocationManager.executors.numberMaxNeededExecutors", "glue.driver.aggregate.bytesRead", "glue.driver.aggregate.elapsedTime", "glue.driver.aggregate.numCompletedStages", "glue.driver.aggregate.numCompletedTasks", "glue.driver.aggregate.numFailedTasks", "glue.driver.aggregate.numKilledTasks", "glue.driver.aggregate.recordsRead", "glue.driver.aggregate.shuffleBytesWritten", "glue.driver.aggregate.shuffleLocalBytesRead", "glue.driver.jvm.heap.usage glue.executorId.jvm.heap.usage glue.ALL.jvm.heap.usage", "glue.driver.jvm.heap.used glue.executorId.jvm.heap.used glue.ALL.jvm.heap.used", "glue.driver.s3.filesystem.read_bytes glue.executorId.s3.filesystem.read_bytes glue.ALL.s3.filesystem.read_bytes", "glue.driver.s3.filesystem.write_bytes glue.executorId.s3.filesystem.write_bytes glue.ALL.s3.filesystem.write_bytes", "glue.driver.system.cpuSystemLoad glue.executorId.system.cpuSystemLoad glue.ALL.system.cpuSystemLoad"}, + "AWS/Inspector": {"TotalAssessmentRunFindings", "TotalAssessmentRuns", "TotalHealthyAgents", "TotalMatchingAgents"}, + "AWS/IoT": {"Connect.Success", "GetThingShadow.Accepted", "Ping.Success", "PublishIn.Success", "PublishOut.Success", "Subscribe.Success"}, + "AWS/KMS": {"SecondsUntilKeyMaterialExpiration"}, + "AWS/Kinesis": {"GetRecords.Bytes", "GetRecords.IteratorAge", "GetRecords.IteratorAgeMilliseconds", "GetRecords.Latency", "GetRecords.Records", "GetRecords.Success", "IncomingBytes", "IncomingRecords", "IteratorAgeMilliseconds", "OutgoingBytes", "OutgoingRecords", "PutRecord.Bytes", "PutRecord.Latency", "PutRecord.Success", "PutRecords.Bytes", "PutRecords.Latency", "PutRecords.Records", "PutRecords.Success", "ReadProvisionedThroughputExceeded", "SubscribeToShard.RateExceeded", "SubscribeToShard.Success", "SubscribeToShardEvent.Bytes", "SubscribeToShardEvent.MillisBehindLatest", "SubscribeToShardEvent.Records", "SubscribeToShardEvent.Success", "WriteProvisionedThroughputExceeded"}, + "AWS/KinesisAnalytics": {"Bytes", "InputProcessing.DroppedRecords", "InputProcessing.Duration", "InputProcessing.OkBytes", "InputProcessing.OkRecords", "InputProcessing.ProcessingFailedRecords", "InputProcessing.Success", "KPUs", "LambdaDelivery.DeliveryFailedRecords", "LambdaDelivery.Duration", "LambdaDelivery.OkRecords", "MillisBehindLatest", "Records", "Success"}, + "AWS/KinesisVideo": {"GetHLSMasterPlaylist.Latency", "GetHLSMasterPlaylist.Requests", "GetHLSMasterPlaylist.Success", "GetHLSMediaPlaylist.Latency", "GetHLSMediaPlaylist.Requests", "GetHLSMediaPlaylist.Success", "GetHLSStreamingSessionURL.Latency", "GetHLSStreamingSessionURL.Requests", "GetHLSStreamingSessionURL.Success", "GetMP4InitFragment.Latency", "GetMP4InitFragment.Requests", "GetMP4InitFragment.Success", "GetMP4MediaFragment.Latency", "GetMP4MediaFragment.OutgoingBytes", "GetMP4MediaFragment.Requests", "GetMP4MediaFragment.Success", "GetMedia.ConnectionErrors", "GetMedia.MillisBehindNow", "GetMedia.OutgoingBytes", "GetMedia.OutgoingFragments", "GetMedia.OutgoingFrames", "GetMedia.Requests", "GetMedia.Success", "GetMediaForFragmentList.OutgoingBytes", "GetMediaForFragmentList.OutgoingFragments", "GetMediaForFragmentList.OutgoingFrames", "GetMediaForFragmentList.Requests", "GetMediaForFragmentList.Success", "GetTSFragment.Latency", "GetTSFragment.OutgoingBytes", "GetTSFragment.Requests", "GetTSFragment.Success", "ListFragments.Latency", "PutMedia.ActiveConnections", "PutMedia.BufferingAckLatency", "PutMedia.ConnectionErrors", "PutMedia.ErrorAckCount", "PutMedia.FragmentIngestionLatency", "PutMedia.FragmentPersistLatency", "PutMedia.IncomingBytes", "PutMedia.IncomingFragments", "PutMedia.IncomingFrames", "PutMedia.Latency", "PutMedia.PersistedAckLatency", "PutMedia.ReceivedAckLatency", "PutMedia.Requests", "PutMedia.Success"}, + "AWS/Lambda": {"ConcurrentExecutions", "DeadLetterErrors", "Duration", "Errors", "Invocations", "IteratorAge", "Throttles", "UnreservedConcurrentExecutions"}, + "AWS/Lex": {"BotChannelAuthErrors", "BotChannelConfigurationErrors", "BotChannelInboundThrottledEvents", "BotChannelOutboundThrottledEvents", "BotChannelRequestCount", "BotChannelResponseCardErrors", "BotChannelSystemErrors", "MissedUtteranceCount", "RuntimeInvalidLambdaResponses", "RuntimeLambdaErrors", "RuntimePollyErrors", "RuntimeRequestCount", "RuntimeSucessfulRequestLatency", "RuntimeSystemErrors", "RuntimeThrottledEvents", "RuntimeUserErrors"}, + "AWS/Logs": {"DeliveryErrors", "DeliveryThrottling", "ForwardedBytes", "ForwardedLogEvents", "IncomingBytes", "IncomingLogEvents"}, + "AWS/ML": {"PredictCount", "PredictFailureCount"}, + "AWS/MediaConvert": {"AudioOutputSeconds", "Errors", "HDOutputSeconds", "JobsCompletedCount", "JobsErroredCount", "SDOutputSeconds", "StandbyTime", "TranscodingTime", "UHDOutputSeconds"}, + "AWS/MediaPackage": {"ActiveInput", "EgressBytes", "EgressRequestCount", "EgressResponseTime", "IngressBytes", "IngressResponseTime"}, + "AWS/MediaTailor": {"AdDecisionServer.Ads", "AdDecisionServer.Duration", "AdDecisionServer.Errors", "AdDecisionServer.FillRate", "AdDecisionServer.Timeouts", "AdNotReady", "Avails.Duration", "Avails.FillRate", "Avails.FilledDuration", "GetManifest.Errors", "Origin.Errors", "Origin.Timeouts"}, + "AWS/NATGateway": {"ActiveConnectionCount", "BytesInFromDestination", "BytesInFromSource", "BytesOutToDestination", "BytesOutToSource", "ConnectionAttemptCount", "ConnectionEstablishedCount", "ErrorPortAllocation", "IdleTimeoutCount", "PacketsDropCount", "PacketsInFromDestination", "PacketsInFromSource", "PacketsOutToDestination", "PacketsOutToSource"}, + "AWS/Neptune": {"CPUUtilization", "ClusterReplicaLag", "ClusterReplicaLagMaximum", "ClusterReplicaLagMinimum", "EngineUptime", "FreeLocalStorage", "FreeableMemory", "GremlinErrors", "GremlinHttp1xx", "GremlinHttp2xx", "GremlinHttp4xx", "GremlinHttp5xx", "GremlinRequests", "GremlinRequestsPerSec", "GremlinWebSocketAvailableConnections", "GremlinWebSocketClientErrors", "GremlinWebSocketServerErrors", "GremlinWebSocketSuccess", "Http100", "Http101", "Http1xx", "Http200", "Http2xx", "Http400", "Http403", "Http405", "Http413", "Http429", "Http4xx", "Http500", "Http501", "Http5xx", "LoaderErrors", "LoaderRequests", "NetworkReceiveThroughput", "NetworkThroughput", "NetworkTransmitThroughput", "SparqlErrors", "SparqlHttp1xx", "SparqlHttp2xx", "SparqlHttp4xx", "SparqlHttp5xx", "SparqlRequests", "SparqlRequestsPerSec", "StatusErrors", "StatusRequests", "VolumeBytesUsed", "VolumeReadIOPs", "VolumeWriteIOPs"}, + "AWS/NetworkELB": {"ActiveFlowCount", "ActiveFlowCount_TLS", "ClientTLSNegotiationErrorCount", "ConsumedLCUs", "HealthyHostCount", "NewFlowCount", "NewFlowCount_TLS", "ProcessedBytes", "ProcessedBytes_TLS", "TCP_Client_Reset_Count", "TCP_ELB_Reset_Count", "TCP_Target_Reset_Count", "TargetTLSNegotiationErrorCount", "UnHealthyHostCount"}, + "AWS/OpsWorks": {"cpu_idle", "cpu_nice", "cpu_steal", "cpu_system", "cpu_user", "cpu_waitio", "load_1", "load_15", "load_5", "memory_buffers", "memory_cached", "memory_free", "memory_swap", "memory_total", "memory_used", "procs"}, + "AWS/Polly": {"2XXCount", "4XXCount", "5XXCount", "RequestCharacters", "ResponseLatency"}, + "AWS/RDS": {"ActiveTransactions", "AuroraBinlogReplicaLag", "AuroraReplicaLag", "AuroraReplicaLagMaximum", "AuroraReplicaLagMinimum", "BinLogDiskUsage", "BlockedTransactions", "BufferCacheHitRatio", "BurstBalance", "CPUCreditBalance", "CPUCreditUsage", "CPUUtilization", "CommitLatency", "CommitThroughput", "DDLLatency", "DDLThroughput", "DMLLatency", "DMLThroughput", "DatabaseConnections", "Deadlocks", "DeleteLatency", "DeleteThroughput", "DiskQueueDepth", "EngineUptime", "FailedSQLServerAgentJobsCount", "FailedSqlStatements", "FreeLocalStorage", "FreeStorageSpace", "FreeableMemory", "InsertLatency", "InsertThroughput", "LoginFailures", "MaximumUsedTransactionIDs", "NetworkReceiveThroughput", "NetworkThroughput", "NetworkTransmitThroughput", "OldestReplicationSlotLag", "Queries", "ReadIOPS", "ReadLatency", "ReadThroughput", "ReplicaLag", "ReplicationSlotDiskUsage", "ResultSetCacheHitRatio", "SelectLatency", "SelectThroughput", "ServerlessDatabaseCapacity", "SwapUsage", "TotalConnections", "TransactionLogsDiskUsage", "TransactionLogsGeneration", "UpdateLatency", "UpdateThroughput", "VolumeBytesUsed", "VolumeReadIOPS", "VolumeWriteIOPS", "WriteIOPS", "WriteLatency", "WriteThroughput"}, + "AWS/Redshift": {"CPUUtilization", "DatabaseConnections", "HealthStatus", "MaintenanceMode", "NetworkReceiveThroughput", "NetworkTransmitThroughput", "PercentageDiskSpaceUsed", "QueriesCompletedPerSecond", "QueryDuration", "QueryRuntimeBreakdown", "ReadIOPS", "ReadLatency", "ReadThroughput", "TotalTableCount", "WLMQueriesCompletedPerSecond", "WLMQueryDuration", "WLMQueueLength", "WriteIOPS", "WriteLatency", "WriteThroughput"}, + "AWS/Route53": {"ChildHealthCheckHealthyCount", "ConnectionTime", "HealthCheckPercentageHealthy", "HealthCheckStatus", "SSLHandshakeTime", "TimeToFirstByte"}, + "AWS/S3": {"4xxErrors", "5xxErrors", "AllRequests", "BucketSizeBytes", "BytesDownloaded", "BytesUploaded", "DeleteRequests", "FirstByteLatency", "GetRequests", "HeadRequests", "ListRequests", "NumberOfObjects", "PostRequests", "PutRequests", "SelectRequests", "SelectReturnedBytes", "SelectScannedBytes", "TotalRequestLatency"}, + "AWS/SES": {"Bounce", "Complaint", "Delivery", "Reject", "Reputation.BounceRate", "Reputation.ComplaintRate", "Send"}, + "AWS/SNS": {"NumberOfMessagesPublished", "NumberOfNotificationsDelivered", "NumberOfNotificationsFailed", "PublishSize"}, + "AWS/SQS": {"ApproximateAgeOfOldestMessage", "ApproximateNumberOfMessagesDelayed", "ApproximateNumberOfMessagesNotVisible", "ApproximateNumberOfMessagesVisible", "NumberOfEmptyReceives", "NumberOfMessagesDeleted", "NumberOfMessagesReceived", "NumberOfMessagesSent", "SentMessageSize"}, + "AWS/SWF": {"ActivityTaskScheduleToCloseTime", "ActivityTaskScheduleToStartTime", "ActivityTaskStartToCloseTime", "ActivityTasksCanceled", "ActivityTasksCompleted", "ActivityTasksFailed", "DecisionTaskScheduleToStartTime", "DecisionTaskStartToCloseTime", "DecisionTasksCompleted", "ScheduledActivityTasksTimedOutOnClose", "ScheduledActivityTasksTimedOutOnStart", "StartedActivityTasksTimedOutOnClose", "StartedActivityTasksTimedOutOnHeartbeat", "StartedDecisionTasksTimedOutOnClose", "WorkflowStartToCloseTime", "WorkflowsCanceled", "WorkflowsCompleted", "WorkflowsContinuedAsNew", "WorkflowsFailed", "WorkflowsTerminated", "WorkflowsTimedOut"}, + "AWS/SageMaker": {"CPUUtilization", "DatasetObjectsAutoAnnotated", "DatasetObjectsHumanAnnotated", "DatasetObjectsLabelingFailed", "DiskUtilization", "GPUMemoryUtilization", "GPUUtilization", "Invocation4XXErrors", "Invocation5XXErrors", "Invocations", "InvocationsPerInstance", "JobsFailed", "JobsStopped", "JobsSucceeded", "MemoryUtilization", "ModelLatency", "OverheadLatency", "TotalDatasetObjectsLabeled"}, + "AWS/States": {"ActivitiesFailed", "ActivitiesHeartbeatTimedOut", "ActivitiesScheduled", "ActivitiesStarted", "ActivitiesSucceeded", "ActivitiesTimedOut", "ActivityRunTime", "ActivityScheduleTime", "ActivityTime", "ConsumedCapacity", "ExecutionThrottled", "ExecutionTime", "ExecutionsAborted", "ExecutionsFailed", "ExecutionsStarted", "ExecutionsSucceeded", "ExecutionsTimedOut", "LambdaFunctionRunTime", "LambdaFunctionScheduleTime", "LambdaFunctionTime", "LambdaFunctionsFailed", "LambdaFunctionsHeartbeatTimedOut", "LambdaFunctionsScheduled", "LambdaFunctionsStarted", "LambdaFunctionsSucceeded", "LambdaFunctionsTimedOut", "ProvisionedBucketSize", "ProvisionedRefillRate", "ThrottledEvents"}, + "AWS/StorageGateway": {"CacheFree", "CacheHitPercent", "CachePercentDirty", "CachePercentUsed", "CacheUsed", "CloudBytesDownloaded", "CloudBytesUploaded", "CloudDownloadLatency", "QueuedWrites", "ReadBytes", "ReadTime", "TimeSinceLastRecoveryPoint", "TotalCacheSize", "UploadBufferFree", "UploadBufferPercentUsed", "UploadBufferUsed", "WorkingStorageFree", "WorkingStoragePercentUsed", "WorkingStorageUsed", "WriteBytes", "WriteTime"}, + "AWS/TransitGateway": {"BytesIn", "BytesOut", "PacketDropCountBlackhole", "PacketDropCountNoRoute", "PacketsIn", "PacketsOut"}, + "AWS/Translate": {"CharacterCount", "ResponseTime", "ServerErrorCount", "SuccessfulRequestCount", "ThrottledCount", "UserErrorCount"}, + "AWS/VPN": {"TunnelDataIn", "TunnelDataOut", "TunnelState"}, + "AWS/WorkSpaces": {"Available", "ConnectionAttempt", "ConnectionFailure", "ConnectionSuccess", "InSessionLatency", "Maintenance", "SessionDisconnect", "SessionLaunchTime", "Stopped", "Unhealthy", "UserConnected"}, + "Rekognition": {"DetectedFaceCount", "DetectedLabelCount", "ResponseTime", "ServerErrorCount", "SuccessfulRequestCount", "ThrottledCount", "UserErrorCount"}, + "WAF": {"AllowedRequests", "BlockedRequests", "CountedRequests", "DDoSAttackBitsPerSecond", "DDoSAttackPacketsPerSecond", "DDoSAttackRequestsPerSecond", "DDoSDetected", "PassedRequests"}, } dimensionsMap = map[string][]string{ - "AWS/AmazonMQ": {"Broker", "Topic", "Queue"}, - "AWS/ApiGateway": {"ApiName", "Method", "Resource", "Stage"}, - "AWS/ApplicationELB": {"LoadBalancer", "TargetGroup", "AvailabilityZone"}, - "AWS/AutoScaling": {"AutoScalingGroupName"}, - "AWS/Billing": {"ServiceName", "LinkedAccount", "Currency"}, - "AWS/CloudFront": {"DistributionId", "Region"}, - "AWS/CloudSearch": {}, - "AWS/CloudHSM": {"Region", "ClusterId", "HsmId"}, - "AWS/CodeBuild": {"ProjectName"}, - "AWS/Connect": {"InstanceId", "MetricGroup", "Participant", "QueueName", "Stream Type", "Type of Connection"}, - "AWS/DMS": {"ReplicationInstanceIdentifier", "ReplicationTaskIdentifier"}, - "AWS/DX": {"ConnectionId"}, - "AWS/DynamoDB": {"TableName", "GlobalSecondaryIndexName", "Operation", "StreamLabel"}, - "AWS/EBS": {"VolumeId"}, - "AWS/EC2": {"AutoScalingGroupName", "ImageId", "InstanceId", "InstanceType"}, - "AWS/EC2/API": {}, - "AWS/EC2Spot": {"AvailabilityZone", "FleetRequestId", "InstanceType"}, - "AWS/ECS": {"ClusterName", "ServiceName"}, - "AWS/EFS": {"FileSystemId"}, - "AWS/ELB": {"LoadBalancerName", "AvailabilityZone"}, - "AWS/ElastiCache": {"CacheClusterId", "CacheNodeId"}, - "AWS/ElasticBeanstalk": {"EnvironmentName", "InstanceId"}, - "AWS/ElasticMapReduce": {"ClusterId", "JobFlowId", "JobId"}, - "AWS/ES": {"ClientId", "DomainName"}, - "AWS/Events": {"RuleName"}, - "AWS/Firehose": {"DeliveryStreamName"}, - "AWS/IoT": {"Protocol"}, - "AWS/Kinesis": {"StreamName", "ShardId"}, - "AWS/KinesisAnalytics": {"Flow", "Id", "Application"}, - "AWS/Lambda": {"FunctionName", "Resource", "Version", "Alias"}, - "AWS/AppSync": {"GraphQLAPIId"}, - "AWS/Logs": {"LogGroupName", "DestinationType", "FilterName"}, - "AWS/ML": {"MLModelId", "RequestMode"}, - "AWS/NATGateway": {"NatGatewayId"}, - "AWS/Neptune": {"DBClusterIdentifier", "Role", "DatabaseClass", "EngineName"}, - "AWS/NetworkELB": {"LoadBalancer", "TargetGroup", "AvailabilityZone"}, - "AWS/OpsWorks": {"StackId", "LayerId", "InstanceId"}, - "AWS/Redshift": {"NodeID", "ClusterIdentifier", "latency", "service class", "wmlid"}, - "AWS/RDS": {"DBInstanceIdentifier", "DBClusterIdentifier", "DbClusterIdentifier", "DatabaseClass", "EngineName", "Role"}, - "AWS/Route53": {"HealthCheckId", "Region"}, - "AWS/S3": {"BucketName", "StorageType", "FilterId"}, - "AWS/SES": {}, - "AWS/SNS": {"Application", "Platform", "TopicName"}, - "AWS/SQS": {"QueueName"}, - "AWS/States": {"StateMachineArn", "ActivityArn", "LambdaFunctionArn"}, - "AWS/StorageGateway": {"GatewayId", "GatewayName", "VolumeId"}, - "AWS/SWF": {"Domain", "WorkflowTypeName", "WorkflowTypeVersion", "ActivityTypeName", "ActivityTypeVersion"}, - "AWS/VPN": {"VpnId", "TunnelIpAddress"}, - "Rekognition": {}, - "WAF": {"Rule", "WebACL"}, - "AWS/WorkSpaces": {"DirectoryId", "WorkspaceId"}, - "KMS": {"KeyId"}, + "AWS/AmazonMQ": {"Broker", "Queue", "Topic"}, + "AWS/ApiGateway": {"ApiName", "Method", "Resource", "Stage"}, + "AWS/AppStream": {"Fleet"}, + "AWS/AppSync": {"GraphQLAPIId"}, + "AWS/ApplicationELB": {"AvailabilityZone", "LoadBalancer", "TargetGroup"}, + "AWS/AutoScaling": {"AutoScalingGroupName"}, + "AWS/Billing": {"Currency", "LinkedAccount", "ServiceName"}, + "AWS/CloudFront": {"DistributionId", "Region"}, + "AWS/CloudHSM": {"ClusterId", "HsmId", "Region"}, + "AWS/CloudSearch": {"ClientId", "DomainName"}, + "AWS/CodeBuild": {"ProjectName"}, + "AWS/Connect": {"InstanceId", "MetricGroup", "Participant", "QueueName", "Stream Type", "Type of Connection"}, + "AWS/DDoSProtection": {"Region", "Rule", "RuleGroup", "WebACL"}, + "AWS/DMS": {"ReplicationInstanceIdentifier", "ReplicationTaskIdentifier"}, + "AWS/DX": {"ConnectionId"}, + "AWS/DynamoDB": {"GlobalSecondaryIndexName", "Operation", "ReceivingRegion", "StreamLabel", "TableName"}, + "AWS/EBS": {"VolumeId"}, + "AWS/EC2": {"AutoScalingGroupName", "ImageId", "InstanceId", "InstanceType"}, + "AWS/EC2/API": {}, + "AWS/EC2Spot": {"AvailabilityZone", "FleetRequestId", "InstanceType"}, + "AWS/ECS": {"ClusterName", "ServiceName"}, + "AWS/EFS": {"FileSystemId"}, + "AWS/ELB": {"AvailabilityZone", "LoadBalancerName"}, + "AWS/ES": {"ClientId", "DomainName"}, + "AWS/ElastiCache": {"CacheClusterId", "CacheNodeId"}, + "AWS/ElasticBeanstalk": {"EnvironmentName", "InstanceId"}, + "AWS/ElasticMapReduce": {"ClusterId", "JobFlowId", "JobId"}, + "AWS/ElasticTranscoder": {"Operation", "PipelineId"}, + "AWS/Events": {"RuleName"}, + "AWS/FSx": {}, + "AWS/Firehose": {"DeliveryStreamName"}, + "AWS/Glue": {"JobName", "JobRunId", "Type"}, + "AWS/Inspector": {}, + "AWS/IoT": {"Protocol"}, + "AWS/KMS": {"KeyId"}, + "AWS/Kinesis": {"ShardId", "StreamName"}, + "AWS/KinesisAnalytics": {"Application", "Flow", "Id"}, + "AWS/KinesisVideo": {}, + "AWS/Lambda": {"Alias", "ExecutedVersion", "FunctionName", "Resource"}, + "AWS/Lex": {"BotAlias", "BotChannelName", "BotName", "BotVersion", "InputMode", "Operation", "Source"}, + "AWS/Logs": {"DestinationType", "FilterName", "LogGroupName"}, + "AWS/ML": {"MLModelId", "RequestMode"}, + "AWS/MediaConvert": {"Job", "Operation", "Queue"}, + "AWS/MediaPackage": {"Channel", "No Dimension", "OriginEndpoint", "StatusCodeRange"}, + "AWS/MediaTailor": {"Configuration Name"}, + "AWS/NATGateway": {"NatGatewayId"}, + "AWS/Neptune": {"DBClusterIdentifier", "DatabaseClass", "EngineName", "Role"}, + "AWS/NetworkELB": {"AvailabilityZone", "LoadBalancer", "TargetGroup"}, + "AWS/OpsWorks": {"InstanceId", "LayerId", "StackId"}, + "AWS/Polly": {"Operation"}, + "AWS/RDS": {"DBClusterIdentifier", "DBInstanceIdentifier", "DatabaseClass", "DbClusterIdentifier", "EngineName", "Role", "SourceRegion"}, + "AWS/Redshift": {"ClusterIdentifier", "NodeID", "Service class", "Stage", "latency", "wmlid"}, + "AWS/Route53": {"HealthCheckId", "Region"}, + "AWS/S3": {"BucketName", "FilterId", "StorageType"}, + "AWS/SES": {}, + "AWS/SNS": {"Application", "Platform", "TopicName"}, + "AWS/SQS": {"QueueName"}, + "AWS/SWF": {"ActivityTypeName", "ActivityTypeVersion", "Domain", "WorkflowTypeName", "WorkflowTypeVersion"}, + "AWS/SageMaker": {"EndpointName", "Host", "LabelingJobName", "VariantName"}, + "AWS/States": {"APIName", "ActivityArn", "LambdaFunctionArn", "StateMachineArn", "StateTransition"}, + "AWS/StorageGateway": {"GatewayId", "GatewayName", "VolumeId"}, + "AWS/TransitGateway": {"TransitGateway"}, + "AWS/Translate": {"LanguagePair", "Operation"}, + "AWS/VPN": {"TunnelIpAddress", "VpnId"}, + "AWS/WorkSpaces": {"DirectoryId", "WorkspaceId"}, + "Rekognition": {}, + "WAF": {"Region", "Rule", "RuleGroup", "WebACL"}, } customMetricsMetricsMap = make(map[string]map[string]map[string]*CustomMetricsCache) From 8d03db24748a99b2a406ade7af867b31d3c9aa97 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Thu, 21 Mar 2019 12:15:13 +0100 Subject: [PATCH 54/56] reversed dashboard-padding --- packages/grafana-ui/src/themes/_variables.scss.tmpl.ts | 2 +- public/sass/components/_panel_editor.scss | 8 ++++---- public/sass/pages/_dashboard.scss | 2 +- public/sass/pages/_explore.scss | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts index 0c6ff640fe4..23e63655f21 100644 --- a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts +++ b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts @@ -196,7 +196,7 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; $side-menu-width: 60px; // dashboard -$dashboard-padding: $space-md $space-md 0 $space-md; +$dashboard-padding: $space-md; $panel-padding: 0 $space-md $space-sm $space-md; // tabs diff --git a/public/sass/components/_panel_editor.scss b/public/sass/components/_panel_editor.scss index 6df1cc60f60..a50ab0d072d 100644 --- a/public/sass/components/_panel_editor.scss +++ b/public/sass/components/_panel_editor.scss @@ -9,14 +9,14 @@ &--edit { height: 40%; - margin: 0 $space-md; + margin: 0 $dashboard-padding; } &--view { flex: 1 1 0; height: 90%; - margin: 0 $space-md; - padding-top: $space-md; + margin: 0 $dashboard-padding; + padding-top: $dashboard-padding; } } @@ -80,7 +80,7 @@ } .submenu-controls { - padding: 0 $space-md $space-sm $space-md; + padding: 0 $dashboard-padding $space-sm $dashboard-padding; } .search-container { diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index 42a5988efb4..df3a34e1d06 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -1,5 +1,5 @@ .dashboard-container { - padding: $dashboard-padding; + padding: $dashboard-padding $dashboard-padding 0 $dashboard-padding; width: 100%; height: 100%; box-sizing: border-box; diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index 666c5e4327c..0b26417005b 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -31,7 +31,7 @@ flex-flow: row wrap; justify-content: flex-start; height: auto; - padding: 0 $space-md; + padding: 0 $dashboard-padding; border-bottom: 1px solid #0000; transition-duration: 0.35s; transition-timing-function: ease-in-out; @@ -91,7 +91,7 @@ } .explore-toolbar-content-item:first-child { - padding-left: $space-md; + padding-left: $dashboard-spacer; margin-right: auto; } @@ -142,7 +142,7 @@ @media only screen and (max-width: 544px) { .explore-toolbar-header-title { .navbar-page-btn { - margin-left: $space-md; + margin-left: $dashboard-padding; } } } From 45e361ef13d9006b60355f0cab19a6ef2fd8a636 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Thu, 21 Mar 2019 12:26:35 +0100 Subject: [PATCH 55/56] change that didn't come with in last commit --- public/sass/_variables.generated.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sass/_variables.generated.scss b/public/sass/_variables.generated.scss index cb0c8688ecc..fe9476f3b5f 100644 --- a/public/sass/_variables.generated.scss +++ b/public/sass/_variables.generated.scss @@ -199,7 +199,7 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; $side-menu-width: 60px; // dashboard -$dashboard-padding: $space-md $space-md 0 $space-md; +$dashboard-padding: $space-md; $panel-padding: 0 $space-md $space-sm $space-md; // tabs From eaaa1681e243abd337b0ffb5140538d89e04b2b3 Mon Sep 17 00:00:00 2001 From: ijin08 Date: Thu, 21 Mar 2019 12:29:13 +0100 Subject: [PATCH 56/56] another change that didn't come with earlier commit --- public/sass/pages/_explore.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index 0b26417005b..9784f8c89e4 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -91,7 +91,7 @@ } .explore-toolbar-content-item:first-child { - padding-left: $dashboard-spacer; + padding-left: $dashboard-padding; margin-right: auto; }