From 426d3a1f3706cb0063477f2d74c8d9dcdbbf1096 Mon Sep 17 00:00:00 2001 From: Aleksandar Manasijevic Date: Fri, 6 Sep 2024 12:01:49 +0200 Subject: [PATCH] Bugfix - when state update value is updated we will send string, otherwise we will send the same type and value received from BE --- .../src/modules/Nodes/components/RunningJob/RunningJob.tsx | 4 ++-- frontend/src/modules/Snapshots/api/SnapshotsApi.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/modules/Nodes/components/RunningJob/RunningJob.tsx b/frontend/src/modules/Nodes/components/RunningJob/RunningJob.tsx index 19fef44..a710fd4 100644 --- a/frontend/src/modules/Nodes/components/RunningJob/RunningJob.tsx +++ b/frontend/src/modules/Nodes/components/RunningJob/RunningJob.tsx @@ -68,7 +68,7 @@ const StateUpdateComponent: React.FC = (props) => { className={styles.editIconWrapper} onClick={() => { setEditMode(true); - setCustomValue(stateUpdateObject.val ?? stateUpdateObject.new); + setCustomValue(JSON.stringify(stateUpdateObject.val ?? stateUpdateObject.new)); }} > {!editMode && } @@ -76,7 +76,7 @@ const StateUpdateComponent: React.FC = (props) => { {editMode && ( { setCustomValue(val); }} diff --git a/frontend/src/modules/Snapshots/api/SnapshotsApi.tsx b/frontend/src/modules/Snapshots/api/SnapshotsApi.tsx index c25a7e6..6836c30 100644 --- a/frontend/src/modules/Snapshots/api/SnapshotsApi.tsx +++ b/frontend/src/modules/Snapshots/api/SnapshotsApi.tsx @@ -56,7 +56,7 @@ export class SnapshotsApi extends Api { return this._fetch(this.api(UPDATE_SNAPSHOT(snapshotId)), API_METHODS.POST, { headers: BASIC_HEADERS, body: JSON.stringify({ data_path, value }), - queryParams: { data_path, value }, + // queryParams: { data_path, value }, }); }