Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
smogonet
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dominik Rosiek
smogonet
Commits
3264f707
Commit
3264f707
authored
Jan 03, 2017
by
Eryk Leniart
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.telemabk.pl/dominik/smogonet
parents
ce0b9320
918354da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
0 deletions
+98
-0
index.html
index.html
+97
-0
measurement_viewer.py
measurement_viewer.py
+1
-0
No files found.
index.html
0 → 100644
View file @
3264f707
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<style>
body
{
background
:
#FFFFFF
;
font-size
:
1rem
;
font-family
:
"Open Sans"
,
"Arial"
,
"sans-serif"
;
color
:
#003f65
;
width
:
370px
;
padding
:
1px
;
}
#main-box
{
height
:
100%
;
width
:
100%
;
padding
:
1px
;
}
#left-side
{
width
:
100%
;
height
:
70%
;
float
:
left
;
padding
:
1px
;
}
#right-side
{
width
:
100%
;
height
:
30%
;
float
:
right
;
padding
:
1px
;
}
</style>
<body>
<div
id=
"main-box"
>
</div>
<div
id=
"left-side"
style=
"float: center;"
>
Aktualny stan powietrza:
</div>
<div
id=
"right-side"
>
<img
src=
"http://www.free-icons-download.net/images/building-icons-68722.png"
width=
"10%"
height=
"10%"
>
<select
id=
"select-station"
style=
"float: right; display: center; font-weight: normal;"
>
<option
value=
"1"
>
ul. Bujaka
</option>
<option
value=
"2"
>
ul. Bulwarowa
</option>
<option
value=
"3"
>
ul. Złoty Róg
</option>
<option
value=
"4"
>
Al. Krasińskiego
</option>
<option
value=
"5"
>
os. Piastów
</option>
<option
value=
"6"
>
ul. Dietla
</option>
</select>
<div
id=
"value-id"
style=
"padding: center;font-size: 0.7rem"
>
µg/m³
</div>
</div>
</body>
</html>
<script>
function
getParams
()
{
var
vars
=
[];
if
(
window
.
location
.
href
.
indexOf
(
'?'
)
!==
-
1
){
var
hashes
=
window
.
location
.
href
.
slice
(
window
.
location
.
href
.
indexOf
(
'?'
)
+
1
).
split
(
'&'
)
for
(
var
i
=
0
;
i
<
hashes
.
length
;
i
++
)
{
var
hash
=
hashes
[
i
].
split
(
'='
);
vars
[
hash
[
0
]]
=
hash
[
1
];
}
}
return
vars
;
}
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(){
var
xhr
=
new
XMLHttpRequest
();
parameters
=
getParams
();
console
.
debug
(
parameters
);
xhr
.
onreadystatechange
=
function
()
{
if
(
xhr
.
readyState
==
XMLHttpRequest
.
DONE
)
{
console
.
debug
(
xhr
);
document
.
getElementById
(
'widget'
).
innerHTML
=
xhr
.
response
;
}
}
//xhr.open('GET', 'http://localhost:8090/view', true);
xhr
.
open
(
'GET'
,
'http://smog.telemabk.pl/view'
,
true
);
xhr
.
send
(
null
);
});
</script>
\ No newline at end of file
measurement_viewer.py
View file @
3264f707
...
...
@@ -61,6 +61,7 @@ class MainHandler(tornado.web.RequestHandler):
def
make_app
():
return
tornado
.
web
.
Application
([
(
r"/view"
,
MainHandler
),
(
r'/()'
,
tornado
.
web
.
StaticFileHandler
,
{
'path'
:
'index.html'
})
])
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
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