Skip to content

Commit

Permalink
feat: [CDE-255]: Fixed Gitness Issues (harness#2564)
Browse files Browse the repository at this point in the history
* feat: [CDE-255]: fixed ui lint issue
* feat: [CDE-255]: Fixed Gitness Issues
  • Loading branch information
deepesh-ui authored and Harness committed Aug 22, 2024
1 parent 4ebc0db commit dab4315
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 6 additions & 3 deletions web/src/cde-gitness/pages/GitspaceDetails/GitspaceDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit dab4315

Please sign in to comment.