From: Grégoire Aubert Date: Tue, 17 Oct 2017 14:30:21 +0000 (+0200) Subject: SONAR-9936 Update marketplace pending plugins notif X-Git-Tag: 6.7-RC1~93 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e013b2b9a6f1afb120722eaf422081a136eb0cfd;p=sonarqube.git SONAR-9936 Update marketplace pending plugins notif --- diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index 7f7632d6630..34dc8b4f72c 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx @@ -61,6 +61,11 @@ export default class SettingsNav extends React.PureComponent { return this.isSomethingActive(urls); } + isMarketplace() { + const urls = ['/admin/marketplace']; + return this.isSomethingActive(urls); + } + renderExtension = ({ key, name }: Extension) => { return (
  • @@ -82,7 +87,7 @@ export default class SettingsNav extends React.PureComponent { const projectsClassName = classNames('dropdown-toggle', { active: isProjects }); const systemClassName = classNames('dropdown-toggle', { active: isSystem }); const configurationClassNames = classNames('dropdown-toggle', { - active: !isSecurity && !isProjects && !isSystem && !isSupport + active: !isSecurity && !isProjects && !isSystem && !isSupport && !this.isMarketplace() }); const extensionsWithoutSupport = extensions.filter( diff --git a/server/sonar-web/src/main/js/apps/marketplace/App.tsx b/server/sonar-web/src/main/js/apps/marketplace/App.tsx index 02910f26c5e..74512fb5dd6 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx @@ -164,24 +164,21 @@ export default class App extends React.PureComponent { this.setState({ editionStatus: editionStatus }); updateQuery = (newQuery: Partial) => { - const query = serializeQuery({ - ...parseQuery(this.props.location.query), - ...newQuery - }); - this.context.router.push({ - pathname: this.props.location.pathname, - query - }); + const query = serializeQuery({ ...parseQuery(this.props.location.query), ...newQuery }); + this.context.router.push({ pathname: this.props.location.pathname, query }); }; render() { - const { editionStatus, plugins, pending } = this.state; + const { editionStatus, loading, plugins, pending } = this.state; const query = parseQuery(this.props.location.query); const filteredPlugins = query.search ? filterPlugins(plugins, query.search) : plugins; return (
    - {editionStatus && } +
    + {editionStatus && } + +
    { updateCenterActive={this.props.updateCenterActive} updateEditionStatus={this.updateEditionStatus} /> - - -
    + {loading && } + {!loading && ( + + )} + {!loading &&
    }
    ); } diff --git a/server/sonar-web/src/main/js/apps/marketplace/PendingActions.tsx b/server/sonar-web/src/main/js/apps/marketplace/PendingActions.tsx index bc96da9bbf0..a42c72145b3 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/PendingActions.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/PendingActions.tsx @@ -53,9 +53,8 @@ export default class PendingActions extends React.PureComponent { return null; } - const nbPluginsClass = 'big little-spacer-left little-spacer-right'; return ( -
    +

    {translate('marketplace.sonarqube_needs_to_be_restarted_to')}

      @@ -64,13 +63,7 @@ export default class PendingActions extends React.PureComponent { - {installing.length} - - ) - }} + values={{ nb: {installing.length} }} /> )} @@ -79,13 +72,7 @@ export default class PendingActions extends React.PureComponent { - {updating.length} - - ) - }} + values={{ nb: {updating.length} }} /> )} @@ -94,18 +81,14 @@ export default class PendingActions extends React.PureComponent { {removing.length} - ) - }} + values={{ nb: {removing.length} }} /> )}
    -
    - ); diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionsStatusNotif-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionsStatusNotif-test.tsx.snap index 807a7c6714a..537348e08af 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionsStatusNotif-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionsStatusNotif-test.tsx.snap @@ -2,7 +2,7 @@ exports[`should display a ready notification 1`] = `