diff options
-rw-r--r-- | roles/koji_hub/tasks/main.yml | 9 | ||||
-rw-r--r-- | roles/koji_hub/templates/fedmenu-extra-footer.html | 27 |
2 files changed, 36 insertions, 0 deletions
diff --git a/roles/koji_hub/tasks/main.yml b/roles/koji_hub/tasks/main.yml index a5fc795e7..57bea75d6 100644 --- a/roles/koji_hub/tasks/main.yml +++ b/roles/koji_hub/tasks/main.yml @@ -30,6 +30,15 @@ tags: - koji_hub +- name: fedmenu shim + template: src=fedmenu-extra-footer.html dest=/usr/share/koji-web/static/extra-footer.html + tags: koji_hub + notify: restart httpd + # XXX - we only want to do this in staging for now because it requires a patch + # to koji itself to include the extra-footer.html file in a sufficiently + # advanced way. + when: env == 'staging' + - name: hub config template: src=hub.conf.j2 dest=/etc/koji-hub/hub.conf owner=apache group=apache mode=600 tags: diff --git a/roles/koji_hub/templates/fedmenu-extra-footer.html b/roles/koji_hub/templates/fedmenu-extra-footer.html new file mode 100644 index 000000000..75934a1e4 --- /dev/null +++ b/roles/koji_hub/templates/fedmenu-extra-footer.html @@ -0,0 +1,27 @@ +{% if env == 'staging' %} +<script src="https://apps.stg.fedoraproject.org/fedmenu/js/jquery-1.11.2.min.js"></script> +<script src="https://apps.stg.fedoraproject.org/fedmenu/js/fedora-libravatar.js"></script> +<script src="https://apps.stg.fedoraproject.org/fedmenu/js/fedmenu.js"></script> +{% else %} +<script src="https://apps.fedoraproject.org/fedmenu/js/jquery-1.11.2.min.js"></script> +<script src="https://apps.fedoraproject.org/fedmenu/js/fedora-libravatar.js"></script> +<script src="https://apps.fedoraproject.org/fedmenu/js/fedmenu.js"></script> +{% endif %} + +<script> + {% if env == 'staging' %} + var base = 'https://apps.stg.fedoraproject.org/'; + {% else %} + var base = 'https://apps.fedoraproject.org/'; + {% endif %} + fedmenu({ + 'url': base + 'js/data.js', + 'mimeType': 'application/javascript', + 'position': 'bottom-right', + #if $varExists('build') + 'package': '$build.package_name', + 'user': '$build.owner_name', + #end if + }); +</script> + |