Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.server
Commits
e537552f
Commit
e537552f
authored
Jul 02, 2020
by
Vladislav Rykov
Browse files
template views file name coherence
parent
f68cb5c5
Changes
5
Show whitespace changes
Inline
Side-by-side
app/app/__pycache__/views_admin.cpython-37.pyc
View file @
e537552f
No preview for this file type
app/app/templates/views/admin/user-add-device.html
→
app/app/templates/views/admin/user-
application-
add-device.html
View file @
e537552f
File moved
app/app/templates/views/admin/user-device.html
→
app/app/templates/views/admin/user-
application-
device.html
View file @
e537552f
File moved
app/app/templates/views/admin/user-new-alert.html
→
app/app/templates/views/admin/user-
application-
new-alert.html
View file @
e537552f
File moved
app/app/views_admin.py
View file @
e537552f
...
@@ -133,7 +133,7 @@ def administration_user_application_add_device(name, appkey):
...
@@ -133,7 +133,7 @@ def administration_user_application_add_device(name, appkey):
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
ap
=
ad
.
get
(
appkey
)
ap
=
ad
.
get
(
appkey
)
dev_list
=
dd
.
get_list
(
appkey
)
dev_list
=
dd
.
get_list
(
appkey
)
return
render_template
(
'views/admin/user-add-device.html'
,
app
=
ap
[
1
],
free_ids
=
misc
.
prep_id_range
(
dev_list
[
1
]),
models
=
ddm
.
MODELS
,
user
=
name
)
return
render_template
(
'views/admin/user-
application-
add-device.html'
,
app
=
ap
[
1
],
free_ids
=
misc
.
prep_id_range
(
dev_list
[
1
]),
models
=
ddm
.
MODELS
,
user
=
name
)
elif
request
.
method
==
'POST'
:
elif
request
.
method
==
'POST'
:
ddmin
=
ddm
.
extract
(
request
)
ddmin
=
ddm
.
extract
(
request
)
res
=
dd
.
create_ddm
(
request
.
form
[
'devname'
],
request
.
form
[
'devid'
],
appkey
,
request
.
form
[
'devdesc'
],
ddmin
)
res
=
dd
.
create_ddm
(
request
.
form
[
'devname'
],
request
.
form
[
'devid'
],
appkey
,
request
.
form
[
'devdesc'
],
ddmin
)
...
@@ -170,7 +170,7 @@ def administration_user_application_device(name, appkey, devid):
...
@@ -170,7 +170,7 @@ def administration_user_application_device(name, appkey, devid):
if
ld
[
0
]
and
ld
[
1
][
0
]
!=
[]:
if
ld
[
0
]
and
ld
[
1
][
0
]
!=
[]:
ltup
=
ld
[
1
][
0
][
1
]
ltup
=
ld
[
1
][
0
][
1
]
return
render_template
(
'views/admin/user-device.html'
,
dev
=
dev
[
1
],
app
=
ap
[
1
],
ltup
=
ltup
,
total
=
cnt
[
1
][
0
],
user
=
name
,
table_max
=
MAX_PG_ENTRIES_DATA
)
return
render_template
(
'views/admin/user-
application-
device.html'
,
dev
=
dev
[
1
],
app
=
ap
[
1
],
ltup
=
ltup
,
total
=
cnt
[
1
][
0
],
user
=
name
,
table_max
=
MAX_PG_ENTRIES_DATA
)
@
app
.
route
(
'/administration/<name>/application/<appkey>/device/<devid>/settings'
,
methods
=
[
'GET'
,
'POST'
])
@
app
.
route
(
'/administration/<name>/application/<appkey>/device/<devid>/settings'
,
methods
=
[
'GET'
,
'POST'
])
...
@@ -229,7 +229,7 @@ def administration_user_application_new_alert(name, appkey):
...
@@ -229,7 +229,7 @@ def administration_user_application_new_alert(name, appkey):
ap
=
ad
.
get
(
appkey
)
ap
=
ad
.
get
(
appkey
)
devs
=
dd
.
get_list
(
appkey
)
devs
=
dd
.
get_list
(
appkey
)
return
render_template
(
'views/admin/user-new-alert.html'
,
devs
=
devs
[
1
],
app
=
ap
[
1
],
user
=
name
)
return
render_template
(
'views/admin/user-
application-
new-alert.html'
,
devs
=
devs
[
1
],
app
=
ap
[
1
],
user
=
name
)
elif
request
.
method
==
'POST'
:
elif
request
.
method
==
'POST'
:
# create new notification
# create new notification
nid
=
misc
.
rand_str
(
app
.
config
[
'NID_LENGTH'
]).
decode
(
'utf-8'
)
nid
=
misc
.
rand_str
(
app
.
config
[
'NID_LENGTH'
]).
decode
(
'utf-8'
)
...
...
Write
Preview
Supports
Markdown
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