Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-web
ensembl-client
Commits
0bf38aae
Unverified
Commit
0bf38aae
authored
Mar 11, 2021
by
Imran Salam
Committed by
GitHub
Mar 11, 2021
Browse files
Remove message and retry button for PDBe error responses (#475)
parent
50afc556
Pipeline
#137400
passed with stages
in 5 minutes and 28 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
52 deletions
+9
-52
src/ensembl/src/content/app/entity-viewer/gene-view/components/proteins-list/proteins-list-item-info/ProteinsListItemInfo.scss
...ns-list/proteins-list-item-info/ProteinsListItemInfo.scss
+0
-5
src/ensembl/src/content/app/entity-viewer/gene-view/components/proteins-list/proteins-list-item-info/ProteinsListItemInfo.tsx
...ins-list/proteins-list-item-info/ProteinsListItemInfo.tsx
+9
-47
No files found.
src/ensembl/src/content/app/entity-viewer/gene-view/components/proteins-list/proteins-list-item-info/ProteinsListItemInfo.scss
View file @
0bf38aae
...
...
@@ -60,8 +60,3 @@ $content-width: $gene_image_width;
justify-content
:
center
;
margin-top
:
40px
;
}
.errorMessage
{
color
:
$red
;
margin-right
:
20px
;
font-weight
:
$normal
;
}
src/ensembl/src/content/app/entity-viewer/gene-view/components/proteins-list/proteins-list-item-info/ProteinsListItemInfo.tsx
View file @
0bf38aae
...
...
@@ -20,7 +20,6 @@ import set from 'lodash/fp/set';
import
{
Pick2
}
from
'
ts-multipick
'
;
import
{
CircleLoader
}
from
'
src/shared/components/loader/Loader
'
;
import
{
PrimaryButton
}
from
'
src/shared/components/button/Button
'
;
import
ProteinDomainImage
from
'
src/content/app/entity-viewer/gene-view/components/protein-domain-image/ProteinDomainImage
'
;
import
ProteinImage
from
'
src/content/app/entity-viewer/gene-view/components/protein-image/ProteinImage
'
;
import
ProteinFeaturesCount
from
'
src/content/app/entity-viewer/gene-view/components/protein-features-count/ProteinFeaturesCount
'
;
...
...
@@ -177,6 +176,10 @@ const ProteinsListItemInfo = (props: Props) => {
};
},
[
summaryStatsLoadingState
,
uniprotXref
]);
const
showLoadingIndicator
=
domainsLoadingState
===
LoadingState
.
LOADING
||
summaryStatsLoadingState
===
LoadingState
.
LOADING
;
return
(
<
div
className
=
{
styles
.
proteinsListItemInfo
}
>
{
productWithProteinDomains
&&
(
...
...
@@ -237,58 +240,17 @@ const ProteinsListItemInfo = (props: Props) => {
</
div
>
)
}
</>
<
StatusContent
summaryLoadingState
=
{
summaryStatsLoadingState
}
domainsLoadingState
=
{
domainsLoadingState
}
setSummaryStatsLoadingState
=
{
setSummaryStatsLoadingState
}
setDomainsLoadingState
=
{
setDomainsLoadingState
}
/>
{
showLoadingIndicator
&&
(
<
div
className
=
{
styles
.
statusContainer
}
>
<
CircleLoader
/>
</
div
>
)
}
<
div
className
=
{
styles
.
keyline
}
></
div
>
</
div
>
</
div
>
);
};
type
StatusContentProps
=
{
summaryLoadingState
:
LoadingState
;
domainsLoadingState
:
LoadingState
;
setSummaryStatsLoadingState
:
(
loadingState
:
LoadingState
)
=>
void
;
setDomainsLoadingState
:
(
loadingState
:
LoadingState
)
=>
void
;
};
const
StatusContent
=
(
props
:
StatusContentProps
)
=>
{
if
(
props
.
domainsLoadingState
===
LoadingState
.
LOADING
||
props
.
summaryLoadingState
===
LoadingState
.
LOADING
)
{
return
(
<
div
className
=
{
styles
.
statusContainer
}
>
<
CircleLoader
/>
</
div
>
);
}
const
retryHandler
=
()
=>
{
if
(
props
.
domainsLoadingState
===
LoadingState
.
ERROR
)
{
props
.
setDomainsLoadingState
(
LoadingState
.
LOADING
);
}
if
(
props
.
summaryLoadingState
===
LoadingState
.
ERROR
)
{
props
.
setSummaryStatsLoadingState
(
LoadingState
.
LOADING
);
}
};
return
props
.
domainsLoadingState
===
LoadingState
.
ERROR
||
props
.
summaryLoadingState
===
LoadingState
.
ERROR
?
(
<
div
className
=
{
styles
.
statusContainer
}
>
<
span
className
=
{
styles
.
errorMessage
}
>
Failed to get data from PDBe Knowledge Base.
</
span
>
<
PrimaryButton
onClick
=
{
retryHandler
}
>
Try again
</
PrimaryButton
>
</
div
>
)
:
null
;
};
type
ProteinExternalReferenceProps
=
{
source
:
ExternalSource
;
accessionId
:
string
;
...
...
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