fix: rebase issues
This commit is contained in:
parent
e8eae7dce6
commit
b156d6154e
6 changed files with 25 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -41,3 +41,4 @@ openapi-ts-error-*.log
|
||||||
tmp/
|
tmp/
|
||||||
qa-output
|
qa-output
|
||||||
|
|
||||||
|
.worktrees/
|
||||||
|
|
|
||||||
|
|
@ -204,8 +204,8 @@ export type GetPublicSsoProvidersResponses = {
|
||||||
*/
|
*/
|
||||||
200: {
|
200: {
|
||||||
providers: Array<{
|
providers: Array<{
|
||||||
organizationSlug: string;
|
|
||||||
providerId: string;
|
providerId: string;
|
||||||
|
organizationSlug: string;
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -224,20 +224,20 @@ export type GetSsoSettingsResponses = {
|
||||||
* SSO settings for the active organization
|
* SSO settings for the active organization
|
||||||
*/
|
*/
|
||||||
200: {
|
200: {
|
||||||
invitations: Array<{
|
|
||||||
email: string;
|
|
||||||
expiresAt: string;
|
|
||||||
id: string;
|
|
||||||
role: string;
|
|
||||||
status: string;
|
|
||||||
}>;
|
|
||||||
providers: Array<{
|
providers: Array<{
|
||||||
autoLinkMatchingEmails: boolean;
|
|
||||||
domain: string;
|
|
||||||
issuer: string;
|
|
||||||
organizationId: string | null;
|
|
||||||
providerId: string;
|
providerId: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
issuer: string;
|
||||||
|
domain: string;
|
||||||
|
autoLinkMatchingEmails: boolean;
|
||||||
|
organizationId: string | null;
|
||||||
|
}>;
|
||||||
|
invitations: Array<{
|
||||||
|
id: string;
|
||||||
|
email: string;
|
||||||
|
role: string;
|
||||||
|
status: string;
|
||||||
|
expiresAt: string;
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -2186,7 +2186,7 @@ export type ListSnapshotFilesResponses = {
|
||||||
id: string;
|
id: string;
|
||||||
short_id: string;
|
short_id: string;
|
||||||
time: string;
|
time: string;
|
||||||
hostname: string;
|
hostname?: string;
|
||||||
paths: Array<string>;
|
paths: Array<string>;
|
||||||
};
|
};
|
||||||
files: Array<{
|
files: Array<{
|
||||||
|
|
@ -4140,6 +4140,7 @@ export type GetBackupProgressResponses = {
|
||||||
volumeName: string;
|
volumeName: string;
|
||||||
repositoryName: string;
|
repositoryName: string;
|
||||||
seconds_elapsed: number;
|
seconds_elapsed: number;
|
||||||
|
seconds_remaining?: number;
|
||||||
percent_done: number;
|
percent_done: number;
|
||||||
total_files: number;
|
total_files: number;
|
||||||
files_done: number;
|
files_done: number;
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,7 @@ export const BackupProgressCard = ({ scheduleShortId, initialProgress }: Props)
|
||||||
const currentFile = progress?.current_files?.[0] || "";
|
const currentFile = progress?.current_files?.[0] || "";
|
||||||
const fileName = currentFile.split("/").pop() || currentFile;
|
const fileName = currentFile.split("/").pop() || currentFile;
|
||||||
const speed = progress ? formatBytes(progress.bytes_done / progress.seconds_elapsed) : null;
|
const speed = progress ? formatBytes(progress.bytes_done / progress.seconds_elapsed) : null;
|
||||||
const eta = progress?.seconds_remaining != null && progress.seconds_remaining > 0
|
const eta = progress?.seconds_remaining ? formatDuration(progress.seconds_remaining) : null;
|
||||||
? formatDuration(progress.seconds_remaining)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="p-4">
|
<Card className="p-4">
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ export const resticBackupOutputSchema = resticBackupRunSummarySchema.extend({
|
||||||
|
|
||||||
export const resticBackupProgressMetricsSchema = z.object({
|
export const resticBackupProgressMetricsSchema = z.object({
|
||||||
seconds_elapsed: z.number(),
|
seconds_elapsed: z.number(),
|
||||||
|
seconds_remaining: z.number().default(0),
|
||||||
percent_done: z.number(),
|
percent_done: z.number(),
|
||||||
total_files: z.number(),
|
total_files: z.number(),
|
||||||
files_done: z.number(),
|
files_done: z.number(),
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,10 @@ export const backup = async (
|
||||||
if (options.onProgress) {
|
if (options.onProgress) {
|
||||||
try {
|
try {
|
||||||
const jsonData = JSON.parse(data);
|
const jsonData = JSON.parse(data);
|
||||||
|
if (jsonData.message_type !== "status") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const progressResult = resticBackupProgressSchema.safeParse(jsonData);
|
const progressResult = resticBackupProgressSchema.safeParse(jsonData);
|
||||||
if (progressResult.success) {
|
if (progressResult.success) {
|
||||||
options.onProgress(progressResult.data);
|
options.onProgress(progressResult.data);
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,10 @@ export const restore = async (
|
||||||
if (options.onProgress) {
|
if (options.onProgress) {
|
||||||
try {
|
try {
|
||||||
const jsonData = JSON.parse(data);
|
const jsonData = JSON.parse(data);
|
||||||
|
if (jsonData.message_type !== "status") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const progress = restoreProgressSchema.safeParse(jsonData);
|
const progress = restoreProgressSchema.safeParse(jsonData);
|
||||||
if (progress.success) {
|
if (progress.success) {
|
||||||
options.onProgress(progress.data);
|
options.onProgress(progress.data);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue