@futo-org/backups-orchestrator-ui 0.43.0 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,10 +77,7 @@
77
77
  {@const isStart = entry.started != null}
78
78
  {@const isEnd = entry.backup != null}
79
79
  {@const isSize = entry.sizeBytes != null && !isStart && !isEnd}
80
- {@const succeeded =
81
- isEnd &&
82
- entry.successfulBackup != null &&
83
- entry.successfulBackup === entry.backup}
80
+ {@const status = entry.backupStatus}
84
81
  <Stack gap={1} class="px-4 py-3">
85
82
  <HStack class="justify-between gap-4">
86
83
  <HStack class="gap-2">
@@ -91,7 +88,7 @@
91
88
  class="text-info-500"
92
89
  />
93
90
  <Text>Backup started</Text>
94
- {:else if isEnd && succeeded}
91
+ {:else if status === 'complete'}
95
92
  <Icon
96
93
  icon={mdiCheckCircleOutline}
97
94
  size="18"
@@ -99,6 +96,30 @@
99
96
  />
100
97
  <Text>Backup finished</Text>
101
98
  <Badge size="tiny" color="success">Success</Badge>
99
+ {:else if status === 'warn'}
100
+ <Icon
101
+ icon={mdiAlertCircleOutline}
102
+ size="18"
103
+ class="text-warning-500"
104
+ />
105
+ <Text>Backup finished</Text>
106
+ <Badge size="tiny" color="warning">Warning</Badge>
107
+ {:else if status === 'incomplete'}
108
+ <Icon
109
+ icon={mdiAlertCircleOutline}
110
+ size="18"
111
+ class="text-warning-500"
112
+ />
113
+ <Text>Backup incomplete</Text>
114
+ <Badge size="tiny" color="warning">Incomplete</Badge>
115
+ {:else if status === 'failed'}
116
+ <Icon
117
+ icon={mdiAlertCircleOutline}
118
+ size="18"
119
+ class="text-danger-500"
120
+ />
121
+ <Text>Backup finished</Text>
122
+ <Badge size="tiny" color="danger">Failed</Badge>
102
123
  {:else if isEnd}
103
124
  <Icon
104
125
  icon={mdiAlertCircleOutline}
@@ -44,6 +44,10 @@
44
44
  tally.warned++;
45
45
  break;
46
46
  }
47
+ case "incomplete": {
48
+ tally.incomplete++;
49
+ break;
50
+ }
47
51
  default: {
48
52
  tally.success++;
49
53
  break;
@@ -52,7 +56,7 @@
52
56
 
53
57
  return tally;
54
58
  },
55
- { success: 0, offline: 0, warned: 0, failed: 0, neverRun: 0 },
59
+ { success: 0, offline: 0, warned: 0, failed: 0, incomplete: 0, neverRun: 0 },
56
60
  ),
57
61
  );
58
62
  </script>
@@ -79,6 +83,12 @@
79
83
  color: "var(--immich-ui-success-500)",
80
84
  badge: "success",
81
85
  },
86
+ {
87
+ value: status.incomplete,
88
+ label: "In-progress or incomplete",
89
+ color: "var(--immich-ui-info-400)",
90
+ badge: "info",
91
+ },
82
92
  {
83
93
  value: status.offline,
84
94
  label: "Offline",
@@ -44,6 +44,9 @@
44
44
  case "warn": {
45
45
  return { color: "warning", icon: mdiCloudCheckVariantOutline } as const;
46
46
  }
47
+ case "incomplete": {
48
+ return { color: "warning", icon: mdiCloudAlertOutline } as const;
49
+ }
47
50
  case "paused": {
48
51
  return { color: "warning", icon: mdiCloudAlertOutline } as const;
49
52
  }
@@ -93,6 +96,8 @@
93
96
  Backup failed
94
97
  {:else if status.kind === "warn"}
95
98
  Backed up with warnings <RelativeTime time={status.lastBackup} />
99
+ {:else if status.kind === "incomplete"}
100
+ Backup did not complete <RelativeTime time={status.lastBackup} />
96
101
  {:else if status.kind === "paused"}
97
102
  Backups paused
98
103
  {:else if status.kind === "unconfigured"}
@@ -37,6 +37,9 @@
37
37
  case "warn": {
38
38
  return { color: "warning", icon: mdiAlert } as const;
39
39
  }
40
+ case "incomplete": {
41
+ return { color: "warning", icon: mdiAlert } as const;
42
+ }
40
43
  case "complete": {
41
44
  return { color: "success", icon: mdiCheck } as const;
42
45
  }
@@ -88,6 +91,8 @@
88
91
  Last backup failed <RelativeTime time={status.lastBackup} />
89
92
  {:else if status.kind === "warn"}
90
93
  Last backup finished with warnings <RelativeTime time={status.lastBackup} />
94
+ {:else if status.kind === "incomplete"}
95
+ Last backup did not complete <RelativeTime time={status.lastBackup} />
91
96
  {:else if status.kind === "complete"}
92
97
  Last backup successful <RelativeTime time={status.lastBackup} />
93
98
  {:else if status.kind === "paused"}
@@ -5,7 +5,7 @@
5
5
  value: number;
6
6
  label: string;
7
7
  color: string;
8
- badge: "success" | "warning" | "danger" | "secondary";
8
+ badge: "success" | "warning" | "danger" | "secondary" | "info";
9
9
  };
10
10
 
11
11
  type Props = {
@@ -2,7 +2,7 @@ type Segment = {
2
2
  value: number;
3
3
  label: string;
4
4
  color: string;
5
- badge: "success" | "warning" | "danger" | "secondary";
5
+ badge: "success" | "warning" | "danger" | "secondary" | "info";
6
6
  };
7
7
  type Props = {
8
8
  title: string;
@@ -81,11 +81,11 @@ export type IntegrationsResponseDto = {
81
81
  immichState?: ImmichStateDto;
82
82
  immichIntegration?: ImmichIntegrationDto;
83
83
  };
84
- export type TaskStatus = "incomplete" | "complete" | "warn" | "failed";
85
84
  export type RepositoryMetricsDto = {
85
+ lastStarted?: string | null;
86
86
  lastBackup?: string | null;
87
- lastBackupStatus?: TaskStatus;
88
- lastBackupDuration?: number;
87
+ lastBackupStatus?: ("incomplete" | "complete" | "warn" | "failed" | null) | null;
88
+ lastBackupDuration?: number | null;
89
89
  sizeBytes: number;
90
90
  };
91
91
  export type RepositoryMeterDto = {
@@ -162,6 +162,7 @@ export type ConfigureImmichIntegrationRequestDto = {
162
162
  libraries: "all" | string[];
163
163
  retentionPolicy?: (RetentionPolicyDto) | null;
164
164
  paused?: boolean;
165
+ repositoryId?: string;
165
166
  };
166
167
  export type ConfigureImmichIntegrationResponseDto = {
167
168
  repositoryId: string;
@@ -197,6 +198,7 @@ export type RepositoryCreateRequestDto = {
197
198
  /** Internal site code from environment metadata */
198
199
  site?: string;
199
200
  paths?: string[];
201
+ retentionPolicy?: (RetentionPolicyDto) | null;
200
202
  };
201
203
  export type RepositoryCreateResponseDto = {
202
204
  repository: LocalRepositoryDto;
@@ -270,6 +272,7 @@ export type RunResponseDto = {
270
272
  run: RunDto;
271
273
  };
272
274
  export type TaskType = "schedule" | "restore" | "backup" | "forget";
275
+ export type TaskStatus = "incomplete" | "complete" | "warn" | "failed";
273
276
  export type ActiveScheduleItemDto = {
274
277
  repositoryId: string;
275
278
  status: TaskStatus;
@@ -285,6 +288,7 @@ export type RunningTaskListResponse = {
285
288
  };
286
289
  export type ScheduleCreateRequestDto = {
287
290
  name: string;
291
+ paused?: boolean;
288
292
  cron: string;
289
293
  repositories: string[];
290
294
  };
@@ -18,7 +18,7 @@ export declare const useImmichBackupStatusEventHandler: () => {
18
18
  export type ImmichBackupStatus = {
19
19
  kind: 'loading' | 'offline' | 'missing' | 'running' | 'paused' | 'unconfigured' | 'never';
20
20
  } | {
21
- kind: 'complete' | 'warn' | 'failed';
21
+ kind: 'complete' | 'warn' | 'incomplete' | 'failed';
22
22
  lastBackup: string;
23
23
  };
24
24
  export declare const useImmichBackupStatus: () => {
@@ -1,3 +1,3 @@
1
1
  import type { RepositoryMetricsDto } from '../fetch-client';
2
- export type BackupOutcome = 'never' | 'complete' | 'warn' | 'failed';
2
+ export type BackupOutcome = 'never' | 'complete' | 'warn' | 'incomplete' | 'failed';
3
3
  export declare const getBackupOutcome: (metrics: RepositoryMetricsDto | undefined) => BackupOutcome;
@@ -1,4 +1,7 @@
1
1
  export const getBackupOutcome = (metrics) => {
2
+ if (metrics?.lastBackupStatus === 'incomplete') {
3
+ return 'incomplete';
4
+ }
2
5
  if (!metrics?.lastBackup) {
3
6
  return 'never';
4
7
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@futo-org/backups-orchestrator-ui",
3
3
  "repository": "https://github.com/immich-app/yucca",
4
4
  "description": "Backups orchestrator (UI library)",
5
- "version": "0.43.0",
5
+ "version": "0.44.0",
6
6
  "license": "Source First License 1.1",
7
7
  "files": [
8
8
  "dist",
@@ -55,7 +55,7 @@
55
55
  "svelte"
56
56
  ],
57
57
  "dependencies": {
58
- "@immich/ui": "^0.85.0",
58
+ "@immich/ui": "^0.89.0",
59
59
  "@mdi/js": "^7.4.47",
60
60
  "@oazapfts/runtime": "^1.1.0",
61
61
  "@tanstack/svelte-query": "^6.1.3",
@@ -64,7 +64,7 @@
64
64
  "lodash.debounce": "^4.0.8",
65
65
  "luxon": "^3.7.2",
66
66
  "socket.io-client": "^4.8.3",
67
- "@futo-org/backups-api-client": "^0.43.0"
67
+ "@futo-org/backups-api-client": "^0.44.0"
68
68
  },
69
69
  "scripts": {
70
70
  "dev": "vite dev --port 5174",