Skip to content

Commit

Permalink
Remove artificial time series chart delay (#3696)
Browse files Browse the repository at this point in the history
* update timeseries-data-store to return data as long as the primary or primaryTotal data is available (rather than both)

* assign totals query a higher priority
  • Loading branch information
briangregoryholmes authored and mindspank committed Dec 18, 2023
1 parent cafcc99 commit 96376bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,6 @@ export function createTimeSeriesDataStore(ctx: StateManagers) {
]) => {
let timeSeriesData = primary?.data?.data;

if (!primary?.data || !primaryTotal?.data || !unfilteredTotal?.data) {
return {
isFetching:
metricsView.isFetching ||
primary?.isFetching ||
primaryTotal?.isFetching ||
unfilteredTotal?.isFetching,
};
}

if (!primary.isFetching && interval) {
timeSeriesData = prepareTimeSeries(
primary?.data?.data,
Expand All @@ -178,7 +168,7 @@ export function createTimeSeriesDataStore(ctx: StateManagers) {
);
}
return {
isFetching: primaryTotal?.isFetching || metricsView?.isFetching,
isFetching: !primary?.data && !primaryTotal?.data,
isError: false, // FIXME Handle errors
timeSeriesData,
total: primaryTotal?.data?.data?.[0],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const QueryPriorities = {
topk: 10,
"rug-histogram": 10,
"descriptive-statistics": 10,
totals: 30,
};

export function getPriority(type: string): number {
Expand Down

0 comments on commit 96376bf

Please sign in to comment.