1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

refactor(app): backport technical changes (#4679)

* refactor(app): backport technical changes

* refactor(app): remove EE only features

* feat(app): small review changes to match EE codebase layout on some files

Co-authored-by: xAt0mZ <baron_l@epitech.eu>
This commit is contained in:
Alice Groux 2021-02-26 16:50:33 +01:00 committed by GitHub
parent 158bdae10e
commit ccf6babc02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 951 additions and 976 deletions

View file

@ -12,7 +12,7 @@ class KubernetesPersistentVolumeClaimConverter {
res.Name = data.metadata.name;
res.Namespace = data.metadata.namespace;
res.CreationDate = data.metadata.creationTimestamp;
res.Storage = data.spec.resources.requests.storage.replace('i', 'B');
res.Storage = `${data.spec.resources.requests.storage}B`;
res.StorageClass = _.find(storageClasses, { Name: data.spec.storageClassName });
res.Yaml = yaml ? yaml.data : '';
res.ApplicationOwner = data.metadata.labels ? data.metadata.labels[KubernetesPortainerApplicationOwnerLabel] : '';
@ -35,7 +35,7 @@ class KubernetesPersistentVolumeClaimConverter {
pvc.PreviousName = item.PersistentVolumeClaimName;
}
pvc.StorageClass = existantPVC.StorageClass;
pvc.Storage = existantPVC.Storage.charAt(0) + 'i';
pvc.Storage = existantPVC.Storage.charAt(0);
pvc.CreationDate = existantPVC.CreationDate;
pvc.Id = existantPVC.Id;
} else {
@ -45,7 +45,7 @@ class KubernetesPersistentVolumeClaimConverter {
} else {
pvc.Name = formValues.Name + '-' + pvc.Name;
}
pvc.Storage = '' + item.Size + item.SizeUnit.charAt(0) + 'i';
pvc.Storage = '' + item.Size + item.SizeUnit.charAt(0);
pvc.StorageClass = item.StorageClass;
}
pvc.MountPath = item.ContainerPath;