diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-25 16:53:22 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-30 09:20:37 +0100 |
commit | e4ef72e885308b113d89a7826d1b300c093134cf (patch) | |
tree | d747d066447c0924cf2cfb108bf107a8effd0144 /server/sonar-web/src/main/js/apps/marketplace | |
parent | eea79d51b8894ef98f1cd02388d06062df343e4d (diff) | |
download | sonarqube-e4ef72e885308b113d89a7826d1b300c093134cf.tar.gz sonarqube-e4ef72e885308b113d89a7826d1b300c093134cf.zip |
update web dependencies (#2752)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/marketplace')
8 files changed, 49 insertions, 45 deletions
diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap index 952e8dc78c1..bd62c3de370 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap @@ -15,9 +15,9 @@ exports[`should display an error message 1`] = ` "url": <a href="https://redirect.sonarsource.com/editions/editions.html" target="_blank" - > + > SonarSource.com - </a>, + </a>, } } /> @@ -56,6 +56,7 @@ exports[`should display the edition boxes correctly 2`] = ` } } isDowngrade={true} + key="comunity" onInstall={[Function]} onUninstall={[Function]} /> @@ -80,6 +81,7 @@ exports[`should display the edition boxes correctly 2`] = ` } } isDowngrade={false} + key="developer" onInstall={[Function]} onUninstall={[Function]} /> diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/PendingActions-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/PendingActions-test.tsx.snap index b30e1e22d36..7e8801a1e0c 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/PendingActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/PendingActions-test.tsx.snap @@ -21,7 +21,7 @@ exports[`should display pending actions 1`] = ` Object { "nb": <strong> 2 - </strong>, + </strong>, } } /> @@ -34,7 +34,7 @@ exports[`should display pending actions 1`] = ` Object { "nb": <strong> 1 - </strong>, + </strong>, } } /> diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionForm.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionForm.tsx index abab7c84ed4..ee86ac11596 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionForm.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionForm.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Modal from 'react-modal'; +import * as Modal from 'react-modal'; import LicenseEditionSet from './LicenseEditionSet'; import { Edition, EditionStatus, applyLicense } from '../../../api/marketplace'; import { translate, translateWithParameters } from '../../../helpers/l10n'; @@ -108,11 +108,9 @@ export default class LicenseEditionForm extends React.PureComponent<Props, State {submitting && <i className="spinner spacer-right" />} {status && ( <button className="js-confirm" onClick={this.handleConfirmClick} disabled={submitting}> - {status === 'AUTOMATIC_INSTALL' ? ( - translate('marketplace.install') - ) : ( - translate('save') - )} + {status === 'AUTOMATIC_INSTALL' + ? translate('marketplace.install') + : translate('save')} </button> )} <a className="js-modal-close" href="#" onClick={this.handleCancelClick}> diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx index 501631edadc..df898dbdbeb 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx @@ -91,19 +91,19 @@ export default class PluginActions extends React.PureComponent<Props, State> { </p> )} {isPluginInstalled(plugin) && - plugin.updates && - plugin.updates.length > 0 && ( - <div className="spacer-top button-group"> - {plugin.updates.map((update, idx) => ( - <PluginUpdateButton - key={idx} - onClick={this.handleUpdate} - update={update} - disabled={this.state.loading} - /> - ))} - </div> - )} + plugin.updates && + plugin.updates.length > 0 && ( + <div className="spacer-top button-group"> + {plugin.updates.map((update, idx) => ( + <PluginUpdateButton + key={idx} + onClick={this.handleUpdate} + update={update} + disabled={this.state.loading} + /> + ))} + </div> + )} </div> ); } @@ -119,25 +119,25 @@ export default class PluginActions extends React.PureComponent<Props, State> { return ( <div className="js-actions"> {isPluginAvailable(plugin) && - plugin.termsAndConditionsUrl && ( - <p className="little-spacer-bottom"> - <Checkbox - checked={this.state.acceptTerms} - className="js-terms" - id={'plugin-terms-' + plugin.key} - onCheck={this.handleTermsCheck}> - <label className="little-spacer-left" htmlFor={'plugin-terms-' + plugin.key}> - {translate('marketplace.i_accept_the')} - </label> - </Checkbox> - <a - className="js-plugin-terms nowrap little-spacer-left" - href={plugin.termsAndConditionsUrl} - target="_blank"> - {translate('marketplace.terms_and_conditions')} - </a> - </p> - )} + plugin.termsAndConditionsUrl && ( + <p className="little-spacer-bottom"> + <Checkbox + checked={this.state.acceptTerms} + className="js-terms" + id={'plugin-terms-' + plugin.key} + onCheck={this.handleTermsCheck}> + <label className="little-spacer-left" htmlFor={'plugin-terms-' + plugin.key}> + {translate('marketplace.i_accept_the')} + </label> + </Checkbox> + <a + className="js-plugin-terms nowrap little-spacer-left" + href={plugin.termsAndConditionsUrl} + target="_blank"> + {translate('marketplace.terms_and_conditions')} + </a> + </p> + )} {loading && <i className="spinner spacer-right" />} {isPluginInstalled(plugin) && ( <div className="display-inlin-block"> diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/UninstallEditionForm.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/UninstallEditionForm.tsx index 37b76edc83e..1af1ee86295 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/UninstallEditionForm.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/UninstallEditionForm.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Modal from 'react-modal'; +import * as Modal from 'react-modal'; import { Edition, EditionStatus, uninstallEdition } from '../../../api/marketplace'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/LicenseEditionForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/LicenseEditionForm-test.tsx.snap index 9e07155c292..bd4aa78eb6a 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/LicenseEditionForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/LicenseEditionForm-test.tsx.snap @@ -42,7 +42,9 @@ exports[`should display correctly 1`] = ` overlayClassName="modal-overlay" parentSelector={[Function]} portalClassName="ReactModalPortal" + shouldCloseOnEsc={true} shouldCloseOnOverlayClick={true} + shouldFocusAfterRender={true} > <header className="modal-head" diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/PluginLicense-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/PluginLicense-test.tsx.snap index 5c6e0ab7138..5a77d6923b2 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/PluginLicense-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/PluginLicense-test.tsx.snap @@ -15,9 +15,9 @@ exports[`should display the license field 1`] = ` Object { "license": <span className="js-plugin-license" - > + > SonarSource license - </span>, + </span>, } } /> diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/UninstallEditionForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/UninstallEditionForm-test.tsx.snap index 507f7e4fe73..05cefbe37c2 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/UninstallEditionForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/UninstallEditionForm-test.tsx.snap @@ -12,7 +12,9 @@ exports[`should display correctly 1`] = ` overlayClassName="modal-overlay" parentSelector={[Function]} portalClassName="ReactModalPortal" + shouldCloseOnEsc={true} shouldCloseOnOverlayClick={true} + shouldFocusAfterRender={true} > <header className="modal-head" |