From 063f086a6e31df250dd9be42cdb5fa549307106f Mon Sep 17 00:00:00 2001 From: garethgeorge Date: Mon, 4 Dec 2023 22:03:33 -0800 Subject: [PATCH] fix: ordering of operations when viewed from backup tree --- webui/src/components/OperationList.tsx | 1 - webui/src/state/oplog.ts | 5 +++++ webui/src/views/App.tsx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webui/src/components/OperationList.tsx b/webui/src/components/OperationList.tsx index a8d645f6..7cc86e76 100644 --- a/webui/src/components/OperationList.tsx +++ b/webui/src/components/OperationList.tsx @@ -15,7 +15,6 @@ import { Typography, } from "antd"; import { - ExclamationCircleOutlined, PaperClipOutlined, SaveOutlined, DeleteOutlined, diff --git a/webui/src/state/oplog.ts b/webui/src/state/oplog.ts index 341f12f0..4483fdda 100644 --- a/webui/src/state/oplog.ts +++ b/webui/src/state/oplog.ts @@ -124,6 +124,9 @@ export class BackupInfoCollector { [...newInfo.operations, ...existing.operations], (o) => o.id! ); + existing.operations.sort((a, b) => { + return parseInt(a.unixTimeStartMs!) - parseInt(b.unixTimeStartMs!); + }); if (newInfo.backupLastStatus) { existing.backupLastStatus = newInfo.backupLastStatus; } @@ -264,6 +267,8 @@ export const displayTypeToString = (type: DisplayType) => { return "Forget"; case DisplayType.PRUNE: return "Prune"; + case DisplayType.RESTORE: + return "Restore"; default: return "Unknown"; } diff --git a/webui/src/views/App.tsx b/webui/src/views/App.tsx index bf74d1b8..ac473fd7 100644 --- a/webui/src/views/App.tsx +++ b/webui/src/views/App.tsx @@ -55,7 +55,7 @@ export const App: React.FC = () => { style={{ color: colorTextLightSolid }} onClick={() => setContent(null, [])} > - ResticUI{" "} + BackRestic{" "} {process.env.RESTICUI_BUILD_VERSION