Commit 18b0de4a authored by Thodoris Nestoridis's avatar Thodoris Nestoridis

tool v0.9

parent 32b8bb89
...@@ -14,7 +14,7 @@ export class AppComponent { ...@@ -14,7 +14,7 @@ export class AppComponent {
title = 'ReqmanAngular11'; title = 'ReqmanAngular11';
LoggedIn() { LoggedIn() {
console.log(this.authService.isLoggedIn()) //console.log(this.authService.isLoggedIn())
return this.authService.isLoggedIn(); return this.authService.isLoggedIn();
} }
......
...@@ -30,6 +30,13 @@ ...@@ -30,6 +30,13 @@
<input name="title" id="title" type="text" class="form-control" required <input name="title" id="title" type="text" class="form-control" required
[(ngModel)]="currentboilerplate.title" (change)="this.updateBoilerplate()" style="width: 63%;" /> [(ngModel)]="currentboilerplate.title" (change)="this.updateBoilerplate()" style="width: 63%;" />
</div> </div>
<div class="form-group" style="display:flex; flex-direction: row; align-items: center">
<label for="title" style="margin-right: 35px;"><b>Extracted property</b></label>
<textarea id="clipboard-example-textarea" class="form-control" style="width: 63%;">{{this.property_text}}</textarea>
<button [cdkCopyToClipboard]="this.property_text" mat-mini-fab color="gray" style="margin-left: 8px;" ><mat-icon>content_copy</mat-icon></button>
</div>
<div style="display: flex; flex-grow: grow; margin-top: 50px; "> <div style="display: flex; flex-grow: grow; margin-top: 50px; ">
<form class="form-group form-inline "> <form class="form-group form-inline ">
<mat-checkbox class="example-full-width" [(ngModel)]="currentboilerplate.has_prefix" <mat-checkbox class="example-full-width" [(ngModel)]="currentboilerplate.has_prefix"
...@@ -158,6 +165,9 @@ ...@@ -158,6 +165,9 @@
<button mat-button [matMenuTriggerFor]="menu" <button mat-button [matMenuTriggerFor]="menu"
[matMenuTriggerData]="{section: section.Name ,class: item.Class}" #menuTrigger> [matMenuTriggerData]="{section: section.Name ,class: item.Class}" #menuTrigger>
<h4><b>Instances</b></h4> <h4><b>Instances</b></h4>
<div *ngIf="this.instaspiner">
<mat-spinner [diameter]='15' style="position: absolute; z-index: 1;top: 10%;left: 125%;"></mat-spinner>
</div>
</button> </button>
<div *ngFor="let instan of item.Instance_of_Class| filter:searchText"> <div *ngFor="let instan of item.Instance_of_Class| filter:searchText">
<li> <li>
...@@ -238,7 +248,10 @@ ...@@ -238,7 +248,10 @@
<ul> <button mat-button [matMenuTriggerFor]="menu" <ul> <button mat-button [matMenuTriggerFor]="menu"
[matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name, subsubclass:subsub.SubSubClass_name , subsubsubclass: subsubsub.SubSubClass_name, subsubsubsubclass: subsubsubsub.SubSubClass_name}" [matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name, subsubclass:subsub.SubSubClass_name , subsubsubclass: subsubsub.SubSubClass_name, subsubsubsubclass: subsubsubsub.SubSubClass_name}"
#menuTrigger> #menuTrigger>
<h5>AAA-Instances</h5> <h5>Instances</h5>
<div *ngIf="this.instaspiner">
<mat-spinner [diameter]='15' style="position: absolute; z-index: 1;top: 10%;left: 125%;"></mat-spinner>
</div>
</button> </button>
<div <div
*ngFor="let subsubsubsubinstansub of subsubsubsub.SubInstanceOfSubclass| filter:searchText"> *ngFor="let subsubsubsubinstansub of subsubsubsub.SubInstanceOfSubclass| filter:searchText">
...@@ -277,6 +290,9 @@ ...@@ -277,6 +290,9 @@
[matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name, subsubclass:subsub.SubSubClass_name , subsubsubclass: subsubsub.SubSubClass_name}" [matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name, subsubclass:subsub.SubSubClass_name , subsubsubclass: subsubsub.SubSubClass_name}"
#menuTrigger> #menuTrigger>
<h5>Instances</h5> <h5>Instances</h5>
<div *ngIf="this.instaspiner">
<mat-spinner [diameter]='15' style="position: absolute; z-index: 1;top: 10%;left: 125%;"></mat-spinner>
</div>
</button> </button>
<div *ngFor="let subsubsubinstansub of subsubsub.SubInstanceOfSubclass| filter:searchText"> <div *ngFor="let subsubsubinstansub of subsubsub.SubInstanceOfSubclass| filter:searchText">
<li> <li>
...@@ -313,6 +329,9 @@ ...@@ -313,6 +329,9 @@
[matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name, subsubclass:subsub.SubSubClass_name }" [matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name, subsubclass:subsub.SubSubClass_name }"
#menuTrigger> #menuTrigger>
<h5>Instances</h5> <h5>Instances</h5>
<div *ngIf="this.instaspiner">
<mat-spinner [diameter]='15' style="position: absolute; z-index: 1;top: 10%;left: 125%;"></mat-spinner>
</div>
</button> </button>
<div *ngFor="let subsubinstansub of subsub.SubInstanceOfSubclass| filter:searchText"> <div *ngFor="let subsubinstansub of subsub.SubInstanceOfSubclass| filter:searchText">
<li> <li>
...@@ -349,6 +368,9 @@ ...@@ -349,6 +368,9 @@
[matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name}" [matMenuTriggerData]="{section: section.Name ,class: item.Class, subclass: sub.SubClass_name}"
#menuTrigger> #menuTrigger>
<h5>Instances</h5> <h5>Instances</h5>
<div *ngIf="this.instaspiner">
<mat-spinner [diameter]='15' style="position: absolute; z-index: 1;top: 10%;left: 125%;"></mat-spinner>
</div>
</button> </button>
<div *ngFor="let instansub of sub.InstanceOfSubclass| filter:searchText"> <div *ngFor="let instansub of sub.InstanceOfSubclass| filter:searchText">
<li> <li>
...@@ -408,6 +430,9 @@ ...@@ -408,6 +430,9 @@
<ul> <ul>
<button mat-button [matMenuTriggerFor]="menu" [matMenuTriggerData]="{section: section.Name}" #menuTrigger> <button mat-button [matMenuTriggerFor]="menu" [matMenuTriggerData]="{section: section.Name}" #menuTrigger>
<h4>Instances</h4> <h4>Instances</h4>
<div *ngIf="this.instaspiner">
<mat-spinner [diameter]='15' style="position: absolute; z-index: 1;top: 10%;left: 125%;"></mat-spinner>
</div>
</button> </button>
<div *ngFor="let genin of section.GeneralInstances| filter:searchText"> <div *ngFor="let genin of section.GeneralInstances| filter:searchText">
<li> <li>
......
...@@ -46,6 +46,8 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -46,6 +46,8 @@ export class BoilerplateDetailsComponent implements OnInit {
mes_list = [] as any; mes_list = [] as any;
searchInstance_list = [] as any; searchInstance_list = [] as any;
private readonly notifier: NotifierService; private readonly notifier: NotifierService;
instaspiner=false;
property_text ='';
...@@ -66,6 +68,7 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -66,6 +68,7 @@ export class BoilerplateDetailsComponent implements OnInit {
this.getchoices(this.route.snapshot.params.gb); this.getchoices(this.route.snapshot.params.gb);
this.getBoilerplate(this.route.snapshot.params.gb, this.route.snapshot.params.id); this.getBoilerplate(this.route.snapshot.params.gb, this.route.snapshot.params.id);
this.getInfer(); this.getInfer();
this.getProperty();
} }
searchInstance(): void { searchInstance(): void {
...@@ -133,6 +136,7 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -133,6 +136,7 @@ export class BoilerplateDetailsComponent implements OnInit {
if (this.currentboilerplate.has_main) { this.mainchild.updateMain(); }; if (this.currentboilerplate.has_main) { this.mainchild.updateMain(); };
if (this.currentboilerplate.has_suffix) { this.sufchild.updateSuffix(); }; if (this.currentboilerplate.has_suffix) { this.sufchild.updateSuffix(); };
this.notifier.notify("success", (JSON.stringify("Requirement " + this.currentboilerplate.title + " updated"))); this.notifier.notify("success", (JSON.stringify("Requirement " + this.currentboilerplate.title + " updated")));
//setTimeout(() => this.getProperty(),1500);
} }
deleteBoilerplate(): void { deleteBoilerplate(): void {
...@@ -209,6 +213,7 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -209,6 +213,7 @@ export class BoilerplateDetailsComponent implements OnInit {
deleteInstance(section: any, classes: any, subclass: any, subsubclass: any, subsubsubclass: any, subsubsubsubclass: any, instance: any, comment: any): void { deleteInstance(section: any, classes: any, subclass: any, subsubclass: any, subsubsubclass: any, subsubsubsubclass: any, instance: any, comment: any): void {
if (confirm("Αre you sure you want to delete this Instance?")) { if (confirm("Αre you sure you want to delete this Instance?")) {
this.instaspiner=true;
const removeinstance = section + (classes ? ' : ' + classes : '') + (subclass ? ' : ' + subclass : '') + (subsubclass ? ' : ' + subsubclass : '') + (subsubsubclass ? ' : ' + subsubsubclass : '') + (subsubsubsubclass ? ' : ' + subsubsubsubclass : '') + ' : ' + instance; const removeinstance = section + (classes ? ' : ' + classes : '') + (subclass ? ' : ' + subclass : '') + (subsubclass ? ' : ' + subsubclass : '') + (subsubsubclass ? ' : ' + subsubsubclass : '') + (subsubsubsubclass ? ' : ' + subsubsubsubclass : '') + ' : ' + instance;
this.mainService.deleteinstances(this.route.snapshot.params.gb, removeinstance, (comment ? comment : ' ')) this.mainService.deleteinstances(this.route.snapshot.params.gb, removeinstance, (comment ? comment : ' '))
.subscribe( .subscribe(
...@@ -220,6 +225,7 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -220,6 +225,7 @@ export class BoilerplateDetailsComponent implements OnInit {
error => { error => {
if (error.error.text == 'Instance deleted') { if (error.error.text == 'Instance deleted') {
this.notifier.notify("success", (JSON.stringify(error.error.text))); this.notifier.notify("success", (JSON.stringify(error.error.text)));
this.instaspiner=false;
if (this.systems) { if (this.systems) {
this.systems.forEach(function (value) { this.systems.forEach(function (value) {
if (section == value.Name) { if (section == value.Name) {
...@@ -353,8 +359,9 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -353,8 +359,9 @@ export class BoilerplateDetailsComponent implements OnInit {
result.instance = result.instance?.replace(/ /g, "_") result.instance = result.instance?.replace(/ /g, "_")
} }
if (result.instance) { if (result.instance) {
this.instaspiner=true;
this.addinstance = section + (classes ? ' : ' + classes : '') + (subclass ? ' : ' + subclass : '') + (subsubclass ? ' : ' + subsubclass : '') + (subsubsubclass ? ' : ' + subsubsubclass : '') + (subsubsubsubclass ? ' : ' + subsubsubsubclass : '') + ' : ' + result.instance; this.addinstance = section + (classes ? ' : ' + classes : '') + (subclass ? ' : ' + subclass : '') + (subsubclass ? ' : ' + subsubclass : '') + (subsubsubclass ? ' : ' + subsubsubclass : '') + (subsubsubsubclass ? ' : ' + subsubsubsubclass : '') + ' : ' + result.instance;
//console.log(this.addinstance); console.log(this.addinstance);
this.mainService.setinstances(this.route.snapshot.params.gb, this.addinstance, (result.comment ? result.comment : " ")) this.mainService.setinstances(this.route.snapshot.params.gb, this.addinstance, (result.comment ? result.comment : " "))
.subscribe( .subscribe(
data => { data => {
...@@ -366,6 +373,7 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -366,6 +373,7 @@ export class BoilerplateDetailsComponent implements OnInit {
error => { error => {
if (error.error.text == 'Update Instance') { if (error.error.text == 'Update Instance') {
this.notifier.notify("success", (JSON.stringify(error.error.text))); this.notifier.notify("success", (JSON.stringify(error.error.text)));
this.instaspiner=false;
if (this.systems) { if (this.systems) {
this.systems.forEach(function (value) { this.systems.forEach(function (value) {
if (section == value.Name) { if (section == value.Name) {
...@@ -561,6 +569,16 @@ export class BoilerplateDetailsComponent implements OnInit { ...@@ -561,6 +569,16 @@ export class BoilerplateDetailsComponent implements OnInit {
}); });
} }
getProperty(): void {
this.boilerplateService.getProperties(this.route.snapshot.params.gb, this.route.snapshot.params.id).subscribe(
data => {
this.property_text=data;
},
error => {
this.property_text=((JSON.stringify(error.error.text)));
});
}
prefixs = [ prefixs = [
......
...@@ -28,10 +28,16 @@ ...@@ -28,10 +28,16 @@
</div> </div>
<div fxFlex fxLayout fxHide.xs fxLayoutAlign="end"> <div fxFlex fxLayout fxHide.xs fxLayoutAlign="end">
<div> <div>
<input class="btn btn-info" [disabled]="exporting" type="button" value="Download" <input class="btn btn-info" [disabled]="exporting" type="button" value="Ontology"
(click)="getCurrentOntology()" /> (click)="getCurrentOntology()" />
</div> </div>
</div> </div>
<div fxFlex fxLayout fxHide.xs fxLayoutAlign="end">
<div>
<input class="btn btn-info" [disabled]="exporting" type="button" value="Properties"
(click)="getCurrentProperties()" />
</div>
</div>
<div fxFlex fxLayout fxHide.xs fxLayoutAlign="end" *ngIf="this.selection.selected.length >= 1"> <div fxFlex fxLayout fxHide.xs fxLayoutAlign="end" *ngIf="this.selection.selected.length >= 1">
<div> <div>
<button mat-mini-fab color="warn" (click)="deleteBoilerplateList()"> <button mat-mini-fab color="warn" (click)="deleteBoilerplateList()">
...@@ -39,8 +45,6 @@ ...@@ -39,8 +45,6 @@
</button> </button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div [hidden]="!showSpinner"> <div [hidden]="!showSpinner">
...@@ -62,11 +66,11 @@ ...@@ -62,11 +66,11 @@
</mat-checkbox> </mat-checkbox>
</td> </td>
</ng-container> </ng-container>
<!-- Position Column --> <!-- Position Column
<ng-container matColumnDef="id"> <ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef> No. </th> <th mat-header-cell *matHeaderCellDef> No. </th>
<td mat-cell *matCellDef="let element"> {{element.id}} </td> <td mat-cell *matCellDef="let element"> {{element.id}} </td>
</ng-container> </ng-container> -->
<!-- Name Column --> <!-- Name Column -->
<ng-container matColumnDef="prefix_data" > <ng-container matColumnDef="prefix_data" >
......
...@@ -26,6 +26,20 @@ table { ...@@ -26,6 +26,20 @@ table {
border-color: currentColor; border-color: currentColor;
} }
.form-control {
border: none;
border-radius: 5px;
padding: 10px;
font-size: 16px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
outline: none;
transition: box-shadow 0.3s ease-in-out;
}
.form-control:focus {
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
::ng-deep .custom-tooltip { ::ng-deep .custom-tooltip {
background-color: #333; background-color: #333;
color: #fff; color: #fff;
......
...@@ -57,7 +57,7 @@ export class BoilerplateListComponent implements OnInit { ...@@ -57,7 +57,7 @@ export class BoilerplateListComponent implements OnInit {
currentIndex = -1; currentIndex = -1;
title = ''; title = '';
displayedColumns: string[] = ['id', 'title', 'has_prefix', 'has_main', 'has_suffix']; displayedColumns: string[] = ['id', 'title', 'has_prefix', 'has_main', 'has_suffix'];
newdisplayedColumns: string[] = ['select', 'id', 'title_data', 'prefix_data', 'main_data', 'suffix_data']; newdisplayedColumns: string[] = ['select', 'title_data', 'prefix_data', 'main_data', 'suffix_data'];
dataSource: Boilerplate[] = [{}]; dataSource: Boilerplate[] = [{}];
thenewdataSource: BoilerplateData[] = [{}]; thenewdataSource: BoilerplateData[] = [{}];
newdataSource = new MatTableDataSource(this.thenewdataSource); newdataSource = new MatTableDataSource(this.thenewdataSource);
...@@ -104,6 +104,26 @@ export class BoilerplateListComponent implements OnInit { ...@@ -104,6 +104,26 @@ export class BoilerplateListComponent implements OnInit {
} }
getCurrentProperties(): void {
this.boilerplateService.getFileProperties(this.route.snapshot.params.gb)
.subscribe(res => {
let blob = new Blob([res], { type: 'text/plain' });
var url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'properties.txt';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
},
error => {
this.notifier.notify("warning", 'Fail to download properties file');
});
}
retrieveBoilerplates(): void { retrieveBoilerplates(): void {
this.boilerplateService.getAll(this.route.snapshot.params.gb) this.boilerplateService.getAll(this.route.snapshot.params.gb)
.subscribe( .subscribe(
......
...@@ -41,15 +41,15 @@ ...@@ -41,15 +41,15 @@
</mat-grid-tile> </mat-grid-tile>
<mat-grid-tile> <mat-grid-tile>
<div class="col" *ngIf="data.currentSection == 'Function'"> <div class="col" *ngIf="data.currentSection == 'Function'">
<p>The current instance will add the above requirement in the ontology :</p> <p>The current instance will add the bellow information in the ontology :</p>
<h1><u>{{data.currentInstance}} shall invoke {{data.instance}}</u></h1> <h1><u>{{data.currentInstance}} shall invoke {{data.instance}}</u></h1>
</div> </div>
<div class="col" *ngIf="data.currentSection == 'System'"> <div class="col" *ngIf="data.currentSection == 'System'">
<p>The current instance will add the above requirement in the ontology :</p> <p>The current instance will add the bellow information in the ontology :</p>
<h1><u>{{data.currentInstance}} shall contain {{data.instance}}</u></h1> <h1><u>{{data.currentInstance}} shall contain {{data.instance}}</u></h1>
</div> </div>
<div class="col" *ngIf="data.currentSection == 'Item'"> <div class="col" *ngIf="data.currentSection == 'Item'">
<p>The current instance will add the above requirement in the ontology :</p> <p>The current instance will add the bellow information in the ontology :</p>
<mat-form-field style="width: 100%;" appearance="fill"> <mat-form-field style="width: 100%;" appearance="fill">
<mat-label>Select System</mat-label> <mat-label>Select System</mat-label>
<mat-select required [(ngModel)]="data.selectedValue" name="system"> <mat-select required [(ngModel)]="data.selectedValue" name="system">
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</mat-grid-tile> </mat-grid-tile>
<mat-grid-tile> <mat-grid-tile>
<div class="col"> <div class="col">
<p>The current instance will add the above requirement in the ontology :</p> <p>The current instance will add the bellow information in the ontology :</p>
<h1><u>{{data.instance}} belongs to </u></h1> <h1><u>{{data.instance}} belongs to </u></h1>
<mat-form-field style="width: 100%;" appearance="fill"> <mat-form-field style="width: 100%;" appearance="fill">
<mat-label>Select StateSet</mat-label> <mat-label>Select StateSet</mat-label>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</mat-grid-tile> </mat-grid-tile>
<mat-grid-tile> <mat-grid-tile>
<div class="col"> <div class="col">
<p>The current instance will add the above requirement in the ontology :</p> <p>The current instance will add the bellow information in the ontology :</p>
<mat-form-field style="width: 100%;" appearance="fill"> <mat-form-field style="width: 100%;" appearance="fill">
<mat-label>Select System</mat-label> <mat-label>Select System</mat-label>
<mat-select required [(ngModel)]="data.selectedValue" name="system1"> <mat-select required [(ngModel)]="data.selectedValue" name="system1">
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
</mat-checkbox> </mat-checkbox>
</section> </section>
<div *ngIf="checked"> <div *ngIf="checked">
<p>The current instance will add the above requirement in the ontology :</p> <p>The current instance will add the bellow information in the ontology :</p>
<mat-form-field style="width: 100%;" appearance="fill"> <mat-form-field style="width: 100%;" appearance="fill">
<mat-label>Select System</mat-label> <mat-label>Select System</mat-label>
<mat-select required [(ngModel)]="data.selectedValue" name="system"> <mat-select required [(ngModel)]="data.selectedValue" name="system">
......
...@@ -15,3 +15,17 @@ ...@@ -15,3 +15,17 @@
max-width: 750px; max-width: 750px;
margin: auto; margin: auto;
} }
.form-control {
border: none;
border-radius: 5px;
padding: 10px;
font-size: 16px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
outline: none;
transition: box-shadow 0.3s ease-in-out;
}
.form-control:focus {
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<form class="form-group form-inline" ngNativeValidate> <form class="form-group form-inline" ngNativeValidate>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="this.subjectsControl.value !=null">Subject : <mat-label *ngIf="this.subjectsControl.value !=null">Subject :
{{this.subjectsControl.value.split(':')[0]}}:{{this.subjectsControl.value.split(':')[1]}}</mat-label> {{this.subjectsControl.value.split(':')[0]}}:{{this.subjectsControl.value.split(':')[this.subjectsControl.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="Subject" matInput [formControl]="subjectsControl" <input type="text" placeholder="Pick one" aria-label="Subject" matInput [formControl]="subjectsControl"
required [matAutocomplete]="automainsub" style="width: 100%;" (blur)="closed($event, this.subjectsControl)"> required [matAutocomplete]="automainsub" style="width: 100%;" (blur)="closed($event, this.subjectsControl)">
<mat-autocomplete autoActiveFirstOption #automainsub="matAutocomplete" showPanel="true" <mat-autocomplete autoActiveFirstOption #automainsub="matAutocomplete" showPanel="true"
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
[ngStyle]="(stateitemControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}"> [ngStyle]="(stateitemControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="this.stateitemControl.value !=null">State or Item : <mat-label *ngIf="this.stateitemControl.value !=null">State or Item :
{{this.stateitemControl.value.split(':')[0]}}:{{this.stateitemControl.value.split(':')[1]}} </mat-label> {{this.stateitemControl.value.split(':')[0]}}:{{this.stateitemControl.value.split(':')[this.stateitemControl.value.split(':').length -2]}} </mat-label>
<input type="text" placeholder="Pick one" aria-label="Number" matInput [formControl]="stateitemControl" <input type="text" placeholder="Pick one" aria-label="Number" matInput [formControl]="stateitemControl"
[matAutocomplete]="autostateitem" (blur)="closed($event, this.stateitemControl)"> [matAutocomplete]="autostateitem" (blur)="closed($event, this.stateitemControl)">
<mat-autocomplete autoActiveFirstOption #autostateitem="matAutocomplete" showPanel="true" <mat-autocomplete autoActiveFirstOption #autostateitem="matAutocomplete" showPanel="true"
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
[ngStyle]="(statevalueControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}"> [ngStyle]="(statevalueControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="statevalueControl.value !=null">State Value : <mat-label *ngIf="statevalueControl.value !=null">State Value :
{{this.statevalueControl.value.split(':')[0]}}:{{this.statevalueControl.value.split(':')[1]}}</mat-label> {{this.statevalueControl.value.split(':')[0]}}:{{this.statevalueControl.value.split(':')[this.statevalueControl.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="StateValue" matInput [formControl]="statevalueControl" <input type="text" placeholder="Pick one" aria-label="StateValue" matInput [formControl]="statevalueControl"
[matAutocomplete]="autostatevalue" (blur)="closed($event, this.statevalueControl)"> [matAutocomplete]="autostatevalue" (blur)="closed($event, this.statevalueControl)">
<mat-autocomplete autoActiveFirstOption #autostatevalue="matAutocomplete" showPanel="true" <mat-autocomplete autoActiveFirstOption #autostatevalue="matAutocomplete" showPanel="true"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="col" style="width: 100px;"> <div class="col" >
<form class="form-group form-inline"> <form class="form-group form-inline">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Shall/shall not</mat-label> <mat-label>Shall/shall not</mat-label>
...@@ -73,8 +73,7 @@ ...@@ -73,8 +73,7 @@
</form> </form>
</div> </div>
<div class="col"> <div class="col">
<form class="form-group form-inline" <form class="form-group form-inline">
[ngStyle]="(verbControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="verbControl.value !=null">Verb : <mat-label *ngIf="verbControl.value !=null">Verb :
{{this.verbControl.value.split(':')[0]}}:{{this.verbControl.value.split(':')[1]}}</mat-label> {{this.verbControl.value.split(':')[0]}}:{{this.verbControl.value.split(':')[1]}}</mat-label>
...@@ -89,9 +88,8 @@ ...@@ -89,9 +88,8 @@
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
<div class="col"> <div class="col" [ngStyle]="(quantifierControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}" >
<form class="form-group form-inline" <form class="form-group form-inline">
[ngStyle]="(quantifierControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="quantifierControl.value !=null">Quantifier : <mat-label *ngIf="quantifierControl.value !=null">Quantifier :
{{this.quantifierControl.value.split(':')[1]}}</mat-label> {{this.quantifierControl.value.split(':')[1]}}</mat-label>
...@@ -106,20 +104,16 @@ ...@@ -106,20 +104,16 @@
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
<!--NUmber Value--> <div class="col" [ngStyle]="(numericalisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<div class="form-row"> <form class="form-group form-inline">
<div class="col">
<form class="form-group form-inline"
[ngStyle]="(numericalisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Numerical Value</mat-label> <mat-label>Numerical Value</mat-label>
<input type="text" matInput [(ngModel)]="currentmain.numerical" name="numerical"> <input type="text" matInput [(ngModel)]="currentmain.numerical" name="numerical">
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
<div class="col"> <div class="col" [ngStyle]="(numunitControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline" <form class="form-group form-inline">
[ngStyle]="(numunitControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Number Unit</mat-label> <mat-label>Number Unit</mat-label>
<input type="text" placeholder="Pick one" aria-label="Number" matInput [formControl]="numunitControl" <input type="text" placeholder="Pick one" aria-label="Number" matInput [formControl]="numunitControl"
...@@ -134,14 +128,13 @@ ...@@ -134,14 +128,13 @@
</form> </form>
</div> </div>
</div> </div>
</div>
<!-- <mat-label *ngIf=".value !=null">State or Item : {{.value.slice(0, .value.indexOf(':'))}}</mat-label> --> <!-- <mat-label *ngIf=".value !=null">State or Item : {{.value.slice(0, .value.indexOf(':'))}}</mat-label> -->
<div class="form-row"> <div class="form-row">
<div class="col"> <div class="col">
<form class="form-group form-inline"> <form class="form-group form-inline">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="fifuintsysstatsetControl.value !=null">Object : <mat-label *ngIf="fifuintsysstatsetControl.value !=null">Object :
{{this.fifuintsysstatsetControl.value.split(':')[0]}}:{{this.fifuintsysstatsetControl.value.split(':')[1]}} {{this.fifuintsysstatsetControl.value.split(':')[0]}}:{{this.fifuintsysstatsetControl.value.split(':')[this.fifuintsysstatsetControl.value.split(':').length -2]}}
</mat-label> </mat-label>
<input type="text" placeholder="Pick one" aria-label="Item" matInput <input type="text" placeholder="Pick one" aria-label="Item" matInput
[formControl]="fifuintsysstatsetControl" required [matAutocomplete]="autofifuintsysstatset" [formControl]="fifuintsysstatsetControl" required [matAutocomplete]="autofifuintsysstatset"
...@@ -155,12 +148,11 @@ ...@@ -155,12 +148,11 @@
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
<div class="col"> <div class="col" [ngStyle]="(stsysconsetControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline" <form class="form-group form-inline">
[ngStyle]="(stsysconsetControlisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="stsysconsetControl.value !=null">StateSet or StateValue or System or Connection : <mat-label *ngIf="stsysconsetControl.value !=null">StateSet or StateValue or System or Connection :
{{this.stsysconsetControl.value.split(':')[0]}}:{{this.stsysconsetControl.value.split(':')[1]}} {{this.stsysconsetControl.value.split(':')[0]}}:{{this.stsysconsetControl.value.split(':')[this.stsysconsetControl.value.split(':').length -2]}}
</mat-label> </mat-label>
<input placeholder="Pick one" aria-label="stsysconset" type="text" matInput [formControl]="stsysconsetControl" <input placeholder="Pick one" aria-label="stsysconset" type="text" matInput [formControl]="stsysconsetControl"
[matAutocomplete]="autostsysconset" (blur)="closed($event, this.stsysconsetControl)"> [matAutocomplete]="autostsysconset" (blur)="closed($event, this.stsysconsetControl)">
......
...@@ -106,39 +106,39 @@ export class MainDetailsComponent implements OnInit { ...@@ -106,39 +106,39 @@ export class MainDetailsComponent implements OnInit {
this.notifier = notifierService; this.notifier = notifierService;
this.subjectsfilteredOptions = this.subjectsControl.valueChanges.pipe( this.subjectsfilteredOptions = this.subjectsControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.subjects, value)) map(value => this._filter(this.subjects, value ? value : ''))
); );
this.stateitemfilteredOptions = this.stateitemControl.valueChanges.pipe( this.stateitemfilteredOptions = this.stateitemControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.stateitem, value)) map(value => this._filter(this.stateitem, value ? value : ''))
); );
this.statevaluefilteredOptions = this.statevalueControl.valueChanges.pipe( this.statevaluefilteredOptions = this.statevalueControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.statevalue, value)) map(value => this._filter(this.statevalue, value ? value : ''))
); );
this.shallfilteredOptions = this.shallControl.valueChanges.pipe( this.shallfilteredOptions = this.shallControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.shall, value)) map(value => this._filter(this.shall, value ? value : ''))
); );
this.verbfilteredOptions = this.verbControl.valueChanges.pipe( this.verbfilteredOptions = this.verbControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.verb, value)) map(value => this._filter(this.verb, value ? value : ''))
); );
this.quantifierfilteredOptions = this.quantifierControl.valueChanges.pipe( this.quantifierfilteredOptions = this.quantifierControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.quantifier, value)) map(value => this._filter(this.quantifier, value ? value : ''))
); );
this.numunitfilteredOptions = this.numunitControl.valueChanges.pipe( this.numunitfilteredOptions = this.numunitControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.numunit, value)) map(value => this._filter(this.numunit, value ? value : ''))
); );
this.fifuintsysstatsetfilteredOptions = this.fifuintsysstatsetControl.valueChanges.pipe( this.fifuintsysstatsetfilteredOptions = this.fifuintsysstatsetControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.fifuintsysstatset, value)) map(value => this._filter(this.fifuintsysstatset, value ? value : ''))
); );
this.stsysconsetfilteredOptions = this.stsysconsetControl.valueChanges.pipe( this.stsysconsetfilteredOptions = this.stsysconsetControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.stsysconset, value)) map(value => this._filter(this.stsysconset, value ? value : ''))
); );
} }
...@@ -266,8 +266,8 @@ export class MainDetailsComponent implements OnInit { ...@@ -266,8 +266,8 @@ export class MainDetailsComponent implements OnInit {
this.currentmain.shall = this.shallControl.value; this.currentmain.shall = this.shallControl.value;
this.currentmain.verb = this.verbControl.value; this.currentmain.verb = this.verbControl.value;
if (this.quantifierControlisDivVisible) { this.currentmain.quantifier = this.quantifierControl.value; } else { this.currentmain.quantifier = '' } if (this.quantifierControlisDivVisible) { this.currentmain.quantifier = this.quantifierControl.value; } else { this.currentmain.quantifier = '' }
//num if (!this.numericalisDivVisible) { this.currentmain.numerical = null }
if (this.numericalisDivVisible) { this.currentmain.mumerical_units = this.numunitControl.value; } else { this.currentmain.mumerical_units = '' } if (this.numunitControlisDivVisible) { this.currentmain.mumerical_units = this.numunitControl.value; } else { this.currentmain.mumerical_units = '' }
this.currentmain.flow_function_interface_item_system_state_stateset = this.fifuintsysstatsetControl.value; this.currentmain.flow_function_interface_item_system_state_stateset = this.fifuintsysstatsetControl.value;
if (this.stsysconsetControlisDivVisible) { this.currentmain.statevalue_system_connection_stateset = this.stsysconsetControl.value; } else { this.currentmain.statevalue_system_connection_stateset = '' } if (this.stsysconsetControlisDivVisible) { this.currentmain.statevalue_system_connection_stateset = this.stsysconsetControl.value; } else { this.currentmain.statevalue_system_connection_stateset = '' }
......
<div class="form-row"> <div class="form-row">
<div class="col"> <div class="col">
<form class="form-group form-inline" ngNativeValidate> <form class="form-group form-inline" ngNativeValidate>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<form class="form-group form-inline"> <form class="form-group form-inline">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="subjectsControl.value !=null">Subject : <mat-label *ngIf="subjectsControl.value !=null">Subject :
{{this.subjectsControl.value.split(':')[0]}}:{{this.subjectsControl.value.split(':')[1]}}</mat-label> {{this.subjectsControl.value.split(':')[0]}}:{{this.subjectsControl.value.split(':')[this.subjectsControl.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="SubC" matInput [formControl]="subjectsControl" required <input type="text" placeholder="Pick one" aria-label="SubC" matInput [formControl]="subjectsControl" required
[matAutocomplete]="autosub" (blur)="closed($event, this.subjectsControl)"> [matAutocomplete]="autosub" (blur)="closed($event, this.subjectsControl)">
<mat-autocomplete autoActiveFirstOption #autosub="matAutocomplete" showPanel="true" [displayWith]="displayFn" panelWidth="string" panelWidth="string"> <mat-autocomplete autoActiveFirstOption #autosub="matAutocomplete" showPanel="true" [displayWith]="displayFn" panelWidth="string" panelWidth="string">
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="col"> <div class="col">
<form class="form-group form-inline"> <form class="form-group form-inline">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
...@@ -62,18 +62,17 @@ ...@@ -62,18 +62,17 @@
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
<div class="col"> <div class="col" [ngStyle]="(numericalisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline" <form class="form-group form-inline"
[ngStyle]="(numericalisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}"> >
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Numerical Value</mat-label> <mat-label>Numerical Value</mat-label>
<input type="text" matInput [(ngModel)]="currentprefix.prefix_numerical" name="numerical"> <input type="text" matInput [(ngModel)]="currentprefix.prefix_numerical" name="numerical">
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
<div class="col"> <div class="col" [ngStyle]="(numericalisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline" <form class="form-group form-inline">
[ngStyle]="(numericalisDivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Number Unit</mat-label> <mat-label>Number Unit</mat-label>
<input type="text" placeholder="Pick one" aria-label="PNumUnit" matInput <input type="text" placeholder="Pick one" aria-label="PNumUnit" matInput
...@@ -87,14 +86,13 @@ ...@@ -87,14 +86,13 @@
</mat-form-field> </mat-form-field>
</form> </form>
</div> </div>
</div>
</div> <div class="form-row">
<div class="form-row">
<div class="col"> <div class="col">
<form class="form-group form-inline"> <form class="form-group form-inline">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="objectsControl.value !=null">Object : <mat-label *ngIf="objectsControl.value !=null">Object :
{{this.objectsControl.value.split(':')[0]}}:{{this.objectsControl.value.split(':')[1]}}</mat-label> {{this.objectsControl.value.split(':')[0]}}:{{this.objectsControl.value.split(':')[this.objectsControl.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="PreObj" matInput required [formControl]="objectsControl" <input type="text" placeholder="Pick one" aria-label="PreObj" matInput required [formControl]="objectsControl"
[matAutocomplete]="autobjects" (blur)="closed($event, this.objectsControl)"> [matAutocomplete]="autobjects" (blur)="closed($event, this.objectsControl)">
<mat-autocomplete autoActiveFirstOption #autobjects="matAutocomplete" showPanel="true" <mat-autocomplete autoActiveFirstOption #autobjects="matAutocomplete" showPanel="true"
...@@ -107,12 +105,12 @@ ...@@ -107,12 +105,12 @@
</form> </form>
</div> </div>
<div class="col"> <div class="col">
<form matTooltip="Under development" matTooltipPosition="right" class="form-group form-inline"> <form class="form-group form-inline">
<fieldset disabled> <fieldset>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Logic connectivity</mat-label> <mat-label>Logic connectivity</mat-label>
<input type="text" placeholder="Pick one" aria-label="PreLogic_c" matInput [formControl]="logic_conControl" <input type="text" placeholder="Pick one" aria-label="PreLogic_c" matInput [formControl]="logic_conControl"
[matAutocomplete]="autolog_con" (blur)="closed($event, this.logic_conControl)"> [matAutocomplete]="autolog_con" >
<mat-autocomplete autoActiveFirstOption #autolog_con="matAutocomplete"> <mat-autocomplete autoActiveFirstOption #autolog_con="matAutocomplete">
<mat-option *ngFor="let option of logic_confilteredOptions | async" [value]="option"> <mat-option *ngFor="let option of logic_confilteredOptions | async" [value]="option">
{{option}} {{option}}
...@@ -122,12 +120,100 @@ ...@@ -122,12 +120,100 @@
</fieldset> </fieldset>
</form> </form>
</div> </div>
</div> </div>
<!--EXTRA PREFIX-->
<div *ngIf="secondprefix">
<div class="form-row">
<div class="col">
<form class="form-group form-inline">
<mat-form-field class="example-full-width">
<mat-label *ngIf="subjects2Control.value !=null">Subject :
{{this.subjects2Control.value.split(':')[0]}}:{{this.subjects2Control.value.split(':')[this.subjects2Control.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="SubC2" matInput [formControl]="subjects2Control" required
[matAutocomplete]="autosub2" (blur)="closed($event, this.subjects2Control)">
<mat-autocomplete autoActiveFirstOption #autosub2="matAutocomplete" showPanel="true" [displayWith]="displayFn" panelWidth="string" panelWidth="string">
<mat-option *ngFor="let option of subjects2filteredOptions | async" [value]="option">
{{option.split(" : ").pop()}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
<div class="col">
<form class="form-group form-inline">
<mat-form-field class="example-full-width">
<mat-label>Verb or State</mat-label>
<mat-label *ngIf="verbs2Control.value !=null">Subject : {{this.verbs2Control.value.split(':')[0]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="Verb" matInput required [formControl]="verbs2Control"
[matAutocomplete]="autoverb2" (blur)="closed($event, this.verbs2Control)">
<mat-autocomplete autoActiveFirstOption #autoverb2="matAutocomplete" showPanel="true" [displayWith]="displayFn" panelWidth="string">
<mat-option *ngFor="let option of verbs2filteredOptions | async" [value]="option">
{{option.split(" : ").pop()}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
<div class="col" [ngStyle]="(numericalis2DivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline">
<mat-form-field class="example-full-width">
<mat-label>Quantifier</mat-label>
<input placeholder="Pick one" aria-label="PrefixQ" matInput [formControl]="prefix_quantifier2Control" type="text"
[matAutocomplete]="autoprefix_quantifier2" (blur)="closed($event, this.prefix_quantifier2Control)">
<mat-autocomplete autoActiveFirstOption #autoprefix_quantifier2="matAutocomplete" showPanel="true"
[displayWith]="displayFn" panelWidth="string">
<mat-option *ngFor="let option of prefix_quantifier2filteredOptions | async" [value]="option">
{{option.split(" : ").pop()}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
<div class="col" [ngStyle]="(numericalis2DivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline">
<mat-form-field class="example-full-width">
<mat-label>Numerical Value</mat-label>
<!--ERROR-->
<input type="text" matInput [(ngModel)]="secondcurrentprefix.prefix_numerical" name="numerical2">
</mat-form-field>
</form>
</div>
<div class="col" [ngStyle]="(numericalis2DivVisible) ? {'visibility': 'visible'} : {'visibility': 'hidden', 'width':'0%'}">
<form class="form-group form-inline">
<mat-form-field class="example-full-width">
<mat-label>Number Unit</mat-label>
<input type="text" placeholder="Pick one" aria-label="PNumUnit" matInput
[formControl]="prefix_mumerical2_unitsControl" [matAutocomplete]="autoprefix_mumerical_units2">
<mat-autocomplete autoActiveFirstOption #autoprefix_mumerical_units2="matAutocomplete" showPanel="true"
[displayWith]="displayFn" panelWidth="string" (blur)="closed($event, this.prefix_mumerical2_unitsControl)">
<mat-option *ngFor="let option of prefix_mumerical2_unitsfilteredOptions | async" [value]="option">
{{option.split(" : ").pop()}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
</div>
<div class="form-row">
<div class="col">
<form class="form-group form-inline">
<mat-form-field class="example-full-width">
<mat-label *ngIf="objects2Control.value !=null">Object :
{{this.objects2Control.value.split(':')[0]}}:{{this.objects2Control.value.split(':')[this.objects2Control.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="PreObj2" matInput required [formControl]="objects2Control"
[matAutocomplete]="autobjects2" (blur)="closed($event, this.objects2Control)">
<mat-autocomplete autoActiveFirstOption #autobjects2="matAutocomplete" showPanel="true"
[displayWith]="displayFn" panelWidth="string">
<mat-option *ngFor="let option of objects2filteredOptions | async" [value]="option">
{{option.split(" : ").pop()}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
</div>
</div>
\ No newline at end of file
<!--
<ng-container *ngFor= "let prefix of simpleprefix">
<ul>
<li>{{prefix[1]}}</li>
</ul>
-->
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="col"> <div class="col">
<form class="form-group form-inline" ngNativeValidate> <form class="form-group form-inline" ngNativeValidate>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="this.suffixControl.value !=null">Suffix : {{this.suffixControl.value.split(':')[0]}}:{{this.suffixControl.value.split(':')[1]}}</mat-label> <mat-label *ngIf="this.suffixControl.value !=null">Suffix : {{this.suffixControl.value.split(':')[0]}}:{{this.suffixControl.value.split(':')[this.suffixControl.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="Suf" matInput [formControl]="suffixControl" required <input type="text" placeholder="Pick one" aria-label="Suf" matInput [formControl]="suffixControl" required
[matAutocomplete]="autosuffix" (blur)="closed($event, this.suffixControl)"> [matAutocomplete]="autosuffix" (blur)="closed($event, this.suffixControl)">
<mat-autocomplete autoActiveFirstOption #autosuffix="matAutocomplete" showPanel="true" <mat-autocomplete autoActiveFirstOption #autosuffix="matAutocomplete" showPanel="true"
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<form class="form-group form-inline" <form class="form-group form-inline"
[ngStyle]=" showflow(this.suffixControl.value) ? {'visibility': 'visible'} : {'visibility': 'hidden'}"> [ngStyle]=" showflow(this.suffixControl.value) ? {'visibility': 'visible'} : {'visibility': 'hidden'}">
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label *ngIf="flowControl.value !=null">Flow or Function : {{this.flowControl.value.split(':')[0]}}:{{this.flowControl.value.split(':')[1]}}</mat-label> <mat-label *ngIf="flowControl.value !=null">Flow or Function : {{this.flowControl.value.split(':')[0]}}:{{this.flowControl.value.split(':')[this.flowControl.value.split(':').length -2]}}</mat-label>
<input type="text" placeholder="Pick one" aria-label="SufFlow" matInput [formControl]="flowControl" required <input type="text" placeholder="Pick one" aria-label="SufFlow" matInput [formControl]="flowControl" required
[matAutocomplete]="autoflow" (blur)="closed($event, this.flowControl)" > [matAutocomplete]="autoflow" (blur)="closed($event, this.flowControl)" >
<mat-autocomplete autoActiveFirstOption #autoflow="matAutocomplete" showPanel="true" [displayWith]="displayFn" panelWidth="string" panelWidth="string"> <mat-autocomplete autoActiveFirstOption #autoflow="matAutocomplete" showPanel="true" [displayWith]="displayFn" panelWidth="string" panelWidth="string">
......
...@@ -49,15 +49,15 @@ export class SuffixDetailsComponent implements OnInit { ...@@ -49,15 +49,15 @@ export class SuffixDetailsComponent implements OnInit {
this.notifier = notifierService; this.notifier = notifierService;
this.suffixfilteredOptions = this.suffixControl.valueChanges.pipe( this.suffixfilteredOptions = this.suffixControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.suffix, value)) map(value => this._filter(this.suffix, value ? value : ''))
); );
this.mumerical_unitsfilteredOptions = this.mumerical_unitsControl.valueChanges.pipe( this.mumerical_unitsfilteredOptions = this.mumerical_unitsControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.mumerical_units, value)) map(value => this._filter(this.mumerical_units, value ? value : ''))
); );
this.flowfilteredOptions = this.flowControl.valueChanges.pipe( this.flowfilteredOptions = this.flowControl.valueChanges.pipe(
startWith(""), startWith(""),
map(value => this._filter(this.flow, value)) map(value => this._filter(this.flow, value ? value : ''))
); );
} }
......
...@@ -38,6 +38,10 @@ export class BoilerplateService { ...@@ -38,6 +38,10 @@ export class BoilerplateService {
return this.http.put(`${baseUrlgb}${gb}${inferUrl}${id}/`, data); return this.http.put(`${baseUrlgb}${gb}${inferUrl}${id}/`, data);
} }
getFileProperties (gb: any): Observable<any> {
return this.http.get(`${genericbaseUrl}`+`/propertydata/${gb}`, { responseType: "blob" });
}
getAll(gb: any): Observable<Boilerplate[]> { getAll(gb: any): Observable<Boilerplate[]> {
//console.log(baseUrlgb + gb + baseUrl) //console.log(baseUrlgb + gb + baseUrl)
return this.http.get<Boilerplate[]>(baseUrlgb + gb + baseUrl); return this.http.get<Boilerplate[]>(baseUrlgb + gb + baseUrl);
...@@ -79,4 +83,8 @@ export class BoilerplateService { ...@@ -79,4 +83,8 @@ export class BoilerplateService {
return this.http.get(`${genericbaseUrl}`+`/getontology/${gb}`, { responseType: "blob" }); return this.http.get(`${genericbaseUrl}`+`/getontology/${gb}`, { responseType: "blob" });
} }
getProperties(gb: any, id: any): Observable<any> {
return this.http.get(`${baseUrlgb}${gb}`+`/boilerplates/${id}`+`/property/`);
}
} }
...@@ -30,7 +30,6 @@ SIMPLE_PREFIX_CHOICES = ( ("",""), ...@@ -30,7 +30,6 @@ SIMPLE_PREFIX_CHOICES = ( ("",""),
LOGIC_CONNECTIVE = ( ("or","OR"), LOGIC_CONNECTIVE = ( ("or","OR"),
("and", "AND"), ("and", "AND"),
("xor", "XOR")
) )
LOGICAL_EXPRESSION = ( ("",""), LOGICAL_EXPRESSION = ( ("",""),
...@@ -68,6 +67,7 @@ def create_prefixgroup(instance): ...@@ -68,6 +67,7 @@ def create_prefixgroup(instance):
def create_prefix(instance): def create_prefix(instance):
prefix = Prefix(prefix_boilerplate = instance.boilerplate, prefixgroup = instance) prefix = Prefix(prefix_boilerplate = instance.boilerplate, prefixgroup = instance)
prefix.save() prefix.save()
create_extra_prefix(prefix, 'AND')
def create_data(instance): def create_data(instance):
...@@ -261,8 +261,9 @@ class Prefix(models.Model): ...@@ -261,8 +261,9 @@ class Prefix(models.Model):
orig = '__original_%s' % field orig = '__original_%s' % field
previous_simple_prefix = getattr(self, orig) previous_simple_prefix = getattr(self, orig)
prev_prefix_list.append(previous_simple_prefix) prev_prefix_list.append(previous_simple_prefix)
if previous_simple_prefix == "" and not self.logic_connective == "" : print("DEBUG-------->",previous_simple_prefix)
create_extra_prefix ( self, self.logic_connective) #if previous_simple_prefix == "" and not self.logic_connective == "" :
# create_extra_prefix ( self, self.logic_connective)
class Meta: class Meta:
......
...@@ -10,6 +10,7 @@ urlpatterns = [ ...@@ -10,6 +10,7 @@ urlpatterns = [
path('users/<uuid:pk>/', user_views.UserDetail.as_view(), name='api-post-details'), path('users/<uuid:pk>/', user_views.UserDetail.as_view(), name='api-post-details'),
path('ontologies/', requirements_views.OntologiesChoicesViewSet.as_view(), name='api-get-ontologies'), path('ontologies/', requirements_views.OntologiesChoicesViewSet.as_view(), name='api-get-ontologies'),
path('getontology/<int:groupboil>/', requirements_views.GetOntology.as_view(), name='get-current-ontology'), path('getontology/<int:groupboil>/', requirements_views.GetOntology.as_view(), name='get-current-ontology'),
path('propertydata/<int:groupboil>/', requirements_views.PropertyListAPIView.as_view(), name='api-property-list-data'),
path('groupboilerplates/', requirements_views.BoilerplateGroupCreateAPIView.as_view(), name='api-groupboilerplates-create'), path('groupboilerplates/', requirements_views.BoilerplateGroupCreateAPIView.as_view(), name='api-groupboilerplates-create'),
path('groupboilerplates/<int:pk>/', requirements_views.BoilerplateGroupDetailsAPIView.as_view(), name='api-groupboilerplates-list'), path('groupboilerplates/<int:pk>/', requirements_views.BoilerplateGroupDetailsAPIView.as_view(), name='api-groupboilerplates-list'),
...@@ -54,5 +55,8 @@ urlpatterns = [ ...@@ -54,5 +55,8 @@ urlpatterns = [
#Search In Ontology #Search In Ontology
path('groupboilerplates/<int:groupboil>/search/<str:instance>/', main_req_views.SearchinOntologyAPIView.as_view(), name='setmainchoices'), path('groupboilerplates/<int:groupboil>/search/<str:instance>/', main_req_views.SearchinOntologyAPIView.as_view(), name='setmainchoices'),
#Properties
path('groupboilerplates/<int:groupboil>/boilerplates/<int:boilerplate>/property/', requirements_views.ExtractedPropertyAPIView.as_view(), name='api-property-list'),
] ]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment