Skip to content

Commit

Permalink
Revert "fix(gitops): correct commit hash link [EE-6346] (#10722)" (#1…
Browse files Browse the repository at this point in the history
…0788)

This reverts commit 83cd5d9.
  • Loading branch information
testA113 committed Dec 7, 2023
1 parent f58aa8c commit 90a160e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { Icon } from '@@/Icon';
import { Link } from '@@/Link';

import { DeploymentStatus, EdgeStackStatus, StatusType } from '../../types';
import { removeTrailingGitExtension } from '../../utils';

import { EnvironmentActions } from './EnvironmentActions';
import { ActionStatus } from './ActionStatus';
Expand Down Expand Up @@ -188,9 +187,7 @@ function TargetVersionCell({
{row.original.TargetCommitHash ? (
<div>
<a
href={`${removeTrailingGitExtension(
row.original.GitConfigURL
)}/commit/${row.original.TargetCommitHash}`}
href={`${row.original.GitConfigURL}/commit/${row.original.TargetCommitHash}`}
target="_blank"
rel="noreferrer"
>
Expand Down Expand Up @@ -239,9 +236,7 @@ function DeployedVersionCell({
<div>
{statusIcon}
<a
href={`${removeTrailingGitExtension(
row.original.GitConfigURL
)}/commit/${row.original.TargetCommitHash}`}
href={`${row.original.GitConfigURL}/commit/${row.original.TargetCommitHash}`}
target="_blank"
rel="noreferrer"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { buildNameColumn } from '@@/datatables/NameCell';
import { Link } from '@@/Link';

import { StatusType } from '../../types';
import { removeTrailingGitExtension } from '../../utils';

import { EdgeStackStatus } from './EdgeStacksStatus';
import { DecoratedEdgeStack } from './types';
Expand Down Expand Up @@ -152,9 +151,7 @@ export const columns = _.compact([
<div className="text-center">
<a
target="_blank"
href={`${removeTrailingGitExtension(
item.GitConfig.URL
)}/commit/${item.GitConfig.ConfigHash}`}
href={`${item.GitConfig.URL}/commit/${item.GitConfig.ConfigHash}`}
rel="noreferrer"
>
{item.GitConfig.ConfigHash.slice(0, 7)}
Expand Down
5 changes: 0 additions & 5 deletions app/react/edge/edge-stacks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,3 @@ export function getValidEditorTypes(
? _.intersection(...endpointTypes.map((type) => right[type]))
: [EditorType.Compose, EditorType.Kubernetes];
}

export function removeTrailingGitExtension(url: string) {
// the url could have the .git extension. Remove it if it does.
return url.replace(/\.git$/, '');
}

0 comments on commit 90a160e

Please sign in to comment.