mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-31 18:17:04 +00:00
CPUs and memory limitation for Docker containers
This commit is contained in:
parent
cb6cacc557
commit
8d795ebf10
@ -55,6 +55,7 @@ export class Properties {
|
||||
environment: string;
|
||||
extra_hosts: string;
|
||||
replicate_network_connection_state: boolean;
|
||||
memory: number;
|
||||
}
|
||||
|
||||
export class Node {
|
||||
|
@ -10,9 +10,19 @@
|
||||
<mat-form-field class="form-field">
|
||||
<input matInput formControlName="name" type="text" [(ngModel)]="node.name" placeholder="Name">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="form-field">
|
||||
<input formControlName="adapter" matInput type="number" [(ngModel)]="node.properties.adapters" placeholder="Adapters">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="form-field">
|
||||
<input formControlName="memory" matInput type="number" [(ngModel)]="node.properties.memory" placeholder="Maximum memory">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="form-field">
|
||||
<input formControlName="cpus" matInput type="number" [(ngModel)]="node.properties.cpus" placeholder="Maximum CPUs">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="select">
|
||||
<mat-select [ngModelOptions]="{standalone: true}" placeholder="Console type" [(ngModel)]="node.console_type">
|
||||
<mat-option *ngFor="let type of consoleTypes" [value]="type">
|
||||
|
@ -29,7 +29,9 @@ export class ConfiguratorDialogDockerComponent implements OnInit {
|
||||
) {
|
||||
this.generalSettingsForm = this.formBuilder.group({
|
||||
name: new FormControl('', Validators.required),
|
||||
adapter: new FormControl('', Validators.required)
|
||||
adapter: new FormControl('', Validators.required),
|
||||
memory: new FormControl(''),
|
||||
cpus: new FormControl('')
|
||||
});
|
||||
}
|
||||
|
||||
@ -38,12 +40,11 @@ export class ConfiguratorDialogDockerComponent implements OnInit {
|
||||
this.node = node;
|
||||
this.name = node.name;
|
||||
this.getConfiguration();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
getConfiguration() {
|
||||
this.consoleTypes = this.dockerConfigurationService.getConsoleTypes();
|
||||
|
||||
}
|
||||
|
||||
onSaveClick() {
|
||||
|
Loading…
Reference in New Issue
Block a user