-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add banner indicating environment type #18652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| -#} | ||
| <link rel="stylesheet" type="text/css" href="{{ url_for_asset('flash.css') }}"> | ||
|
|
||
| <div style="padding-top: 40px"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did that because otherwise the error was slightly hidden by navbar
|
How is this feature different from
http://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#id29 |
I agree that both can be used to achieve the same thing. The difference is visibility. If you will take a look at the thread I linked you will see that changing navbar colour is quite common practice to achieve more visible distinction than just changing a word (instance name). I think we can combine those two options, WDYT? |
| default: "False" | ||
| - name: environment_type | ||
| description: | | ||
| Environment type of this Airflow instance. One of PROD, STAGING, TEST. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Environment type of this Airflow instance. One of PROD, STAGING, TEST. | |
| Environment type of this Airflow instance. Example would be PROD, STAGING, TEST. |
|
I agree with @turbaszek that it is a good idea. Actually the fact that you need to explain to the users something with "Did you actually know that you can do this and this to achieve that"? means that there is something wrong with the feature - it's either not obvious, not discoverable, or maybe it has many overlapping uses, which make it difficult to understand and even realise that you can already do something (albeit in a convoluted way). There are various reasons why you would like to change instance name, or change navbar colour - for example due to matching your colors with the company "color theme" or naming your instances via department. However explicitly naming the option "as environment" which would be "orthognal" to that and much more visible is a good idea:
I would be very much for explicit "environment" flag like @turbaszek is proposing. |
|
UX-wise I think it would be better to integrate the env into the existing navbar-header instead of tacking on another banner. Also, I'm happy to help with CSS :) |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
This work was inspired by responses to this linkedin comment. The aim is to add simple banner hovering at top of the Airflow webui and indicating what environment type it is (test, staging, production etc).
Example:

The banner is by default disabled. Personally I think we should provided users with predefined environment types with correlated colours (to keep the UI visually consistent). However, I'm extremely poor front developer so if someone would like to help with polishing the css and html I would be grateful ❤️