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:
Polina Boneva
2023-04-03 14:04:54 +03:00
committed by GitHub
parent 821633c796
commit bf0f4a6751
8 changed files with 15 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import { css, cx } from '@emotion/css';
import React, { useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { Dropdown, Button, useTheme2, Icon } from '@grafana/ui';
import { DashboardModel } from 'app/features/dashboard/state';
@@ -27,6 +28,7 @@ export const AddPanelButton = ({ dashboard }: Props) => {
size="lg"
fill="outline"
className={cx(styles.button, styles.buttonIcon, styles.buttonText)}
data-testid={selectors.components.PageToolbar.itemButton('Add panel button')}
>
Add
<Icon name={isMenuOpen ? 'angle-up' : 'angle-down'} size="lg" />

View File

@@ -1,5 +1,6 @@
import React, { useMemo } from 'react';
import { selectors } from '@grafana/e2e-selectors';
import { locationService, reportInteraction } from '@grafana/runtime';
import { Menu } from '@grafana/ui';
import { DashboardModel } from 'app/features/dashboard/state';
@@ -23,7 +24,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
<Menu.Item
key="add-visualisation"
label="Visualization"
ariaLabel="Add new panel"
testId={selectors.components.PageToolbar.itemButton('Add new visualization menu item')}
onClick={() => {
reportInteraction('Create new panel');
const id = onCreateNewPanel(dashboard);
@@ -33,7 +34,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
<Menu.Item
key="add-row"
label="Row"
ariaLabel="Add new row"
testId={selectors.components.PageToolbar.itemButton('Add new row menu item')}
onClick={() => {
reportInteraction('Create new row');
onCreateNewRow(dashboard);
@@ -42,7 +43,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
<Menu.Item
key="add-panel-lib"
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={() => {
reportInteraction('Add a panel from the panel library');
onAddLibraryPanel(dashboard);
@@ -51,7 +52,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
<Menu.Item
key="add-panel-clipboard"
label="Paste panel"
ariaLabel="Add new panel from clipboard"
testId={selectors.components.PageToolbar.itemButton('Add new panel from clipboard menu item')}
onClick={() => {
reportInteraction('Paste panel from clipboard');
onPasteCopiedPanel(dashboard, copiedPanelPlugin);