feat: [CDE-255]: Fixed Gitness Issues (#2564)

* feat: [CDE-255]: fixed ui lint issue
* feat: [CDE-255]: Fixed Gitness Issues
pull/3545/head
Deepesh Kumar 2024-08-22 09:40:35 +00:00 committed by Harness
parent 4ebc0db9b3
commit dab431568f
2 changed files with 10 additions and 5 deletions

View File

@ -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) {

View File

@ -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) {