Commit de2bd7f5 authored by Tom Powell's avatar Tom Powell

add footer, include version

parent b1c5ae70
Pipeline #38636455 failed with stages
in 5 minutes and 3 seconds
......@@ -24,7 +24,7 @@ build:
DOCKER_DRIVER: overlay2
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build . -t $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- docker build --build-arg VERSION=$CI_COMMIT_SHA . -t $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- docker tag $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
......
FROM python:3.6
ARG VERSION=dev
ENV VERSION=$VERSION
COPY . /app
WORKDIR /app
RUN pip install gunicorn
......
......@@ -31,6 +31,11 @@ nav.register_element('top', Navbar(
headers = {'Private-Token': os.environ.get('GITLAB_TOKEN', '')}
def version():
return os.environ.get("VERSION", "dev")[:6]
app.jinja_env.globals.update(version=version)
def parse_args():
args = {}
if request.args:
......
......@@ -27,3 +27,20 @@ a:focus, a:hover {
.pagination li a, .pagination li a:focus, .pagination li a:hover {
color: #167c80;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
background-color: #167c80;
color: white;
display: flex;
justify-content: space-between;
width: 100%;
}
.footer a {
color: white;
}
\ No newline at end of file
......@@ -31,4 +31,5 @@
</table>
{{render_pagination(builds)}}
</div>
{% include "footer.html" %}
{% endblock %}
{% block footer %}
<footer class="footer">
<span>© 2017-2018 LineageOS. Licensed under Apache 2.0.</span>
<span><a href="https://gitlab.com/lineageos/infra/builds-ui">Source</a> (version: {{version()}})</span>
</footer>
{% endblock %}
\ No newline at end of file
......@@ -35,4 +35,5 @@
</table>
{{render_pagination(builds)}}
</div>
{% include "footer.html" %}
{% endblock %}
......@@ -17,4 +17,5 @@
{% endfor %}
</table>
</div>
{% include "footer.html" %}
{% endblock %}
......@@ -54,4 +54,5 @@
{% endfor %}
</div>
{% include "footer.html" %}
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment