RodrigoDLopez opened a new pull request, #6505:
URL: https://github.com/apache/cloudstack/pull/6505
### Description
There is currently no way in ACS to redirect users to external links. To
resolve the situation, two new properties have been added to the `config.json`
settings file so that redirects to external links can be defined. The
`externalLinks` property consists of a list of title, link and icon attributes.
```
"externalLinksIcon: "",
"externalLinks": [
{
"title": "Cloudstack",
"link": "https://cloudstack.apache.org",
"icon": myIcons/cloudstach.png
},
{
"title": "Apache",
"link": "https://apache.org",
"icon": "https://www.apache.org/icons/apache.png"
}
]
```
The following rules govern the redirection feature for external links:
- If the properties are not defined, the redirect button will not be
displayed to the user;
- The `link` attribute of the `externalLinks` property is mandatory in
this context, and elements of this property that do not have the link attribute
or have it empty will be disregarded. The `title` and `icon` attributes are
optional, if icon is not defined a default icon will be applied;
- When the title attribute is not set, the link will be displayed
instead.
Once the title, link and icon attributes are informed, two possible
behaviors can be observed:
1. Only one defined element: in this context, a button will be displayed,
which, when clicked, will redirect the user to the link defined in the
configuration;

2. More than one element is defined: a dropdown containing the configured
links will be displayed.

```
"externalLinksIcon": "",
"externalLinks": [
{
"title": "",
"link": "http://apache.org",
"icon": "https://www.apache.org/icons/apache.png"
},
{
"tittle": "will not be shown",
"link": "",
"icon": ""
},
{
"title": "Cloudstack",
"link": "http://cloudstack.org",
"icon": "myIcons/cloudstach.png"
}
]
```
The `externalLinksIcon` property, also optional, defines the icon that will
be used to compose the button displayed when more than one external link is
provided. In the example above this property was omitted, so the default icon
was displayed. It is also possible to use local images in the icon attribute:
`"icon": "myIcons/cloudstach.png"` or an external link.

### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
#### Feature/Enhancement Scale
- [ ] Major
- [x] Minor
### How Has This Been Tested?
Changing the configuration file to get one or a list of external links
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]