From 33734d2afa882a4e7ca26ddfa123eca48a02eb13 Mon Sep 17 00:00:00 2001 From: Pritam Roy Date: Thu, 27 Apr 2017 10:13:44 -0700 Subject: [PATCH] Remove unused imports/ Change React-Dom to latest version that suppresses warnings Summary: With React-Dom@15.5.0 we are getting warnings React.createClass is deprecated. We are not using react.createClass in our code-base but some of the dependancies react-bootstrap, react-select use react.createClass and have PR's regarding the same have not been yet been resolved. https://github.com/JedWatson/react-select/issues/1661 Hence keeping to React, React-Dom versions 15.4.0 until the PR's for React-Bootstrap and React-Select are resolved. Test Plan: Go to browser console. You should not see any console warnings. Reviewers: karthik, jeff, ram Reviewed By: ram Subscribers: jenkins-bot, ui, yugaware Differential Revision: https://phabricator.dev.yugabyte.com/D1890 --- managed/ui/package.json | 4 ++-- managed/ui/src/components/common/nav_bar/SideNavBar.js | 2 +- .../components/config/PublicCloud/AWSProviderConfiguration.js | 2 +- managed/ui/src/components/modals/YBConfirmModal.js | 2 +- managed/ui/src/components/tables/TableDetail/TableDetail.js | 2 +- .../src/components/universes/UniverseStatus/UniverseStatus.js | 2 +- managed/ui/src/utils/ObjectUtils.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/managed/ui/package.json b/managed/ui/package.json index 8a3482641b95..a60977060f9f 100644 --- a/managed/ui/package.json +++ b/managed/ui/package.json @@ -47,13 +47,13 @@ "leaflet": "1.0.2", "leaflet.markercluster": "^1.0.0", "lodash": "^3.10.1", - "react": "^15.3.2", + "react": "^15.4.0", "react-ace": "^3.6.1", "react-addons-update": "^15.3.0", "react-bootstrap": "^0.30.2", "react-bootstrap-multiselect": "^2.2.0", "react-bootstrap-table": "^2.5.8", - "react-dom": "^15.3.0", + "react-dom": "^15.4.0", "react-dropzone": "^3.7.3", "react-gauge": "0.0.5", "react-highlight": "^0.9.0", diff --git a/managed/ui/src/components/common/nav_bar/SideNavBar.js b/managed/ui/src/components/common/nav_bar/SideNavBar.js index 752151691475..b575d82f175c 100644 --- a/managed/ui/src/components/common/nav_bar/SideNavBar.js +++ b/managed/ui/src/components/common/nav_bar/SideNavBar.js @@ -6,7 +6,7 @@ import './stylesheets/SideNavBar.scss'; class NavLink extends Component { render () { - const { router, index, to, children, icon, text, ...props } = this.props; + const { router, index, to, icon, text, ...props } = this.props; // Added by withRouter in React Router 3.0. delete props.params; diff --git a/managed/ui/src/components/config/PublicCloud/AWSProviderConfiguration.js b/managed/ui/src/components/config/PublicCloud/AWSProviderConfiguration.js index 4bd45e2b1b8e..73265fc5e93d 100644 --- a/managed/ui/src/components/config/PublicCloud/AWSProviderConfiguration.js +++ b/managed/ui/src/components/config/PublicCloud/AWSProviderConfiguration.js @@ -162,7 +162,7 @@ class AWSProviderConfiguration extends Component { btnClass={deleteButtonClassName} onClick={this.props.showDeleteProviderModal}/> Are you sure you want to delete this AWS configuration? diff --git a/managed/ui/src/components/modals/YBConfirmModal.js b/managed/ui/src/components/modals/YBConfirmModal.js index b907af242ff5..d611f0252a5e 100644 --- a/managed/ui/src/components/modals/YBConfirmModal.js +++ b/managed/ui/src/components/modals/YBConfirmModal.js @@ -1,7 +1,7 @@ // Copyright (c) YugaByte, Inc. import React, { Component, PropTypes } from 'react'; -import { YBModal, YBButton } from '../common/forms/fields'; +import { YBModal } from '../common/forms/fields'; export default class YBConfirmModal extends Component { constructor(props) { diff --git a/managed/ui/src/components/tables/TableDetail/TableDetail.js b/managed/ui/src/components/tables/TableDetail/TableDetail.js index 6dc3ff123324..5a0a25848f43 100644 --- a/managed/ui/src/components/tables/TableDetail/TableDetail.js +++ b/managed/ui/src/components/tables/TableDetail/TableDetail.js @@ -103,7 +103,7 @@ export default class TableDetail extends Component { - + { tabElements } diff --git a/managed/ui/src/components/universes/UniverseStatus/UniverseStatus.js b/managed/ui/src/components/universes/UniverseStatus/UniverseStatus.js index beb9b9910d40..47b7bedcc725 100644 --- a/managed/ui/src/components/universes/UniverseStatus/UniverseStatus.js +++ b/managed/ui/src/components/universes/UniverseStatus/UniverseStatus.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import './UniverseStatus.scss'; -import {Row, Col, ProgressBar} from 'react-bootstrap'; +import {ProgressBar} from 'react-bootstrap'; import {isValidArray, isValidObject} from '../../../utils/ObjectUtils'; export default class UniverseStatus extends Component { diff --git a/managed/ui/src/utils/ObjectUtils.js b/managed/ui/src/utils/ObjectUtils.js index 6d22e5febf09..eb39f9137977 100644 --- a/managed/ui/src/utils/ObjectUtils.js +++ b/managed/ui/src/utils/ObjectUtils.js @@ -92,7 +92,7 @@ export function areUniverseConfigsEqual(config1, config2) { } export function normalizeToPositiveInt(value) { - return parseInt(Math.abs(value)) || 0; + return parseInt(Math.abs(value), 10) || 0; } export function sortVersionStrings(arr) {