smolnar82 opened a new pull request #430:
URL: https://github.com/apache/knox/pull/430
## What changes were proposed in this pull request?
Added the ability to declare an arbitrary number of homepage profiles in
`gateway-site.xml`. The relevant configuration prefix is
`knox.homepage.profile.` which should be finished with the profile name (e.g.
`knox.homepage.profile.smolnar` declares the profile called `smolnar`).
The purpose of these profiles is to
- control what's going to be displayed in General Proxy Information
- optionally, filter topologies too
The following language elements should be used when declaring a profile in
`gateway-site.xml`
- gpi_version - allows `Knox Version`
- gpi_cert - allows `TLS Public Certificate`
- gpi_admin_ui - allows `Admin UI URL`
- gpi_admin_api - allows `Admin API Details`
- gpi_md_api - allows `Metadata API`
- gpi_tokens - allows `Integration Tokens`
- top_$TOPOLOGY_LIST - allows to define a comma-separated list of topology
names that should be included in the `Topologies` section
Let's see a sample:
```
<property>
<name>knox.homepage.profile.smolnar</name>
<value>gpi_version,gpi_tokens,top_other</value>
</property>
```
The `smolnar` profile will allow displaying the `Knox Version` and
`Integration Tokens` elements in `General Proxy Information` and will filter
topologies such as only the topology called `other` will be displayed in
`Topologies`.
Other than adding homepage profile support I also moved the session
information block (username and optional logout button) into the top-left
corner.
## How was this patch tested?
Manually tested (I used the above described `smolnar` profile during my
tests):
<img width="1668" alt="Screen Shot 2021-04-07 at 2 41 43 PM"
src="https://user-images.githubusercontent.com/34065904/113870239-ead89480-97b1-11eb-95f3-e0f3037a63c4.png">
<img width="1673" alt="Screen Shot 2021-04-07 at 2 41 57 PM"
src="https://user-images.githubusercontent.com/34065904/113870253-edd38500-97b1-11eb-8ed2-451c36ad2791.png">
<img width="1668" alt="Screen Shot 2021-04-07 at 2 42 12 PM"
src="https://user-images.githubusercontent.com/34065904/113870257-ee6c1b80-97b1-11eb-9c49-ec3106648aa4.png">
<img width="1668" alt="Screen Shot 2021-04-07 at 2 42 35 PM"
src="https://user-images.githubusercontent.com/34065904/113870260-ef04b200-97b1-11eb-8302-6c1faac091e4.png">
<img width="1672" alt="Screen Shot 2021-04-07 at 2 43 23 PM"
src="https://user-images.githubusercontent.com/34065904/113870262-ef9d4880-97b1-11eb-97dd-77d0a5fc7b08.png">
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]