Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: query cancellation issue #6319

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading