Skip to content

Commit

Permalink
Add Dashboard URL to services view
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Hamidi <[email protected]>
  • Loading branch information
hamzahamidi committed Jun 26, 2018
1 parent 67158d9 commit 1629695
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@
<app-meta-card-key>Last Updated</app-meta-card-key>
<app-meta-card-value>{{ serviceInstanceEntity?.entity.last_operation?.updated_at | date:'medium' }} </app-meta-card-value>
</app-meta-card-item>

<app-meta-card-item>
<app-meta-card-key>Dashboard URL</app-meta-card-key>
<app-meta-card-value>
<div *ngIf="hasDashboardUrl(); then dashboardUrl; else none"></div>
<ng-template #dashboardUrl>
<a [href]="getDashboardUrl()" target="_blank" appClickStopPropagation>
<mat-icon>launch</mat-icon>
</a>
</ng-template>
<ng-template #none>{{ getDashboardUrl() }}</ng-template>
</app-meta-card-value>
</app-meta-card-item>
<app-meta-card-item>
<app-meta-card-key>Tags</app-meta-card-key>
<app-meta-card-value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export class ServiceInstanceCardComponent extends CardCell<APIResource<IServiceI
this.serviceInstanceEntity.entity.cfGuid
)

hasDashboardUrl = () => !!this.serviceInstanceEntity.entity.dashboard_url;
getDashboardUrl = () => this.serviceInstanceEntity.entity.dashboard_url || 'None';

getServiceName = () => {
const serviceEntity = this.serviceInstanceEntity.entity.service_plan.entity.service;
let extraInfo: IServiceExtra = null;
Expand Down

0 comments on commit 1629695

Please sign in to comment.