[mod] try to make app working on path installation

This commit is contained in:
Laurent Peuch 2018-08-27 00:35:55 +02:00
parent b5bf55265a
commit 67c837c496
2 changed files with 4 additions and 4 deletions

4
run.py
View file

@ -389,13 +389,13 @@ async def job(request, job_id):
if job.count == 0:
raise NotFound()
return {"job": job[0]}
return {"job": job[0], 'relative_path_to_root': '../../'}
@app.route('/')
@jinja.template('index.html')
async def index(request):
return {}
return {'relative_path_to_root': ''}
def main(path_to_analyseCI, ssl=False, keyfile_path="/etc/yunohost/certs/ci-apps.yunohost.org/key.pem", certfile_path="/etc/yunohost/certs/ci-apps.yunohost.org/crt.pem"):

View file

@ -7,8 +7,8 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="/static/js/app.js"></script>
<link href="/static/css/style.css" rel="stylesheet" type="text/css">
<script src="<{ relative_path_to_root }>static/js/app.js"></script>
<link href="<{ relative_path_to_root }>static/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<% block content %><% endblock %>