mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +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:
parent
158bdae10e
commit
ccf6babc02
40 changed files with 951 additions and 976 deletions
|
@ -21,7 +21,7 @@ class KubernetesVolumeService {
|
|||
*/
|
||||
async getAsync(namespace, name) {
|
||||
try {
|
||||
const [pvc, pool] = await Promise.all([await this.KubernetesPersistentVolumeClaimService.get(namespace, name), await this.KubernetesResourcePoolService.get(namespace)]);
|
||||
const [pvc, pool] = await Promise.all([this.KubernetesPersistentVolumeClaimService.get(namespace, name), this.KubernetesResourcePoolService.get(namespace)]);
|
||||
return KubernetesVolumeConverter.pvcToVolume(pvc, pool);
|
||||
} catch (err) {
|
||||
throw err;
|
||||
|
@ -30,7 +30,8 @@ class KubernetesVolumeService {
|
|||
|
||||
async getAllAsync(namespace) {
|
||||
try {
|
||||
const pools = await this.KubernetesResourcePoolService.get(namespace);
|
||||
const data = await this.KubernetesResourcePoolService.get(namespace);
|
||||
const pools = data instanceof Array ? data : [data];
|
||||
const res = await Promise.all(
|
||||
_.map(pools, async (pool) => {
|
||||
const pvcs = await this.KubernetesPersistentVolumeClaimService.get(pool.Namespace.Name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue