mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 15:25:22 +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,13 +1,12 @@
|
|||
import moment from 'moment';
|
||||
import _ from 'lodash-es';
|
||||
import filesize from 'filesize';
|
||||
import { Eye, EyeOff, Users, Cloud } from 'lucide-react';
|
||||
import { Cloud } from 'lucide-react';
|
||||
|
||||
import Kube from '@/assets/ico/kube.svg?c';
|
||||
import DockerIcon from '@/assets/ico/vendor/docker-icon.svg?c';
|
||||
import MicrosoftIcon from '@/assets/ico/vendor/microsoft-icon.svg?c';
|
||||
import NomadIcon from '@/assets/ico/vendor/nomad-icon.svg?c';
|
||||
import { ResourceControlOwnership as RCO } from '@/react/portainer/access-control/types';
|
||||
import { EnvironmentType } from '@/react/portainer/environments/types';
|
||||
|
||||
export function truncateLeftRight(text, max, left, right) {
|
||||
|
@ -127,19 +126,6 @@ export function environmentTypeIcon(type) {
|
|||
}
|
||||
}
|
||||
|
||||
export function ownershipIcon(ownership) {
|
||||
switch (ownership) {
|
||||
case RCO.PRIVATE:
|
||||
return EyeOff;
|
||||
case RCO.ADMINISTRATORS:
|
||||
return EyeOff;
|
||||
case RCO.RESTRICTED:
|
||||
return Users;
|
||||
default:
|
||||
return Eye;
|
||||
}
|
||||
}
|
||||
|
||||
export function truncate(text, length, end) {
|
||||
if (isNaN(length)) {
|
||||
length = 10;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash-es';
|
||||
|
||||
import { ownershipIcon } from '@/react/docker/components/datatable/createOwnershipColumn';
|
||||
import {
|
||||
arrayToStr,
|
||||
environmentTypeIcon,
|
||||
|
@ -12,7 +13,6 @@ import {
|
|||
isoDate,
|
||||
isoDateFromTimestamp,
|
||||
labelsToStr,
|
||||
ownershipIcon,
|
||||
stripProtocol,
|
||||
truncate,
|
||||
truncateLeftRight,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue