mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CommandPalette: Make dashboard nav work when under grafana is under sub path (#48744)
This commit is contained in:
parent
ec666f8785
commit
fca52a1c83
@ -1,5 +1,6 @@
|
||||
import { Action } from 'kbar';
|
||||
|
||||
import { locationUtil } from '@grafana/data';
|
||||
import { locationService, getBackendSrv } from '@grafana/runtime';
|
||||
|
||||
async function getDashboardNav(parentId: string): Promise<Action[]> {
|
||||
@ -12,7 +13,7 @@ async function getDashboardNav(parentId: string): Promise<Action[]> {
|
||||
id: `go/dashboard/${item.url}`,
|
||||
name: `Go to dashboard ${item.title}`,
|
||||
perform: () => {
|
||||
locationService.push(item.url);
|
||||
locationService.push(locationUtil.stripBaseFromUrl(item.url));
|
||||
},
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user