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
35469f79
Commit
35469f79
authored
May 11, 2020
by
Vladislav Rykov
Browse files
dev data finished without graph nac
parent
07c7c87f
Changes
2
Show whitespace changes
Inline
Side-by-side
app/app/static/css/custom.css
View file @
35469f79
...
...
@@ -40,6 +40,11 @@
/*workaround to make clickable in IE */
}
.glyphicon
.glyphicon-arrow-left
{
.glyphicon
-pagenav
{
font-size
:
50px
;
}
.glyphicon-graphnav
{
font-size
:
40px
;
}
app/app/templates/public/dev-data-t.html
View file @
35469f79
...
...
@@ -14,7 +14,7 @@
<div
class=
"row"
>
<div
class=
"col-md-1"
>
<div
class=
"clickback"
>
<span
class=
"glyphicon glyphicon-arrow-left"
></span>
<span
class=
"glyphicon glyphicon-arrow-left
glyphicon-pagenav
"
></span>
<p><a
class=
"backlink"
onclick=
"history.back(-1)"
></a></p>
</div>
</div>
...
...
@@ -34,11 +34,22 @@
{% for k in data[0][2] %}
<div
id=
"{{ k }}"
class=
"tabcontent"
>
<center><div
id=
"curve_chart_{{ k }}"
></div></center>
<br>
<!--
<div>
<div style="float:left;">
<span class="glyphicon glyphicon-arrow-left glyphicon-graphnav"></span>
</div>
<div style="float:right;">
<span class="glyphicon glyphicon-arrow-right glyphicon-graphnav"></span>
</div>
</div>
<br><br>
-->
<center>
<p>
Total:
<strong>
{{ total }}
</strong>
messages.
<a
href=
"/data-csv"
><button
type=
"submit"
class=
"btn btn-primary"
>
Download CSV
</button></a>
</p>
<a
href=
"/data-csv"
><button
type=
"submit"
class=
"btn btn-primary"
>
Download CSV
</button></a>
</center>
<br>
<table
class=
"table"
id=
"table_{{ k }}"
>
...
...
@@ -60,6 +71,8 @@
{% if data %}
<script
type=
"text/javascript"
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"
></script>
<script
type=
"text/javascript"
>
google
.
charts
.
load
(
'
current
'
,
{
'
packages
'
:[
'
corechart
'
]});
function
init_scroll
()
{
var
ts
=
{
{
%
for
k
in
data
[
0
][
2
]
%
}
...
...
@@ -70,7 +83,6 @@
}
var
tscroll
=
init_scroll
();
google
.
charts
.
load
(
'
current
'
,
{
'
packages
'
:[
'
corechart
'
]});
function
drawChart
(
dname
,
ddata
)
{
var
data
=
google
.
visualization
.
arrayToDataTable
(
ddata
);
...
...
@@ -79,8 +91,7 @@
title
:
'
{{ devname }} >
'
+
dname
,
curveType
:
'
function
'
,
hAxis
:
{
format
:
'
dd/MM hh:mm
'
,
format
:
'
dd/MM hh:mm
'
},
vAxis
:
{
format
:
'
decimal
'
,
...
...
@@ -119,7 +130,9 @@
document
.
getElementById
(
dname
).
style
.
display
=
"
block
"
;
evt
.
currentTarget
.
className
+=
"
active
"
;
fetch
(
window
.
origin
+
'
/dev-data/
'
+
dname
+
'
/graph/
'
+
tscroll
[
dname
]).
then
(
res
=>
res
.
text
()).
then
(
data
=>
drawChart
(
dname
,
eval
(
data
)));
tscroll
=
init_scroll
();
fetch
(
window
.
origin
+
'
/dev-data/
'
+
dname
+
'
/graph/1
'
).
then
(
res
=>
res
.
text
()).
then
(
data
=>
drawChart
(
dname
,
eval
(
data
)));
fetch
(
window
.
origin
+
'
/dev-data/
'
+
dname
+
'
/table/
'
+
tscroll
[
dname
]).
then
(
res
=>
res
.
text
()).
then
(
data
=>
$
(
'
#table_
'
+
dname
+
'
_body
'
).
html
(
data
));
...
...
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