mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeries: Make timeseries the default panel and remove beta state (#33639)
* TimeSeries: Make timeseries the default panel and remove beta state * rename old graph * Updated panel descriptions, fixed e2e tests * Updated text * Fixed e2e * Fixing e2e tests
This commit is contained in:
parent
f121e3a281
commit
dbcfebac56
@ -20,14 +20,12 @@ export const smokeTestScenario = {
|
||||
});
|
||||
|
||||
// Make sure the graph renders via checking legend
|
||||
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('be.visible');
|
||||
e2e.components.VizLegend.seriesName('A-series').should('be.visible');
|
||||
|
||||
// Expand options section
|
||||
e2e.components.Panels.Visualization.Graph.VisualizationTab.legendSection().click();
|
||||
e2e.components.PanelEditor.applyButton();
|
||||
|
||||
// Disable legend
|
||||
e2e.components.Panels.Visualization.Graph.Legend.showLegendSwitch().click();
|
||||
|
||||
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('not.exist');
|
||||
// Make sure panel is & visualization is added to dashboard
|
||||
e2e.components.VizLegend.seriesName('A-series').should('be.visible');
|
||||
},
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { e2e } from '@grafana/e2e';
|
||||
|
||||
const PANEL_UNDER_TEST = 'Random walk series';
|
||||
const PANEL_UNDER_TEST = 'Lines 500 data points';
|
||||
|
||||
e2e.scenario({
|
||||
describeName: 'Panel edit tests',
|
||||
@ -9,7 +9,7 @@ e2e.scenario({
|
||||
addScenarioDashBoard: false,
|
||||
skipScenario: false,
|
||||
scenario: () => {
|
||||
e2e.flows.openDashboard({ uid: '5SdHCadmz' });
|
||||
e2e.flows.openDashboard({ uid: 'TkZXxlNG3' });
|
||||
|
||||
e2e.flows.openPanelMenuItem(e2e.flows.PanelMenuItems.Edit, PANEL_UNDER_TEST);
|
||||
|
||||
@ -64,12 +64,10 @@ e2e.scenario({
|
||||
e2e.components.PanelEditor.toggleVizOptions().should('be.visible').click();
|
||||
e2e.components.PanelEditor.OptionsPane.content().should('be.visible');
|
||||
|
||||
// Check that Graph is chosen
|
||||
// Check that Time series is chosen
|
||||
e2e.components.PanelEditor.toggleVizPicker().click();
|
||||
e2e.components.PluginVisualization.item('Graph').should('be.visible');
|
||||
e2e.components.PluginVisualization.current().within((div: JQuery<HTMLDivElement>) => {
|
||||
expect(div.text()).equals('Graph');
|
||||
});
|
||||
e2e.components.PluginVisualization.item('Time series').should('be.visible');
|
||||
e2e.components.PluginVisualization.current().should((e) => expect(e).to.contain('Time series'));
|
||||
|
||||
// Change to Text panel
|
||||
e2e.components.PluginVisualization.item('Text').scrollIntoView().should('be.visible').click();
|
||||
|
@ -49,6 +49,9 @@ export const Components = {
|
||||
},
|
||||
},
|
||||
},
|
||||
VizLegend: {
|
||||
seriesName: (name: string) => `VizLegend series ${name}`,
|
||||
},
|
||||
Drawer: {
|
||||
General: {
|
||||
title: (title: string) => `Drawer title ${title}`,
|
||||
@ -71,6 +74,7 @@ export const Components = {
|
||||
DataPane: {
|
||||
content: 'Panel editor data pane content',
|
||||
},
|
||||
applyButton: 'panel editor apply',
|
||||
toggleVizPicker: 'toggle-viz-picker',
|
||||
toggleVizOptions: 'toggle-viz-options',
|
||||
},
|
||||
|
@ -5,6 +5,7 @@ import { VizLegendItem } from './types';
|
||||
import { VizLegendStatsList } from './VizLegendStatsList';
|
||||
import { useStyles } from '../../themes';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
export interface Props {
|
||||
item: VizLegendItem;
|
||||
@ -53,7 +54,7 @@ export const VizLegendListItem: React.FunctionComponent<Props> = ({
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.itemWrapper}>
|
||||
<div className={styles.itemWrapper} aria-label={selectors.components.VizLegend.seriesName(item.label)}>
|
||||
<VizLegendSeriesIcon seriesName={item.label} color={item.color} />
|
||||
<div
|
||||
onMouseEnter={onMouseEnter}
|
||||
|
@ -254,34 +254,36 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
func getPanelSort(id string) int {
|
||||
sort := 100
|
||||
switch id {
|
||||
case "graph":
|
||||
sort = 1
|
||||
case "timeseries":
|
||||
sort = 2
|
||||
sort = 1
|
||||
case "barchart":
|
||||
sort = 3
|
||||
sort = 2
|
||||
case "stat":
|
||||
sort = 4
|
||||
sort = 3
|
||||
case "gauge":
|
||||
sort = 5
|
||||
sort = 4
|
||||
case "bargauge":
|
||||
sort = 6
|
||||
sort = 5
|
||||
case "table":
|
||||
sort = 7
|
||||
sort = 6
|
||||
case "singlestat":
|
||||
sort = 8
|
||||
sort = 7
|
||||
case "piechart":
|
||||
sort = 8
|
||||
case "timeline":
|
||||
sort = 9
|
||||
case "heatmap":
|
||||
sort = 10
|
||||
case "text":
|
||||
case "graph":
|
||||
sort = 11
|
||||
case "alertlist":
|
||||
case "text":
|
||||
sort = 12
|
||||
case "dashlist":
|
||||
case "alertlist":
|
||||
sort = 13
|
||||
case "news":
|
||||
case "dashlist":
|
||||
sort = 14
|
||||
case "news":
|
||||
sort = 15
|
||||
}
|
||||
return sort
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ export const AddPanelWidgetUnconnected: React.FC<Props> = ({ panel, dashboard })
|
||||
const { gridPos } = panel;
|
||||
|
||||
const newPanel: Partial<PanelModel> = {
|
||||
type: 'graph',
|
||||
type: 'timeseries',
|
||||
title: 'Panel Title',
|
||||
gridPos: { x: gridPos.x, y: gridPos.y, w: gridPos.w, h: gridPos.h },
|
||||
};
|
||||
|
@ -330,7 +330,13 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
|
||||
Save
|
||||
</ToolbarButton>
|
||||
),
|
||||
<ToolbarButton onClick={this.onBack} variant="primary" title="Apply changes and go back to dashboard" key="apply">
|
||||
<ToolbarButton
|
||||
onClick={this.onBack}
|
||||
variant="primary"
|
||||
title="Apply changes and go back to dashboard"
|
||||
key="apply"
|
||||
aria-label={selectors.components.PanelEditor.applyButton}
|
||||
>
|
||||
Apply
|
||||
</ToolbarButton>,
|
||||
];
|
||||
|
@ -14,6 +14,7 @@ export const VizTypePickerPlugin: React.FC<Props> = ({ isCurrent, plugin, onClic
|
||||
<PanelTypeCard
|
||||
title={plugin.name}
|
||||
plugin={plugin}
|
||||
description={plugin.info.description}
|
||||
onClick={onClick}
|
||||
isCurrent={isCurrent}
|
||||
disabled={disabled}
|
||||
|
@ -2,10 +2,10 @@
|
||||
"type": "panel",
|
||||
"name": "Bar chart",
|
||||
"id": "barchart",
|
||||
|
||||
"state": "alpha",
|
||||
"state": "beta",
|
||||
|
||||
"info": {
|
||||
"description": "Categorical charts with group support",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -4,6 +4,7 @@
|
||||
"id": "bargauge",
|
||||
|
||||
"info": {
|
||||
"description": "Horizontal and vertical gauges",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -4,6 +4,7 @@
|
||||
"id": "gauge",
|
||||
|
||||
"info": {
|
||||
"description": "Standard gauge visualization",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"type": "panel",
|
||||
"name": "Graph",
|
||||
"name": "Graph (old)",
|
||||
"id": "graph",
|
||||
|
||||
"info": {
|
||||
"description": "Graph Panel for Grafana",
|
||||
"description": "The old default graph panel",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"id": "heatmap",
|
||||
|
||||
"info": {
|
||||
"description": "Heatmap Panel for Grafana",
|
||||
"description": "Like a histogram over time",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -8,6 +8,7 @@
|
||||
"state": "beta",
|
||||
|
||||
"info": {
|
||||
"description": "RSS feed reader",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -5,6 +5,7 @@
|
||||
"state": "beta",
|
||||
|
||||
"info": {
|
||||
"description": "The new core pie chart visualization",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"id": "stat",
|
||||
|
||||
"info": {
|
||||
"description": "Singlestat Panel for Grafana",
|
||||
"description": "Big stat values & sparklines",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -9,7 +9,7 @@
|
||||
},
|
||||
|
||||
"info": {
|
||||
"description": "Table Panel for Grafana",
|
||||
"description": "Supports many column styles",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -6,6 +6,7 @@
|
||||
"skipDataQuery": true,
|
||||
|
||||
"info": {
|
||||
"description": "Supports markdown and html content",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -6,6 +6,7 @@
|
||||
"state": "alpha",
|
||||
|
||||
"info": {
|
||||
"description": "State over time",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
@ -2,9 +2,9 @@
|
||||
"type": "panel",
|
||||
"name": "Time series",
|
||||
"id": "timeseries",
|
||||
"state": "beta",
|
||||
|
||||
"info": {
|
||||
"description": "Time based line, area and bar charts",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
|
Loading…
Reference in New Issue
Block a user