From 038d0e4bc998feecfd026136fff2c0f800bdedbe Mon Sep 17 00:00:00 2001 From: garethgeorge Date: Thu, 13 Jun 2024 18:16:41 -0700 Subject: [PATCH] fix: misc ui consistency and refresh errors --- webui/src/components/ActivityBar.tsx | 5 +- webui/src/components/HooksFormList.tsx | 8 +- webui/src/components/OperationList.tsx | 37 ++------- webui/src/components/OperationTree.tsx | 95 ++++++----------------- webui/src/components/ScheduleFormItem.tsx | 3 +- webui/src/components/StatsPanel.tsx | 7 +- webui/src/state/oplog.ts | 51 ++++++++++-- webui/src/views/AddPlanModal.tsx | 9 +-- webui/src/views/App.tsx | 7 +- webui/src/views/RepoView.tsx | 22 +++++- 10 files changed, 114 insertions(+), 130 deletions(-) diff --git a/webui/src/components/ActivityBar.tsx b/webui/src/components/ActivityBar.tsx index ef3b3688..50d17d86 100644 --- a/webui/src/components/ActivityBar.tsx +++ b/webui/src/components/ActivityBar.tsx @@ -18,8 +18,9 @@ export const ActivityBar = () => { const setRefresh = useState(0)[1]; useEffect(() => { - const callback = ({ operation, type }: OperationEvent) => { - if (!operation || !type) return; + const callback = (event?: OperationEvent, err?: Error) => { + if (!event || !event.operation) return; + const operation = event.operation; setActiveOperations((ops) => { ops = ops.filter((op) => op.id !== operation.id); diff --git a/webui/src/components/HooksFormList.tsx b/webui/src/components/HooksFormList.tsx index 32a5b38a..37a25423 100644 --- a/webui/src/components/HooksFormList.tsx +++ b/webui/src/components/HooksFormList.tsx @@ -119,8 +119,8 @@ export const HooksFormList = () => { size="small" style={{ marginBottom: "5px" }} > - - + +