Skip to content

Add optional image to card aggregate status #222

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

Conversation

yaacov
Copy link
Contributor

@yaacov yaacov commented Apr 12, 2016

The provider icons are not provided as css class anymore. But they are available as svg files.
This PR makes it possible to optionally use images, in cases where icons are not available.

It adds an optional iconImage parameter.

screenshot-2016-04-12-15-19-38

@yaacov
Copy link
Contributor Author

yaacov commented Apr 12, 2016

@simon3z @zeari
@jeff-phillips-18 is this a good approach to fix the missing icons ?

@yaacov yaacov changed the title add-optional-image-to-card-aggregate-status Add optional image to card aggregate status Apr 12, 2016
@jeff-phillips-18
Copy link
Member

re: Is it ok to add kubernetes.svg and openshift.svg to the misc directory ?
The OpenShift and Kubernetes images are available from Patternfly.

@yaacov yaacov force-pushed the add-optional-image-to-card-aggregate-status branch from 9ad4c79 to 29102db Compare April 12, 2016 12:18
@simon3z
Copy link

simon3z commented Apr 12, 2016

re: Is it ok to add kubernetes.svg and openshift.svg to the misc directory ?
The OpenShift and Kubernetes images are available from Patternfly.

cc @abonas

@yaacov
Copy link
Contributor Author

yaacov commented Apr 12, 2016

@jeff-phillips-18 👍
now using this images.

p.s.
This PR has bad karma because in the html template, image src is an angular var :-( what to do ?

@abonas
Copy link

abonas commented Apr 12, 2016

re: Is it ok to add kubernetes.svg and openshift.svg to the misc directory ?
The OpenShift and Kubernetes images are available from Patternfly.

@epwinchell can you please sync with @jeff-phillips-18 on this topic so there won't be 2 places to maintain the same svg icons?
cc @simon3z

@jeff-phillips-18
Copy link
Member

@epwinchell since you already have a good list of svg files I would continue to use yours as you are probably already maintaining them for other uses as well. I was under the impression this PR was going to be adding the svgs which doesn't seem to be the case.

@epwinchell
Copy link

@jeff-phillips-18 Sounds good

@abonas @simon3z For ManageIQ, the SVG vendor icons are up-to-date and available here: https://github.com/ManageIQ/manageiq/tree/master/app/assets/images/svg

@yaacov
Copy link
Contributor Author

yaacov commented Apr 12, 2016

@jeff-phillips-18 I just wanted nice icons for the demo, not for manageiq that has it's icons mechanism.
I need help with karma, it's complaining about the image source , being angular variable.
cc @epwinchell

@dtaylor113
Copy link
Member

@yaacov , you wrote: "This PR has bad karma because in the html template, image src is an angular var :-( what to do ?", can you elaborate on what the issues is?
Thanks,

  • Dave

@yaacov
Copy link
Contributor Author

yaacov commented Apr 12, 2016

@dtaylor113 the line:
<image ng-if="status.iconImage" src="{{status.iconImage}}" alt="" class="card-pf-icon-image"></image>
makes karma to say:

Running "karma:unit" (karma) task
WARN [web-server]: 404: /%7B%7Bstatus.iconImage%7D%7D

The preprocessor need to know about it ?

@jeff-phillips-18
Copy link
Member

@yaacov Change from src="{{ to ng-src="{{

Putting ng- in front tells it to evaluate the text as a variable.

@yaacov yaacov force-pushed the add-optional-image-to-card-aggregate-status branch from 29102db to 2723ac1 Compare April 12, 2016 13:55
@yaacov
Copy link
Contributor Author

yaacov commented Apr 12, 2016

@jeff-phillips-18 Thanks !
This PR has good karma now :-)

@yaacov yaacov force-pushed the add-optional-image-to-card-aggregate-status branch from 2723ac1 to 925086f Compare April 12, 2016 14:55
@yaacov
Copy link
Contributor Author

yaacov commented Apr 13, 2016

@jeff-phillips-18 @dtaylor113 please review

@jeff-phillips-18
Copy link
Member

Changes LGTM, but speaking of good karma... please add a unit test for the correct setting of the iconImage value.

@yaacov yaacov force-pushed the add-optional-image-to-card-aggregate-status branch from 925086f to 15f9528 Compare April 13, 2016 13:15
@yaacov yaacov force-pushed the add-optional-image-to-card-aggregate-status branch from 15f9528 to c844af0 Compare April 13, 2016 13:20
@yaacov
Copy link
Contributor Author

yaacov commented Apr 13, 2016

@jeff-phillips-18 👍 added a unit test "should set of the iconImage value".

@jeff-phillips-18
Copy link
Member

LGTM 👍

@dtaylor113
Copy link
Member

LGTM

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

Successfully merging this pull request may close these issues.

6 participants