Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jannik Hellenkamp
website
Commits
cac09d9d
Commit
cac09d9d
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.fsmpi.rwth-aachen.de:videoagwebsite/videoagwebsite
parents
99715d29
9ecfbd5e
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
db_schema.sql
+1
-0
1 addition, 0 deletions
db_schema.sql
server.py
+2
-2
2 additions, 2 deletions
server.py
stats.py
+4
-1
4 additions, 1 deletion
stats.py
templates/courses.html
+3
-2
3 additions, 2 deletions
templates/courses.html
with
10 additions
and
5 deletions
db_schema.sql
+
1
−
0
View file @
cac09d9d
...
...
@@ -128,6 +128,7 @@ CREATE TABLE IF NOT EXISTS `log` (
`ip`
varchar
(
64
),
`id`
varchar
(
64
),
`time`
datetime
NOT
NULL
,
`source`
varchar
(
8
),
`object`
varchar
(
10
),
`obj_id`
INTEGER
,
`path`
varchar
(
255
)
NOT
NULL
...
...
This diff is collapsed.
Click to expand it.
server.py
+
2
−
2
View file @
cac09d9d
...
...
@@ -323,7 +323,7 @@ def courses():
if
course
[
'
semester
'
]
==
''
:
course
[
'
semester
'
]
=
'
zeitlos
'
groupedby
=
request
.
args
.
get
(
'
groupedby
'
)
if
groupedby
not
in
[
'
title
'
,
'
semester
'
,
'
organizer
'
]:
if
groupedby
not
in
[
'
title
'
,
'
semester
'
,
'
organizer
'
,
'
subject
'
]:
groupedby
=
'
semester
'
return
render_template
(
'
courses.html
'
,
courses
=
courses
,
groupedby
=
groupedby
)
...
...
@@ -552,7 +552,7 @@ def auth(): # For use with nginx auth_request
password
=
auth
.
password
if
checkperm
(
perms
,
username
=
username
,
password
=
password
):
try
:
modify
(
'
INSERT INTO log VALUES (?, ?, ?,
"
video
"
, ?, ?)
'
,
ip
,
cookie
,
datetime
.
now
(),
perms
[
0
][
'
vid
'
],
url
)
modify
(
'
INSERT INTO log
(ip, id, `time`, object, obj_id, path)
VALUES (?, ?, ?,
"
video
"
, ?, ?)
'
,
ip
,
cookie
,
datetime
.
now
(),
perms
[
0
][
'
vid
'
],
url
)
except
:
pass
r
=
make_response
(
'
OK
'
,
200
)
...
...
This diff is collapsed.
Click to expand it.
stats.py
+
4
−
1
View file @
cac09d9d
...
...
@@ -29,7 +29,10 @@ def stats_generic(req, param=None):
rows
=
query
(
statsqueries
[
req
],
*
(
statsqueries
[
req
].
count
(
'
?
'
)
*
[
param
]))
res
=
{
'
x
'
:[],
'
y
'
:[]}
for
row
in
rows
:
if
row
[
'
x
'
]
!=
''
:
res
[
'
x
'
].
append
(
row
[
'
x
'
])
else
:
res
[
'
x
'
].
append
(
'
leer
'
)
res
[
'
y
'
].
append
(
row
[
'
y
'
])
return
Response
(
json
.
dumps
(
res
,
default
=
plotly_date_handler
),
mimetype
=
'
application/json
'
)
...
...
This diff is collapsed.
Click to expand it.
templates/courses.html
+
3
−
2
View file @
cac09d9d
...
...
@@ -19,8 +19,9 @@
</button>
<ul
class=
"dropdown-menu dropdown-menu-right"
>
<li><a
href=
"?groupedby=semester"
>
Semester
</a></li>
<li><a
href=
"?groupedby=title"
>
Veranstaltungen
</a></li>
<li><a
href=
"?groupedby=organizer"
>
Dozenten
</a></li>
<li><a
href=
"?groupedby=title"
>
Veranstaltung
</a></li>
<li><a
href=
"?groupedby=organizer"
>
Dozent
</a></li>
<li><a
href=
"?groupedby=subject"
>
Kategorie
</a></li>
</ul>
</li>
</ul>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment