diff --git a/frontend/src/lib/components/AppConnect.svelte b/frontend/src/lib/components/AppConnect.svelte index d66460a0e5..b63deba996 100644 --- a/frontend/src/lib/components/AppConnect.svelte +++ b/frontend/src/lib/components/AppConnect.svelte @@ -264,20 +264,23 @@ const resourceValue = args if (!manual || linkedSecret != undefined) { - await VariableService.createVariable({ - workspace: $workspaceStore!, - requestBody: { - path, - value: manual ? args[linkedSecret ?? ''] : value, - is_secret: true, - description: emptyString(description) - ? `${manual ? 'Token' : 'OAuth token'} for ${resource_type}` - : description, - is_oauth: !manual, - account: account - } - }) - resourceValue[linkedSecret ?? 'token'] = `$var:${path}` + let v = manual ? args[linkedSecret ?? ''] : value + if (!v.startsWith('$var:')) { + await VariableService.createVariable({ + workspace: $workspaceStore!, + requestBody: { + path, + value: v, + is_secret: true, + description: emptyString(description) + ? `${manual ? 'Token' : 'OAuth token'} for ${resource_type}` + : description, + is_oauth: !manual, + account: account + } + }) + resourceValue[linkedSecret ?? 'token'] = `$var:${path}` + } } await ResourceService.createResource({ diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index 2a15bfb3e1..c346e7ec6f 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -91,18 +91,6 @@ } } - function setDurationStatus(key: string, value: DurationStatus) { - if (!deepEqual($localDurationStatuses[key], value)) { - $localDurationStatuses[key] = value - globalDurationStatuses.forEach((s) => { - s.update((x) => { - x[key] = JSON.parse(JSON.stringify(value)) - return x - }) - }) - } - } - function setDurationStatusByJob(key: string, id: string, value: any) { if (!deepEqual($localDurationStatuses[key]?.byJob[id], value)) { $localDurationStatuses[key].byJob[id] = value