Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Fix css/js version commits (HumanSignal#957)
Browse files Browse the repository at this point in the history
* Fix css/js version commits

* Fix misspell
  • Loading branch information
makseq authored Jun 4, 2021
1 parent 415c71e commit 05e4f7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions label_studio/core/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ def settings(request):
versions['lsf'] = versions.get('label-studio-frontend', {})
versions['lsf']['commit'] = versions['lsf'].get('commit', 'none')[0:6]

if 'backend' in versions:
versions['backend']['commit'] = versions['backend'].get('commit', 'none')[0:6]
versions['backend'] = {}
if 'label-studio-os-backend' in versions:
versions['backend']['commit'] = versions['label-studio-os-backend'].get('commit', 'none')[0:6]
if 'label-studio-enterprise-backend' in versions:
versions['backend']['commit'] = versions['label-studio-enterprise-backend'].get('commit', 'none')[0:6]

if 'dm2' in versions:
versions['dm2']['commit'] = versions['dm2'].get('commit', 'none')[0:6]

return {
'settings': django_settings,
Expand Down
4 changes: 2 additions & 2 deletions label_studio/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<script>
EDITOR_JS = "{{settings.HOSTNAME}}/label-studio-frontend/js/main.js?v={{ versions.lsf.commit }}";
EDITOR_CSS = "{{settings.HOSTNAME}}/label-studio-frontend/css/main.css?v={{ versions.lsf.commit }}";
DM_JS = "{{settings.HOSTNAME}}/dm/js/main.js?v={{ versions.lsf.commit }}";
DM_CSS = "{{settings.HOSTNAME}}/dm/css/main.css?v={{ versions.lsf.commit }}";
DM_JS = "{{settings.HOSTNAME}}/dm/js/main.js?v={{ versions.dm2.commit }}";
DM_CSS = "{{settings.HOSTNAME}}/dm/css/main.css?v={{ versions.dm2.commit }}";
</script>

<script>
Expand Down

0 comments on commit 05e4f7f

Please sign in to comment.