fix(dashboard): copy permalink to dashboard chart (#19772)

* fix(dashboard): copy permalink to dashboard chart

* lint

* address comments
This commit is contained in:
Ville Brofeldt
2022-04-19 22:34:41 +03:00
committed by GitHub
parent a6f46013d9
commit e061955fd0
4 changed files with 28 additions and 28 deletions

View File

@@ -154,11 +154,15 @@ export function getChartPermalink(
});
}
export function getDashboardPermalink(
dashboardId: string,
filterState: JsonObject,
hash?: string,
) {
export function getDashboardPermalink({
dashboardId,
filterState,
hash, // the anchor part of the link which corresponds to the tab/chart id
}: {
dashboardId: string | number;
filterState: JsonObject;
hash?: string;
}) {
// only encode filter box state if non-empty
return getPermalink(`/api/v1/dashboard/${dashboardId}/permalink`, {
filterState,