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;  
   
   
![image1](https://user-content.gitlab-static.net/92582a0991b079ab177fa65a62273962be4ec995/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f73632d636c6f7564732f696d6167652f75706c6f61642f76313635333035313639302f72656c656173652d6e6f7465732f342e31362e302e372d7363636c6f7564732f2532313234362f65787465726e616c2d6c696e6b2d696d6167652d315f78676f72396d2e706e67)
   
   2. More than one element is defined: a dropdown containing the configured 
links will be displayed.
   
   
![image2](https://user-content.gitlab-static.net/98de10b6f916698592be6ef103a9aeef481db47d/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f73632d636c6f7564732f696d6167652f75706c6f61642f76313635333035313639302f72656c656173652d6e6f7465732f342e31362e302e372d7363636c6f7564732f2532313234362f65787465726e616c2d6c696e6b2d696d6167652d325f7a39707567352e706e67)
   
   ```
   "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.
   
   
![image](https://user-content.gitlab-static.net/c83757218fdc853646e32eeb432e5f04bf0dfa98/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f73632d636c6f7564732f696d6167652f75706c6f61642f76313635333037383730352f72656c656173652d6e6f7465732f342e31362e302e372d7363636c6f7564732f2532313234362f65787465726e616c2d6c696e6b2d696d6167652d335f7a6474396f6f2e706e67)
   
   ### 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]

Reply via email to