Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetObsSite
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
William Roberts
MetObsSite
Commits
0a4d8444
Commit
0a4d8444
authored
5 years ago
by
William Roberts
Browse files
Options
Downloads
Patches
Plain Diff
Make roofcam change time to be seconds from epoch
parent
3b4ed226
Branches
dev
main
No related tags found
No related merge requests found
Pipeline
#9589
failed with stages
Stage: build
Stage: deploy
in 0 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
content/js/meteorogram/meteorogram.js
+1
-1
1 addition, 1 deletion
content/js/meteorogram/meteorogram.js
content/js/meteorogram/plot/update.js
+2
-3
2 additions, 3 deletions
content/js/meteorogram/plot/update.js
with
3 additions
and
4 deletions
content/js/meteorogram/meteorogram.js
+
1
−
1
View file @
0a4d8444
This diff is collapsed.
Click to expand it.
content/js/meteorogram/plot/update.js
+
2
−
3
View file @
0a4d8444
...
...
@@ -56,9 +56,8 @@ function changeCamera() {
// Makes image update. Image updates every (about) 2 minutes and 15 seconds.
document
.
getElementById
(
'
roofCam
'
).
alt
=
document
.
getElementById
(
'
dirText
'
).
innerHTML
=
newDirection
;
var
date
=
new
Date
();
// Update image every 5 minutes. The date and hours ensures that it won't use pictures
// from previous days/hours if the cache isn't cleared in that time frame.
var
formatted_date
=
String
(
date
.
getDate
())
+
date
.
getHours
()
+
Math
.
floor
(
date
.
getMinutes
()
/
5
);
// Update image every 5 minutes and let the final value be in seconds since epoch.
var
formatted_date
=
Math
.
floor
(
date
.
getTime
()
/
1000
/
300
)
*
300
;
document
.
getElementById
(
'
roofCam
'
).
src
=
METOBS_API_URL
+
'
/pub/cache/aoss/cameras/
'
+
newDirection
+
'
/latest_medium.jpg?t=
'
+
formatted_date
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment