mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
Don't render the 404 not found page until the content's finished loading
This commit is contained in:
@@ -149,15 +149,17 @@ class Job extends Component {
|
|||||||
<Route
|
<Route
|
||||||
key="not-found"
|
key="not-found"
|
||||||
path="*"
|
path="*"
|
||||||
render={() => (
|
render={() =>
|
||||||
<ContentError isNotFound>
|
!hasContentLoading && (
|
||||||
<Link
|
<ContentError isNotFound>
|
||||||
to={`/jobs/${match.params.type}/${match.params.id}/details`}
|
<Link
|
||||||
>
|
to={`/jobs/${match.params.type}/${match.params.id}/details`}
|
||||||
{i18n._(`View Job Details`)}
|
>
|
||||||
</Link>
|
{i18n._(`View Job Details`)}
|
||||||
</ContentError>
|
</Link>
|
||||||
)}
|
</ContentError>
|
||||||
|
)
|
||||||
|
}
|
||||||
/>,
|
/>,
|
||||||
]}
|
]}
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|||||||
@@ -238,15 +238,17 @@ class Organization extends Component {
|
|||||||
<Route
|
<Route
|
||||||
key="not-found"
|
key="not-found"
|
||||||
path="*"
|
path="*"
|
||||||
render={() => (
|
render={() =>
|
||||||
<ContentError isNotFound>
|
!hasContentLoading && (
|
||||||
{match.params.id && (
|
<ContentError isNotFound>
|
||||||
<Link to={`/organizations/${match.params.id}/details`}>
|
{match.params.id && (
|
||||||
{i18n._(`View Organization Details`)}
|
<Link to={`/organizations/${match.params.id}/details`}>
|
||||||
</Link>
|
{i18n._(`View Organization Details`)}
|
||||||
)}
|
</Link>
|
||||||
</ContentError>
|
)}
|
||||||
)}
|
</ContentError>
|
||||||
|
)
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|||||||
@@ -119,17 +119,19 @@ class Template extends Component {
|
|||||||
<Route
|
<Route
|
||||||
key="not-found"
|
key="not-found"
|
||||||
path="*"
|
path="*"
|
||||||
render={() => (
|
render={() =>
|
||||||
<ContentError isNotFound>
|
!hasContentLoading && (
|
||||||
{match.params.id && (
|
<ContentError isNotFound>
|
||||||
<Link
|
{match.params.id && (
|
||||||
to={`/templates/${match.params.templateType}/${match.params.id}/details`}
|
<Link
|
||||||
>
|
to={`/templates/${match.params.templateType}/${match.params.id}/details`}
|
||||||
{i18n._(`View Template Details`)}
|
>
|
||||||
</Link>
|
{i18n._(`View Template Details`)}
|
||||||
)}
|
</Link>
|
||||||
</ContentError>
|
)}
|
||||||
)}
|
</ContentError>
|
||||||
|
)
|
||||||
|
}
|
||||||
/>,
|
/>,
|
||||||
]}
|
]}
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|||||||
Reference in New Issue
Block a user