mirror of https://github.com/portainer/portainer
This reverts commit 83cd5d9b2f
.
pull/10752/head
parent
b75f0e561b
commit
b660feafbf
|
@ -15,7 +15,6 @@ import { Icon } from '@@/Icon';
|
||||||
import { Link } from '@@/Link';
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import { DeploymentStatus, EdgeStackStatus, StatusType } from '../../types';
|
import { DeploymentStatus, EdgeStackStatus, StatusType } from '../../types';
|
||||||
import { removeTrailingGitExtension } from '../../utils';
|
|
||||||
|
|
||||||
import { EnvironmentActions } from './EnvironmentActions';
|
import { EnvironmentActions } from './EnvironmentActions';
|
||||||
import { ActionStatus } from './ActionStatus';
|
import { ActionStatus } from './ActionStatus';
|
||||||
|
@ -188,9 +187,7 @@ function TargetVersionCell({
|
||||||
{row.original.TargetCommitHash ? (
|
{row.original.TargetCommitHash ? (
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
href={`${removeTrailingGitExtension(
|
href={`${row.original.GitConfigURL}/commit/${row.original.TargetCommitHash}`}
|
||||||
row.original.GitConfigURL
|
|
||||||
)}/commit/${row.original.TargetCommitHash}`}
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
|
@ -239,9 +236,7 @@ function DeployedVersionCell({
|
||||||
<div>
|
<div>
|
||||||
{statusIcon}
|
{statusIcon}
|
||||||
<a
|
<a
|
||||||
href={`${removeTrailingGitExtension(
|
href={`${row.original.GitConfigURL}/commit/${row.original.TargetCommitHash}`}
|
||||||
row.original.GitConfigURL
|
|
||||||
)}/commit/${row.original.TargetCommitHash}`}
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
|
|
|
@ -8,7 +8,6 @@ import { buildNameColumn } from '@@/datatables/NameCell';
|
||||||
import { Link } from '@@/Link';
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import { StatusType } from '../../types';
|
import { StatusType } from '../../types';
|
||||||
import { removeTrailingGitExtension } from '../../utils';
|
|
||||||
|
|
||||||
import { EdgeStackStatus } from './EdgeStacksStatus';
|
import { EdgeStackStatus } from './EdgeStacksStatus';
|
||||||
import { DecoratedEdgeStack } from './types';
|
import { DecoratedEdgeStack } from './types';
|
||||||
|
@ -152,9 +151,7 @@ export const columns = _.compact([
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href={`${removeTrailingGitExtension(
|
href={`${item.GitConfig.URL}/commit/${item.GitConfig.ConfigHash}`}
|
||||||
item.GitConfig.URL
|
|
||||||
)}/commit/${item.GitConfig.ConfigHash}`}
|
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
{item.GitConfig.ConfigHash.slice(0, 7)}
|
{item.GitConfig.ConfigHash.slice(0, 7)}
|
||||||
|
|
|
@ -19,8 +19,3 @@ export function getValidEditorTypes(
|
||||||
? _.intersection(...endpointTypes.map((type) => right[type]))
|
? _.intersection(...endpointTypes.map((type) => right[type]))
|
||||||
: [EditorType.Compose, EditorType.Kubernetes];
|
: [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$/, '');
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue