feat: add permalink to dashboard and explore (#19078)

* rename key_value to temporary_cache

* add migration

* create new key_value package

* add commands

* lots of new stuff

* fix schema reference

* remove redundant filter state from bootstrap data

* add missing license headers

* fix pylint

* fix dashboard permalink access

* use valid json mocks for filter state tests

* fix temporary cache tests

* add anchors to dashboard state

* lint

* fix util test

* fix url shortlink button tests

* remove legacy shortner

* remove unused imports

* fix js tests

* fix test

* add native filter state to anchor link

* add UPDATING.md section

* address comments

* address comments

* lint

* fix test

* add utils tests + other test stubs

* add key_value integration tests

* add filter box state to permalink state

* fully support persisting url parameters

* lint, add redirects and a few integration tests

* fix test + clean up trailing comma

* fix anchor bug

* change value to LargeBinary to support persisting binary values

* fix urlParams type and simplify urlencode

* lint

* add optional entry expiration

* fix incorrect chart id + add test
This commit is contained in:
Ville Brofeldt
2022-03-17 01:15:52 +02:00
committed by GitHub
parent d01fdad1d8
commit b7a0559aaf
94 changed files with 2943 additions and 439 deletions

View File

@@ -36,7 +36,7 @@ import {
setItem,
LocalStorageKeys,
} from 'src/utils/localStorageHelpers';
import { URL_PARAMS } from 'src/constants';
import { RESERVED_CHART_URL_PARAMS, URL_PARAMS } from 'src/constants';
import { getUrlParam } from 'src/utils/urlUtils';
import cx from 'classnames';
import * as chartActions from 'src/components/Chart/chartAction';
@@ -177,13 +177,7 @@ const updateHistory = debounce(
const urlParams = payload?.url_params || {};
Object.entries(urlParams).forEach(([key, value]) => {
if (
![
URL_PARAMS.sliceId.name,
URL_PARAMS.formDataKey.name,
URL_PARAMS.datasetId.name,
].includes(key)
) {
if (!RESERVED_CHART_URL_PARAMS.includes(key)) {
additionalParam[key] = value;
}
});