From 1cb3cc4ad1dd1520f9586af9c6cce4cb4af66cd0 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 22 Jan 2024 13:02:47 +0000 Subject: [PATCH] Navigation: handle cloud id when modifying connections url (#80965) cloud id is different than onprem... who knew? --- public/app/features/commandPalette/actions/staticActions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/app/features/commandPalette/actions/staticActions.ts b/public/app/features/commandPalette/actions/staticActions.ts index 3f31f872562..b9bc77118b8 100644 --- a/public/app/features/commandPalette/actions/staticActions.ts +++ b/public/app/features/commandPalette/actions/staticActions.ts @@ -30,7 +30,11 @@ function navTreeToActions(navTree: NavModelItem[], parents: NavModelItem[] = []) } let urlOrCallback: CommandPaletteAction['url'] = url; - if (url && navItem.id === 'connections-add-new-connection') { + if ( + url && + (navItem.id === 'connections-add-new-connection' || + navItem.id === 'standalone-plugin-page-/connections/add-new-connection') + ) { urlOrCallback = (searchQuery: string) => { const matchingKeyword = keywords?.find((keyword) => keyword.toLowerCase().includes(searchQuery.toLowerCase())); return matchingKeyword ? `${url}?search=${matchingKeyword}` : url;