aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/settings
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings')
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/Definition.js23
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/PageHeader.js3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js17
-rw-r--r--server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/propTypes.js2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js5
22 files changed, 82 insertions, 61 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.js b/server/sonar-web/src/main/js/apps/settings/components/Definition.js
index ec64d222cb4..9b613bc6d79 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/Definition.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.js
@@ -19,6 +19,7 @@
*/
// @flow
import React from 'react';
+import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import classNames from 'classnames';
import Input from './inputs/Input';
@@ -46,17 +47,17 @@ class Definition extends React.PureComponent {
timeout: number;
static propTypes = {
- component: React.PropTypes.object,
- setting: React.PropTypes.object.isRequired,
- changedValue: React.PropTypes.any,
- loading: React.PropTypes.bool.isRequired,
- validationMessage: React.PropTypes.string,
-
- changeValue: React.PropTypes.func.isRequired,
- cancelChange: React.PropTypes.func.isRequired,
- saveValue: React.PropTypes.func.isRequired,
- resetValue: React.PropTypes.func.isRequired,
- passValidation: React.PropTypes.func.isRequired
+ component: PropTypes.object,
+ setting: PropTypes.object.isRequired,
+ changedValue: PropTypes.any,
+ loading: PropTypes.bool.isRequired,
+ validationMessage: PropTypes.string,
+
+ changeValue: PropTypes.func.isRequired,
+ cancelChange: PropTypes.func.isRequired,
+ saveValue: PropTypes.func.isRequired,
+ resetValue: PropTypes.func.isRequired,
+ passValidation: PropTypes.func.isRequired
};
state = {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js
index ef9c248ffd0..67545155421 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js
@@ -19,12 +19,13 @@
*/
// @flow
import React from 'react';
+import PropTypes from 'prop-types';
import { translate } from '../../../helpers/l10n';
export default class DefinitionChanges extends React.PureComponent {
static propTypes = {
- onSave: React.PropTypes.func.isRequired,
- onCancel: React.PropTypes.func.isRequired
+ onSave: PropTypes.func.isRequired,
+ onCancel: PropTypes.func.isRequired
};
handleSaveClick(e: Object) {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js
index d686f9097db..01ef2658324 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js
@@ -19,14 +19,15 @@
*/
// @flow
import React from 'react';
+import PropTypes from 'prop-types';
import { getSettingValue, isEmptyValue, getDefaultValue } from '../utils';
import { translate } from '../../../helpers/l10n';
export default class DefinitionDefaults extends React.PureComponent {
static propTypes = {
- setting: React.PropTypes.object.isRequired,
- isDefault: React.PropTypes.bool.isRequired,
- onReset: React.PropTypes.func.isRequired
+ setting: PropTypes.object.isRequired,
+ isDefault: PropTypes.bool.isRequired,
+ onReset: PropTypes.func.isRequired
};
handleReset(e: Object) {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js
index 8a9399e2c8b..3df8d283c7d 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js
@@ -19,12 +19,13 @@
*/
// @flow
import React from 'react';
+import PropTypes from 'prop-types';
import Definition from './Definition';
export default class DefinitionsList extends React.PureComponent {
static propTypes = {
- component: React.PropTypes.object,
- settings: React.PropTypes.array.isRequired
+ component: PropTypes.object,
+ settings: PropTypes.array.isRequired
};
render() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js
index 44fc1f1976c..394b607a715 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js
@@ -19,11 +19,12 @@
*/
// @flow
import React from 'react';
+import PropTypes from 'prop-types';
import { translate } from '../../../helpers/l10n';
export default class PageHeader extends React.PureComponent {
static propTypes = {
- component: React.PropTypes.object
+ component: PropTypes.object
};
render() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js
index 51186fde3b8..532a03ba4b1 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js
@@ -19,6 +19,7 @@
*/
// @flow
import React from 'react';
+import PropTypes from 'prop-types';
import { groupBy, sortBy } from 'lodash';
import DefinitionsList from './DefinitionsList';
import EmailForm from './EmailForm';
@@ -26,8 +27,8 @@ import { getSubCategoryName, getSubCategoryDescription } from '../utils';
export default class SubCategoryDefinitionsList extends React.PureComponent {
static propTypes = {
- component: React.PropTypes.object,
- settings: React.PropTypes.array.isRequired
+ component: PropTypes.object,
+ settings: PropTypes.array.isRequired
};
renderEmailForm(subCategoryKey: string) {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js
index ac0e51a76b6..1a1b8d7cb56 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import PropertySetInput from './PropertySetInput';
import MultiValueInput from './MultiValueInput';
import PrimitiveInput from './PrimitiveInput';
@@ -25,9 +26,9 @@ import { TYPE_PROPERTY_SET } from '../../constants';
export default class Input extends React.PureComponent {
static propTypes = {
- setting: React.PropTypes.object.isRequired,
- value: React.PropTypes.any,
- onChange: React.PropTypes.func.isRequired
+ setting: PropTypes.object.isRequired,
+ value: PropTypes.any,
+ onChange: PropTypes.func.isRequired
};
render() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js
index 66794971de7..fa95e12b7b1 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import Toggle from '../../../../components/controls/Toggle';
import { defaultInputPropTypes } from '../../propTypes';
import { translate } from '../../../../helpers/l10n';
@@ -25,7 +26,7 @@ import { translate } from '../../../../helpers/l10n';
export default class InputForBoolean extends React.PureComponent {
static propTypes = {
...defaultInputPropTypes,
- value: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.string])
+ value: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])
};
render() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js
index 06de1ca1c58..c6c62a38651 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js
@@ -18,13 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import Select from 'react-select';
import { defaultInputPropTypes } from '../../propTypes';
export default class InputForSingleSelectList extends React.PureComponent {
static propTypes = {
...defaultInputPropTypes,
- options: React.PropTypes.arrayOf(React.PropTypes.string).isRequired
+ options: PropTypes.arrayOf(PropTypes.string).isRequired
};
handleInputChange(option) {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js
index a5346068192..668f9fe5720 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js
@@ -18,14 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import PrimitiveInput from './PrimitiveInput';
import { getEmptyValue } from '../../utils';
export default class MultiValueInput extends React.PureComponent {
static propTypes = {
- setting: React.PropTypes.object.isRequired,
- value: React.PropTypes.array,
- onChange: React.PropTypes.func.isRequired
+ setting: PropTypes.object.isRequired,
+ value: PropTypes.array,
+ onChange: PropTypes.func.isRequired
};
ensureValue() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js
index 3f39350f7b6..fc8f48de793 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import InputForString from './InputForString';
import InputForText from './InputForText';
import InputForPassword from './InputForPassword';
@@ -39,9 +40,9 @@ const typeMapping = {
export default class PrimitiveInput extends React.PureComponent {
static propTypes = {
- setting: React.PropTypes.object.isRequired,
- value: React.PropTypes.any,
- onChange: React.PropTypes.func.isRequired
+ setting: PropTypes.object.isRequired,
+ value: PropTypes.any,
+ onChange: PropTypes.func.isRequired
};
render() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js
index 8a48eede7f9..a77603fb388 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js
@@ -18,14 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import PrimitiveInput from './PrimitiveInput';
import { getEmptyValue, getUniqueName } from '../../utils';
export default class PropertySetInput extends React.PureComponent {
static propTypes = {
- setting: React.PropTypes.object.isRequired,
- value: React.PropTypes.array,
- onChange: React.PropTypes.func.isRequired
+ setting: PropTypes.object.isRequired,
+ value: PropTypes.array,
+ onChange: PropTypes.func.isRequired
};
ensureValue() {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js
index 0b0164407a3..b628f69c7e6 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js
@@ -18,14 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import { defaultInputPropTypes } from '../../propTypes';
export default class SimpleInput extends React.PureComponent {
static propTypes = {
...defaultInputPropTypes,
- value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]),
- type: React.PropTypes.string.isRequired,
- className: React.PropTypes.string.isRequired
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
+ type: PropTypes.string.isRequired,
+ className: PropTypes.string.isRequired
};
handleInputChange(e) {
diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js
index 9b769007425..e9f59b8c2df 100644
--- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js
+++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import GenerateSecretKeyForm from './GenerateSecretKeyForm';
import EncryptionForm from './EncryptionForm';
@@ -25,15 +26,15 @@ import { translate } from '../../../helpers/l10n';
export default class EncryptionApp extends React.PureComponent {
static propTypes = {
- loading: React.PropTypes.bool.isRequired,
- secretKeyAvailable: React.PropTypes.bool,
- secretKey: React.PropTypes.string,
- encryptedValue: React.PropTypes.string,
+ loading: PropTypes.bool.isRequired,
+ secretKeyAvailable: PropTypes.bool,
+ secretKey: PropTypes.string,
+ encryptedValue: PropTypes.string,
- checkSecretKey: React.PropTypes.func.isRequired,
- generateSecretKey: React.PropTypes.func.isRequired,
- encryptValue: React.PropTypes.func.isRequired,
- startGeneration: React.PropTypes.func.isRequired
+ checkSecretKey: PropTypes.func.isRequired,
+ generateSecretKey: PropTypes.func.isRequired,
+ encryptValue: PropTypes.func.isRequired,
+ startGeneration: PropTypes.func.isRequired
};
componentDidMount() {
diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js
index 544c19fa45c..c3301970686 100644
--- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js
+++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js
@@ -18,12 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
export default class EncryptionForm extends React.PureComponent {
static propTypes = {
- encryptedValue: React.PropTypes.string,
- encryptValue: React.PropTypes.func.isRequired,
- generateSecretKey: React.PropTypes.func.isRequired
+ encryptedValue: PropTypes.string,
+ encryptValue: PropTypes.func.isRequired,
+ generateSecretKey: PropTypes.func.isRequired
};
state = { value: '' };
diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js
index f6ae735d4eb..79166acc968 100644
--- a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js
+++ b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js
@@ -18,11 +18,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
export default class GenerateSecretKeyForm extends React.PureComponent {
static propTypes = {
- secretKey: React.PropTypes.string,
- generateSecretKey: React.PropTypes.func.isRequired
+ secretKey: PropTypes.string,
+ generateSecretKey: PropTypes.func.isRequired
};
handleSubmit(e) {
diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js
index b9b6c56b737..36fa5ff8a70 100644
--- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js
+++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js
@@ -18,13 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import Modal from 'react-modal';
import { translate, translateWithParameters } from '../../../helpers/l10n';
export default class LicenseChangeForm extends React.PureComponent {
static propTypes = {
- license: React.PropTypes.object.isRequired,
- onChange: React.PropTypes.func.isRequired
+ license: PropTypes.object.isRequired,
+ onChange: PropTypes.func.isRequired
};
state = {
diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js
index 277d8a4c636..f8ef6d4c7f0 100644
--- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js
+++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js
@@ -18,14 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import moment from 'moment';
import LicenseStatus from './LicenseStatus';
import LicenseChangeForm from './LicenseChangeForm';
export default class LicenseRow extends React.PureComponent {
static propTypes = {
- license: React.PropTypes.object.isRequired,
- setLicense: React.PropTypes.func.isRequired
+ license: PropTypes.object.isRequired,
+ setLicense: PropTypes.func.isRequired
};
handleSet = value => this.props.setLicense(this.props.license.key, value);
diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js
index 086fb5f4eb0..5f77eeeb718 100644
--- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js
+++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js
@@ -18,11 +18,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import { isLicenseInvalid } from './licenseUtils';
export default class LicenseStatus extends React.PureComponent {
static propTypes = {
- license: React.PropTypes.object.isRequired
+ license: PropTypes.object.isRequired
};
render() {
diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js
index 9104cd830ee..91fcdcb1889 100644
--- a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js
+++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js
@@ -18,13 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import LicenseRowContainer from './LicenseRowContainer';
import { translate } from '../../../helpers/l10n';
export default class LicensesList extends React.PureComponent {
static propTypes = {
- licenses: React.PropTypes.array.isRequired,
- fetchLicenses: React.PropTypes.func.isRequired
+ licenses: PropTypes.array.isRequired,
+ fetchLicenses: PropTypes.func.isRequired
};
componentDidMount() {
diff --git a/server/sonar-web/src/main/js/apps/settings/propTypes.js b/server/sonar-web/src/main/js/apps/settings/propTypes.js
index 871b3301c02..e6284a0d86b 100644
--- a/server/sonar-web/src/main/js/apps/settings/propTypes.js
+++ b/server/sonar-web/src/main/js/apps/settings/propTypes.js
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { PropTypes } from 'react';
+import PropTypes from 'prop-types';
export const defaultInputPropTypes = {
name: PropTypes.string.isRequired,
diff --git a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js
index ef2ded655bc..a6adaec83b9 100644
--- a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js
+++ b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import { translate } from '../../../helpers/l10n';
import { getServerId, generateServerId } from '../../../api/settings';
@@ -25,8 +26,8 @@ import { parseError } from '../../code/utils';
export default class ServerIdApp extends React.PureComponent {
static propTypes = {
- addGlobalErrorMessage: React.PropTypes.func.isRequired,
- closeAllGlobalMessages: React.PropTypes.func.isRequired
+ addGlobalErrorMessage: PropTypes.func.isRequired,
+ closeAllGlobalMessages: PropTypes.func.isRequired
};
state = {