Skip to content

Commit

Permalink
Display status and team name for microservice dialog(s) #90
Browse files Browse the repository at this point in the history
  • Loading branch information
tillias committed Nov 3, 2020
1 parent 5ecec96 commit ea691fc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ export class ImpactAnalysisLegendComponent implements OnInit {
}

initDependencies(): void {
const targetId = this.analysisResult?.target?.id;
this.dependencies = [];
this.analysisResult?.groups?.forEach(v => v.items?.forEach(i => this.dependencies.push(i.target)));
this.analysisResult?.groups?.forEach(v =>
v.items?.forEach(i => {
if (i.target.id !== targetId) {
this.dependencies.push(i.target);
}
})
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ <h2><span jhiTranslate="microcatalogApp.dependency.detail.title">Dependency</spa
<dt><span jhiTranslate="microcatalogApp.dependency.source">Source</span></dt>
<dd>
<div *ngIf="dependency.source">
<a [routerLink]="['/microservice', dependency.source?.id, 'view']">{{ dependency.source?.id }}</a>
<a [routerLink]="['/microservice', dependency.source?.id, 'view']">{{ dependency.source?.name }}</a>
</div>
</dd>
<dt><span jhiTranslate="microcatalogApp.dependency.target">Target</span></dt>
<dd>
<div *ngIf="dependency.target">
<a [routerLink]="['/microservice', dependency.target?.id, 'view']">{{ dependency.target?.id }}</a>
<a [routerLink]="['/microservice', dependency.target?.id, 'view']">{{ dependency.target?.name }}</a>
</div>
</dd>
</dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2 id="jhi-dependency-heading" jhiTranslate="microcatalogApp.dependency.home.cr
<label class="form-control-label" jhiTranslate="microcatalogApp.dependency.source" for="field_source">Source</label>
<select class="form-control" id="field_source" name="source" formControlName="source">
<option *ngIf="!editForm.get('source')!.value" [ngValue]="null" selected></option>
<option [ngValue]="microserviceOption.id === editForm.get('source')!.value?.id ? editForm.get('source')!.value : microserviceOption" *ngFor="let microserviceOption of microservices; trackBy: trackById">{{ microserviceOption.id }}</option>
<option [ngValue]="microserviceOption.id === editForm.get('source')!.value?.id ? editForm.get('source')!.value : microserviceOption" *ngFor="let microserviceOption of microservices; trackBy: trackById">{{ microserviceOption.name }}</option>
</select>
</div>
<div *ngIf="editForm.get('source')!.invalid && (editForm.get('source')!.dirty || editForm.get('source')!.touched)">
Expand All @@ -47,7 +47,7 @@ <h2 id="jhi-dependency-heading" jhiTranslate="microcatalogApp.dependency.home.cr
<label class="form-control-label" jhiTranslate="microcatalogApp.dependency.target" for="field_target">Target</label>
<select class="form-control" id="field_target" name="target" formControlName="target">
<option *ngIf="!editForm.get('target')!.value" [ngValue]="null" selected></option>
<option [ngValue]="microserviceOption.id === editForm.get('target')!.value?.id ? editForm.get('target')!.value : microserviceOption" *ngFor="let microserviceOption of microservices; trackBy: trackById">{{ microserviceOption.id }}</option>
<option [ngValue]="microserviceOption.id === editForm.get('target')!.value?.id ? editForm.get('target')!.value : microserviceOption" *ngFor="let microserviceOption of microservices; trackBy: trackById">{{ microserviceOption.name }}</option>
</select>
</div>
<div *ngIf="editForm.get('target')!.invalid && (editForm.get('target')!.dirty || editForm.get('target')!.touched)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ <h2><span jhiTranslate="microcatalogApp.microservice.detail.title">Microservice<
<dt><span jhiTranslate="microcatalogApp.microservice.team">Team</span></dt>
<dd>
<div *ngIf="microservice.team">
<a [routerLink]="['/team', microservice.team?.id, 'view']">{{ microservice.team?.id }}</a>
<a [routerLink]="['/team', microservice.team?.id, 'view']">{{ microservice.team?.name }}</a>
</div>
</dd>
<dt><span jhiTranslate="microcatalogApp.microservice.status">Status</span></dt>
<dd>
<div *ngIf="microservice.status">
<a [routerLink]="['/status', microservice.status?.id, 'view']">{{ microservice.status?.id }}</a>
<a [routerLink]="['/status', microservice.status?.id, 'view']">{{ microservice.status?.name }}</a>
</div>
</dd>
</dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h2 id="jhi-microservice-heading" jhiTranslate="microcatalogApp.microservice.hom
<label class="form-control-label" jhiTranslate="microcatalogApp.microservice.team" for="field_team">Team</label>
<select class="form-control" id="field_team" name="team" formControlName="team">
<option *ngIf="!editForm.get('team')!.value" [ngValue]="null" selected></option>
<option [ngValue]="teamOption.id === editForm.get('team')!.value?.id ? editForm.get('team')!.value : teamOption" *ngFor="let teamOption of teams; trackBy: trackById">{{ teamOption.id }}</option>
<option [ngValue]="teamOption.id === editForm.get('team')!.value?.id ? editForm.get('team')!.value : teamOption" *ngFor="let teamOption of teams; trackBy: trackById">{{ teamOption.name }}</option>
</select>
</div>
<div *ngIf="editForm.get('team')!.invalid && (editForm.get('team')!.dirty || editForm.get('team')!.touched)">
Expand All @@ -101,7 +101,7 @@ <h2 id="jhi-microservice-heading" jhiTranslate="microcatalogApp.microservice.hom
<label class="form-control-label" jhiTranslate="microcatalogApp.microservice.status" for="field_status">Status</label>
<select class="form-control" id="field_status" name="status" formControlName="status">
<option *ngIf="!editForm.get('status')!.value" [ngValue]="null" selected></option>
<option [ngValue]="statusOption.id === editForm.get('status')!.value?.id ? editForm.get('status')!.value : statusOption" *ngFor="let statusOption of statuses; trackBy: trackById">{{ statusOption.id }}</option>
<option [ngValue]="statusOption.id === editForm.get('status')!.value?.id ? editForm.get('status')!.value : statusOption" *ngFor="let statusOption of statuses; trackBy: trackById">{{ statusOption.name }}</option>
</select>
</div>
<div *ngIf="editForm.get('status')!.invalid && (editForm.get('status')!.dirty || editForm.get('status')!.touched)">
Expand Down

0 comments on commit ea691fc

Please sign in to comment.