Dashboards: Do not show alert rules button for new dashboads

This commit is contained in:
Torkel Ödegaard
2025-12-18 16:19:33 +01:00
parent f1b19dd9fa
commit 5012b4079e
2 changed files with 1 additions and 7 deletions
@@ -22,7 +22,7 @@ export function initAlerting() {
component: ({ dashboard }) =>
alertingEnabled ? (
<Suspense fallback={null} key="alert-rules-button">
{dashboard && <AlertRulesToolbarButton dashboardUid={dashboard.uid} />}
{dashboard && dashboard.uid && <AlertRulesToolbarButton dashboardUid={dashboard.uid} />}
</Suspense>
) : null,
index: -2,
@@ -76,12 +76,6 @@ export function DashboardEditPaneRenderer({ editPane, dashboard, isDocked }: Pro
data-testid={selectors.pages.Dashboard.Sidebar.optionsButton}
active={selectedObject === dashboard ? true : false}
/>
{/* <Sidebar.Button
tooltip={t('dashboard.sidebar.edit-schema.tooltip', 'Edit as code')}
title={t('dashboard.sidebar.edit-schema.title', 'Code')}
icon="brackets-curly"
onClick={() => dashboard.openV2SchemaEditor()}
/> */}
<Sidebar.Divider />
</>
)}