-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dashboard URL to services view #2526
Add Dashboard URL to services view #2526
Conversation
Hey hamzahamidi! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA. |
Codecov Report
@@ Coverage Diff @@
## v2-master #2526 +/- ##
==========================================
Coverage 70.44% 70.44%
==========================================
Files 594 594
Lines 25124 25124
Branches 5671 5671
==========================================
Hits 17698 17698
Misses 7426 7426 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Just a few things to address.
<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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's generally a bad idea to use functions in templates as these need to be re-evaluated every cycle - I know this seems hypocritical considering we're doing this for the other values but we shouldn't have used functions for most of those either (issue created #2531). In this case, I would directly use this.serviceInstanceEntity.entity.dashboard_url (or assign it to a value on the component) and use this for both the ngIf and the href value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
<mat-icon>launch</mat-icon> | ||
</a> | ||
</ng-template> | ||
<ng-template #none>{{ getDashboardUrl() }}</ng-template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add 'None' into the template here, no need to get angular to do the work for us.
1629695
to
5de57bb
Compare
Signed-off-by: Hamza Hamidi <[email protected]>
5de57bb
to
b422032
Compare
@KlapTrap All done |
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: