mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Merge pull request #59548 from amosbird/compatible-dashboard
Compress state of dashboard [2]
This commit is contained in:
commit
32d11cdc2d
@ -1450,7 +1450,13 @@ window.onpopstate = function(event) {
|
||||
if (window.location.hash) {
|
||||
try {
|
||||
let search_query_, customized_;
|
||||
({host, user, queries, params, search_query_, customized_} = JSON.parse(LZString.decompressFromEncodedURIComponent(window.location.hash.substring(1))));
|
||||
try {
|
||||
({host, user, queries, params, search_query_, customized_} = JSON.parse(LZString.decompressFromEncodedURIComponent(window.location.hash.substring(1))));
|
||||
} catch {
|
||||
// For compatibility with uncompressed state
|
||||
({host, user, queries, params, search_query_, customized_} = JSON.parse(atob(window.location.hash.substring(1))));
|
||||
}
|
||||
|
||||
// For compatibility with old URLs' hashes
|
||||
search_query = search_query_ !== undefined ? search_query_ : search_query;
|
||||
customized = customized_ !== undefined ? customized_ : true;
|
||||
|
Loading…
Reference in New Issue
Block a user