Skip to content

Commit 64a69e6

Browse files
committed
make options handling consistent
1 parent 1bacc8d commit 64a69e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Frontend/src/stores/MessagesStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import FailureGroup from "@/resources/FailureGroup";
1111
import QueueAddress from "@/resources/QueueAddress";
1212

1313
const deletedPeriodOptions = ["All Deleted", "Deleted in the last 2 Hours", "Deleted in the last 1 Day", "Deleted in the last 7 days"] as const;
14-
const retryPeriodOptions = ["All Pending Retries", "Retried in the last 2 Hours", "Retried in the last 1 Day", "Retried in the last 7 Days"];
14+
const retryPeriodOptions = ["All Pending Retries", "Retried in the last 2 Hours", "Retried in the last 1 Day", "Retried in the last 7 Days"] as const;
1515
export type DeletedPeriodOption = (typeof deletedPeriodOptions)[number];
1616
export type RetryPeriodOption = (typeof retryPeriodOptions)[number];
1717

@@ -138,7 +138,7 @@ export const useMessagesStore = defineStore("MessagesStore", () => {
138138
async function setMessageStatus(status: FailedMessageStatus) {
139139
if (controller) {
140140
// need to cancel any existing fetch which otherwise will set messages of the incorrect status
141-
controller.abort();
141+
controller.abort(`Switching status to ${status}`);
142142
}
143143
messageStatus = status;
144144
messages.value = [];
@@ -156,7 +156,7 @@ export const useMessagesStore = defineStore("MessagesStore", () => {
156156
case FailedMessageStatus.RetryIssued:
157157
{
158158
sortBy.value = "time_of_failure";
159-
let retryMessagePeriod = cookies.cookies.get("pending_retries_period");
159+
let retryMessagePeriod = cookies.cookies.get("pending_retries_period") as RetryPeriodOption;
160160
if (!retryMessagePeriod) {
161161
retryMessagePeriod = retryPeriodOptions[0]; //default All Pending Retries
162162
}

0 commit comments

Comments
 (0)