mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-26 00:06:13 +08:00
(ui): Update UI to use the user selected duration
This commit is contained in:
@@ -27,11 +27,11 @@ export type MetricsActionTypes =
|
||||
| GetMetricsSuccessAction
|
||||
| GetMetricsErrorAction;
|
||||
|
||||
export function getMetricsAsync() {
|
||||
export function getMetricsAsync(endTime: number, duration: number) {
|
||||
return async (dispatch: Dispatch<MetricsActionTypes>) => {
|
||||
dispatch({ type: GET_METRICS_BEGIN });
|
||||
try {
|
||||
const response = await getMetrics();
|
||||
const response = await getMetrics(endTime, duration);
|
||||
dispatch({ type: GET_METRICS_SUCCESS, payload: response });
|
||||
} catch (error) {
|
||||
console.error(`getMetricsAsync: ${toErrorStringWithHttpStatus(error)}`);
|
||||
|
||||
Reference in New Issue
Block a user