[
https://issues.apache.org/jira/browse/KNOX-3008?focusedWorklogId=906652&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906652
]
ASF GitHub Bot logged work on KNOX-3008:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Feb/24 13:26
Start Date: 23/Feb/24 13:26
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #842:
URL: https://github.com/apache/knox/pull/842
## What changes were proposed in this pull request?
As explained in
[KNOX-3008](https://issues.apache.org/jira/browse/KNOX-3008), the following
changes were implemented in this PR:
- the hostname where the Knox Gateway instance is running is added in the
`General Proxy Information' section on the Knox Home page
- end-users can configure a custom banner text displayed on the top banner
between the Knox logo and the logged-in user name. The new gateway-level
configuration name is `gateway.ui.banner.text` and defaults to an `empty
string`. Administrators can set this configuration to simple text, or they can
also set HTML style elements to match their needs.
## How was this patch tested?
Manually tested with the following `gateway-site.xml` settings:
1. Simple text
```
<property>
<name>gateway.ui.banner.text</name>
<value>Message of the day: give Knox a star on GitHub!</value>
</property>
```
<img width="1776" alt="Screenshot 2024-02-23 at 14 13 14"
src="https://github.com/apache/knox/assets/34065904/b573a52c-355b-456d-9175-ebbceb353617">
<img width="1786" alt="Screenshot 2024-02-23 at 14 13 23"
src="https://github.com/apache/knox/assets/34065904/7cb4ca17-8c94-4c7a-897e-e85735b7474b">
<img width="1788" alt="Screenshot 2024-02-23 at 14 13 32"
src="https://github.com/apache/knox/assets/34065904/c63a2b76-8701-42b1-9147-3228756d1fcd">
<img width="1780" alt="Screenshot 2024-02-23 at 14 13 47"
src="https://github.com/apache/knox/assets/34065904/8712cb77-a69c-429a-9335-c10e5e00a7d8">
2. Message within a `span` with yellow color:
```
<property>
<name>gateway.ui.banner.text</name>
<value><span style="color: yellow">This is a very
long banner text without any meaningful content. This is a very long banner
text without any meaningful content. This is a very long banner text without
any meaningful content. This is a very long banner text without any meaningful
content. This is a very long banner text without any meaningful content. This
is a very long banner text without any meaningful content.</span></value>
</property>
```
<img width="1783" alt="Screenshot 2024-02-23 at 14 15 52"
src="https://github.com/apache/knox/assets/34065904/ec9fb063-919f-4516-9fbf-a614a4ef20ee">
<img width="1791" alt="Screenshot 2024-02-23 at 14 16 00"
src="https://github.com/apache/knox/assets/34065904/79398786-9b90-459a-b4fc-f463914ccbf4">
<img width="1783" alt="Screenshot 2024-02-23 at 14 16 08"
src="https://github.com/apache/knox/assets/34065904/9a45fe03-cd24-4d6c-a40d-afad01c162fd">
Issue Time Tracking
-------------------
Worklog Id: (was: 906652)
Remaining Estimate: 0h
Time Spent: 10m
> Add a new banner on the top of Knox UIs
> ---------------------------------------
>
> Key: KNOX-3008
> URL: https://issues.apache.org/jira/browse/KNOX-3008
> Project: Apache Knox
> Issue Type: New Feature
> Components: AdminUI, Homepage, TokenGenerationUI, TokenManagementUI
> Affects Versions: 2.1.0
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 2.1.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I got to know that Hue has a simple, but really cool feature: it can show a
> [custom HTML banner|https://gethue.com/add-a-top-banner-to-hue/] on the top
> of the Hue UI. Implementing a similar feature in Knox can help end-users to:
> # Share a message of the day like hints, tips, or planned outages.
> # Identify the cluster (e.g. Prod/Test/Dev) in case the URL is not clear
> enough.
> An additional improvement would be identifying which Knox gateway is in use,
> in case of HA deployments and if it's behind a load balancer, which can help
> with troubleshooting. This information fits perfectly into the existing
> {{General Proxy Information}} section on the Knox home page; we just need to
> add this new information as a new row in the table.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)