-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add footer and review doc to customize UI #182
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Paulin Charliquart <[email protected]>
Signed-off-by: Paulin Charliquart <[email protected]>
Signed-off-by: Paulin Charliquart <[email protected]>
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.
Hi @PaulinCharliquart,
Thanks for this PR ! I let you make the changes I suggest before checking it again ;)
</v-app> | ||
</div> | ||
<script type="text/javascript"> | ||
const HISTORY_MODE =%% config.ENABLE_HISTORY_MODE | int %%; | ||
const API_URL = "%% config.API_URL %%"; |
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.
I'm not sure simply concatenating request.url_root
and api
is a really good idea. My feedling is we can have some problems if a user is behind a reverse proxy or something like that.
By allowing him to fully customize its API_URL
, we're safe.
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.
hi @ncrocfer,
Or do you think it can work with this js code?
const API_URL = window.location.origin + "/api"
regards,
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.
No, I insist: don't concatenate please. A single API_URL
is enough to customize the url ;)
@@ -730,11 +730,19 @@ | |||
</v-card> | |||
</v-dialog> | |||
<!-- Definitions Ends --> | |||
<v-footer padless> |
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.
The idea of having the version displayed in the UI is nice but unfortunately the rendering is not really good:
Can you simply add this information somewhere else? Maybe at the bottom of the navigation menu?
It seems you can use the append slot of vuetify for that: https://vuetifyjs.com/en/components/navigation-drawers/#misc (didn't try it).
@@ -35,12 +34,12 @@ def __init__(self, home_path=None, config_path=None): | |||
env = Env() | |||
env.read_env(env_path) | |||
|
|||
self.VERSION = env.str("DIRECTOR_VERSION", version) |
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.
Why would you like to let the user override the installed version value?
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.
hi @ncrocfer,
It will allow user to customize the footer. For my case, I can pass GIT_TAG from my CI/CD pipeline and see it in the UI.
regards,
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.
Ok I see, indeed it seems to be a very good use case ! You can for instance reference celery-director==x.y.z
in your own requirements.txt
file, then display your hash commit or git tag in the footer.
But I'm not sure the DIRECTOR_VERSION
is a good name for that (because the real director version doesn't change, so it brings confusion). I will check what is done by other similar tools for this kind of needs and I will answer you.
DIRECTOR_VERSION
Update doc to customize UI
Remove usage of
DIRECTOR_API_URL
by using Flask template feature