Commit 3d131d83 authored by Marc Duez's avatar Marc Duez

server : admin panel

parent 8176ebc2
# coding: utf8
import gluon.contrib.simplejson
if request.env.http_origin:
response.headers['Access-Control-Allow-Origin'] = request.env.http_origin
response.headers['Access-Control-Allow-Credentials'] = 'true'
response.headers['Access-Control-Max-Age'] = 86400
## return admin_panel
def index():
return dict(message=T(''))
def result():
return dict(message=T(''))
def run_all():
query = db(
& (
for row in query:
res = {"success" : "true",
"message" : "rerun all"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
{{extend 'db_layout.html'}}
Bientot vous trouverez içi un magnifique panneau d'administration, en attendant voila un lapin.</br>
<img src="" style="width:200px; height:200px;">
<a class="button" onclick="'admin/result');">liste des fichiers result (data)</a>
{{extend 'db_layout.html'}}
query = db(
& (
& (
<div id="db_table_container">
<table class="db_table" id="table">
<td class="column1">file_name</td>
<td class="column2">config</td>
<td> </td>
<td class="column1">patient</td>
<td class="column2">producer</td>
<td class="column2">last process</td>
<td class="column2">status</td>
{{for row in query :}}
{{if row.sequence_file.data_file is None :}}
{{filename = ''}}
{{(filename, str) = db.sequence_file.data_file.retrieve(row.sequence_file.data_file)}}
{{if row.data_file.scheduler_task_id is None :}}
{{status = '' }}
{{status = db.scheduler_task[row.data_file.scheduler_task_id ].status }}
<td> {{=filename}} </td>
<td> {{}} </td>
<td> {{=row.patient.last_name + " " + row.patient.first_name }} </td>
<td> {{=row.sequence_file.producer}} </td>
<td> {{=row.data_file.run_date}} </td>
<td> {{=status}} </td>
<table class="db_table" id="db_fixed_header"></table>
<div class="db_block">
<div class="db_block_right">
<a class="button" onclick="'admin/run_all')" > run all </a>
......@@ -7,6 +7,7 @@
<a class="button" onclick="'config/index');">configs</a>
<a class="button" onclick="'group/index');">groups</a>
<a class="button" onclick="'user/index');">users</a>
<a class="button" onclick="'admin/index');">admin</a>
- - -
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment