Skip to content
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

Merged

Conversation

hamzahamidi
Copy link
Contributor

@hamzahamidi hamzahamidi commented Jun 26, 2018

Description

  • Add Dashboard link to services cards in Services wall

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Docs update
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have followed the guidelines in CONTRIBUTING.md, including the required formatting of the commit message

@cfdreddbot
Copy link

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
Copy link

codecov bot commented Jun 26, 2018

Codecov Report

Merging #2526 into v2-master will not change coverage.
The diff coverage is n/a.

@@            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

Copy link
Contributor

@KlapTrap KlapTrap left a 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>
Copy link
Contributor

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.

Copy link
Contributor Author

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>
Copy link
Contributor

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.

@KlapTrap KlapTrap added the needs attention This PR needs attention label Jun 27, 2018
@hamzahamidi hamzahamidi force-pushed the feature-services-view branch from 1629695 to 5de57bb Compare June 27, 2018 09:10
@hamzahamidi hamzahamidi force-pushed the feature-services-view branch from 5de57bb to b422032 Compare June 27, 2018 10:10
@hamzahamidi
Copy link
Contributor Author

@KlapTrap All done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants