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
a64b8045
Commit
a64b8045
authored
Apr 15, 2020
by
Vladislav Rykov
Browse files
device last time up fixed
parent
5eb53579
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
a64b8045
...
...
@@ -161,10 +161,16 @@ def dev():
dh
=
dd
.
DeviceDao
()
if
request
.
method
==
'GET'
:
dev
=
dh
.
get
(
session
[
'appkey'
],
request
.
args
.
get
(
'id'
))
ltup
=
'recently'
session
[
'devid'
]
=
dev
[
1
][
1
]
session
[
'devname'
]
=
dev
[
1
][
0
]
last
=
data
.
get_last_n
(
session
[
'appkey'
],
session
[
'devid'
],
1
)
ltup
=
'Device have not sent data yet'
if
last
[
0
]:
ltup
=
last
[
1
][
0
][
1
]
return
render_template
(
'dev.html'
,
dev
=
dev
[
1
],
appkey
=
session
[
'appkey'
],
ltup
=
ltup
)
else
:
...
...
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