Rename /status to /services

master
Pierre Jaury 9 years ago
parent 46f2af3837
commit 5677c85368

@ -36,7 +36,7 @@
<li class="header">Administration</li> <li class="header">Administration</li>
{% if current_user.global_admin %} {% if current_user.global_admin %}
<li> <li>
<a href="{{ url_for('.status') }}"> <a href="{{ url_for('.services') }}">
<i class="fa fa-dashboard"></i> <span>Services status</span> <i class="fa fa-dashboard"></i> <span>Services status</span>
</a> </a>
</li> </li>

@ -8,9 +8,9 @@ import flask
import json import json
@app.route('/status', methods=['GET']) @app.route('/services', methods=['GET'])
@flask_login.login_required @flask_login.login_required
def status(): def services():
utils.require_global_admin() utils.require_global_admin()
containers = {} containers = {}
for brief in dockercli.containers(all=True): for brief in dockercli.containers(all=True):
@ -20,7 +20,7 @@ def status():
name = container['Config']['Labels']['com.docker.compose.service'] name = container['Config']['Labels']['com.docker.compose.service']
containers[name] = container containers[name] = container
pprint.pprint(container) pprint.pprint(container)
return flask.render_template('admin/status.html', containers=containers) return flask.render_template('admin/services.html', containers=containers)
@app.route('/admins', methods=['GET']) @app.route('/admins', methods=['GET'])

Loading…
Cancel
Save