mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-03 19:44:12 +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;
|
environment: string;
|
||||||
extra_hosts: string;
|
extra_hosts: string;
|
||||||
replicate_network_connection_state: boolean;
|
replicate_network_connection_state: boolean;
|
||||||
|
memory: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Node {
|
export class Node {
|
||||||
|
@ -10,9 +10,19 @@
|
|||||||
<mat-form-field class="form-field">
|
<mat-form-field class="form-field">
|
||||||
<input matInput formControlName="name" type="text" [(ngModel)]="node.name" placeholder="Name">
|
<input matInput formControlName="name" type="text" [(ngModel)]="node.name" placeholder="Name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field class="form-field">
|
<mat-form-field class="form-field">
|
||||||
<input formControlName="adapter" matInput type="number" [(ngModel)]="node.properties.adapters" placeholder="Adapters">
|
<input formControlName="adapter" matInput type="number" [(ngModel)]="node.properties.adapters" placeholder="Adapters">
|
||||||
</mat-form-field>
|
</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-form-field class="select">
|
||||||
<mat-select [ngModelOptions]="{standalone: true}" placeholder="Console type" [(ngModel)]="node.console_type">
|
<mat-select [ngModelOptions]="{standalone: true}" placeholder="Console type" [(ngModel)]="node.console_type">
|
||||||
<mat-option *ngFor="let type of consoleTypes" [value]="type">
|
<mat-option *ngFor="let type of consoleTypes" [value]="type">
|
||||||
|
@ -29,7 +29,9 @@ export class ConfiguratorDialogDockerComponent implements OnInit {
|
|||||||
) {
|
) {
|
||||||
this.generalSettingsForm = this.formBuilder.group({
|
this.generalSettingsForm = this.formBuilder.group({
|
||||||
name: new FormControl('', Validators.required),
|
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.node = node;
|
||||||
this.name = node.name;
|
this.name = node.name;
|
||||||
this.getConfiguration();
|
this.getConfiguration();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfiguration() {
|
getConfiguration() {
|
||||||
this.consoleTypes = this.dockerConfigurationService.getConsoleTypes();
|
this.consoleTypes = this.dockerConfigurationService.getConsoleTypes();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSaveClick() {
|
onSaveClick() {
|
||||||
|
Loading…
Reference in New Issue
Block a user