coorect flag in styl;e editor + width of menu changed + validation added

This commit is contained in:
Piotr Pekala 2019-07-03 03:26:29 -07:00
parent b4cb013090
commit 4377835153
6 changed files with 7 additions and 6 deletions

View File

@ -17,7 +17,6 @@ import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'
})
export class EthernetHubsAddTemplateComponent implements OnInit {
server: Server;
numberOfPorts: number;
templateName: string = '';
formGroup: FormGroup;

View File

@ -10,6 +10,9 @@
<mat-form-field class="form-field">
<input formControlName="templateName" matInput type="text" placeholder="Template name">
</mat-form-field>
<mat-form-field class="form-field">
<input formControlName="numberOfPorts" matInput type="text" placeholder="Number of ports">
</mat-form-field>
</form>
</mat-card>
<div class="buttons-bar">

View File

@ -17,7 +17,6 @@ import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'
})
export class EthernetSwitchesAddTemplateComponent implements OnInit {
server: Server;
numberOfPorts: number;
templateName: string = '';
formGroup: FormGroup;
@ -58,7 +57,7 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
ethernetSwitchTemplate.template_id = uuid();
ethernetSwitchTemplate.name = this.formGroup.get('templateName').value;
for(let i=0; i<this.numberOfPorts; i++){
for(let i=0; i<this.formGroup.get('numberOfPorts').value; i++){
ethernetSwitchTemplate.ports_mapping.push({
ethertype: '',
name: `Ethernet${i}`,

View File

@ -102,7 +102,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
this.qemuTemplate.hda_disk_image = this.selectedImage.path;
}
this.qemuTemplate.template_id = uuid();
this.qemuTemplate.name = this.nameForm.get("templateName").value();
this.qemuTemplate.name = this.nameForm.get("templateName").value;
this.qemuService.addTemplate(this.server, this.qemuTemplate).subscribe((template: QemuTemplate) => {
this.goBack();

View File

@ -7,7 +7,7 @@
</mat-form-field>
<mat-form-field class="form-field">
<input matInput [ngModelOptions]="{standalone: true}" placeholder="Fill color" type="color" [(ngModel)]="element.stroke">
<input matInput [ngModelOptions]="{standalone: true}" placeholder="Border color" type="color" [(ngModel)]="element.stroke">
</mat-form-field>
<mat-form-field class="form-field">

View File

@ -80,7 +80,7 @@ g.node:hover {
}
.extended {
width: 720px !important;
width: 700px !important;
height: 100%;
overflow: hidden;
}