Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
minerva
frontend
Commits
f62726cd
Commit
f62726cd
authored
6 months ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
when fetching overlay dont fetch data for connected submaps, but compute them
parent
d80a2513
No related branches found
Branches containing commit
No related tags found
Loading
Pipeline
#94521
passed
6 months ago
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/redux/apiPath.ts
+1
-1
1 addition, 1 deletion
src/redux/apiPath.ts
src/redux/overlayBioEntity/overlayBioEntity.selector.ts
+34
-1
34 additions, 1 deletion
src/redux/overlayBioEntity/overlayBioEntity.selector.ts
src/redux/root/init.thunks.ts
+3
-0
3 additions, 0 deletions
src/redux/root/init.thunks.ts
with
38 additions
and
2 deletions
src/redux/apiPath.ts
+
1
−
1
View file @
f62726cd
...
...
@@ -63,7 +63,7 @@ export const apiPath = {
getConfigurationOptions
:
():
string
=>
'
configuration/options/
'
,
getConfiguration
:
():
string
=>
'
configuration/
'
,
getOverlayBioEntity
:
({
overlayId
,
modelId
}:
{
overlayId
:
number
;
modelId
:
number
}):
string
=>
`projects/
${
PROJECT_ID
}
/overlays/
${
overlayId
}
/models/
${
modelId
}
/bioEntities/
?includeIndirect=true
`
,
`projects/
${
PROJECT_ID
}
/overlays/
${
overlayId
}
/models/
${
modelId
}
/bioEntities/`
,
createOverlay
:
(
projectId
:
string
):
string
=>
`projects/
${
projectId
}
/overlays/`
,
createOverlayFile
:
():
string
=>
`files/`
,
uploadOverlayFileContent
:
(
fileId
:
number
):
string
=>
`files/
${
fileId
}
:uploadContent`
,
...
...
This diff is collapsed.
Click to expand it.
src/redux/overlayBioEntity/overlayBioEntity.selector.ts
+
34
−
1
View file @
f62726cd
import
{
OverlayBioEntityRender
}
from
'
@/types/OLrendering
'
;
import
{
createSelector
}
from
'
@reduxjs/toolkit
'
;
import
{
allSubmapConnectionsBioEntitySelector
}
from
'
@/redux/bioEntity/bioEntity.selectors
'
;
import
{
currentSearchedBioEntityId
}
from
'
../drawer/drawer.selectors
'
;
import
{
currentModelIdSelector
}
from
'
../models/models.selectors
'
;
import
{
...
...
@@ -34,7 +35,8 @@ export const overlayBioEntitiesForCurrentModelSelector = createSelector(
overlayBioEntityDataSelector
,
activeOverlaysIdSelector
,
currentModelIdSelector
,
(
data
,
activeOverlaysIds
,
currentModelId
)
=>
{
allSubmapConnectionsBioEntitySelector
,
(
data
,
activeOverlaysIds
,
currentModelId
,
submapConnections
)
=>
{
const
result
:
OverlayBioEntityRender
[]
=
[];
activeOverlaysIds
.
forEach
(
overlayId
=>
{
...
...
@@ -43,6 +45,37 @@ export const overlayBioEntitiesForCurrentModelSelector = createSelector(
}
});
submapConnections
.
forEach
(
submapConnection
=>
{
if
(
submapConnection
.
model
===
currentModelId
)
{
const
submapId
=
submapConnection
?.
submodel
?.
mapId
;
if
(
submapId
)
{
activeOverlaysIds
.
forEach
(
overlayId
=>
{
if
(
data
[
overlayId
]?.[
submapId
])
{
data
[
overlayId
][
submapId
].
forEach
(
overlayBioEntityRender
=>
{
const
newOverlayBioEntityRender
=
{
id
:
submapConnection
.
id
,
modelId
:
submapConnection
.
model
,
x1
:
submapConnection
.
x
,
y2
:
submapConnection
.
y
,
x2
:
submapConnection
.
x
+
submapConnection
.
width
,
y1
:
submapConnection
.
y
+
submapConnection
.
height
,
width
:
submapConnection
.
width
,
height
:
submapConnection
.
height
,
value
:
overlayBioEntityRender
.
value
,
overlayId
:
overlayBioEntityRender
.
overlayId
,
color
:
overlayBioEntityRender
.
color
,
hexColor
:
overlayBioEntityRender
.
hexColor
,
type
:
overlayBioEntityRender
.
type
,
geneVariants
:
overlayBioEntityRender
.
geneVariants
,
name
:
overlayBioEntityRender
.
name
,
};
result
.
push
(
newOverlayBioEntityRender
);
});
}
});
}
}
});
return
result
;
},
);
...
...
This diff is collapsed.
Click to expand it.
src/redux/root/init.thunks.ts
+
3
−
0
View file @
f62726cd
...
...
@@ -14,6 +14,7 @@ import {
}
from
'
@/redux/autocomplete/autocomplete.thunks
'
;
import
{
openSelectProjectModal
}
from
'
@/redux/modal/modal.slice
'
;
import
{
getProjects
}
from
'
@/redux/projects/projects.thunks
'
;
import
{
getSubmapConnectionsBioEntity
}
from
'
@/redux/bioEntity/thunks/getSubmapConnectionsBioEntity
'
;
import
{
getAllBackgroundsByProjectId
}
from
'
../backgrounds/backgrounds.thunks
'
;
import
{
getConfiguration
,
getConfigurationOptions
}
from
'
../configuration/configuration.thunks
'
;
import
{
...
...
@@ -98,6 +99,8 @@ export const fetchInitialAppData = createAsyncThunk<
dispatch
(
getDrugAutocomplete
());
dispatch
(
getChemicalAutocomplete
());
dispatch
(
getSubmapConnectionsBioEntity
());
/** Trigger search */
if
(
queryData
.
searchValue
)
{
dispatch
(
setPerfectMatch
(
queryData
.
perfectMatch
));
...
...
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