diff --git a/web-common/src/components/forms/Select.svelte b/web-common/src/components/forms/Select.svelte
index ded81b33248..a5c870c7915 100644
--- a/web-common/src/components/forms/Select.svelte
+++ b/web-common/src/components/forms/Select.svelte
@@ -12,7 +12,13 @@
export let id: string;
export let label: string = "";
export let lockTooltip: string = "";
- export let options: { value: string; label: string; type?: string }[];
+ export let options: {
+ value: string;
+ label: string;
+ type?: string;
+ disabled?: boolean;
+ tooltip?: string;
+ }[];
export let placeholder: string = "";
export let optional: boolean = false;
export let tooltip: string = "";
@@ -101,12 +107,31 @@
{/if}
- {#each filteredOptions as { type, value, label } (value)}
-
- {#if type}
-
+ {#each filteredOptions as { type, value, label, disabled, tooltip } (value)}
+
+ {#if tooltip}
+
+
+ {#if type}
+
+ {/if}
+ {label ?? value}
+
+
+ {tooltip}
+
+
+ {:else}
+ {#if type}
+
+ {/if}
+ {label ?? value}
{/if}
- {label ?? value}
{:else}
No results found
diff --git a/web-common/src/features/dashboards/url-state/convertPresetToExploreState.ts b/web-common/src/features/dashboards/url-state/convertPresetToExploreState.ts
index d77defc7137..2738129846a 100644
--- a/web-common/src/features/dashboards/url-state/convertPresetToExploreState.ts
+++ b/web-common/src/features/dashboards/url-state/convertPresetToExploreState.ts
@@ -151,17 +151,27 @@ function fromTimeRangesParams(
preset.compareTimeRange,
);
partialExploreState.showTimeComparison = true;
- // unset compare dimension
- partialExploreState.selectedComparisonDimension = "";
+ if (
+ preset.comparisonMode ===
+ V1ExploreComparisonMode.EXPLORE_COMPARISON_MODE_TIME
+ ) {
+ // unset compare dimension
+ partialExploreState.selectedComparisonDimension = "";
+ }
}
if (preset.comparisonDimension) {
if (dimensions.has(preset.comparisonDimension)) {
partialExploreState.selectedComparisonDimension =
preset.comparisonDimension;
- // unset compare time ranges
- partialExploreState.selectedComparisonTimeRange = undefined;
- partialExploreState.showTimeComparison = false;
+ if (
+ preset.comparisonMode ===
+ V1ExploreComparisonMode.EXPLORE_COMPARISON_MODE_DIMENSION
+ ) {
+ // unset compare time ranges
+ partialExploreState.selectedComparisonTimeRange = undefined;
+ partialExploreState.showTimeComparison = false;
+ }
} else {
errors.push(
getSingleFieldError("compare dimension", preset.comparisonDimension),