mirror of https://git.48k.eu/ogcp
Add legacy real-time log
Clients in ogLive offer a web page with lighttpd that shows a real-time log. This commit links this log in ogcp. Future patches will deprecate this log functionality in favour of more robust solutions.multi-ogserver
parent
7faa607131
commit
792e4ed3dd
|
@ -42,5 +42,7 @@
|
|||
form="scopesForm" formaction="{{ url_for('action_mode') }}" formmethod="get">
|
||||
<input class="btn btn-light" type="submit" value="{{ _('Log') }}"
|
||||
form="scopesForm" formaction="{{ url_for('action_legacy_log') }}" formmethod="get">
|
||||
<input class="btn btn-light" type="submit" value="{{ _('Real time log') }}"
|
||||
form="scopesForm" formaction="{{ url_for('action_legacy_rt_log') }}" formmethod="get">
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -860,3 +860,15 @@ def action_legacy_log():
|
|||
else:
|
||||
return redirect(url_for('commands'))
|
||||
|
||||
@app.route('/action/rt-log', methods=['GET'])
|
||||
@login_required
|
||||
def action_legacy_rt_log():
|
||||
ips = parse_elements(request.args.to_dict())
|
||||
if not validate_elements(ips, max_len=1):
|
||||
return redirect(url_for('commands'))
|
||||
ip = ips.pop()
|
||||
scheme = "http://"
|
||||
rt_log_path = "/cgi-bin/httpd-log.sh"
|
||||
rt_log_url = scheme + ip + rt_log_path
|
||||
return redirect(rt_log_url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue