From 2c66372d3880262042afe3f11e5a1d2574762443 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 3 Mar 2024 19:19:18 -0300 Subject: [PATCH] Add last run time to GenericNode component --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index c9844a47d..776bc779e 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -100,7 +100,10 @@ export default function GenericNode({ if (duration === undefined) { return ""; } else { - return `Duration: ${duration}`; + const nowTimestamp = new Date(Date.now()); + // readable last run time like YYYY-MM-DD HH:MM:SS + const last_run_datetime = nowTimestamp.toLocaleString(); + return `Last run: ${last_run_datetime}\nDuration: ${duration}`; } }; const durationString = getDurationString(validationStatus?.data.duration);