From 5bb820088071415e448e1fe75a3d138e05d3e6a2 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Wed, 29 Sep 2021 10:35:03 -0700 Subject: [PATCH] fix(ui): Force refresh projects/teams on project creation (#28886) --- static/app/views/organizationContext.tsx | 2 +- .../app/views/projectDetail/projectDetail.tsx | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/static/app/views/organizationContext.tsx b/static/app/views/organizationContext.tsx index fb84740c5468b3..971b9ab7bcdf81 100644 --- a/static/app/views/organizationContext.tsx +++ b/static/app/views/organizationContext.tsx @@ -202,7 +202,7 @@ class OrganizationContextContainer extends React.Component { this.props.api, OrganizationContextContainer.getOrganizationSlug(this.props), true, - true + false ); } diff --git a/static/app/views/projectDetail/projectDetail.tsx b/static/app/views/projectDetail/projectDetail.tsx index c1628b0d4c25ce..e7a1228ab28a1b 100644 --- a/static/app/views/projectDetail/projectDetail.tsx +++ b/static/app/views/projectDetail/projectDetail.tsx @@ -3,9 +3,9 @@ import {RouteComponentProps} from 'react-router'; import styled from '@emotion/styled'; import {updateProjects} from 'app/actionCreators/globalSelection'; +import {fetchOrganizationDetails} from 'app/actionCreators/organization'; import {fetchTagValues} from 'app/actionCreators/tags'; import Feature from 'app/components/acl/feature'; -import Alert from 'app/components/alert'; import Breadcrumbs from 'app/components/breadcrumbs'; import Button from 'app/components/button'; import ButtonBar from 'app/components/buttonBar'; @@ -16,10 +16,11 @@ import GlobalSdkUpdateAlert from 'app/components/globalSdkUpdateAlert'; import IdBadge from 'app/components/idBadge'; import * as Layout from 'app/components/layouts/thirds'; import LightWeightNoProjectMessage from 'app/components/lightWeightNoProjectMessage'; +import LoadingError from 'app/components/loadingError'; import GlobalSelectionHeader from 'app/components/organizations/globalSelectionHeader'; import MissingProjectMembership from 'app/components/projects/missingProjectMembership'; import TextOverflow from 'app/components/textOverflow'; -import {IconSettings, IconWarning} from 'app/icons'; +import {IconSettings} from 'app/icons'; import {t} from 'app/locale'; import {PageContent} from 'app/styles/organization'; import space from 'app/styles/space'; @@ -169,6 +170,11 @@ class ProjectDetail extends AsyncView { } } + onRetryProjects = () => { + const {params} = this.props; + fetchOrganizationDetails(this.api, params.orgId, true, false); + }; + isProjectStabilized() { const {selection, location} = this.props; const projectId = this.project?.id; @@ -197,9 +203,10 @@ class ProjectDetail extends AsyncView { renderProjectNotFound() { return ( - }> - {t('This project could not be found.')} - + ); }