mirror of https://github.com/portainer/portainer
fix(stacks): remove deployed version column [EE-6346] (#10859)
Co-authored-by: testa113 <testa113>pull/10867/head
parent
e687cee608
commit
52fe09d0b1
|
@ -1,44 +0,0 @@
|
|||
import { isExternalStack } from '@/react/docker/stacks/view-models/utils';
|
||||
import { cleanGitRepoUrl } from '@/react/portainer/gitops/utils';
|
||||
|
||||
import { columnHelper } from './helper';
|
||||
|
||||
export const deployedVersion = columnHelper.accessor(
|
||||
(item) => {
|
||||
if (isExternalStack(item)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return item.GitConfig ? item.GitConfig.ConfigHash : item.StackFileVersion;
|
||||
},
|
||||
{
|
||||
header: 'Deployed Version',
|
||||
id: 'deployed-version',
|
||||
cell: ({ row: { original: item } }) => {
|
||||
if (isExternalStack(item)) {
|
||||
return <div className="text-center">-</div>;
|
||||
}
|
||||
|
||||
if (item.GitConfig) {
|
||||
return (
|
||||
<div className="text-center">
|
||||
<a
|
||||
target="_blank"
|
||||
href={`${cleanGitRepoUrl(item.GitConfig.URL)}/commit/${
|
||||
item.GitConfig.ConfigHash
|
||||
}`}
|
||||
rel="noreferrer"
|
||||
>
|
||||
{item.GitConfig.ConfigHash.slice(0, 7)}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return <div className="text-center">{item.StackFileVersion || '-'}</div>;
|
||||
},
|
||||
meta: {
|
||||
className: '[&>*]:justify-center',
|
||||
},
|
||||
}
|
||||
);
|
|
@ -10,7 +10,6 @@ import { columnHelper } from './helper';
|
|||
import { name } from './name';
|
||||
import { imageNotificationColumn } from './image-notification';
|
||||
import { control } from './control';
|
||||
import { deployedVersion } from './deployed-version';
|
||||
|
||||
export function useColumns(isImageNotificationEnabled: boolean) {
|
||||
return _.compact([
|
||||
|
@ -52,7 +51,6 @@ export function useColumns(isImageNotificationEnabled: boolean) {
|
|||
return `${isoDateFromTimestamp(value)} ${by}`.trim();
|
||||
},
|
||||
}),
|
||||
deployedVersion,
|
||||
createOwnershipColumn<DecoratedStack>(false),
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue