Add footer and review doc to customize UI#182
Add footer and review doc to customize UI#182PaulinCharliquart wants to merge 3 commits intoovh:masterfrom
Conversation
Signed-off-by: Paulin Charliquart <paulincharliquart@gmail.com>
Signed-off-by: Paulin Charliquart <paulincharliquart@gmail.com>
Signed-off-by: Paulin Charliquart <paulincharliquart@gmail.com>
ncrocfer
left a comment
There was a problem hiding this comment.
Hi @PaulinCharliquart,
Thanks for this PR ! I let you make the changes I suggest before checking it again ;)
| </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.
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.
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.
No, I insist: don't concatenate please. A single API_URL is enough to customize the url ;)
| </v-card> | ||
| </v-dialog> | ||
| <!-- Definitions Ends --> | ||
| <v-footer padless> |
There was a problem hiding this comment.
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).
| env = Env() | ||
| env.read_env(env_path) | ||
|
|
||
| self.VERSION = env.str("DIRECTOR_VERSION", version) |
There was a problem hiding this comment.
Why would you like to let the user override the installed version value?
There was a problem hiding this comment.
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.
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_VERSIONUpdate doc to customize UI
Remove usage of
DIRECTOR_API_URLby using Flask template feature