Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
e6460959
Commit
e6460959
authored
1 year ago
by
Reinder Kraaij
Browse files
Options
Downloads
Patches
Plain Diff
improve GetStationLst
parent
74566fbc
No related branches found
No related tags found
2 merge requests
!1213
Resolve TMSS-2717 "Refactor details summary + ui tweaks"
,
!1212
Resolve TMSS-2717 "Refactor details summary + ui tweaks"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/week.view.helper.js
+10
-10
10 additions, 10 deletions
...ss_webapp/src/routes/Timeline/helpers/week.view.helper.js
with
10 additions
and
10 deletions
SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/week.view.helper.js
+
10
−
10
View file @
e6460959
...
...
@@ -204,23 +204,23 @@ export async function getCursorDateTimes(cursorTimeUTC, groupIndex, groupDate, l
let
corelst
=
cursorDateTimeCoreLST
.
format
(
"
HH:mm
"
);
let
stationlst
=
await
GetStationLst
(
isSingleStation
,
cursorDateTimeUTC
,
stationName
);
let
cursordatetimes
=
{
utc
,
corelst
,
stationlst
}
setCursorDateTimes
(
cursordatetimes
)
setCursorDateTimes
(
cursordatetimes
)
}
async
function
GetStationLst
(
isSingleStation
,
cursorDateTimeUTC
,
stationName
)
{
async
function
GetStationLst
(
isSingleStation
,
cursorDateTimeUTC
,
stationName
)
{
if
(
!
isSingleStation
)
return
;
let
lststationshiftSeconds
=
0
;
let
lststationshiftSeconds
=
-
2
;
let
key
=
cursorDateTimeUTC
.
format
(
UIConstants
.
CALENDAR_GROUPING_FORMAT
)
+
"
_
"
+
stationName
;
// we cache on a daily base
if
(
key
in
timecache
)
{
if
(
!
timecache
[
key
].
isRetrieved
)
{
return
"
...
"
;
}
if
(
!
timecache
[
key
].
isRetrieved
)
{
return
"
...
"
;
}
lststationshiftSeconds
=
timecache
[
key
].
shift
;
}
else
{
timecache
[
key
]
=
{
isRetrieved
:
false
};
lststationshiftSeconds
=
await
fetchLSTStationShift
(
cursorDateTimeUTC
,
stationName
);
timecache
[
key
]
=
{
isRetrieved
:
true
,
shift
:
lststationshiftSeconds
};
}
if
(
lststationshiftSeconds
<=
0
)
{
timecache
[
key
]
=
{
isRetrieved
:
false
};
lststationshiftSeconds
=
await
fetchLSTStationShift
(
cursorDateTimeUTC
,
stationName
);
timecache
[
key
]
=
{
isRetrieved
:
true
,
shift
:
lststationshiftSeconds
};
}
lststationshiftSeconds
=
moment
(
cursorDateTimeUTC
).
add
(
lststationshiftSeconds
,
'
second
'
);
const
stationlst
=
lststationshiftSeconds
.
format
(
"
HH:mm
"
);
...
...
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