From ffe44f1284b7d23383bd3b69f8bbdadf7480a257 Mon Sep 17 00:00:00 2001 From: Osmar Benavidez Date: Fri, 9 Feb 2024 11:13:17 -0600 Subject: [PATCH] Fix issue #10 --- datanode-ui/src/config.tsx | 3 +++ .../arachne/datanode/model/datasource/DataSource.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/datanode-ui/src/config.tsx b/datanode-ui/src/config.tsx index 6433354c..46249902 100644 --- a/datanode-ui/src/config.tsx +++ b/datanode-ui/src/config.tsx @@ -72,6 +72,9 @@ export const colsTableSubmissions = (t: any): ColumnInterface[] => [ maxWidth: 150, minWidth: 150, isCropped: true, + Cell: (props): any => { + return props.value.includes('deleted_source_at') ?props.value.substring( 0,props.value.indexOf('_deleted_source_at') )?.concat(' (Removed)'): props.value; + } }, { Header: t("tables.cols.submitted"), diff --git a/datanode/src/main/java/com/odysseusinc/arachne/datanode/model/datasource/DataSource.java b/datanode/src/main/java/com/odysseusinc/arachne/datanode/model/datasource/DataSource.java index bbda28c2..3b165100 100644 --- a/datanode/src/main/java/com/odysseusinc/arachne/datanode/model/datasource/DataSource.java +++ b/datanode/src/main/java/com/odysseusinc/arachne/datanode/model/datasource/DataSource.java @@ -41,7 +41,7 @@ @Entity @Table(name = "datasource") -@SQLDelete(sql = "UPDATE datasource SET deleted_at = current_timestamp WHERE id = ?") +@SQLDelete(sql = "UPDATE datasource SET deleted_at = current_timestamp, name = name ||'_deleted_source_at_'||to_char(current_timestamp, 'YYYYMMDD\"T\"HH24MISS') WHERE id = ?") @ValidCredentials public class DataSource {