Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
da3ff9a6
Commit
da3ff9a6
authored
Jun 21, 2016
by
HERBERT Ryan
Browse files
Added basic controller for viewing logs stored in db
parent
d787d50d
Changes
3
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/controllers/log.py
0 → 100644
View file @
da3ff9a6
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
def
index
():
query
=
db
(
db
.
user_log
).
select
()
return
dict
(
query
=
query
)
server/web2py/applications/vidjil/views/db_layout.html
View file @
da3ff9a6
...
...
@@ -10,6 +10,7 @@
<a
class=
"button"
onclick=
"db.call('config/index');"
>
analysis configs
</a>
<a
class=
"button"
onclick=
"db.call('group/index');"
>
groups
</a>
<a
class=
"button"
onclick=
"db.call('user/index');"
>
users
</a>
<a
class=
"button"
onclick=
"db.call('log/index');"
>
log
</a>
<a
class=
"button"
onclick=
"db.call('admin/index');"
>
admin
</a>
- - -
{{pass}}
...
...
server/web2py/applications/vidjil/views/log/index.html
0 → 100644
View file @
da3ff9a6
{{extend 'db_layout.html'}}
{{import vidjil_utils}}
<h3></h3>
<div
id=
"db_table_container"
>
<table
class=
"db_table"
id=
"table"
>
<thead>
<tr>
<td
class=
'column_100 pointer'
>
user
</td>
<td
class=
'column_100 pointer'
>
table
</td>
<td
class=
'column_100 pointer'
>
message
</td>
<td
class=
'column_100 pointer'
>
record
</td>
<td
class=
'column_100 pointer'
>
created
</td>
</tr>
</thead>
{{ for row in query: }}
<tr>
<td>
{{=row.user_id}}
</td>
<td>
{{=row.table_name}}
</td>
<td>
{{=row.msg}}
</td>
<td>
{{=row.record_id}}
</td>
<td>
{{=row.created}}
</td>
</tr>
{{ pass }}
</table>
<table
class=
"db_table"
id=
"db_fixed_header"
></table>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment