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
bb5c9147
Commit
bb5c9147
authored
1 year ago
by
Jörn Künsemöller
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-2831
: handle updates on items that moved into wekkview scope
parent
7ae5f6d7
No related branches found
No related tags found
1 merge request
!1210
Resolve TMSS-2831
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/WeekView.js
+7
-6
7 additions, 6 deletions
...TMSS/frontend/tmss_webapp/src/routes/Timeline/WeekView.js
with
7 additions
and
6 deletions
SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/WeekView.js
+
7
−
6
View file @
bb5c9147
...
@@ -274,7 +274,7 @@ export default function WeekView() {
...
@@ -274,7 +274,7 @@ export default function WeekView() {
console
.
log
(
"
Auth token submitted
"
);
console
.
log
(
"
Auth token submitted
"
);
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
'
err
'
,
err
)
console
.
log
(
'
err
'
,
err
)
;
}
}
}
}
...
@@ -282,7 +282,7 @@ export default function WeekView() {
...
@@ -282,7 +282,7 @@ export default function WeekView() {
* Function to call when websocket is disconnected
* Function to call when websocket is disconnected
*/
*/
function
onDisconnect
()
{
function
onDisconnect
()
{
console
.
log
(
"
WS Closed
"
)
console
.
log
(
"
WS Closed
"
)
;
}
}
function
fetchBlueprintAndAddToTimeline
(
id
)
{
function
fetchBlueprintAndAddToTimeline
(
id
)
{
...
@@ -293,7 +293,8 @@ export default function WeekView() {
...
@@ -293,7 +293,8 @@ export default function WeekView() {
...
prevData
,
...
prevData
,
schedulingUnits
:
prevData
.
schedulingUnits
.
concat
(
response
)
schedulingUnits
:
prevData
.
schedulingUnits
.
concat
(
response
)
}));
}));
});
})
.
catch
(
e
=>
console
.
error
(
"
Couldn't retrieve scheduling unit details for id:
"
,
id
,
e
));
}
}
/**
/**
...
@@ -318,7 +319,7 @@ export default function WeekView() {
...
@@ -318,7 +319,7 @@ export default function WeekView() {
break
;
break
;
}
}
case
'
update
'
:
{
case
'
update
'
:
{
if
(
data
.
schedulingUnits
.
schedulingUnits
.
some
(
unit
=>
unit
.
id
===
jsonData
.
object_details
.
id
))
{
if
(
data
.
schedulingUnits
.
some
(
unit
=>
unit
.
id
===
jsonData
.
object_details
.
id
))
{
// usually we already have most details, so only update the relevant ones.
// usually we already have most details, so only update the relevant ones.
setData
(
prevData
=>
({
setData
(
prevData
=>
({
...
prevData
,
...
prevData
,
...
@@ -330,7 +331,7 @@ export default function WeekView() {
...
@@ -330,7 +331,7 @@ export default function WeekView() {
// ...but sometimes we don't have the details yet, e.g. because it at least used to be
// ...but sometimes we don't have the details yet, e.g. because it at least used to be
// outside the timelines time range, and we need to fetch all details so we don't miss
// outside the timelines time range, and we need to fetch all details so we don't miss
// anything that e.g. got moved into scope.
// anything that e.g. got moved into scope.
fetchBlueprintAndAddToTimeline
(
jsonData
.
object_details
.
id
)
fetchBlueprintAndAddToTimeline
(
jsonData
.
object_details
.
id
)
;
}
}
if
(
summaryItem
?.
id
===
jsonData
.
object_details
.
id
)
{
if
(
summaryItem
?.
id
===
jsonData
.
object_details
.
id
)
{
...
@@ -350,7 +351,7 @@ export default function WeekView() {
...
@@ -350,7 +351,7 @@ export default function WeekView() {
break
;
break
;
}
}
case
'
create
'
:
{
case
'
create
'
:
{
fetchBlueprintAndAddToTimeline
(
jsonData
.
object_details
.
id
)
fetchBlueprintAndAddToTimeline
(
jsonData
.
object_details
.
id
)
;
break
;
break
;
}
}
default
:
{
break
;
}
default
:
{
break
;
}
...
...
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