1. Added server side support for custom contrib icons
When contribution schemas are loaded the server checks for the existence of property display.icon in the descriptor.json. If the schema defines a the property display.icon then the server verifies that the referenced icon file exists and that it has a valid format and location. If the validation passes then the icon path is normalized and stored in the contrib database.
This PR adds a new "icon" endpoint in the contributions REST API /contributions/microservices/icons/:contribRef. If an icon exists for the passed contribRef then the endpoint will respond with the corresponding custom icon file. It will return a code 404 (not found) if the contrib didn't define a custom icon.
The contributions data served by the contributions REST API now includes a property icon that if present it indicates that the contribution has a valid custom icon. This property points to the its corresponding icons endpoint at /contributions/microservices/icons/:contribRef.
2. Display activity icons in client side
Updated both flow and stream client plugins to support activity icons.
Note that this PR only add support for custom activity icons. Trigger support is still TBD.
Description
1. Added server side support for custom contrib icons
When contribution schemas are loaded the server checks for the existence of property
display.icon
in thedescriptor.json
. If the schema defines a the propertydisplay.icon
then the server verifies that the referenced icon file exists and that it has a valid format and location. If the validation passes then the icon path is normalized and stored in the contrib database.This PR adds a new "icon" endpoint in the contributions REST API
/contributions/microservices/icons/:contribRef
. If an icon exists for the passedcontribRef
then the endpoint will respond with the corresponding custom icon file. It will return a code404
(not found) if the contrib didn't define a custom icon.The contributions data served by the contributions REST API now includes a property
icon
that if present it indicates that the contribution has a valid custom icon. This property points to the its corresponding icons endpoint at/contributions/microservices/icons/:contribRef
.2. Display activity icons in client side
Updated both flow and stream client plugins to support activity icons.
Note that this PR only add support for custom activity icons. Trigger support is still TBD.
Motivation and Context
Part of #1261
How has this been tested?
Mock trigger and activity with custom icons are available at https://github.com/fcastill/flogo-contrib-test and they can be installed to test this functionality.
Screenshots (if appropriate):
Types of changes
Checklist: