mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 10:49:40 +02:00
chore(deps): upgrade react-table to v8 [EE-4837] (#8245)
This commit is contained in:
parent
f20d3e72b9
commit
757461d58b
140 changed files with 1805 additions and 2872 deletions
|
@ -1,15 +1,13 @@
|
|||
import { CellProps, Column } from 'react-table';
|
||||
|
||||
import { Authorized } from '@/react/hooks/useUser';
|
||||
import KubernetesNamespaceHelper from '@/kubernetes/helpers/namespaceHelper';
|
||||
|
||||
import { Service } from '../../types';
|
||||
import { columnHelper } from './helper';
|
||||
|
||||
export const name: Column<Service> = {
|
||||
Header: 'Name',
|
||||
id: 'Name',
|
||||
accessor: (row) => row.Name,
|
||||
Cell: ({ row }: CellProps<Service>) => {
|
||||
export const name = columnHelper.accessor('Name', {
|
||||
header: 'Name',
|
||||
id: 'name',
|
||||
cell: ({ row, getValue }) => {
|
||||
const name = getValue();
|
||||
const isSystem = KubernetesNamespaceHelper.isSystemNamespace(
|
||||
row.original.Namespace
|
||||
);
|
||||
|
@ -19,11 +17,8 @@ export const name: Column<Service> = {
|
|||
!row.original.Labels['io.portainer.kubernetes.application.owner'];
|
||||
|
||||
return (
|
||||
<Authorized
|
||||
authorizations="K8sServiceW"
|
||||
childrenUnauthorized={row.original.Name}
|
||||
>
|
||||
{row.original.Name}
|
||||
<Authorized authorizations="K8sServiceW" childrenUnauthorized={name}>
|
||||
{name}
|
||||
|
||||
{isSystem && (
|
||||
<span className="label label-info image-tag label-margins">
|
||||
|
@ -39,7 +34,4 @@ export const name: Column<Service> = {
|
|||
</Authorized>
|
||||
);
|
||||
},
|
||||
|
||||
disableFilters: true,
|
||||
canHide: true,
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue