Skip to content

Commit

Permalink
chore: use variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gtk-grafana committed Feb 27, 2025
1 parent 6c76e68 commit 6d2306d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/services/extensions/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
addAdHocFilterUserInputPrefix,
AdHocFieldValue,
AppliedPattern,
EMPTY_VARIABLE_VALUE,
LEVEL_VARIABLE_VALUE,
SERVICE_NAME,
stripAdHocFilterUserInputPrefix,
Expand Down Expand Up @@ -64,7 +65,7 @@ export const linkConfigs: LinkConfigs = [

function stringifyValues(value?: string): string {
if (!value) {
return '""';
return EMPTY_VARIABLE_VALUE;
}
return value;
}
Expand All @@ -76,7 +77,7 @@ export function replaceEscapeChars(value?: string): string | undefined {

export function stringifyAdHocValues(value?: string): string {
if (!value) {
return '""';
return EMPTY_VARIABLE_VALUE;
}

// All label values from explore are already escaped, so we mark them as custom values to prevent them from getting escaped again when rendering the LogQL
Expand All @@ -85,7 +86,7 @@ export function stringifyAdHocValues(value?: string): string {

export function stringifyAdHocValueLabels(value?: string): string {
if (!value) {
return '""';
return EMPTY_VARIABLE_VALUE;
}

return escapeURLDelimiters(replaceEscapeChars(value));
Expand Down

0 comments on commit 6d2306d

Please sign in to comment.