mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(docker/volumes): migrate table to react [EE-4677] (#10312)
This commit is contained in:
parent
8e1417b4e9
commit
5c37ed328f
25 changed files with 402 additions and 395 deletions
|
@ -1,6 +1,6 @@
|
|||
import { CellContext, ColumnDef } from '@tanstack/react-table';
|
||||
import { Eye, EyeOff, Users } from 'lucide-react';
|
||||
|
||||
import { ownershipIcon } from '@/portainer/filters/filters';
|
||||
import { ResourceControlOwnership } from '@/react/portainer/access-control/types';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
|
@ -36,3 +36,16 @@ export function createOwnershipColumn<D extends IResource>(
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export function ownershipIcon(ownership: ResourceControlOwnership) {
|
||||
switch (ownership) {
|
||||
case ResourceControlOwnership.PRIVATE:
|
||||
return EyeOff;
|
||||
case ResourceControlOwnership.ADMINISTRATORS:
|
||||
return EyeOff;
|
||||
case ResourceControlOwnership.RESTRICTED:
|
||||
return Users;
|
||||
default:
|
||||
return Eye;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue