Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano T Vaglienti2022-06-20 21:55:18 +0000
committerLuciano Vaglienti2022-06-23 20:49:03 +0000
commitedf91f6ca304fae781c4e77887449a77c622600f (patch)
tree757c8987628464276364f528199d99f8185d7978
parent257bca4c76f0cdbeb55cea03b022f3d63fc78c9b (diff)
downloadorg.eclipse.osee-edf91f6ca304fae781c4e77887449a77c622600f.tar.gz
org.eclipse.osee-edf91f6ca304fae781c4e77887449a77c622600f.tar.xz
org.eclipse.osee-edf91f6ca304fae781c4e77887449a77c622600f.zip
feature[TW20767]: ICD - Update Element dialog
Change-Id: I7d3e4724a60650aad4730952dffa32f00144446f Signed-off-by: Luciano T Vaglienti <luciano.t.vaglienti@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.web/cypress/support/messaging/element.commands.ts10
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.html49
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.spec.ts5
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.ts17
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.html22
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.spec.ts7
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.ts75
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/mocks/services/CurrentStateService.mock.ts8
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/shared/types/MimQuery.ts6
-rw-r--r--plugins/org.eclipse.osee.web/src/app/ple/messaging/structure-names/structure-names.component.html2
10 files changed, 155 insertions, 46 deletions
diff --git a/plugins/org.eclipse.osee.web/cypress/support/messaging/element.commands.ts b/plugins/org.eclipse.osee.web/cypress/support/messaging/element.commands.ts
index 901e930230c..1629dfacbe6 100644
--- a/plugins/org.eclipse.osee.web/cypress/support/messaging/element.commands.ts
+++ b/plugins/org.eclipse.osee.web/cypress/support/messaging/element.commands.ts
@@ -44,17 +44,23 @@ Cypress.Commands.add(
cy.get(`@end`).focus().type(endIndex);
cy.get(`[data-cy="search-type-menu"]`)
.click({ force: true })
+ .get('mat-dialog-content')
+ .first()
+ .click({force:true})
.get(`[data-cy="field-logical-type"]`)
- .click()
+ .click({force:true})
.get(`[data-cy="option-${type}"]`)
.click()
+ .get('mat-dialog-content')
+ .first()
+ .click({force:true})
.get(`[data-cy="query-button"]`)
.click({ force: true })
.get(`[data-cy="stepper-next"]`)
.click({ force: true });
return cy
.get(`[data-cy="submit-btn"]`)
- .click()
+ .click({force:true})
.wait('@txs')
.wait('@structures')
.get('osee-messaging-add-element-dialog')
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.html b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.html
index ba86b6cab60..52607b831b3 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.html
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.html
@@ -34,48 +34,59 @@
<mat-step label="Define element" #step2>
<mat-dialog-content>
<div style="visibility:visible">
- <mat-form-field>
+ <mat-form-field class="width-100">
<mat-label>Name</mat-label>
<input matInput [(ngModel)]="data.element.name" required data-cy="field-name">
+ <mat-hint>Name of the element being created</mat-hint>
</mat-form-field>
<br>
- <mat-form-field>
+ <mat-form-field class="width-100">
<mat-label>Description</mat-label>
<textarea cdkTextareaAutosize matInput [(ngModel)]="data.element.description" required data-cy="field-description"></textarea>
+ <mat-hint>Description of the element being created</mat-hint>
</mat-form-field>
<br>
- <mat-form-field>
+ <mat-form-field class="width-100">
<mat-label>Notes</mat-label>
- <input matInput [(ngModel)]="data.element.notes" data-cy="field-notes">
+ <textarea cdkTextareaAutosize matInput [(ngModel)]="data.element.notes" data-cy="field-notes"></textarea>
+ <mat-hint>Notes associated with the element being created</mat-hint>
</mat-form-field>
<br>
- <mat-form-field>
+ <mat-form-field class="width-100">
<mat-label>Start Index</mat-label>
<input type="number" matInput [(ngModel)]="data.element.interfaceElementIndexStart" required data-cy="field-index-start">
+ <mat-hint>Starting index of the element array being created(if inserting an array of elements)</mat-hint>
</mat-form-field>
<br>
- <mat-form-field>
+ <mat-form-field class="width-100">
<mat-label>End Index</mat-label>
<input type="number" matInput [(ngModel)]="data.element.interfaceElementIndexEnd" required data-cy="field-index-end">
+ <mat-hint>Ending index of the element array being created(if inserting an array of elements)</mat-hint>
</mat-form-field>
<br>
<mat-slide-toggle [(ngModel)]="data.element.interfaceElementAlterable" labelPosition='before' data-cy="field-alterable">
Alterable
</mat-slide-toggle>
<br>
- <mat-label>{{platformTypeState|async}}</mat-label>
- <br>
- <div class="flex row align-center">
- <mat-label>Find existing element information to create your element or create new type information.</mat-label>
- <button mat-icon-button (click)="openPlatformTypeDialog()"><mat-icon color="success">add</mat-icon></button>
- <ng-container *ngIf="!searchOpen">
- <button mat-icon-button (click)="openSearch()" class="search-button"><mat-icon color="primary" data-cy="search-type-menu">search</mat-icon></button>
- </ng-container>
- </div>
</div>
<br>
- <ng-container *ngIf="availableTypes|async">
- <!--Container just to keep available types *alive* while typeDialogOpen is closed-->
+ <ng-container *ngIf="(availableTypes|async) as _availableTypes">
+ <mat-form-field class="width-100">
+ <mat-label>Platform Type</mat-label>
+ <mat-select [(ngModel)]="data.type" required [compareWith]="compareTypes">
+ <mat-option *ngFor="let selectableType of _availableTypes" [value]="selectableType">
+ {{selectableType.name}}
+ </mat-option>
+ </mat-select>
+ <mat-hint align="start">{{platformTypeState|async}}</mat-hint>
+ <mat-hint align="end">Find existing element information to create your element or create new type information.</mat-hint>
+ <div matSuffix>
+ <ng-container *ngIf="!searchOpen">
+ <button mat-icon-button (click)="openSearch()" class="search-button"><mat-icon color="primary" data-cy="search-type-menu">search</mat-icon></button>
+ </ng-container>
+ <button mat-icon-button (click)="openPlatformTypeDialog()"><mat-icon color="success">add</mat-icon></button>
+ </div>
+ </mat-form-field>
</ng-container>
<ng-container *ngIf="searchOpen">
<mat-divider></mat-divider>
@@ -89,8 +100,8 @@
</ng-container>
</mat-dialog-content>
<mat-dialog-actions align="end">
- <button mat-raised-button matStepperPrevious data-cy="back-2">Back</button>
- <button mat-raised-button color="primary" *ngIf="data.element.name.length>0 &&
+ <button mat-raised-button matStepperPrevious data-cy="back-2" (click)="resetDialog()">Back</button>
+ <button mat-raised-button color="primary" (click)="resetDialog()" *ngIf="data.element.name.length>0 &&
data.element.description.length>0 &&
data.type.name.length>0 &&
+(data.type.id!==undefined && data.type.id)>0" matStepperNext data-cy="stepper-next">Next</button>
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.spec.ts b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.spec.ts
index a9fdbdf8e55..c11b08f158e 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.spec.ts
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.spec.ts
@@ -47,6 +47,8 @@ import { EnumsService } from '../../../shared/services/http/enums.service';
import { MimPreferencesService } from '../../../shared/services/http/mim-preferences.service';
import { TypesService } from '../../../shared/services/http/types.service';
import { PlatformTypeQueryMock } from '../../mocks/components/PlatformTypeQuery.mock';
+import { CurrentStateServiceMock } from '../../mocks/services/CurrentStateService.mock';
+import { CurrentStructureService } from '../../services/current-structure.service';
import { AddElementDialog } from '../../types/AddElementDialog';
import { AddElementDialogComponent } from './add-element-dialog.component';
@@ -107,7 +109,8 @@ describe('AddElementDialogComponent', () => {
{ provide: TypesService, useValue: typesServiceMock },
{ provide: EnumsService, useValue: enumsServiceMock },
{ provide: EnumerationSetService, useValue: enumerationSetServiceMock },
- { provide: ApplicabilityListService, useValue: applicabilityListServiceMock}]
+ { provide: ApplicabilityListService, useValue: applicabilityListServiceMock },
+ { provide: CurrentStructureService,useValue:CurrentStateServiceMock }]
})
.compileComponents();
});
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.ts b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.ts
index 85f26343f04..e72edd2f7a4 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.ts
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/add-element-dialog/add-element-dialog.component.ts
@@ -48,8 +48,6 @@ export class AddElementDialogComponent implements OnInit {
map((result) => {
if (result.length === 1) {
this.data.type=result[0]
- } else if (!this.typeDialogOpen) {
- this.openPlatformTypeDialog();
}
return result;
}),
@@ -69,7 +67,10 @@ export class AddElementDialogComponent implements OnInit {
constructor (public dialog: MatDialog, private structures: CurrentStructureService, public dialogRef: MatDialogRef<AddElementDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: AddElementDialog, private typeDialogService: TypesUIService, private _ui: UiService) {
}
- ngOnInit(): void {}
+ ngOnInit(): void {
+ this.query.next(new PlatformTypeQuery());
+ this.queryMode.next(true);
+ }
createNew() {
this.data.element.id = '-1';
@@ -87,9 +88,19 @@ export class AddElementDialogComponent implements OnInit {
}
openPlatformTypeDialog() {
this.typeDialogOpen = !this.typeDialogOpen;
+ if (this.typeDialogOpen) {
+ this.searchOpen = false;
+ }
+ }
+ resetDialog() {
+ this.searchOpen = false;
+ this.typeDialogOpen = false;
}
openSearch() {
this.searchOpen = !this.searchOpen;
+ if (this.searchOpen) {
+ this.typeDialogOpen = false;
+ }
}
receivePlatformTypeData(value: newPlatformTypeDialogReturnData) {
this.typeDialogOpen = !this.typeDialogOpen;
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.html b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.html
index 89e7e706136..2cf64541b7e 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.html
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.html
@@ -16,7 +16,7 @@
<ng-container>
<mat-form-field class="width-100">
<mat-label>Byte Size</mat-label><!--TODO: Replace this with an api function later to handle bit/byte depending on preference-->
- <input type="number" matInput [(ngModel)]="bitSize" data-cy="field-byte-size">
+ <input type="number" matInput [(ngModel)]="bitSize" [min]="minBitSize" [max]="maxBitSize" data-cy="field-byte-size">
<span matSuffix>
<mat-slider matSuffix [min]="minBitSize" [value]="bitSize" (input)="bitSize=$event.value?$event.value:0" [max]="maxBitSize" [step]="bitSizeSliderStepSize" thumbLabel="true" [displayWith]="bitSizeDisplay" color="primary"></mat-slider>
<button mat-icon-button (click)="queryTypes()" class="query-button" data-cy="query-button"><mat-icon>search</mat-icon></button>
@@ -24,16 +24,26 @@
</mat-form-field>
</ng-container>
</div>
- <div *ngIf="logicalType==='enumeration'">
+ <div>
<mat-form-field class="width-100">
<mat-label>Name</mat-label>
- <mat-select [(ngModel)]="name" class="name-select" data-cy="field-name" style="visibility:visible">
- <mat-option *ngFor="let enum of enumerations" [value]="enum" [attr.data-cy]="'option-'+enum">
- <mat-label>{{enum}}</mat-label>
+ <input matInput [(ngModel)]="name" [matAutocomplete]="nameAuto">
+ <mat-autocomplete autoActiveFirstOption class="name-select" data-cy="field-name" #nameAuto="matAutocomplete">
+ <mat-option *ngFor="let type of types" [value]="type" [attr.data-cy]="'option-'+type">
+ <mat-label>{{type}}</mat-label>
</mat-option>
- </mat-select>
+ </mat-autocomplete>
</mat-form-field>
<br>
+ <mat-form-field class="width-100">
+ <mat-label>Description</mat-label>
+ <textarea cdkTextareaAutosize matInput [(ngModel)]="description" [matAutocomplete]="descriptionAuto"></textarea>
+ <mat-autocomplete autoActiveFirstOption class="description-select" data-cy="field-description" #descriptionAuto="matAutocomplete">
+ <mat-option *ngFor="let _description of descriptions" [value]="_description" [attr.data-cy]="'option-'+_description">
+ <mat-label>{{_description}}</mat-label>
+ </mat-option>
+ </mat-autocomplete>
+ </mat-form-field>
</div>
<br>
<div class="flex row">
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.spec.ts b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.spec.ts
index 42620262be8..d71ec5f4bef 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.spec.ts
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.spec.ts
@@ -43,6 +43,7 @@ import { MimPreferencesService } from '../../../shared/services/http/mim-prefere
import { TypesService } from '../../../shared/services/http/types.service';
import { PlatformTypeQueryComponent } from './platform-type-query.component';
+import { MatAutocompleteModule } from '@angular/material/autocomplete';
describe('PlatformTypeQueryComponent', () => {
let component: PlatformTypeQueryComponent;
@@ -51,7 +52,7 @@ describe('PlatformTypeQueryComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports:[MatSelectModule,MatFormFieldModule,FormsModule,MatDividerModule,MatButtonModule,MatIconModule,MatSliderModule,MatDividerModule,MatInputModule,NoopAnimationsModule],
+ imports:[MatSelectModule,MatFormFieldModule,FormsModule,MatDividerModule,MatButtonModule,MatIconModule,MatSliderModule,MatDividerModule,MatInputModule,MatAutocompleteModule,NoopAnimationsModule],
declarations: [PlatformTypeQueryComponent],
providers: [
{ provide: TransactionBuilderService, useValue: transactionBuilderMock },
@@ -95,8 +96,8 @@ describe('PlatformTypeQueryComponent', () => {
await testSelect('unit', "Feet^2", 3);
await testSelect('logical-type', "boolean", 0);
await testSelect('min-val', "4", 2,"=");
- await testSelect('max-val', "8", 2,"=");
- await testSelect('msb-val', "6", 2, "=");
+ await testSelect('max-val', "8", 1,"=");
+ await testSelect('msb-val', "6", 1, "=");
await testSelect('default-val', "false", 1, "=");
const input = await loader.getHarness(MatInputHarness);
await input.setValue('8');
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.ts b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.ts
index c17160e0214..af36b1524e9 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.ts
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/components/platform-type-query/platform-type-query.component.ts
@@ -12,7 +12,7 @@
**********************************************************************/
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { EnumsService } from '../../../shared/services/http/enums.service';
-import { andBitSizeQuery, andDefaultValQuery, andLogicalTypeQuery, andMaxValQuery, andMinValQuery, andMsbValQuery, andNameQuery, andQuery, andUnitQuery, PlatformTypeQuery } from '../../../shared/types/MimQuery';
+import { andBitSizeQuery, andDefaultValQuery, andDescriptionQuery, andLogicalTypeQuery, andMaxValQuery, andMinValQuery, andMsbValQuery, andNameQuery, andQuery, andUnitQuery, PlatformTypeQuery } from '../../../shared/types/MimQuery';
import { PlatformType } from '../../../shared/types/platformType';
@Component({
@@ -33,6 +33,7 @@ export class PlatformTypeQueryComponent implements OnInit {
msbValue = ""
bitSize = 0;
name = "";
+ description = "";
@Output('query') returnQuery = new EventEmitter<PlatformTypeQuery>();
constructor (private constantEnumService: EnumsService) {
}
@@ -41,10 +42,23 @@ export class PlatformTypeQueryComponent implements OnInit {
}
get logicalTypes() {
- return this.platformTypes.map(type => type.interfaceLogicalType).filter((v, i, a) => a.indexOf(v) === i);
+ return this.platformTypes.filter(value =>
+ value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => type.interfaceLogicalType).filter((v, i, a) => a.indexOf(v) === i);
}
get bitSizes() {
- return this.platformTypes.map(type => Number(type.interfacePlatformTypeBitSize)).filter((v, i, a) => a.indexOf(v) === i);
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => Number(type.interfacePlatformTypeBitSize)).filter((v, i, a) => a.indexOf(v) === i);
}
get maxBitSize() {
return Math.max(...this.bitSizes)/8;
@@ -54,27 +68,69 @@ export class PlatformTypeQueryComponent implements OnInit {
return Math.min(...this.bitSizes)/8;
}
get defaultValues() {
- return this.platformTypes.map(type => type.interfacePlatformTypeDefaultValue).filter((v, i, a) => a.indexOf(v) === i);
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ ).map(type => type.interfacePlatformTypeDefaultValue).filter((v, i, a) => a.indexOf(v) === i);
}
get maxValues() {
- return this.platformTypes.map(type => type.interfacePlatformTypeMaxval).filter((v, i, a) => a.indexOf(v) === i);
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => type.interfacePlatformTypeMaxval).filter((v, i, a) => a.indexOf(v) === i);
}
get minValues() {
- return this.platformTypes.map(type => type.interfacePlatformTypeMinval).filter((v, i, a) => a.indexOf(v) === i);
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => type.interfacePlatformTypeMinval).filter((v, i, a) => a.indexOf(v) === i);
}
get msbValues() {
- return this.platformTypes.map(type => type.interfacePlatformTypeMsbValue).filter((v, i, a) => a.indexOf(v) === i);
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => type.interfacePlatformTypeMsbValue).filter((v, i, a) => a.indexOf(v) === i);
}
bitSizeDisplay(value: number) {
return value.toPrecision(4)
}
- get enumerations() {
- return this.platformTypes.filter(type=>type.interfaceLogicalType.toLowerCase()==='enumeration').map(type=>type.name).filter((v, i, a) => a.indexOf(v) === i);
+ get types() {
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => type.name).filter((v, i, a) => a.indexOf(v) === i).filter(value => value.toLowerCase().includes(this.name.toLowerCase()));
+ }
+
+ get descriptions() {
+ return this.platformTypes.filter(value =>
+ value.interfaceLogicalType.toLowerCase().includes(this.logicalType.toLowerCase())
+ && value.interfacePlatformTypeMsbValue.toLowerCase().includes(this.msbValue.toLowerCase())
+ && value.interfacePlatformTypeDefaultValue.toLowerCase().includes(this.defaultVal.toLowerCase())
+ && value.interfacePlatformTypeMaxval.toLowerCase().includes(this.maximumValue.toLowerCase())
+ && value.interfacePlatformTypeMinval.toLowerCase().includes(this.minimumValue.toLowerCase())
+ && value.description.toLowerCase().includes(this.description.toLowerCase())
+ ).map(type => type.description).filter((v, i, a) => a.indexOf(v) === i).filter(value => value.toLowerCase().includes(this.name.toLowerCase()));
}
get query() {
@@ -87,6 +143,7 @@ export class PlatformTypeQueryComponent implements OnInit {
if (this.defaultVal !== "") queries.push(new andDefaultValQuery(this.defaultVal));
if (this.msbValue !== "") queries.push(new andMsbValQuery(this.msbValue));
if (this.name !== "") queries.push(new andNameQuery(this.name));
+ if (this.description !== "") queries.push(new andDescriptionQuery(this.description));
return new PlatformTypeQuery(undefined,queries)
}
queryTypes() {
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/mocks/services/CurrentStateService.mock.ts b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/mocks/services/CurrentStateService.mock.ts
index 04e0b03bddc..2ab1cad5a53 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/mocks/services/CurrentStateService.mock.ts
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/message-element-interface/mocks/services/CurrentStateService.mock.ts
@@ -10,7 +10,7 @@
* Contributors:
* Boeing - initial API and implementation
**********************************************************************/
-import { BehaviorSubject, of, ReplaySubject, Subject } from "rxjs";
+import { BehaviorSubject, Observable, of, ReplaySubject, Subject } from "rxjs";
import { MimPreferencesMock } from "../../../shared/mocks/MimPreferences.mock";
import { applic } from "../../../../../types/applicability/applic";
import { settingsDialogData } from "../../../shared/types/settingsdialog";
@@ -24,6 +24,7 @@ import { unitsMock } from "../../../shared/mocks/unit.mock";
import { response } from "../../../connection-view/mocks/Response.mock";
import { PlatformType } from "../../../shared/types/platformType";
import { transactionResultMock } from '../../../../../transactions/transaction.mock';
+import { MimQuery, PlatformTypeQuery } from '../../../shared/types/MimQuery';
let sideNavContentPlaceholder = new ReplaySubject<{ opened: boolean; field: string; currentValue: string | number | boolean | applic; previousValue?: string | number | boolean | applic | undefined; transaction?: transactionToken | undefined; user?: string | undefined; date?: string | undefined; }>();
let _singleStructureId = new BehaviorSubject<string>("10")
@@ -86,5 +87,8 @@ export const CurrentStateServiceMock: Partial<CurrentStructureService> = {
singleStructureId: _singleStructureId,
set singleStructureIdValue(value: string) {
_singleStructureId.next(value)
- }
+ },
+ query: function <T = unknown>(query: MimQuery<T>): Observable<Required<T>[]> {
+ return of<Required<T>[]>([{ name: 'abcd' } as unknown as Required<T>]);
+ },
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/shared/types/MimQuery.ts b/plugins/org.eclipse.osee.web/src/app/ple/messaging/shared/types/MimQuery.ts
index b3ff37c6dfe..d99cd01608a 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/shared/types/MimQuery.ts
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/shared/types/MimQuery.ts
@@ -76,6 +76,12 @@ export class andNameQuery extends andQuery{
super(ATTRIBUTETYPEID.NAME, value);
}
}
+
+export class andDescriptionQuery extends andQuery{
+ constructor (value: string) {
+ super(ATTRIBUTETYPEID.DESCRIPTION, value);
+ }
+}
export class MimQuery<T =unknown> implements _mimQuery<T>{
constructor (type: ARTIFACTTYPEID, related?: {
relation: RelationTypeId,
diff --git a/plugins/org.eclipse.osee.web/src/app/ple/messaging/structure-names/structure-names.component.html b/plugins/org.eclipse.osee.web/src/app/ple/messaging/structure-names/structure-names.component.html
index ff3d9c5b9c1..13c49d48718 100644
--- a/plugins/org.eclipse.osee.web/src/app/ple/messaging/structure-names/structure-names.component.html
+++ b/plugins/org.eclipse.osee.web/src/app/ple/messaging/structure-names/structure-names.component.html
@@ -25,7 +25,7 @@
</mat-panel-title>
</mat-expansion-panel-header>
<ng-container *ngFor="let path of name.paths">
- <a mat-button [routerLink]="((basePath|async)||'')+path.path+'/'">
+ <a mat-button [routerLink]="((basePath|async)||'')+path.path+'/.'">
{{path.name}}
</a>
</ng-container>

Back to the top