(null);
const [queryParams, updateQueryParams] = useQueryParams();
@@ -66,6 +68,9 @@ export const OptionsPaneCategory = React.memo(
}, [forceOpen, isExpanded, isOpenFromUrl]);
const onToggle = useCallback(() => {
+ if (!isOpenable) {
+ return;
+ }
manualClickTime.current = Date.now();
updateQueryParams(
{
@@ -75,7 +80,7 @@ export const OptionsPaneCategory = React.memo(
);
setSavedState({ isExpanded: !isExpanded });
setIsExpanded(!isExpanded);
- }, [setSavedState, setIsExpanded, updateQueryParams, isExpanded, id]);
+ }, [isOpenable, updateQueryParams, isExpanded, id, setSavedState]);
if (!renderTitle) {
renderTitle = function defaultTitle(isExpanded: boolean) {
@@ -101,6 +106,7 @@ export const OptionsPaneCategory = React.memo(
);
const headerStyles = cx(styles.header, {
+ [styles.headerHover]: isOpenable,
[styles.headerExpanded]: isExpanded,
[styles.headerNested]: isNested,
});
@@ -123,17 +129,19 @@ export const OptionsPaneCategory = React.memo(
-
+ {isOpenable ? (
+
+ ) : null}
{isExpanded && (
@@ -161,15 +169,19 @@ const getStyles = (theme: GrafanaTheme2) => ({
fontSize: '1rem',
fontWeight: theme.typography.fontWeightMedium,
margin: 0,
+ height: theme.spacing(4),
+ display: 'flex',
+ alignItems: 'center',
}),
header: css({
display: 'flex',
- cursor: 'pointer',
alignItems: 'center',
padding: theme.spacing(0.5, 1.5),
color: theme.colors.text.primary,
fontWeight: theme.typography.fontWeightMedium,
-
+ }),
+ headerHover: css({
+ cursor: 'pointer',
'&:hover': {
background: theme.colors.emphasize(theme.colors.background.primary, 0.03),
},
diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx
index 9106be64a5d..bb1c76969d1 100644
--- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx
+++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx
@@ -16,6 +16,7 @@ export interface OptionsPaneCategoryDescriptorProps {
itemsCount?: number;
customRender?: () => React.ReactNode;
sandboxId?: string;
+ isOpenable?: boolean;
}
/**
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index 2447f89a826..3dd18f11efa 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -1078,11 +1078,6 @@
}
},
"open": "Open options pane",
- "panels": {
- "multi-select": {
- "selection-number": "No. of panels selected: {{length}}"
- }
- },
"row": {
"header": {
"hide": "Hide",
@@ -1171,6 +1166,16 @@
"rows": "Total number rows",
"table-title": "Stats"
},
+ "layout": {
+ "common": {
+ "copy": "Copy",
+ "copy-or-duplicate": "Copy or Duplicate",
+ "delete": "Delete",
+ "duplicate": "Duplicate",
+ "layout": "Layout",
+ "panels-title": "{{length}} Panels Selected"
+ }
+ },
"options": {
"description": "Description",
"title": "Dashboard options",
@@ -1325,7 +1330,9 @@
"viz-panel": {
"options": {
"description": "Description",
- "title": "Panel options",
+ "open-edit": "Open Panel Edit",
+ "plugin-type-image": "Image of plugin type",
+ "title": "Panel",
"title-option": "Title",
"transparent-background": "Transparent background"
}
diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json
index 9bd26c9e45a..4d2e90d0c70 100644
--- a/public/locales/pseudo-LOCALE/grafana.json
+++ b/public/locales/pseudo-LOCALE/grafana.json
@@ -1078,11 +1078,6 @@
}
},
"open": "Øpęʼn őpŧįőʼnş päʼnę",
- "panels": {
- "multi-select": {
- "selection-number": "Ńő. őƒ päʼnęľş şęľęčŧęđ: {{length}}"
- }
- },
"row": {
"header": {
"hide": "Ħįđę",
@@ -1171,6 +1166,16 @@
"rows": "Ŧőŧäľ ʼnūmþęř řőŵş",
"table-title": "Ŝŧäŧş"
},
+ "layout": {
+ "common": {
+ "copy": "Cőpy",
+ "copy-or-duplicate": "Cőpy őř Đūpľįčäŧę",
+ "delete": "Đęľęŧę",
+ "duplicate": "Đūpľįčäŧę",
+ "layout": "Ŀäyőūŧ",
+ "panels-title": "{{length}} Päʼnęľş Ŝęľęčŧęđ"
+ }
+ },
"options": {
"description": "Đęşčřįpŧįőʼn",
"title": "Đäşĥþőäřđ őpŧįőʼnş",
@@ -1325,7 +1330,9 @@
"viz-panel": {
"options": {
"description": "Đęşčřįpŧįőʼn",
- "title": "Päʼnęľ őpŧįőʼnş",
+ "open-edit": "Øpęʼn Päʼnęľ Ēđįŧ",
+ "plugin-type-image": "Ĩmäģę őƒ pľūģįʼn ŧypę",
+ "title": "Päʼnęľ",
"title-option": "Ŧįŧľę",
"transparent-background": "Ŧřäʼnşpäřęʼnŧ þäčĸģřőūʼnđ"
}