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
2e9e8353
Commit
2e9e8353
authored
Jun 09, 2020
by
Vladislav Rykov
Browse files
separated device variables better control
parent
de9f85de
Changes
2
Show whitespace changes
Inline
Side-by-side
app/app/__pycache__/views.cpython-37.pyc
View file @
2e9e8353
No preview for this file type
app/app/views.py
View file @
2e9e8353
...
@@ -432,6 +432,7 @@ def application_device_data(appkey, devid, var, dest, page):
...
@@ -432,6 +432,7 @@ def application_device_data(appkey, devid, var, dest, page):
arr
=
'['
arr
=
'['
last
=
[
ddm
.
decode_datum
(
d
,
dev
[
3
])
for
d
in
last
[
1
]]
last
=
[
ddm
.
decode_datum
(
d
,
dev
[
3
])
for
d
in
last
[
1
]]
for
d
in
last
:
for
d
in
last
:
if
var
in
d
[
2
]:
arr
+=
'[new Date('
+
str
(
d
[
0
])
+
'*1000),'
+
str
(
d
[
2
][
var
])
+
'],'
arr
+=
'[new Date('
+
str
(
d
[
0
])
+
'*1000),'
+
str
(
d
[
2
][
var
])
+
'],'
arr
+=
']'
arr
+=
']'
return
arr
return
arr
...
@@ -442,6 +443,7 @@ def application_device_data(appkey, devid, var, dest, page):
...
@@ -442,6 +443,7 @@ def application_device_data(appkey, devid, var, dest, page):
if
last
[
0
]:
if
last
[
0
]:
last
=
[
ddm
.
decode_datum
(
d
,
dev
[
3
])
for
d
in
last
[
1
]]
last
=
[
ddm
.
decode_datum
(
d
,
dev
[
3
])
for
d
in
last
[
1
]]
for
d
in
last
:
for
d
in
last
:
if
var
in
d
[
2
]:
t
+=
'<tr><th>'
+
d
[
1
]
+
'</th><th>'
+
str
(
d
[
2
][
var
])
+
'</th></tr>'
t
+=
'<tr><th>'
+
d
[
1
]
+
'</th><th>'
+
str
(
d
[
2
][
var
])
+
'</th></tr>'
return
t
return
t
...
...
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