diff --git a/eslint-suppressions.json b/eslint-suppressions.json index 2fcb6da5ee3..ed74e615414 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -1830,11 +1830,6 @@ "count": 1 } }, - "public/app/features/dashboard-scene/inspect/InspectJsonTab.tsx": { - "no-restricted-syntax": { - "count": 1 - } - }, "public/app/features/dashboard-scene/pages/DashboardScenePage.tsx": { "@typescript-eslint/consistent-type-assertions": { "count": 2 diff --git a/pkg/registry/apis/provisioning/jobs/progress_test.go b/pkg/registry/apis/provisioning/jobs/progress_test.go index 611058d2c74..7e849491bbe 100644 --- a/pkg/registry/apis/provisioning/jobs/progress_test.go +++ b/pkg/registry/apis/provisioning/jobs/progress_test.go @@ -154,9 +154,12 @@ func TestJobProgressRecorderWarningStatus(t *testing.T) { // Verify the final status includes warnings require.NotNil(t, finalStatus.Warnings) assert.Len(t, finalStatus.Warnings, 3) - assert.Contains(t, finalStatus.Warnings[0], "deprecated API used") - assert.Contains(t, finalStatus.Warnings[1], "missing optional field") - assert.Contains(t, finalStatus.Warnings[2], "validation warning") + expectedWarnings := []string{ + "deprecated API used (file: dashboards/test.json, name: test-resource, action: updated)", + "missing optional field (file: dashboards/test2.json, name: test-resource-2, action: created)", + "validation warning (file: datasources/test.yaml, name: test-resource-3, action: created)", + } + assert.ElementsMatch(t, finalStatus.Warnings, expectedWarnings) // Verify the state is set to Warning assert.Equal(t, provisioning.JobStateWarning, finalStatus.State) diff --git a/public/app/features/dashboard-scene/edit-pane/DashboardOutline.tsx b/public/app/features/dashboard-scene/edit-pane/DashboardOutline.tsx index 39a10538f67..10bb180a4b1 100644 --- a/public/app/features/dashboard-scene/edit-pane/DashboardOutline.tsx +++ b/public/app/features/dashboard-scene/edit-pane/DashboardOutline.tsx @@ -51,11 +51,16 @@ function DashboardOutlineNode({ sceneObject, editPane, isEditing, depth, index } const noTitleText = t('dashboard.outline.tree-item.no-title', ''); - const children = editableElement.getOutlineChildren?.(isEditing) ?? []; const elementInfo = editableElement.getEditableElementInfo(); const instanceName = elementInfo.instanceName === '' ? noTitleText : elementInfo.instanceName; const outlineRename = useOutlineRename(editableElement, isEditing); const isContainer = editableElement.getOutlineChildren ? true : false; + const visibleChildren = useMemo(() => { + const children = editableElement.getOutlineChildren?.(isEditing) ?? []; + return isEditing + ? children + : children.filter((child) => !getEditableElementFor(child)?.getEditableElementInfo().isHidden); + }, [editableElement, isEditing]); const onNodeClicked = (e: React.MouseEvent) => { e.stopPropagation(); @@ -74,6 +79,10 @@ function DashboardOutlineNode({ sceneObject, editPane, isEditing, depth, index } setIsCollapsed(!isCollapsed); }; + if (elementInfo.isHidden && !isEditing) { + return null; + } + return ( // todo: add proper keyboard navigation // eslint-disable-next-line jsx-a11y/click-events-have-key-events @@ -130,8 +139,8 @@ function DashboardOutlineNode({ sceneObject, editPane, isEditing, depth, index } {isContainer && !isCollapsed && (