mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +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
|
@ -1,43 +1,21 @@
|
|||
import { KubernetesCommonMetadataPayload } from 'Kubernetes/models/common/payloads';
|
||||
import {
|
||||
KubernetesPortainerResourceQuotaCPURequest,
|
||||
KubernetesPortainerResourceQuotaMemoryRequest,
|
||||
KubernetesPortainerResourceQuotaCPULimit,
|
||||
KubernetesPortainerResourceQuotaMemoryLimit,
|
||||
} from './models';
|
||||
|
||||
/**
|
||||
* KubernetesResourceQuotaCreatePayload Model
|
||||
*/
|
||||
const _KubernetesResourceQuotaCreatePayload = Object.freeze({
|
||||
metadata: new KubernetesCommonMetadataPayload(),
|
||||
spec: {
|
||||
hard: {
|
||||
'requests.cpu': 0,
|
||||
'requests.memory': 0,
|
||||
'limits.cpu': 0,
|
||||
'limits.memory': 0,
|
||||
export function KubernetesResourceQuotaCreatePayload() {
|
||||
return {
|
||||
metadata: new KubernetesCommonMetadataPayload(),
|
||||
spec: {
|
||||
hard: {
|
||||
[KubernetesPortainerResourceQuotaCPURequest]: 0,
|
||||
[KubernetesPortainerResourceQuotaMemoryRequest]: 0,
|
||||
[KubernetesPortainerResourceQuotaCPULimit]: 0,
|
||||
[KubernetesPortainerResourceQuotaMemoryLimit]: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export class KubernetesResourceQuotaCreatePayload {
|
||||
constructor() {
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesResourceQuotaCreatePayload)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* KubernetesResourceQuotaUpdatePayload Model
|
||||
*/
|
||||
const _KubernetesResourceQuotaUpdatePayload = Object.freeze({
|
||||
metadata: new KubernetesCommonMetadataPayload(),
|
||||
spec: {
|
||||
hard: {
|
||||
'requests.cpu': 0,
|
||||
'requests.memory': 0,
|
||||
'limits.cpu': 0,
|
||||
'limits.memory': 0,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export class KubernetesResourceQuotaUpdatePayload {
|
||||
constructor() {
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesResourceQuotaUpdatePayload)));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue