1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

feat(ACI): add UAC to ACI (#4952)

This commit is contained in:
fhanportainer 2021-04-13 23:55:11 +12:00 committed by GitHub
parent d09ae22ba8
commit 12cf4a00f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 410 additions and 18 deletions

View file

@ -1,3 +1,6 @@
import { AccessControlFormData } from 'Portainer/components/accessControlForm/porAccessControlFormModel';
import { ResourceControlViewModel } from 'Portainer/models/resourceControl/resourceControl';
export function ContainerGroupDefaultModel() {
this.Location = '';
this.OSType = 'Linux';
@ -13,6 +16,7 @@ export function ContainerGroupDefaultModel() {
];
this.CPU = 1;
this.Memory = 1;
this.AccessControlData = new AccessControlFormData();
}
export function ContainerGroupViewModel(data) {
@ -30,6 +34,10 @@ export function ContainerGroupViewModel(data) {
this.AllocatePublicIP = data.properties.ipAddress.type === 'Public';
this.CPU = container.properties.resources.requests.cpu;
this.Memory = container.properties.resources.requests.memoryInGB;
if (data.Portainer && data.Portainer.ResourceControl) {
this.ResourceControl = new ResourceControlViewModel(data.Portainer.ResourceControl);
}
}
export function CreateContainerGroupRequest(model) {