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
07c7c87f
Commit
07c7c87f
authored
May 11, 2020
by
Vladislav Rykov
Browse files
linechart styling improved
parent
27f49a1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/app/templates/public/dev-data-t.html
View file @
07c7c87f
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<div
class=
"panel panel-success"
>
<div
class=
"panel panel-success"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<h2><center>
{{ devname }} data
</center></h2>
<h2><center>
{{ devname }} data
</center></h2>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
{% if data %}
{% if data %}
<div
class=
"tab"
>
<div
class=
"tab"
>
...
@@ -33,7 +33,13 @@
...
@@ -33,7 +33,13 @@
{% for k in data[0][2] %}
{% for k in data[0][2] %}
<div
id=
"{{ k }}"
class=
"tabcontent"
>
<div
id=
"{{ k }}"
class=
"tabcontent"
>
<div
id=
"curve_chart_{{ k }}"
></div>
<center><div
id=
"curve_chart_{{ k }}"
></div></center>
<br>
<p>
Total:
<strong>
{{ total }}
</strong>
messages.
<a
href=
"/data-csv"
><button
type=
"submit"
class=
"btn btn-primary"
>
Download CSV
</button></a>
</p>
<br>
<table
class=
"table"
id=
"table_{{ k }}"
>
<table
class=
"table"
id=
"table_{{ k }}"
>
<thead>
<thead>
...
@@ -45,50 +51,6 @@
...
@@ -45,50 +51,6 @@
</table>
</table>
</div>
</div>
{% endfor %}
{% endfor %}
<p>
Total:
<strong>
{{ total }}
</strong>
messages.
</p>
<center>
<nav
aria-label=
"Page navigation"
>
<ul
class=
"pagination"
>
{% if pp %}
<li>
{% else %}
<li
class=
"disabled"
>
{% endif %}
<a
href=
"/dev-data?p={{ pp }}"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
</a>
</li>
{% for i in range(pr[0],pr[1]) %}
{% if i == cp %}
<li
class=
"active"
>
<a
href=
"/dev-data?p={{ i }}"
>
{{ i }}
<span
class=
"sr-only"
>
(current)
</span>
</a>
</li>
{% else %}
<li>
<a
href=
"/dev-data?p={{ i }}"
>
{{ i }}
</a>
</li>
{% endif %}
{% endfor %}
{% if np %}
<li>
{% else %}
<li
class=
"disabled"
>
{% endif %}
<a
href=
"/dev-data?p={{ np }}"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
</a>
</li>
</ul>
</nav>
</center>
<br>
<center>
<a
href=
"/data-csv"
><button
type=
"submit"
class=
"btn btn-primary"
>
Download CSV
</button></a>
</center>
{% else %}
{% else %}
<h3><center>
Device have not sent any data yet.
</center></h3>
<h3><center>
Device have not sent any data yet.
</center></h3>
{% endif %}
{% endif %}
...
@@ -117,18 +79,19 @@
...
@@ -117,18 +79,19 @@
title
:
'
{{ devname }} >
'
+
dname
,
title
:
'
{{ devname }} >
'
+
dname
,
curveType
:
'
function
'
,
curveType
:
'
function
'
,
hAxis
:
{
hAxis
:
{
format
:
'
dd/MM/yy hh:mm:ss
'
,
format
:
'
dd/MM hh:mm
'
,
},
},
vAxis
:
{
vAxis
:
{
format
:
'
decimal
'
,
format
:
'
decimal
'
,
scaleType
:
'
linear
'
,
scaleType
:
'
linear
'
,
textPosition
:
'
in
'
textPosition
:
'
out
'
},
},
legend
:
{
position
:
'
none
'
},
legend
:
{
position
:
'
none
'
},
height
:
600
,
height
:
600
,
width
:
900
,
width
:
900
,
// interpolateNulls: true,
// interpolateNulls: true,
chartArea
:
{
left
:
0
,
top
:
10
,
width
:
'
10
0%
'
}
chartArea
:
{
left
:
'
5%
'
,
width
:
'
90%
'
,
height
:
'
8
0%
'
}
};
};
var
container
=
document
.
getElementById
(
'
curve_chart_
'
+
dname
);
var
container
=
document
.
getElementById
(
'
curve_chart_
'
+
dname
);
...
@@ -164,7 +127,6 @@
...
@@ -164,7 +127,6 @@
if
((
window
.
innerHeight
+
window
.
scrollY
)
>=
document
.
body
.
offsetHeight
)
{
if
((
window
.
innerHeight
+
window
.
scrollY
)
>=
document
.
body
.
offsetHeight
)
{
tscroll
[
dname
]
+=
1
;
tscroll
[
dname
]
+=
1
;
fetch
(
window
.
origin
+
'
/dev-data/
'
+
dname
+
'
/table/
'
+
tscroll
[
dname
]).
then
(
res
=>
res
.
text
()).
then
(
data
=>
$
(
'
#table_
'
+
dname
+
'
_body
'
).
append
(
data
));
fetch
(
window
.
origin
+
'
/dev-data/
'
+
dname
+
'
/table/
'
+
tscroll
[
dname
]).
then
(
res
=>
res
.
text
()).
then
(
data
=>
$
(
'
#table_
'
+
dname
+
'
_body
'
).
append
(
data
));
console
.
log
(
tscroll
[
dname
]);
}
}
};
};
}
}
...
...
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