diff --git a/frontend/src/components/resources/procedure/index.tsx b/frontend/src/components/resources/procedure/index.tsx
index 7c0c819ae..7cf2e0ef5 100644
--- a/frontend/src/components/resources/procedure/index.tsx
+++ b/frontend/src/components/resources/procedure/index.tsx
@@ -1,8 +1,8 @@
-import { ConfirmButton } from "@components/util";
+import { ActionWithDialog } from "@components/util";
import { useExecute, useRead } from "@lib/hooks";
import { RequiredResourceComponents } from "@types";
import { Card, CardHeader } from "@ui/card";
-import { Loader2, Route } from "lucide-react";
+import { Route } from "lucide-react";
import { ProcedureConfig } from "./config";
import { ProcedureTable } from "./table";
import { DeleteResource, NewResource } from "../common";
@@ -57,18 +57,16 @@ export const ProcedureComponents: RequiredResourceComponents = {
{ refetchInterval: 5000 }
).data?.running;
const { mutate, isPending } = useExecute("RunProcedure");
+ const procedure = useProcedure(id);
+ if (!procedure) return null;
return (
-
- ) : (
-
- )
- }
+ icon={}
onClick={() => mutate({ procedure: id })}
disabled={running || isPending}
+ loading={running}
/>
);
},
diff --git a/frontend/src/components/resources/resource-sync/actions.tsx b/frontend/src/components/resources/resource-sync/actions.tsx
index 7d33434f7..163334bc6 100644
--- a/frontend/src/components/resources/resource-sync/actions.tsx
+++ b/frontend/src/components/resources/resource-sync/actions.tsx
@@ -1,4 +1,4 @@
-import { ConfirmButton } from "@components/util";
+import { ActionButton, ActionWithDialog } from "@components/util";
import { useExecute, useInvalidate, useRead, useWrite } from "@lib/hooks";
import { sync_no_changes } from "@lib/utils";
import { Loader2, RefreshCcw, SquarePlay } from "lucide-react";
@@ -10,7 +10,7 @@ export const RefreshSync = ({ id }: { id: string }) => {
});
const pending = isPending;
return (
- {
const pending = isPending || syncing;
return (
-
- ) : (
-
- )
- }
+ icon={}
onClick={() => mutate({ sync: id })}
disabled={pending}
loading={pending}