From dab431568fa1181d0ffbe223019d87543fcda224 Mon Sep 17 00:00:00 2001 From: Deepesh Kumar Date: Thu, 22 Aug 2024 09:40:35 +0000 Subject: [PATCH] feat: [CDE-255]: Fixed Gitness Issues (#2564) * feat: [CDE-255]: fixed ui lint issue * feat: [CDE-255]: Fixed Gitness Issues --- .../components/GitspaceListing/ListGitspaces.tsx | 6 ++++-- .../pages/GitspaceDetails/GitspaceDetails.tsx | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/web/src/cde-gitness/components/GitspaceListing/ListGitspaces.tsx b/web/src/cde-gitness/components/GitspaceListing/ListGitspaces.tsx index 94a208c37..802eb907e 100644 --- a/web/src/cde-gitness/components/GitspaceListing/ListGitspaces.tsx +++ b/web/src/cde-gitness/components/GitspaceListing/ListGitspaces.tsx @@ -389,8 +389,9 @@ const ActionMenu = ({ e.stopPropagation() if (ide === IDEType.VSCODE) { const params = standalone ? '?gitness' : '' + const projectOrSpace = standalone ? space_path : projectIdentifier const vscodeExtensionCode = standalone ? 'harness-inc.oss-gitspaces' : 'harness-inc.gitspaces' - const vsCodeURL = `vscode://${vscodeExtensionCode}/${projectIdentifier}/${identifier}${params}` + const vsCodeURL = `vscode://${vscodeExtensionCode}/${projectOrSpace}/${identifier}${params}` window.open(vsCodeURL, '_blank') } else { if (standalone) { @@ -761,8 +762,9 @@ export const ListGitspaces = ({ data, refreshList }: { data: TypesGitspaceConfig if (row?.state === GitspaceStatus.RUNNING) { if (row?.ide === IDEType.VSCODE) { const params = standalone ? '?gitness' : '' + const projectOrSpace = standalone ? row?.space_path : projectIdentifier const vscodeExtensionCode = standalone ? 'harness-inc.oss-gitspaces' : 'harness-inc.gitspaces' - const vsCodeURL = `vscode://${vscodeExtensionCode}/${projectIdentifier}/${row?.identifier}${params}` + const vsCodeURL = `vscode://${vscodeExtensionCode}/${projectOrSpace}/${row?.identifier}${params}` window.open(vsCodeURL, '_blank') } else { if (standalone) { diff --git a/web/src/cde-gitness/pages/GitspaceDetails/GitspaceDetails.tsx b/web/src/cde-gitness/pages/GitspaceDetails/GitspaceDetails.tsx index ca8c0945b..41aff1122 100644 --- a/web/src/cde-gitness/pages/GitspaceDetails/GitspaceDetails.tsx +++ b/web/src/cde-gitness/pages/GitspaceDetails/GitspaceDetails.tsx @@ -128,14 +128,16 @@ const GitspaceDetails = () => { } }, { - pollingInterval: 10000, + pollingInterval: standalone ? 2000 : 10000, startCondition: Boolean(startPolling) || !pollingCondition } ) usePolling( async () => { - await refetchLogsData() + if (!standalone) { + await refetchLogsData() + } }, { pollingInterval: 10000, @@ -346,8 +348,9 @@ const GitspaceDetails = () => { e.stopPropagation() if (data?.ide === StandaloneIDEType.VSCODE) { const params = standalone ? '?gitness' : '' + const projectOrSpace = standalone ? space : projectIdentifier const vscodeExtensionCode = standalone ? 'harness-inc.oss-gitspaces' : 'harness-inc.gitspaces' - const vsCodeURL = `vscode://${vscodeExtensionCode}/${projectIdentifier}/${data?.identifier}${params}` + const vsCodeURL = `vscode://${vscodeExtensionCode}/${projectOrSpace}/${data?.identifier}${params}` window.open(vsCodeURL, '_blank') } else { if (standalone) {