Skip to content

Commit

Permalink
fix: query cancellation issue (#6319)
Browse files Browse the repository at this point in the history
* fix: query cancellation issue

* type fix
  • Loading branch information
briangregoryholmes authored and ericpgreen2 committed Dec 20, 2024
1 parent 0a3c1d6 commit 73141ba
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions web-common/src/features/dashboards/workspace/Dashboard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
},
dashboardStore,
validSpecStore,
} = StateManagers;
const timeControlsStore = useTimeControlStore(StateManagers);
Expand All @@ -45,6 +44,8 @@
let exploreContainerWidth: number;
$: ({ instanceId } = $runtime);
$: ({ whereFilter, dimensionThresholdFilters } = $dashboardStore);
$: extraLeftPadding = !$navigationOpen;
Expand All @@ -55,37 +56,41 @@
$: selectedDimension =
selectedDimensionName && $getDimensionByName(selectedDimensionName);
$: expandedMeasureName = $exploreState?.tdd?.expandedMeasureName;
$: metricTimeSeries = useModelHasTimeSeries(
$runtime.instanceId,
metricsViewName,
);
$: metricTimeSeries = useModelHasTimeSeries(instanceId, metricsViewName);
$: hasTimeSeries = $metricTimeSeries.data;
$: isRillDeveloper = $readOnly === false;
// Check if the mock user (if selected) has access to the explore
$: explore = useExploreValidSpec($runtime.instanceId, exploreName);
$: explore = useExploreValidSpec(instanceId, exploreName);
$: mockUserHasNoAccess =
$selectedMockUserStore && $explore.error?.response?.status === 404;
$: hidePivot = isEmbedded && $explore.data?.explore?.embedsHidePivot;
$: timeControls = $timeControlsStore;
$: ({
timeStart: start,
timeEnd: end,
showTimeComparison,
comparisonTimeStart,
comparisonTimeEnd,
ready: timeControlsReady = false,
} = $timeControlsStore);
$: timeRange = {
start: timeControls.timeStart,
end: timeControls.timeEnd,
start,
end,
};
$: comparisonTimeRange = timeControls.showTimeComparison
$: comparisonTimeRange = showTimeComparison
? {
start: timeControls.comparisonTimeStart,
end: timeControls.comparisonTimeEnd,
start: comparisonTimeStart,
end: comparisonTimeEnd,
}
: undefined;
$: metricsView = $validSpecStore.data?.metricsView ?? {};
$: metricsView = $explore.data?.metricsView ?? {};
let metricsWidth = DEFAULT_TIMESERIES_WIDTH;
let resizing = false;
Expand Down Expand Up @@ -181,7 +186,7 @@
{timeRange}
{comparisonTimeRange}
activeMeasureName={$activeMeasureName}
timeControlsReady={!!timeControls.ready}
{timeControlsReady}
{metricsView}
visibleMeasureNames={$visibleMeasures.map(
({ name }) => name ?? "",
Expand All @@ -197,7 +202,7 @@
{timeRange}
{comparisonTimeRange}
{metricsView}
timeControlsReady={!!timeControls.ready}
{timeControlsReady}
/>
{/if}
</div>
Expand Down

0 comments on commit 73141ba

Please sign in to comment.