1
0
Fork 0
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:
Chaim Lev-Ari 2023-10-11 10:27:42 +03:00 committed by GitHub
parent 8e1417b4e9
commit 5c37ed328f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 402 additions and 395 deletions

View file

@ -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;
}
}