Commit 10a9befe authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

controllers/admin.py: rename 'log' to 'showlog', preventing name clash

parent 6abe633e
......@@ -49,7 +49,7 @@ def monitor():
last_results = last_results)
def log():
def showlog():
if auth.has_membership("admin"):
......
......@@ -92,7 +92,7 @@ def log_links(s):
>>> log_links("abcdef")
'abcdef'
>>> log_links("[1234]abcdef")
'[<a class="loglink pointer" onclick="db.call(\\'admin/log\\', {\\'file\\': \\'../..//mnt/result/tmp/out-001234/001234.vidjil.log\\', \\'format\\': \\'raw\\'})">1234</a>]abcdef'
'[<a class="loglink pointer" onclick="db.call(\\'admin/showlog\\', {\\'file\\': \\'../..//mnt/result/tmp/out-001234/001234.vidjil.log\\', \\'format\\': \\'raw\\'})">1234</a>]abcdef'
>>> log_links("abcdef(234)")
'abcdef(<a class="loglink pointer" onclick="db.call(\\'patient/info\\', {\\'id\\': \\'234\\'})">234</a>)'
>>> log_links("abcdef(234)abcdef c11")
......@@ -128,7 +128,7 @@ def log_links(s):
end -= 1
if task:
call = "admin/log"
call = "admin/showlog"
args = {'file': '../../' + defs.DIR_OUT_VIDJIL_ID % task + defs.BASENAME_OUT_VIDJIL_ID % task + '.vidjil.log', 'format': 'raw'}
(start, end) = m_task.span()
start += 1
......
......@@ -16,13 +16,13 @@
<hr>
</br>Vidjil server:
<a class="button" onclick="db.call('admin/log', {'file' : 'vidjil.log', 'format': 'vidjil'} );">vidjil.log</a>
<a class="button" onclick="db.call('admin/log', {'file' : 'vidjil-debug.log', 'format': 'vidjil'} );">debug.log</a>
<a class="button" onclick="db.call('admin/showlog', {'file' : 'vidjil.log', 'format': 'vidjil'} );">vidjil.log</a>
<a class="button" onclick="db.call('admin/showlog', {'file' : 'vidjil-debug.log', 'format': 'vidjil'} );">debug.log</a>
<a class="button" href="/admin/default/errors/vidjil">web2py tickets</a>
</br>Ngnix:
<a class="button" onclick="db.call('admin/log', {'file' : '../log/nginx/access.log'} );">access.log</a>
<a class="button" onclick="db.call('admin/log', {'file' : '../log/nginx/error.log'} );">error.log</a>
<a class="button" onclick="db.call('admin/showlog', {'file' : '../log/nginx/access.log'} );">access.log</a>
<a class="button" onclick="db.call('admin/showlog', {'file' : '../log/nginx/error.log'} );">error.log</a>
......
......@@ -15,7 +15,7 @@
<div class="db_block_left">
search
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}"
onchange="db.call('admin/log', {'file' : '{{=request.vars["file"]}}', 'filter' : this.value, 'format': '{{=request.vars["format"]}}' } )" >
onchange="db.call('admin/showlog', {'file' : '{{=request.vars["file"]}}', 'filter' : this.value, 'format': '{{=request.vars["format"]}}' } )" >
</div>
</div>
......
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