fix: add missing warning state in backup list
This commit is contained in:
parent
7fba271107
commit
c2c5a1d235
3 changed files with 9 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ export const StatusDot = ({ variant, label, animated }: StatusDotProps) => {
|
|||
|
||||
return (
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<TooltipTrigger aria-label={label}>
|
||||
<span className="relative flex size-3 mx-auto">
|
||||
{statusMapping?.animated && (
|
||||
<span
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ export const BackupCard = ({ schedule }: { schedule: BackupSchedule }) => {
|
|||
</div>
|
||||
<BackupStatusDot
|
||||
enabled={schedule.enabled}
|
||||
hasError={!!schedule.lastBackupError}
|
||||
hasError={schedule.lastBackupStatus === "error"}
|
||||
hasWarning={schedule.lastBackupStatus === "warning"}
|
||||
isInProgress={schedule.lastBackupStatus === "in_progress"}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,15 @@ import { StatusDot } from "~/client/components/status-dot";
|
|||
export const BackupStatusDot = ({
|
||||
enabled,
|
||||
hasError,
|
||||
hasWarning,
|
||||
isInProgress,
|
||||
}: {
|
||||
enabled: boolean;
|
||||
hasError?: boolean;
|
||||
hasWarning?: boolean;
|
||||
isInProgress?: boolean;
|
||||
}) => {
|
||||
let variant: "success" | "neutral" | "error" | "info";
|
||||
let variant: "success" | "neutral" | "error" | "warning" | "info";
|
||||
let label: string;
|
||||
|
||||
if (isInProgress) {
|
||||
|
|
@ -18,6 +20,9 @@ export const BackupStatusDot = ({
|
|||
} else if (hasError) {
|
||||
variant = "error";
|
||||
label = "Error";
|
||||
} else if (hasWarning) {
|
||||
variant = "warning";
|
||||
label = "Warning";
|
||||
} else if (enabled) {
|
||||
variant = "success";
|
||||
label = "Active";
|
||||
|
|
|
|||
Loading…
Reference in a new issue