mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Notify when compact URL is used (#58684)
* Add explore compact url notices * Add error checking around data links urls * Fix tests * remove global flag, add test for warning in title * Move feature tracking to initialization, add better error messaging * Fix test * Add compact url tests, fix styling bug, remove warning tooltip * Fix broken check, move tests to util file
This commit is contained in:
@@ -219,7 +219,8 @@ export function parseUrlState(initial: string | undefined): ExploreUrlState {
|
||||
}
|
||||
|
||||
if (!Array.isArray(parsed)) {
|
||||
return parsed;
|
||||
const urlState = { ...parsed, isFromCompactUrl: false };
|
||||
return urlState;
|
||||
}
|
||||
|
||||
if (parsed.length <= ParseUrlStateIndex.SegmentsStart) {
|
||||
@@ -236,7 +237,7 @@ export function parseUrlState(initial: string | undefined): ExploreUrlState {
|
||||
const queries = parsedSegments.filter((segment) => !isSegment(segment, 'ui', 'mode', '__panelsState'));
|
||||
|
||||
const panelsState = parsedSegments.find((segment) => isSegment(segment, '__panelsState'))?.__panelsState;
|
||||
return { datasource, queries, range, panelsState };
|
||||
return { datasource, queries, range, panelsState, isFromCompactUrl: true };
|
||||
}
|
||||
|
||||
export function generateKey(index = 0): string {
|
||||
|
||||
Reference in New Issue
Block a user