Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
tev
plugin_event
Commits
d759e57c
Commit
d759e57c
authored
Nov 15, 2019
by
LE GAC Renaud
Browse files
Apply 2to3 converter to controllers.
parent
daae7dac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
controllers/default.py
controllers/default.py
+1
-2
controllers/plugin_event.py
controllers/plugin_event.py
+4
-5
No files found.
controllers/default.py
View file @
d759e57c
# -*- coding: utf-8 -*-
""" Controllers
"""
...
...
@@ -12,7 +11,7 @@ def index():
"""
# login procedure is active
if
session
.
auth
:
roles
=
session
.
auth
.
user_groups
.
values
()
roles
=
list
(
session
.
auth
.
user_groups
.
values
()
)
if
roles
:
session
.
role
=
roles
[
0
]
...
...
controllers/plugin_event.py
View file @
d759e57c
# -*- coding: utf-8 -*-
"""plugin_event controllers
"""
import
json
import
traceback
import
urllib
import
urllib
.parse
from
datetime
import
datetime
...
...
@@ -72,7 +71,7 @@ def metric2d():
if
graph
.
ax
is
not
None
:
img
=
graph
.
to_svg
()
img
=
urllib
.
quote
(
img
)
img
=
urllib
.
parse
.
quote
(
img
)
response
.
view
=
"plugin_event/grid_and_graph.html"
return
dict
(
cfg_store
=
store
,
grid
=
grid
,
img
=
img
,
title
=
title
)
...
...
@@ -145,7 +144,7 @@ def userModelConsistency():
if
update_keys
:
ok
=
False
for
k
,
v
in
update_keys
.
iter
items
():
for
k
,
v
in
update_keys
.
items
():
if
oldkey
==
v
:
update_keys
[
k
]
=
newkey
ok
=
True
...
...
@@ -212,7 +211,7 @@ def userModelConsistency():
data
[
key
]
=
(
rd
[
key
]
if
key
in
rd
else
model
[
key
][
"value"
])
# modify key name
for
oldkey
,
newkey
in
update_keys
.
iter
items
():
for
oldkey
,
newkey
in
update_keys
.
items
():
if
oldkey
in
rd
:
data
[
newkey
]
=
rd
[
oldkey
]
...
...
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