Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hitachi-weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
hitachi-weather
Commits
88530b45
Commit
88530b45
authored
Sep 14, 2022
by
Kornkitt Poolsup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change title from HitaChi to One City Center Building
parent
d2c8b53f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
index.html
+0
-0
index.js
+8
-5
No files found.
index.html
View file @
88530b45
This diff is collapsed.
Click to expand it.
index.js
View file @
88530b45
...
...
@@ -86,11 +86,11 @@ function getData() {
}).
done
(
function
(
data
)
{
var
obj
=
jQuery
.
parseJSON
(
data
);
if
(
obj
.
success
==
1
){
$
(
"#home-temperature"
).
text
(
JSON
.
stringify
(
obj
.
data
.
temperature
));
$
(
"#home-humidity"
).
text
(
JSON
.
stringify
(
obj
.
data
.
humidity
));
$
(
"#home-pm10"
).
text
(
JSON
.
stringify
(
obj
.
data
.
pm10dot0
));
$
(
"#home-temperature"
).
text
(
JSON
.
stringify
(
Math
.
round
(
obj
.
data
.
temperature
)
));
$
(
"#home-humidity"
).
text
(
JSON
.
stringify
(
Math
.
round
(
obj
.
data
.
humidity
)
));
$
(
"#home-pm10"
).
text
(
JSON
.
stringify
(
Math
.
round
(
obj
.
data
.
pm10dot0
)
));
$
(
"#home-pm25"
).
text
(
JSON
.
stringify
(
obj
.
data
.
pm2dot5
));
$
(
"#home-pm25"
).
text
(
JSON
.
stringify
(
Math
.
round
(
obj
.
data
.
pm2dot5
)
));
var
pm25state_color
=
[
"#80C355"
,
"#F5EC43"
,
"#F9941B"
,
"#E92026"
,
"#B1498E"
,
"#994544"
];
var
pm25state_name
=
[
"Good"
,
"Moderate"
,
"Unhealthy for Sensitive Groups"
,
"Unhealthy"
,
"Very Unhealthy"
,
"Hazardous"
];
...
...
@@ -132,6 +132,7 @@ function getCamera() {
$
(
"#cam06"
).
attr
(
'src'
,
'https://occ-hitachi.nexpie.com/data/z1/cam6.png?time='
+
new
Date
().
getTime
());
var
date_show
=
new
Date
().
toLocaleString
();
console
.
log
(
date_show
);
$
(
"#camera01-time"
).
text
(
date_show
);
$
(
"#camera02-time"
).
text
(
date_show
);
...
...
@@ -211,10 +212,12 @@ function showtime() {
}
function
init
()
{
getData
();
getCamera
();
getData
();
getForecast
();
showtime
();
console
.
log
(
"init"
)
}
init
();
...
...
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