From: Stas Vilchik Date: Fri, 14 Dec 2018 16:00:32 +0000 (+0100) Subject: fix refreshing of the projects list X-Git-Tag: 7.6~238 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=402ab19b0e1712eab73ac5abfc06f78a751918c1;p=sonarqube.git fix refreshing of the projects list --- diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx index 8d2e9b49f8a..eb37f118f77 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx @@ -34,29 +34,31 @@ interface Props { } export default function ProfileDetails(props: Props) { - const { profile } = props; + const { organization, profile } = props; return (
- - + + {profile.actions && profile.actions.edit && !profile.isBuiltIn && ( - + )}
- - +
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx index 7ca7c13e2eb..f88766b3058 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx @@ -30,7 +30,6 @@ import { translate } from '../../../helpers/l10n'; interface Props { organization: string | null; profile: Profile; - updateProfiles: () => Promise; } interface State { @@ -114,7 +113,7 @@ export default class ProfileProjects extends React.PureComponent { closeForm = () => { this.setState({ formOpen: false }); - this.props.updateProfiles(); + this.loadProjects(); }; renderDefault() { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileDetails-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileDetails-test.tsx.snap index 9ab3884c99b..42299aa5648 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileDetails-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileDetails-test.tsx.snap @@ -9,7 +9,6 @@ exports[`renders with edit permission 1`] = ` className="quality-profile-grid-left" > @@ -86,25 +79,19 @@ exports[`renders without permissions 1`] = ` className="quality-profile-grid-left" >