mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Enable feature toggle emptyDashboardPage by default (#65464)
* enable FF emptyDashboardPage by default * fix smoke test for creating a panel after enabling FF emptyDashboardPage by default
This commit is contained in:
parent
821633c796
commit
bf0f4a6751
@ -30,6 +30,7 @@ Some stable features are enabled by default. You can disable a stable feature by
|
|||||||
| `topnav` | Enables new top navigation and page layouts | Yes |
|
| `topnav` | Enables new top navigation and page layouts | Yes |
|
||||||
| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes |
|
| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes |
|
||||||
| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | |
|
| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | |
|
||||||
|
| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels | Yes |
|
||||||
| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | |
|
| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | |
|
||||||
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
||||||
|
|
||||||
@ -82,7 +83,6 @@ Alpha features might be changed or removed without prior notice.
|
|||||||
| `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query |
|
| `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query |
|
||||||
| `elasticsearchBackendMigration` | Use Elasticsearch as backend data source |
|
| `elasticsearchBackendMigration` | Use Elasticsearch as backend data source |
|
||||||
| `datasourceOnboarding` | Enable data source onboarding page |
|
| `datasourceOnboarding` | Enable data source onboarding page |
|
||||||
| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels |
|
|
||||||
| `secureSocksDatasourceProxy` | Enable secure socks tunneling for supported core datasources |
|
| `secureSocksDatasourceProxy` | Enable secure socks tunneling for supported core datasources |
|
||||||
| `authnService` | Use new auth service to perform authentication |
|
| `authnService` | Use new auth service to perform authentication |
|
||||||
| `alertingBacktesting` | Rule backtesting API for alerting |
|
| `alertingBacktesting` | Rule backtesting API for alerting |
|
||||||
|
@ -10,8 +10,8 @@ export const smokeTestScenario = {
|
|||||||
scenario: () => {
|
scenario: () => {
|
||||||
// wait for time to be set to account for any layout shift
|
// wait for time to be set to account for any layout shift
|
||||||
e2e().contains('2020-01-01 00:00:00 to 2020-01-01 06:00:00').should('be.visible');
|
e2e().contains('2020-01-01 00:00:00 to 2020-01-01 06:00:00').should('be.visible');
|
||||||
e2e.components.PageToolbar.item('Add panel').click();
|
e2e.components.PageToolbar.itemButton('Add panel button').click();
|
||||||
e2e.pages.AddDashboard.addNewPanel().click();
|
e2e.components.PageToolbar.itemButton('Add new visualization menu item').click();
|
||||||
|
|
||||||
e2e.components.DataSource.TestData.QueryTab.scenarioSelectContainer()
|
e2e.components.DataSource.TestData.QueryTab.scenarioSelectContainer()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
|
@ -256,6 +256,7 @@ export const Components = {
|
|||||||
PageToolbar: {
|
PageToolbar: {
|
||||||
container: () => '.page-toolbar',
|
container: () => '.page-toolbar',
|
||||||
item: (tooltip: string) => `${tooltip}`,
|
item: (tooltip: string) => `${tooltip}`,
|
||||||
|
itemButton: (title: string) => `data-testid ${title}`,
|
||||||
},
|
},
|
||||||
QueryEditorToolbarItem: {
|
QueryEditorToolbarItem: {
|
||||||
button: (title: string) => `QueryEditor toolbar item button ${title}`,
|
button: (title: string) => `QueryEditor toolbar item button ${title}`,
|
||||||
|
@ -42,6 +42,7 @@ export const Pages = {
|
|||||||
},
|
},
|
||||||
AddDashboard: {
|
AddDashboard: {
|
||||||
url: '/dashboard/new',
|
url: '/dashboard/new',
|
||||||
|
itemButton: (title: string) => `data-testid ${title}`,
|
||||||
addNewPanel: 'Add new panel',
|
addNewPanel: 'Add new panel',
|
||||||
addNewRow: 'Add new row',
|
addNewRow: 'Add new row',
|
||||||
addNewPanelLibrary: 'Add new panel from panel library',
|
addNewPanelLibrary: 'Add new panel from panel library',
|
||||||
|
@ -324,8 +324,9 @@ var (
|
|||||||
{
|
{
|
||||||
Name: "emptyDashboardPage",
|
Name: "emptyDashboardPage",
|
||||||
Description: "Enable the redesigned user interface of a dashboard page that includes no panels",
|
Description: "Enable the redesigned user interface of a dashboard page that includes no panels",
|
||||||
State: FeatureStateAlpha,
|
State: FeatureStateStable,
|
||||||
FrontendOnly: true,
|
FrontendOnly: true,
|
||||||
|
Expression: "true", // enabled by default
|
||||||
Owner: grafanaDashboardsSquad,
|
Owner: grafanaDashboardsSquad,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@ nestedFolders,alpha,@grafana/backend-platform,true,false,false,false
|
|||||||
accessTokenExpirationCheck,stable,@grafana/grafana-authnz-team,false,false,false,false
|
accessTokenExpirationCheck,stable,@grafana/grafana-authnz-team,false,false,false,false
|
||||||
elasticsearchBackendMigration,alpha,@grafana/observability-logs,false,false,false,false
|
elasticsearchBackendMigration,alpha,@grafana/observability-logs,false,false,false,false
|
||||||
datasourceOnboarding,alpha,@grafana/dashboards-squad,false,false,false,false
|
datasourceOnboarding,alpha,@grafana/dashboards-squad,false,false,false,false
|
||||||
emptyDashboardPage,alpha,@grafana/dashboards-squad,false,false,false,true
|
emptyDashboardPage,stable,@grafana/dashboards-squad,false,false,false,true
|
||||||
secureSocksDatasourceProxy,alpha,@grafana/hosted-grafana-team,false,false,false,false
|
secureSocksDatasourceProxy,alpha,@grafana/hosted-grafana-team,false,false,false,false
|
||||||
authnService,alpha,@grafana/grafana-authnz-team,false,false,false,false
|
authnService,alpha,@grafana/grafana-authnz-team,false,false,false,false
|
||||||
disablePrometheusExemplarSampling,stable,@grafana/observability-metrics,false,false,false,false
|
disablePrometheusExemplarSampling,stable,@grafana/observability-metrics,false,false,false,false
|
||||||
|
|
@ -2,6 +2,7 @@ import { css, cx } from '@emotion/css';
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import { GrafanaTheme2 } from '@grafana/data';
|
import { GrafanaTheme2 } from '@grafana/data';
|
||||||
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
import { Dropdown, Button, useTheme2, Icon } from '@grafana/ui';
|
import { Dropdown, Button, useTheme2, Icon } from '@grafana/ui';
|
||||||
import { DashboardModel } from 'app/features/dashboard/state';
|
import { DashboardModel } from 'app/features/dashboard/state';
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ export const AddPanelButton = ({ dashboard }: Props) => {
|
|||||||
size="lg"
|
size="lg"
|
||||||
fill="outline"
|
fill="outline"
|
||||||
className={cx(styles.button, styles.buttonIcon, styles.buttonText)}
|
className={cx(styles.button, styles.buttonIcon, styles.buttonText)}
|
||||||
|
data-testid={selectors.components.PageToolbar.itemButton('Add panel button')}
|
||||||
>
|
>
|
||||||
Add
|
Add
|
||||||
<Icon name={isMenuOpen ? 'angle-up' : 'angle-down'} size="lg" />
|
<Icon name={isMenuOpen ? 'angle-up' : 'angle-down'} size="lg" />
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
|
|
||||||
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
import { locationService, reportInteraction } from '@grafana/runtime';
|
import { locationService, reportInteraction } from '@grafana/runtime';
|
||||||
import { Menu } from '@grafana/ui';
|
import { Menu } from '@grafana/ui';
|
||||||
import { DashboardModel } from 'app/features/dashboard/state';
|
import { DashboardModel } from 'app/features/dashboard/state';
|
||||||
@ -23,7 +24,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
|||||||
<Menu.Item
|
<Menu.Item
|
||||||
key="add-visualisation"
|
key="add-visualisation"
|
||||||
label="Visualization"
|
label="Visualization"
|
||||||
ariaLabel="Add new panel"
|
testId={selectors.components.PageToolbar.itemButton('Add new visualization menu item')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
reportInteraction('Create new panel');
|
reportInteraction('Create new panel');
|
||||||
const id = onCreateNewPanel(dashboard);
|
const id = onCreateNewPanel(dashboard);
|
||||||
@ -33,7 +34,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
|||||||
<Menu.Item
|
<Menu.Item
|
||||||
key="add-row"
|
key="add-row"
|
||||||
label="Row"
|
label="Row"
|
||||||
ariaLabel="Add new row"
|
testId={selectors.components.PageToolbar.itemButton('Add new row menu item')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
reportInteraction('Create new row');
|
reportInteraction('Create new row');
|
||||||
onCreateNewRow(dashboard);
|
onCreateNewRow(dashboard);
|
||||||
@ -42,7 +43,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
|||||||
<Menu.Item
|
<Menu.Item
|
||||||
key="add-panel-lib"
|
key="add-panel-lib"
|
||||||
label="Import from library"
|
label="Import from library"
|
||||||
ariaLabel="Add new panel from panel library"
|
testId={selectors.components.PageToolbar.itemButton('Add new panel from panel library menu item')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
reportInteraction('Add a panel from the panel library');
|
reportInteraction('Add a panel from the panel library');
|
||||||
onAddLibraryPanel(dashboard);
|
onAddLibraryPanel(dashboard);
|
||||||
@ -51,7 +52,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
|||||||
<Menu.Item
|
<Menu.Item
|
||||||
key="add-panel-clipboard"
|
key="add-panel-clipboard"
|
||||||
label="Paste panel"
|
label="Paste panel"
|
||||||
ariaLabel="Add new panel from clipboard"
|
testId={selectors.components.PageToolbar.itemButton('Add new panel from clipboard menu item')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
reportInteraction('Paste panel from clipboard');
|
reportInteraction('Paste panel from clipboard');
|
||||||
onPasteCopiedPanel(dashboard, copiedPanelPlugin);
|
onPasteCopiedPanel(dashboard, copiedPanelPlugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user