diff --git a/public/app/features/alerting/unified/components/rules/GrafanaRules.tsx b/public/app/features/alerting/unified/components/rules/GrafanaRules.tsx index 54d9e176ed9..c8a8e4f0943 100644 --- a/public/app/features/alerting/unified/components/rules/GrafanaRules.tsx +++ b/public/app/features/alerting/unified/components/rules/GrafanaRules.tsx @@ -34,8 +34,8 @@ export const GrafanaRules: FC = ({ namespaces, expandAll }) => { const loading = prom.loading || ruler.loading; const hasResult = !!prom.result || !!ruler.result; - const wantsGroupedView = queryParams['view'] === 'grouped'; - const namespacesFormat = wantsGroupedView ? namespaces : flattenGrafanaManagedRules(namespaces); + const wantsListView = queryParams['view'] === 'list'; + const namespacesFormat = wantsListView ? flattenGrafanaManagedRules(namespaces) : namespaces; const groupsWithNamespaces = useCombinedGroupNamespace(namespacesFormat); @@ -58,7 +58,7 @@ export const GrafanaRules: FC = ({ namespaces, expandAll }) => { key={`${namespace.name}-${group.name}`} namespace={namespace} expandAll={expandAll} - viewMode={wantsGroupedView ? 'grouped' : 'list'} + viewMode={wantsListView ? 'list' : 'grouped'} /> ))} {hasResult && namespacesFormat?.length === 0 &&

No rules found.

} diff --git a/public/app/features/alerting/unified/components/rules/RulesFilter.tsx b/public/app/features/alerting/unified/components/rules/RulesFilter.tsx index ba408a51ea8..1ec596341db 100644 --- a/public/app/features/alerting/unified/components/rules/RulesFilter.tsx +++ b/public/app/features/alerting/unified/components/rules/RulesFilter.tsx @@ -14,16 +14,16 @@ import { getFiltersFromUrlParams } from '../../utils/misc'; import { alertStateToReadable } from '../../utils/rules'; const ViewOptions: SelectableValue[] = [ - { - icon: 'list-ul', - label: 'List', - value: 'list', - }, { icon: 'folder', label: 'Grouped', value: 'grouped', }, + { + icon: 'list-ul', + label: 'List', + value: 'list', + }, { icon: 'heart-rate', label: 'State',