diff --git a/e2e/dashboards-suite/new-datasource-variable.spec.ts b/e2e/dashboards-suite/new-datasource-variable.spec.ts
index 5f62f6d42a1..17a46749c23 100644
--- a/e2e/dashboards-suite/new-datasource-variable.spec.ts
+++ b/e2e/dashboards-suite/new-datasource-variable.spec.ts
@@ -25,12 +25,14 @@ describe('Variables - Datasource', () => {
e2e.pages.Dashboard.Settings.Variables.Edit.DatasourceVariable.datasourceSelect().within(() => {
cy.get('input').type('Prometheus{enter}');
});
- e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption()
- .eq(0)
- .should('have.text', 'gdev-prometheus');
- e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption()
- .eq(1)
- .should('have.text', 'gdev-slow-prometheus');
+ e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should(
+ 'contain.text',
+ 'gdev-prometheus'
+ );
+ e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should(
+ 'contain.text',
+ 'gdev-slow-prometheus'
+ );
// Navigate back to the homepage and change the selected variable value
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
diff --git a/public/app/core/components/AccessControl/Permissions.tsx b/public/app/core/components/AccessControl/Permissions.tsx
index de6a240b5d0..56180466695 100644
--- a/public/app/core/components/AccessControl/Permissions.tsx
+++ b/public/app/core/components/AccessControl/Permissions.tsx
@@ -158,41 +158,20 @@ export const Permissions = ({
return (
- {canSetPermissions && (
+ {canSetPermissions && resource === 'folders' && (
<>
- {resource === 'folders' && (
- <>
-
- This will change permissions for this folder and all its descendants. In total, this will affect:
-
-
-
- >
- )}
-
-
- setIsAdding(false)}
- />
-
+
+ This will change permissions for this folder and all its descendants. In total, this will affect:
+
+
+
>
)}
{items.length === 0 && (
@@ -227,7 +206,6 @@ export const Permissions = ({
onRemove={onRemove}
canSet={canSetPermissions}
/>
-
+ {canSetPermissions && (
+ <>
+
+
+ setIsAdding(false)}
+ />
+
+ >
+ )}
);
};
diff --git a/public/app/features/dashboard-scene/settings/DashboardLinksEditView.test.tsx b/public/app/features/dashboard-scene/settings/DashboardLinksEditView.test.tsx
index 0c68be0e6ba..0143dfd43eb 100644
--- a/public/app/features/dashboard-scene/settings/DashboardLinksEditView.test.tsx
+++ b/public/app/features/dashboard-scene/settings/DashboardLinksEditView.test.tsx
@@ -215,7 +215,7 @@ describe('DashboardLinksEditView', () => {
const { getByText } = render();
expect(getByText('Edit link')).toBeInTheDocument();
- expect(getByText('Apply')).toBeInTheDocument();
+ expect(getByText('Back to list')).toBeInTheDocument();
});
});
});
diff --git a/public/app/features/dashboard-scene/settings/links/DashboardLinkForm.tsx b/public/app/features/dashboard-scene/settings/links/DashboardLinkForm.tsx
index 73544270608..eb4cd33700e 100644
--- a/public/app/features/dashboard-scene/settings/links/DashboardLinkForm.tsx
+++ b/public/app/features/dashboard-scene/settings/links/DashboardLinkForm.tsx
@@ -101,7 +101,9 @@ export function DashboardLinkForm({ link, onUpdate, onGoBack }: DashboardLinkFor
-
+
);
}
diff --git a/public/app/features/dashboard-scene/settings/links/DashboardLinkList.tsx b/public/app/features/dashboard-scene/settings/links/DashboardLinkList.tsx
index a2c66e4a3fc..9e9f76d3d15 100644
--- a/public/app/features/dashboard-scene/settings/links/DashboardLinkList.tsx
+++ b/public/app/features/dashboard-scene/settings/links/DashboardLinkList.tsx
@@ -1,12 +1,11 @@
import { css } from '@emotion/css';
import React from 'react';
+import { GrafanaTheme2 } from '@grafana/data';
import { DashboardLink } from '@grafana/schema';
-import { DeleteButton, HorizontalGroup, Icon, IconButton, TagList, useStyles2 } from '@grafana/ui';
+import { Button, DeleteButton, HorizontalGroup, Icon, IconButton, TagList, useStyles2 } from '@grafana/ui';
import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA';
-import { ListNewButton } from '../../../dashboard/components/DashboardSettings/ListNewButton';
-
interface DashboardLinkListProps {
links: DashboardLink[];
onNew: () => void;
@@ -92,12 +91,14 @@ export function DashboardLinkList({
))}
- New link
+
>
);
}
-const getStyles = () => ({
+const getStyles = (theme: GrafanaTheme2) => ({
titleWrapper: css({
width: '20vw',
textOverflow: 'ellipsis',
@@ -108,4 +109,7 @@ const getStyles = () => ({
textOverflow: 'ellipsis',
overflow: 'hidden',
}),
+ newLinkButton: css({
+ marginTop: theme.spacing(3),
+ }),
});
diff --git a/public/app/features/dashboard-scene/settings/variables/VariableEditorList.tsx b/public/app/features/dashboard-scene/settings/variables/VariableEditorList.tsx
index 27d16634ae8..b844531febb 100644
--- a/public/app/features/dashboard-scene/settings/variables/VariableEditorList.tsx
+++ b/public/app/features/dashboard-scene/settings/variables/VariableEditorList.tsx
@@ -42,7 +42,7 @@ export function VariableEditorList({
{variables.length === 0 && }
{variables.length > 0 && (
-
+
{
expect(screen.queryByText('Type')).toBeInTheDocument();
expect(screen.queryByText('Title')).toBeInTheDocument();
expect(screen.queryByText('With tags')).toBeInTheDocument();
- expect(screen.queryByText('Apply')).toBeInTheDocument();
+ expect(screen.queryByText('Back to list')).toBeInTheDocument();
expect(screen.queryByText('Url')).not.toBeInTheDocument();
expect(screen.queryByText('Tooltip')).not.toBeInTheDocument();
@@ -194,7 +194,7 @@ describe('LinksSettings', () => {
await userEvent.clear(screen.getByRole('textbox', { name: /title/i }));
await userEvent.type(screen.getByRole('textbox', { name: /title/i }), 'New Dashboard Link');
- await userEvent.click(screen.getByRole('button', { name: /Apply/i }));
+ await userEvent.click(screen.getByRole('button', { name: /Back to list/i }));
expect(getTableBodyRows().length).toBe(4);
expect(within(getTableBody()).queryByText('New Dashboard Link')).toBeInTheDocument();
@@ -203,7 +203,7 @@ describe('LinksSettings', () => {
await userEvent.clear(screen.getByRole('textbox', { name: /title/i }));
await userEvent.type(screen.getByRole('textbox', { name: /title/i }), 'The first dashboard link');
- await userEvent.click(screen.getByRole('button', { name: /Apply/i }));
+ await userEvent.click(screen.getByRole('button', { name: /Back to list/i }));
expect(within(getTableBody()).queryByText(originalLinks[0].title)).not.toBeInTheDocument();
expect(within(getTableBody()).queryByText('The first dashboard link')).toBeInTheDocument();
diff --git a/public/app/features/dashboard/components/DashboardSettings/ListNewButton.tsx b/public/app/features/dashboard/components/DashboardSettings/ListNewButton.tsx
index 24ad47e2a7f..eafdcb04e2e 100644
--- a/public/app/features/dashboard/components/DashboardSettings/ListNewButton.tsx
+++ b/public/app/features/dashboard/components/DashboardSettings/ListNewButton.tsx
@@ -10,7 +10,7 @@ export const ListNewButton = ({ children, ...restProps }: Props) => {
const styles = useStyles2(getStyles);
return (
-