Skip to content

Commit

Permalink
fix: add endpoints in product detail 1/2
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG committed Oct 12, 2024
1 parent 19b8e9c commit a0929bf
Showing 1 changed file with 60 additions and 50 deletions.
110 changes: 60 additions & 50 deletions src/app/workspace/workspace-product/products.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,42 +322,23 @@
<div class="px-3 text-xs">Microfrontend</div>
</p-divider>

<div *ngIf="app.value.modules">
<div class="ml-2 mb-1 text-sm font-bold">Modules</div>
<div
*ngIf="app.value.modules && displayedDetailItem?.bucket === 'TARGET'"
formArrayName="modules"
class="ml-2"
>
<div *ngIf="app.value.modules" class="ml-2 text-sm">
<div class="mb-1 font-bold">Modules</div>
<div *ngIf="app.value.modules && displayedDetailItem?.bucket === 'TARGET'" formArrayName="modules">
<div *ngFor="let mfe of moduleControls.controls; let i = index">
<div
[formGroupName]="i"
[class.mb-4]="i < moduleControls.controls.length - 2"
class="mt-3 flex flex-column"
class="ml-2 flex flex-column"
>
<span controlErrorAnchor class="p-float-label">
<input
pInputText
type="text"
class="w-full text-responsive"
[id]="'ws_product_item_mfe_' + i + '_base_path'"
formControlName="basePath"
[pTooltip]="'PRODUCT.MFE.BASE_PATH.TOOLTIP' | translate"
tooltipPosition="top"
tooltipEvent="hover"
/>
<label class="ocx-required-label" [for]="'ws_product_item_mfe_' + i + '_base_path'">
{{ 'PRODUCT.MFE.BASE_PATH' | translate }}</label
>
</span>
<div class="mt-05 ml-2 flex flex-row column-gap-2">
<span [id]="'ws_product_item_mfe_' + i + '_exposed_module'" class="mr-2 text-sm">
<div class="mb-1 flex flex-row column-gap-2">
<span [id]="'ws_product_item_mfe_' + i + '_exposed_module'" class="mr-2">
{{ mfe.controls['exposedModule'].value }}</span
>
<span
*ngIf="mfe.controls['undeployed'].value"
[id]="'ws_product_item_mfe_' + i + '_undeployed'"
class="danger-action-text text-sm pi pi-ban"
class="danger-action-text pi pi-ban"
[pTooltip]="'DIALOG.PRODUCTS.MFES.UNDEPLOYED' | translate"
tooltipPosition="top"
tooltipEvent="hover"
Expand All @@ -366,40 +347,69 @@
<span
*ngIf="mfe.controls['deprecated'].value"
[id]="'ws_product_item_mfe_' + i + '_deprecated'"
class="danger-action-text text-sm pi pi-exclamation-circle"
class="danger-action-text pi pi-exclamation-circle"
[pTooltip]="'DIALOG.PRODUCTS.MFES.DEPRECATED' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
</span>
</div>
<span controlErrorAnchor class="mt-2 p-float-label">
<input
pInputText
type="text"
class="w-full text-responsive"
[id]="'ws_product_item_mfe_' + i + '_base_path'"
formControlName="basePath"
[pTooltip]="'PRODUCT.MFE.BASE_PATH.TOOLTIP' | translate"
tooltipPosition="top"
tooltipEvent="hover"
/>
<label class="ocx-required-label" [for]="'ws_product_item_mfe_' + i + '_base_path'">
{{ 'PRODUCT.MFE.BASE_PATH' | translate }}</label
>
</span>
</div>
<div *ngIf="mfe.endpoints && mfe.endpoints.length > 0">
<div class="mb-1 font-bold">Endpoints</div>
<div *ngFor="let end of mfe.endpoints; let j = index" class="ml-2">
<div [id]="'ws_product_item_mfe_' + i + '_endpoint_' + j">{{ end.name }}: {{ end.path }}</div>
</div>
</div>
</div>
</div>

<div *ngIf="app.value.modules && displayedDetailItem?.bucket === 'SOURCE'">
<div *ngFor="let item of app.value.modules; let i = index" class="ml-4 flex flex-row column-gap-2">
<span [id]="'ws_product_item_component_' + i + '_exposed_module'" class="mr-2">
{{ item.exposedModule }}</span
>
<span
*ngIf="item.undeployed"
[id]="'ws_product_item_mfe_' + i + '_deprecated'"
class="danger-action-text pi pi-ban"
[pTooltip]="'DIALOG.PRODUCTS.MFES.UNDEPLOYED' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
</span>
<span
*ngIf="item.deprecated"
[id]="'ws_product_item_mfe_' + i + '_deprecated'"
class="danger-action-text pi pi-exclamation-circle"
[pTooltip]="'DIALOG.PRODUCTS.MFES.DEPRECATED' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
</span>
<div *ngIf="app.value.modules && displayedDetailItem?.bucket === 'SOURCE'" class="ml-2">
<div *ngFor="let smfe of app.value.modules; let i = index" class="flex flex-column row-gap-2">
<div class="flex flex-row flex-nowrap column-gap-2">
<span [id]="'ws_product_item_component_' + i + '_exposed_module'" class="mr-2">
{{ smfe.exposedModule }}</span
>
<span
*ngIf="smfe.undeployed"
[id]="'ws_product_item_mfe_' + i + '_deprecated'"
class="danger-action-text pi pi-ban"
[pTooltip]="'DIALOG.PRODUCTS.MFES.UNDEPLOYED' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
</span>
<span
*ngIf="smfe.deprecated"
[id]="'ws_product_item_mfe_' + i + '_deprecated'"
class="danger-action-text pi pi-exclamation-circle"
[pTooltip]="'DIALOG.PRODUCTS.MFES.DEPRECATED' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
</span>
</div>
<div *ngIf="smfe.endpoints && smfe.endpoints.length > 0">
<div class="mb-1 font-bold">Endpoints {{ smfe.endpoints.length }}</div>
<div *ngFor="let send of smfe.endpoints; let j = index" class="ml-2">
<div [id]="'ws_product_item_mfe_' + i + '_endpoint_' + j">{{ send.name }}: {{ send.path }}</div>
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit a0929bf

Please sign in to comment.