From dda51972bbd7b3eae574b1d64545b5b1b5fa5cbf Mon Sep 17 00:00:00 2001 From: Sipachev Igor Date: Mon, 16 Jan 2023 13:23:04 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/elements/commands/index.tsx | 1 + components/elements/processes/index.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/elements/commands/index.tsx b/components/elements/commands/index.tsx index 099adf1..9d18234 100644 --- a/components/elements/commands/index.tsx +++ b/components/elements/commands/index.tsx @@ -47,6 +47,7 @@ export default function Commands() { let runCommand = async () => { let url = `http://fmw.sipachev.sv/system-monitoring/commands/${command.name}/run` let data = command2data[command.name] || {} + data['requestId'] = '123'; let response = await fetch(url, { method: 'POST', headers: { diff --git a/components/elements/processes/index.tsx b/components/elements/processes/index.tsx index ea429c7..3168106 100644 --- a/components/elements/processes/index.tsx +++ b/components/elements/processes/index.tsx @@ -83,7 +83,7 @@ export default function Processes() { let canPause = (process: ProcessInterface) => !isFinished(process) && process.progress && !process.pausedAt let canRepeat = (process: ProcessInterface) => isFinished(process) let canStop = (process: ProcessInterface) => !isFinished(process) && process.progress - let canKill = (process: ProcessInterface) => !isFinished(process) + let canKill = (process: ProcessInterface) => !isFinished(process) && process.startedAt let progress = (progress: ProcessProgressInterface) => progress.progress / progress.total * 100 let status = (process: ProcessInterface): Status => {