George Vrancianu 8 lat temu
rodzic
commit
97c7187c29
56 zmienionych plików z 336 dodań i 488 usunięć
  1. 24 28
      src/actions/MigrationActions/MigrationActions.js
  2. 4 4
      src/actions/NotificationActions/NotificationActions.js
  3. 1 2
      src/actions/UserActions/UserActions.js
  4. 3 3
      src/components/App/App.js
  5. 7 12
      src/components/CloudConnectionAuth/CloudConnectionAuth.js
  6. 9 8
      src/components/CloudConnectionsView/CloudConnectionsView.js
  7. 5 4
      src/components/CloudItem/CloudItem.js
  8. 0 4
      src/components/ConfirmationDialog/ConfirmationDialog.js
  9. 1 1
      src/components/EditProfile/EditProfile.js
  10. 3 5
      src/components/EndpointLink/EndpointLink.js
  11. 0 2
      src/components/EndpointUsage/EndpointUsage.js
  12. 8 10
      src/components/ExecutionsTimeline/ExecutionsTimeline.js
  13. 1 2
      src/components/Federate/Federate.js
  14. 1 1
      src/components/FilteredTable/FilteredTable.js
  15. 7 7
      src/components/Header/Header.js
  16. 2 2
      src/components/LoadingIcon/LoadingIcon.js
  17. 2 2
      src/components/LoginPage/LoginPage.js
  18. 57 60
      src/components/MainList/MainList.js
  19. 6 22
      src/components/MigrationDetail/MigrationDetail.js
  20. 5 5
      src/components/MigrationList/MigrationList.js
  21. 26 29
      src/components/MigrationNetworks/MigrationNetworks.js
  22. 7 14
      src/components/MigrationTasks/MigrationTasks.js
  23. 3 7
      src/components/MigrationView/MigrationView.js
  24. 2 4
      src/components/MigrationWizard/MigrationWizard.js
  25. 2 5
      src/components/NewDropdown/NewDropdown.js
  26. 5 7
      src/components/NotificationDropdown/NotificationDropdown.js
  27. 1 1
      src/components/NotificationIcon/NotificationIcon.js
  28. 13 20
      src/components/Notifications/Notifications.js
  29. 2 2
      src/components/ProgressBar/ProgressBar.js
  30. 2 13
      src/components/Project/Project.js
  31. 5 7
      src/components/ProjectDetail/ProjectDetail.js
  32. 8 17
      src/components/ProjectList/ProjectList.js
  33. 5 5
      src/components/ProjectsDropdown/ProjectsDropdown.js
  34. 6 21
      src/components/ReplicaDetail/ReplicaDetail.js
  35. 14 16
      src/components/ReplicaExecutions/ReplicaExecutions.js
  36. 2 12
      src/components/ReplicaList/ReplicaList.js
  37. 2 8
      src/components/ReplicaView/ReplicaView.js
  38. 1 1
      src/components/ScheduleItem/ScheduleItem.js
  39. 1 1
      src/components/Table/Table.js
  40. 4 4
      src/components/Tasks/Tasks.js
  41. 4 1
      src/components/UserDropdown/UserDropdown.js
  42. 1 1
      src/components/UserIcon/UserIcon.js
  43. 13 13
      src/components/ValidateEndpoint/ValidateEndpoint.js
  44. 5 2
      src/components/WithSidebar/WithSidebar.js
  45. 0 24
      src/components/WizardMigrationType/WizardMigrationType.js
  46. 4 5
      src/components/WizardNetworks/WizardNetworks.js
  47. 11 16
      src/components/WizardOptions/WizardOptions.js
  48. 3 3
      src/components/WizardSchedule/WizardSchedule.js
  49. 5 5
      src/components/WizardSource/WizardSource.js
  50. 18 21
      src/components/WizardSummary/WizardSummary.js
  51. 3 3
      src/components/WizardTarget/WizardTarget.js
  52. 2 2
      src/config.sample.js
  53. 0 2
      src/data/types/UserType.js
  54. 1 1
      src/server.js
  55. 6 8
      src/stores/UserStore/UserStore.js
  56. 3 3
      src/stores/WizardStore/WizardStore.js

+ 24 - 28
src/actions/MigrationActions/MigrationActions.js

@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import Reflux from 'reflux';
 import Api from '../../components/ApiCaller';
 import NotificationActions from '../NotificationActions'
-import {servicesUrl, securityGroups} from '../../config';
+import { servicesUrl, securityGroups } from '../../config';
 
 let MigrationActions = Reflux.createActions({
   loadMigrations: { children: ['completed', 'failed'], shouldEmit: () => {} },
@@ -81,9 +81,9 @@ MigrationActions.loadMigration.listen((migration) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
 
   Api.sendAjaxRequest({
-      url: `${servicesUrl.coriolis}/${projectId}/migrations/${migration.id}`,
-      method: "GET"
-    })
+    url: `${servicesUrl.coriolis}/${projectId}/migrations/${migration.id}`,
+    method: "GET"
+  })
     .then(MigrationActions.loadMigration.completed, MigrationActions.loadMigration.failed)
     .catch(MigrationActions.loadMigration.failed);
 })
@@ -159,27 +159,25 @@ MigrationActions.cancelMigration.listen((migration, callback = null) => {
   }
 
   Api.sendAjaxRequest({
-      url: url,
-      method: "POST",
-      data: payload
-    })
+    url: url,
+    method: "POST",
+    data: payload
+  })
     .then((response) => {
       if (callback) {
         callback(migration, response)
       }
-        MigrationActions.cancelMigration.completed(migration, response)
-      }, MigrationActions.cancelMigration.failed
-    )
+      MigrationActions.cancelMigration.completed(migration, response)
+    }, MigrationActions.cancelMigration.failed)
     .catch(MigrationActions.cancelMigration.failed);
-
 })
 
 MigrationActions.getReplicaExecutions.listen((replica, callback) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   Api.sendAjaxRequest({
-      url: `${servicesUrl.coriolis}/${projectId}/replicas/${replica.id}/executions/detail`,
-      method: "GET"
-    })
+    url: `${servicesUrl.coriolis}/${projectId}/replicas/${replica.id}/executions/detail`,
+    method: "GET"
+  })
     .then((response) => {
       MigrationActions.getReplicaExecutions.completed(replica, response)
       if (callback) callback()
@@ -191,9 +189,9 @@ MigrationActions.getReplicaExecutions.listen((replica, callback) => {
 MigrationActions.getReplicaExecutionDetail.listen((replica, executionId, callback = null) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   Api.sendAjaxRequest({
-      url: `${servicesUrl.coriolis}/${projectId}/replicas/${replica.id}/executions/${executionId}`,
-      method: "GET"
-    })
+    url: `${servicesUrl.coriolis}/${projectId}/replicas/${replica.id}/executions/${executionId}`,
+    method: "GET"
+  })
     .then((response) => {
       MigrationActions.getReplicaExecutionDetail.completed(replica, executionId, response)
       if (callback) {
@@ -228,14 +226,14 @@ MigrationActions.addMigration.listen((migration) => {
     }
   })
 
-  let network_map = {}
+  let networkMap = {}
   migration.networks.forEach(network => {
-    network_map[network.name] = network.migrateNetwork
+    networkMap[network.name] = network.migrateNetwork
   })
 
   let destinationEnv = {}
 
-  for (var i in migration.destination_environment) {
+  for (let i in migration.destination_environment) {
     if (migration.destination_environment[i].label) { // removing label from dropdown if present
       destinationEnv[i] = migration.destination_environment[i].value
     } else {
@@ -243,7 +241,7 @@ MigrationActions.addMigration.listen((migration) => {
     }
   }
 
-  destinationEnv["network_map"] = network_map
+  destinationEnv["network_map"] = networkMap // eslint-disable-line dot-notation
 
   payload[migration.migrationType] = {
     origin_endpoint_id: migration.sourceCloud.credential.id,
@@ -263,7 +261,6 @@ MigrationActions.addMigration.listen((migration) => {
   })
     .then(MigrationActions.addMigration.completed, MigrationActions.addMigration.failed)
     .catch(MigrationActions.addMigration.failed);
-
 })
 
 MigrationActions.createMigrationFromReplica.listen((replica) => {
@@ -278,13 +275,12 @@ MigrationActions.createMigrationFromReplica.listen((replica) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
 
   Api.sendAjaxRequest({
-      url: `${servicesUrl.coriolis}/${projectId}/migrations`,
-      method: "POST",
-      data: payload
-    })
+    url: `${servicesUrl.coriolis}/${projectId}/migrations`,
+    method: "POST",
+    data: payload
+  })
     .then(MigrationActions.createMigrationFromReplica.completed, MigrationActions.createMigrationFromReplica.failed)
     .catch(MigrationActions.createMigrationFromReplica.failed);
-
 })
 
 

+ 4 - 4
src/actions/NotificationActions/NotificationActions.js

@@ -18,10 +18,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import Reflux from 'reflux';
 
 let NotificationActions = Reflux.createActions({
-  'removeNotification': {},
-  'keepNotification': {},
-  'markAsRead': {},
-  'notify': {}
+  removeNotification: {},
+  keepNotification: {},
+  markAsRead: {},
+  notify: {}
 })
 
 export default NotificationActions;

+ 1 - 2
src/actions/UserActions/UserActions.js

@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import Reflux from 'reflux';
 import Api from '../../components/ApiCaller';
-import {servicesUrl, defaultDomain} from '../../config';
+import { servicesUrl, defaultDomain } from '../../config';
 import Location from '../../core/Location';
 
 let UserAction = Reflux.createActions({
@@ -65,7 +65,6 @@ UserAction.login.listen(userData => {
       UserAction.login.success(response)
       Location.push('/replicas')
     }, UserAction.login.failed)
-
 })
 
 UserAction.loginScope.listen((token, projectId, fallback = true) => {

+ 3 - 3
src/components/App/App.js

@@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { Component, PropTypes } from 'react';
+import React, { PropTypes } from 'react';
 import Reflux from 'reflux';
 import emptyFunction from 'fbjs/lib/emptyFunction';
 import s from './App.scss';
@@ -90,13 +90,13 @@ class App extends Reflux.Component {
   }
 
   componentWillUnmount() {
-    this.removeCss();
+    this.removeCss()
   }
 
   render() {
     return !this.props.error ? (
       <div className={s.root}>
-        <Notifications notifications={this.state.notifications}/>
+        <Notifications notifications={this.state.notifications} />
         {this.props.children}
       </div>
     ) : (<div className={s.root}>

+ 7 - 12
src/components/CloudConnectionAuth/CloudConnectionAuth.js

@@ -18,8 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './CloudConnectionAuth.scss';
-import ConnectionsStore from '../../stores/ConnectionsStore';
-import {defaultLabels} from '../../config'
+import { defaultLabels } from '../../config'
 import LoadingIcon from "../LoadingIcon/LoadingIcon";
 
 
@@ -41,10 +40,14 @@ class CloudConnectionAuth extends Component {
     this.state = { fields: fields }
   }
 
+  componentWillMount() {
+    this.context.onSetTitle(title);
+  }
+
   processProps(props) {
     let fields = []
     if (props.connection.credentials) {
-      for (var fieldName in props.connection.credentials) {
+      for (let fieldName in props.connection.credentials) {
         let value = props.connection.credentials[fieldName]
         if (value.value) { // if dropdown
           value = value.value
@@ -61,14 +64,6 @@ class CloudConnectionAuth extends Component {
     return fields
   }
 
-  componentWillReceiveProps(newProps, oldProps) {
-
-  }
-
-  componentWillMount() {
-    this.context.onSetTitle(title);
-  }
-
   renderFields() {
     if (this.state.fields.length) {
       return this.state.fields.map((field, index) => (
@@ -83,7 +78,7 @@ class CloudConnectionAuth extends Component {
         )
       )
     } else {
-      return <LoadingIcon/>
+      return <LoadingIcon />
     }
   }
 

+ 9 - 8
src/components/CloudConnectionsView/CloudConnectionsView.js

@@ -29,10 +29,11 @@ import ValidateEndpoint from '../ValidateEndpoint';
 
 
 class CloudConnectionsView extends Component {
-  title = ""
 
   static propTypes = {
     connection: PropTypes.object,
+    connections: PropTypes.array,
+    children: PropTypes.array,
     connectionId: PropTypes.string
   }
 
@@ -69,7 +70,7 @@ class CloudConnectionsView extends Component {
 
   componentWillReceiveProps(newProps) {
     if (newProps.connections) {
-      let connection = newProps.connections.filter((item => item.id === this.props.connectionId))[0]
+      let connection = newProps.connections.filter(item => item.id === this.props.connectionId)[0]
 
       this.setState({ connection: connection })
     }
@@ -86,6 +87,8 @@ class CloudConnectionsView extends Component {
     }
   }
 
+  title = ""
+
   showEditConnectionModal() {
     this.setState({ showModal: true })
   }
@@ -95,12 +98,12 @@ class CloudConnectionsView extends Component {
       confirmationDialog: {
         visible: true,
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           ConnectionsActions.deleteConnection(this.state.connection)
           Location.push('/cloud-endpoints')
         },
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
       }
     })
@@ -116,7 +119,7 @@ class CloudConnectionsView extends Component {
 
   closeModal() {
     this.setState({ showModal: false })
-    let connection = this.props.connections.filter((item => item.id === this.props.connectionId))[0]
+    let connection = this.props.connections.filter(item => item.id === this.props.connectionId)[0]
 
     this.setState({ connection: connection })
   }
@@ -167,7 +170,7 @@ class CloudConnectionsView extends Component {
     if (item) {
       return (
         <div className={s.root}>
-          <Header title={title} linkUrl="/cloud-endpoints"/>
+          <Header title={title} linkUrl="/cloud-endpoints" />
           <div className={s.connectionHead + " detailViewHead"}>
             <div className={s.container}>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
@@ -241,9 +244,7 @@ class CloudConnectionsView extends Component {
           </div>
         </div>)
     }
-
   }
-
 }
 
 export default withStyles(CloudConnectionsView, s);

+ 5 - 4
src/components/CloudItem/CloudItem.js

@@ -18,7 +18,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './CloudItem.scss';
-import sApp from '../App/App.scss';
 import Dropdown from '../NewDropdown';
 import AddCloudConnection from '../AddCloudConnection';
 import Modal from 'react-modal';
@@ -27,8 +26,10 @@ class CloudItem extends Component {
   static propTypes = {
     cloud: PropTypes.object,
     addCredentialsCallback: PropTypes.func,
+    credentialSelected: PropTypes.array,
     callback: PropTypes.func,
-    exclude: PropTypes.string
+    exclude: PropTypes.string,
+    selected: PropTypes.bool
   }
 
   constructor(props) {
@@ -67,7 +68,7 @@ class CloudItem extends Component {
   componentWillReceiveProps(nextProps) {
     this.updateCredentialOptions(nextProps)
     if (nextProps.selected === false && this.props.selected === true) {
-      this.setState( {credentialSelected: null })
+      this.setState({ credentialSelected: null })
     }
   }
 
@@ -109,7 +110,7 @@ class CloudItem extends Component {
     if (props.cloud.credentials) {
       props.cloud.credentials.forEach((credential) => {
         if (credential.id != this.props.exclude) {
-          credentialsOptions.push({value: credential.id, label: credential.name})
+          credentialsOptions.push({ value: credential.id, label: credential.name })
         }
       })
       credentialsOptions.push({ value: "new", label: "Add New ..." })

+ 0 - 4
src/components/ConfirmationDialog/ConfirmationDialog.js

@@ -34,10 +34,6 @@ class ConfirmationDialog extends Component {
     place: "right"
   }
 
-  constructor(props) {
-    super(props)
-  }
-
   onCancel() {
     if (this.props.onCancel) {
       this.props.onCancel()

+ 1 - 1
src/components/EditProfile/EditProfile.js

@@ -119,7 +119,7 @@ class EditProfile extends Component {
     if (this.props.user) {
       projectOptions = this.props.user.projects.map(project => ({ label: project.name, id: project.id }))
     }
-    console.log(projectOptions)
+
     return (
       <div className={s.root}>
         <div className={s.header}>

+ 3 - 5
src/components/EndpointLink/EndpointLink.js

@@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { Component, PropTypes } from 'react';
+import React, { PropTypes } from 'react';
 import Location from '../../core/Location';
 import Reflux from 'reflux';
 import ConnectionStore from '../../stores/ConnectionsStore';
@@ -94,17 +94,15 @@ class EndpointLink extends Reflux.Component {
   render() {
     const { to, ...props } = this.props; // eslint-disable-line no-use-before-define
     if (this.state && this.state.connection) {
-      return <a
+      return (<a
         href={Location.createHref(`/cloud-endpoints/${this.state.connection.id}`)}
         {...props}
         onClick={this.handleClick}
-      >{this.state.connection.name}</a>;
+      >{this.state.connection.name}</a>)
     } else {
       return null
     }
-
   }
-
 }
 
 export default EndpointLink;

+ 0 - 2
src/components/EndpointUsage/EndpointUsage.js

@@ -66,9 +66,7 @@ class EndpointUsage extends Reflux.Component {
     } else {
       return null
     }
-
   }
-
 }
 
 export default EndpointUsage;

+ 8 - 10
src/components/ExecutionsTimeline/ExecutionsTimeline.js

@@ -77,9 +77,7 @@ class ExecutionsTimeline extends Component {
       props = newProps
     }
     let executions = props.executions
-    executions.sort((a, b) => {
-      return a.number - b.number;
-    })
+    executions.sort((a, b) => a.number - b.number)
     return executions
   }
 
@@ -96,7 +94,7 @@ class ExecutionsTimeline extends Component {
         number = i
       }
     }
-    return parseInt(number)
+    return parseInt(number, 10)
   }
 
   render() {
@@ -109,17 +107,17 @@ class ExecutionsTimeline extends Component {
       let offset = (numberOfExecutions - 1) / 2
       let style
       if (index < (number - offset)) { // if before
-        style = { left: "0%", transform: "scale(0)"}
+        style = { left: "0%", transform: "scale(0)" }
       } else if (index > (number + offset)) { // if after
-        style = { left: "100%", transform: "scale(0)"}
+        style = { left: "100%", transform: "scale(0)" }
       } else { // in between
-        style = { left: (dotDistance * (index - number + offset + 1)) + "%", transform: "scale(1)"}
+        style = { left: (dotDistance * (index - number + offset + 1)) + "%", transform: "scale(1)" }
       }
       return (
         <div
           className={s.executionDot + (index == number ? (" " + s.current) : "")}
           style={style}
-          onClick={(e) => this.props.handleChangeExecution(execution)}
+          onClick={() => this.props.handleChangeExecution(execution)}
           key={"execution_" + index}
         >
           <div className={"taskIcon " + execution.status}></div>
@@ -130,9 +128,9 @@ class ExecutionsTimeline extends Component {
     return (
       <div className={s.root}>
         <div className={s.line}>
-          { this.isPrev() && <div className={s.caretLeft + " icon chevron"} onClick={(e) => this.handlePrev()}></div>}
+          { this.isPrev() && <div className={s.caretLeft + " icon chevron"} onClick={() => this.handlePrev()}></div>}
           <div className={s.progress}></div>
-          { this.isNext() && <div className={s.caretRight + " icon chevron"} onClick={(e) => this.handleNext()}></div>}
+          { this.isNext() && <div className={s.caretRight + " icon chevron"} onClick={() => this.handleNext()}></div>}
         </div>
         {executions}
       </div>

+ 1 - 2
src/components/Federate/Federate.js

@@ -15,11 +15,10 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { Component, PropTypes } from 'react';
+import { PropTypes } from 'react';
 import Location from '../../core/Location';
 import Reflux from 'reflux';
 import UserActions from '../../actions/UserActions';
-import ConnectionStore from '../../stores/ConnectionsStore';
 
 
 class Federate extends Reflux.Component {

+ 1 - 1
src/components/FilteredTable/FilteredTable.js

@@ -52,7 +52,7 @@ class FilteredTable extends Component {
     }
   }
 
-  componentWillReceiveProps(newProps, oldProps) {
+  componentWillReceiveProps(newProps) {
     if (newProps.items) {
       this.setState({ filteredData: newProps.items }, () => {
         this.searchItem()

+ 7 - 7
src/components/Header/Header.js

@@ -81,11 +81,11 @@ class Header extends Component {
             <div className="logo coriolis-white-topbar"></div>
           </Link>
           <div className={s.banner}>
-            {/*<h1 className={s.bannerTitle}>{this.props.title}</h1>*/}
+            {/* <h1 className={s.bannerTitle}>{this.props.title}</h1> */}
           </div>
           <div className={s.userIcon}>
-            <UserIcon dark={true} />
-            <NotificationIcon dark={true} />
+            <UserIcon dark />
+            <NotificationIcon dark />
           </div>
         </div>
         <div
@@ -93,10 +93,10 @@ class Header extends Component {
           style={{ height: this.state.height }}
         >
           <ul>
-            <li><a onClick={(e) => this.goToMenu("/replicas")}>Replicas</a></li>
-            <li><a onClick={(e) => this.goToMenu("/migrations")}>Migrations</a></li>
-            <li><a onClick={(e) => this.goToMenu("/cloud-endpoints")}>Cloud Endpoints</a></li>
-            <li><a onClick={(e) => this.goToMenu("/projects")}>Projects</a></li>
+            <li><a onClick={() => this.goToMenu("/replicas")}>Replicas</a></li>
+            <li><a onClick={() => this.goToMenu("/migrations")}>Migrations</a></li>
+            <li><a onClick={() => this.goToMenu("/cloud-endpoints")}>Cloud Endpoints</a></li>
+            <li><a onClick={() => this.goToMenu("/projects")}>Projects</a></li>
           </ul>
         </div>
       </div>

+ 2 - 2
src/components/LoadingIcon/LoadingIcon.js

@@ -14,6 +14,7 @@ GNU Affero General Public License for more details.
 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+/* eslint-disable max-len */
 
 import React, { Component, PropTypes } from 'react';
 import s from './LoadingIcon.scss';
@@ -35,7 +36,6 @@ const svgIcon = `
                 <path d="M37.4075,19.5507 C26.3395,19.5507 17.6535,22.8147 13.5865,29.4827 C11.0315,33.6727 10.5065,38.7967 12.0245,44.7107 C15.7565,59.2487 30.9865,75.6817 51.7715,87.5977 C81.8655,104.8517 113.6995,106.8377 122.7345,92.0237 C125.2895,87.8337 125.8155,82.7107 124.2965,76.7967 C120.5645,62.2587 105.3345,45.8257 84.5495,33.9087 C68.0015,24.4217 50.9275,19.5507 37.4075,19.5507 M98.8585,103.0097 C85.1115,103.0097 67.8845,98.1197 51.2175,88.5647 C30.1805,76.5037 14.7495,59.8067 10.9455,44.9877 C9.3485,38.7717 9.9175,33.3597 12.6355,28.9027 C21.9805,13.5797 54.4905,15.3907 85.1035,32.9427 C106.1405,45.0027 121.5715,61.7007 125.3755,76.5187 C126.9715,82.7357 126.4035,88.1477 123.6855,92.6037 C119.4275,99.5847 110.3615,103.0097 98.8585,103.0097" id="Fill-9" fill="#159588"></path>
                 <path d="M17.2963,18.6519 L17.7333,18.9969 C5.6663,34.2729 18.5003,65.4219 46.3413,88.4339 C64.9233,103.7929 86.3753,112.2799 102.3403,110.5869 C109.4293,109.8349 115.0803,107.0269 118.6823,102.4679 C130.7493,87.1929 117.9153,56.0439 90.0753,33.0319 C71.4923,17.6719 50.0303,9.1809 34.0753,10.8779 C26.9853,11.6309 21.3343,14.4379 17.7333,18.9969 L17.2963,18.6519 Z M98.2093,111.9139 C82.5383,111.9139 62.8413,103.5179 45.6323,89.2929 C17.3273,65.8979 4.4203,34.0539 16.8593,18.3069 C20.6513,13.5069 26.5633,10.5549 33.9573,9.7699 C50.2033,8.0459 71.9803,16.6299 90.7843,32.1729 C119.0883,55.5679 131.9953,87.4119 119.5573,103.1579 C115.7653,107.9589 109.8523,110.9109 102.4573,111.6949 C101.0803,111.8409 99.6613,111.9139 98.2093,111.9139 L98.2093,111.9139 Z" id="Fill-10" fill="#2F81B7"></path>
                 <path d="M40.6234,1.2244 C32.9264,1.2244 26.4584,3.7314 21.8834,8.4964 C6.7634,24.2454 15.2924,60.4824 40.8944,89.2744 C57.5674,108.0244 78.3774,119.8714 95.2024,120.1924 C103.2004,120.3364 109.9174,117.8324 114.6264,112.9264 C129.7464,97.1774 121.2184,60.9404 95.6154,32.1484 C78.9434,13.3994 58.1344,1.5524 41.3084,1.2314 C41.0784,1.2264 40.8504,1.2244 40.6234,1.2244 M95.8884,121.3124 C95.6534,121.3124 95.4184,121.3104 95.1804,121.3064 C78.0544,120.9794 56.9344,108.9894 40.0624,90.0154 C14.0824,60.7984 5.5664,23.8834 21.0794,7.7254 C26.0104,2.5894 33.0144,-0.0516 41.3294,0.1174 C58.4554,0.4444 79.5764,12.4344 96.4484,31.4084 C122.4284,60.6244 130.9444,97.5394 115.4304,113.6984 C110.6404,118.6874 103.8944,121.3124 95.8884,121.3124" id="Fill-11" fill="#0056B8"></path>
-                
             </g>
         </g>
     </g>
@@ -74,7 +74,7 @@ class LoadingIcon extends Component {
       <div
         className={!this.props.animate && "noAnimation"}
         style={loaderStyle}
-        dangerouslySetInnerHTML={{__html: svgIcon}}
+        dangerouslySetInnerHTML={{ __html: svgIcon }}
       >
       </div>
       {this.props.text && (<div className={s.text}>{this.props.text}</div>)}

+ 2 - 2
src/components/LoginPage/LoginPage.js

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { Component, PropTypes } from 'react';
+import React, { PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './LoginPage.scss';
 import Reflux from 'reflux';
@@ -137,7 +137,7 @@ class LoginPage extends Reflux.Component {
         <div className={s.container + " " + (loginButtons.length <= 2 ? s.oneColumn : "")}>
           <div className={s.logo}>
             <div className={s.large}>
-              <LoadingIcon width={224} height={200} animate={this.state.loadingState} padding={16} text=""/>
+              <LoadingIcon width={224} height={200} animate={this.state.loadingState} padding={16} text="" />
               <div className={s.coriolisText} dangerouslySetInnerHTML={{ __html: coriolisTextSvg }}></div>
             </div>
             <div className={s.small}>

+ 57 - 60
src/components/MainList/MainList.js

@@ -14,15 +14,14 @@
  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+/* eslint-disable react/sort-comp */
 
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import Dropdown from '../NewDropdown';
 import SearchBox from '../SearchBox';
-import Moment from 'react-moment';
 import s from './MainList.scss';
 import FilteredTable from '../FilteredTable';
-import TextTruncate from 'react-text-truncate';
 import ConfirmationDialog from '../ConfirmationDialog'
 
 
@@ -87,6 +86,51 @@ class MainList extends Component {
     this.setState({ items: newProps.items, filters: stateFilters })
   }
 
+  renderSearch(items) {
+    if (items) {
+      let output = items.map((item) => (
+          <div className={s.row + " " + (item.selected ? "selected" : "")} key={"row_" + item.id}>
+            <div className={"checkbox-container " + (this.props.actions == null ? "hidden" : "")}>
+              <input
+                id={"vm_check_" + item.id}
+                type="checkbox"
+                checked={item.selected}
+                onChange={(e) => this.checkItem(e, item)}
+                className="checkbox-normal"
+              />
+              <label htmlFor={"vm_check_" + item.id}></label>
+            </div>
+            {this.props.renderItem(item)}
+          </div>
+        ))
+      return output
+    } else {
+      return (<div className="no-results">Your search returned no results</div>)
+    }
+  }
+
+  filter(filter, option) {
+    let stateFilters = this.state.filters
+    stateFilters[filter.field] = option.value
+    this.setState({ filters: stateFilters })
+    this.searchItem(this.state.queryText)
+  }
+
+  filterFn(item, queryText, filters) {
+    let valid = true
+    if (item.name.toLowerCase().indexOf(queryText.toLowerCase()) == -1) {
+      valid = false
+    }
+    for (let field in filters) {
+      if (item[field] != filters[field] && filters[field] != null) {
+        valid = false
+      }
+    }
+
+    return valid
+  }
+
+
   selectedCount() {
     let count = 0
     if (this.state.items) {
@@ -137,60 +181,6 @@ class MainList extends Component {
     this.setState({ items: items, selectedAll: !selectedAll })
   }
 
-  searchItem(queryText) {
-    if (queryText.target) {
-      this.setState({ queryText: queryText.target.value })
-    } else {
-      this.setState({ queryText: queryText })
-    }
-  }
-
-  filter(filter, option) {
-    let stateFilters = this.state.filters
-    stateFilters[filter.field] = option.value
-    this.setState({ filters: stateFilters })
-    this.searchItem(this.state.queryText)
-  }
-
-  filterFn(item, queryText, filters) {
-    let valid = true
-    if (item.name.toLowerCase().indexOf(queryText.toLowerCase()) == -1) {
-      valid = false
-    }
-    for (let field in filters) {
-      if (item[field] != filters[field] && filters[field] != null) {
-        valid = false
-      }
-    }
-
-    return valid
-  }
-
-  renderSearch(items) {
-    if (items) {
-      let output = items.map((item) => {
-        return (
-          <div className={s.row + " " + (item.selected ? "selected" : "")} key={"row_" + item.id}>
-            <div className={"checkbox-container " + (this.props.actions == null ? "hidden" : "")}>
-              <input
-                id={"vm_check_" + item.id}
-                type="checkbox"
-                checked={item.selected}
-                onChange={(e) => this.checkItem(e, item)}
-                className="checkbox-normal"
-              />
-              <label htmlFor={"vm_check_" + item.id}></label>
-            </div>
-            {this.props.renderItem(item)}
-          </div>
-        )
-      })
-      return output
-    } else {
-      return (<div className="no-results">Your search returned no results</div>)
-    }
-  }
-
   onActionChange(option) {
     let items = this.state.items.filter(item => item.selected)
     if (this.props.actions[option.value].confirm) {
@@ -198,7 +188,7 @@ class MainList extends Component {
         confirmationDialog: {
           visible: true,
           onConfirm: () => {
-            this.setState({ confirmationDialog: { visible: false }})
+            this.setState({ confirmationDialog: { visible: false } })
             if (this.props.actions[option.value].action) {
               items.forEach((item) => {
                 this.props.actions[option.value].action(item)
@@ -206,7 +196,7 @@ class MainList extends Component {
             }
           },
           onCancel: () => {
-            this.setState({ confirmationDialog: { visible: false }})
+            this.setState({ confirmationDialog: { visible: false } })
           }
         }
       })
@@ -219,6 +209,13 @@ class MainList extends Component {
     }
   }
 
+  searchItem(queryText) {
+    if (queryText.target) {
+      this.setState({ queryText: queryText.target.value })
+    } else {
+      this.setState({ queryText: queryText })
+    }
+  }
   refreshList() {
     this.props.refresh()
   }
@@ -244,7 +241,7 @@ class MainList extends Component {
                   id={"vm_check_all"}
                   type="checkbox"
                   checked={this.state.selectedAll[this.state.filterType]}
-                  onChange={(e) => this.checkAll()}
+                  onChange={() => this.checkAll()}
                   className="checkbox-normal"
                 />
                 <label htmlFor={"vm_check_all"}></label>
@@ -287,7 +284,7 @@ class MainList extends Component {
               queryText={this.state.queryText}
               renderSearch={(e) => this.renderSearch(e)}
               customClassName={s.mainTable}
-            ></FilteredTable>
+            />
           </div>
         </div>
         <ConfirmationDialog

+ 6 - 22
src/components/MigrationDetail/MigrationDetail.js

@@ -19,7 +19,6 @@ import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './MigrationDetail.scss';
 import Moment from 'react-moment';
-import LoadingIcon from "../LoadingIcon";
 import EndpointLink from '../EndpointLink';
 import ConfirmationDialog from '../ConfirmationDialog'
 import MigrationActions from '../../actions/MigrationActions';
@@ -33,7 +32,8 @@ class MigrationDetail extends Component {
   };
 
   static propTypes = {
-    migration: PropTypes.object
+    migration: PropTypes.object,
+    migrationId: PropTypes.string
   }
 
   constructor(props) {
@@ -61,13 +61,13 @@ class MigrationDetail extends Component {
       confirmationDialog: {
         visible: true,
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           let item = this.state.migrations.filter(migration => migration.id == this.props.migrationId)[0]
           MigrationActions.deleteMigration(item)
           Location.push('/cloud-endpoints')
         },
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
       }
     })
@@ -143,29 +143,14 @@ class MigrationDetail extends Component {
                   <a>{item.id}</a>
                 </div>
               </div>
-              {/*<div className={s.formGroup}>
-               <div className={s.title}>
-               Flavours
-               </div>
-               <div className={s.value}>
-               {item.autoFlavors ? "Automatic flavour selection" : "Manual flavour selection"}
-               </div>
-               </div>*/}
-              {/*<div className={s.formGroup}>
-               <div className={s.title}>
-               Disk Format
-               </div>
-               <div className={s.value}>
-               {item.diskFormat}
-               </div>
-               </div>*/}
             </div>
           </div>
           <MigrationNetworks migration={item} />
           <div className={s.container + " " + s.buttons}>
             { item.type == "replica" && <button
               onClick={(e) => this.createMigrationFromReplica(e, item)}
-              disabled={disabled} className={disabled ? "disabled": ""} >
+              disabled={disabled} className={disabled ? "disabled" : ""}
+            >
               Migrate Replica
             </button>}
             <button className="wire" onClick={(e) => this.deleteMigration(e)}>Delete</button>
@@ -181,7 +166,6 @@ class MigrationDetail extends Component {
     }
     return output
   }
-
 }
 
 export default withStyles(MigrationDetail, s);

+ 5 - 5
src/components/MigrationList/MigrationList.js

@@ -132,23 +132,23 @@ class MigrationList extends Reflux.Component {
             <Moment format="MMM Do YYYY HH:mm" date={createdAt} />
           </span>
         </span>
-        {/*<span className={"cell " + s.composite} onClick={(e) => this.migrationDetail(e, item)}>
+        {/* <span className={"cell " + s.composite} onClick={(e) => this.migrationDetail(e, item)}>
          <span className={s.label}>Notes</span>
          <TextTruncate line={2} truncateText="..." text={item.notes} />
-         </span>*/}
+         </span> */}
         <span className={"cell " + s.composite} onClick={(e) => this.migrationDetail(e, item)}>
           <span className={s.label}>Tasks remaining</span>
           <span className={s.value}>{tasksRemaining}</span>
         </span>
-        {/*<span className={"cell " + s.composite}>
+        {/* <span className={"cell " + s.composite}>
          <span className={s.label}>Current instance</span>
          <span className={s.value}>{this.currentInstance(item)}</span>
-         </span>*/}
+         </span> */}
       </div>
     )
   }
 
-  currentInstance(migration) {
+  currentInstance() {
     let instance = "N/A"
     /* migration.vms.forEach((item) => {
       if (item.selected) {

+ 26 - 29
src/components/MigrationNetworks/MigrationNetworks.js

@@ -44,33 +44,6 @@ class MigrationNetworks extends Component {
     this.processProps(props)
   }
 
-  processProps(props) {
-    if (props.migration && props.migration.destination_environment) {
-      for (var i in props.migration.destination_environment.network_map) {
-        let connectedVms = "-"
-        let newItem = {
-          source_network: i,
-          connected_vms: "-",
-          destination_network: props.migration.destination_environment.network_map[i],
-          destination_type: "Existing network"
-        }
-        this.listItems.push(newItem)
-      }
-      /*
-      props.migration.destination_environment.network_map.forEach((item) => {
-          //let connectedVms = this.getConnectedVms(item.id).join(", ")
-        let connectedVms = "-"
-          let newItem = {
-            source_network: item.name,
-            connected_vms: connectedVms,
-            destination_network: item.migrateNetwork,
-            destination_type: item.migrateNetwork == "Create new" ? "New network" : "Existing network"
-          }
-          this.listItems.push(newItem)
-        }*/
-    }
-  }
-
   componentWillMount() {
     this.context.onSetTitle(title);
   }
@@ -85,6 +58,32 @@ class MigrationNetworks extends Component {
     return vms
   }
 
+  processProps(props) {
+    if (props.migration && props.migration.destination_environment) {
+      for (let i in props.migration.destination_environment.network_map) {
+        let newItem = {
+          source_network: i,
+          connected_vms: "-",
+          destination_network: props.migration.destination_environment.network_map[i],
+          destination_type: "Existing network"
+        }
+        this.listItems.push(newItem)
+      }
+      /*
+       props.migration.destination_environment.network_map.forEach((item) => {
+       //let connectedVms = this.getConnectedVms(item.id).join(", ")
+       let connectedVms = "-"
+       let newItem = {
+       source_network: item.name,
+       connected_vms: connectedVms,
+       destination_network: item.migrateNetwork,
+       destination_type: item.migrateNetwork == "Create new" ? "New network" : "Existing network"
+       }
+       this.listItems.push(newItem)
+       }*/
+    }
+  }
+
   render() {
     if (this.listItems.length) {
       return (
@@ -97,9 +96,7 @@ class MigrationNetworks extends Component {
     } else {
       return (<div className="no-results">No networks mapped</div>)
     }
-
   }
-
 }
 
 export default withStyles(MigrationNetworks, s);

+ 7 - 14
src/components/MigrationTasks/MigrationTasks.js

@@ -18,21 +18,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import moment from 'moment';
-import Table from '../Table';
 import s from './MigrationTasks.scss';
-import TextTruncate from 'react-text-truncate';
-import LoadingIcon from "../LoadingIcon/LoadingIcon";
-import Dropdown from '../NewDropdown';
 import MigrationActions from '../../actions/MigrationActions';
-import {tasksPollTimeout} from '../../config'
+import { tasksPollTimeout } from '../../config'
 import Tasks from '../Tasks';
 
 const title = 'Migration Tasks';
 
 class MigrationTasks extends Component {
 
-  timeout = null
-
   static propTypes = {
     migration: PropTypes.object
   }
@@ -59,17 +53,11 @@ class MigrationTasks extends Component {
     this.context.onSetTitle(title);
     this.pollTasks()
   }
-
-  componentWillUnmount() {
-    clearInterval(this.timeout)
-  }
-
   componentWillReceiveProps(props) {
     if (props.migration && props.migration.tasks) {
       let loadMigration = false
       props.migration.tasks.forEach((item) => {
         if (item.progress_updates.length) {
-          let first = true
           if (item.progress_updates[0] != null) {
             item.progress_updates.sort((a, b) => moment(a.created_at).isAfter(moment(b.created_at)))
           } else {
@@ -83,6 +71,11 @@ class MigrationTasks extends Component {
     }
   }
 
+  componentWillUnmount() {
+    clearInterval(this.timeout)
+  }
+
+  timeout = null
 
   pollTasks() {
     if (this.props && this.props.migration &&
@@ -96,7 +89,7 @@ class MigrationTasks extends Component {
       <div className={s.root}>
         { this.props.migration &&
           <div className={s.container}>
-            <Tasks tasks={this.props.migration.tasks}/>
+            <Tasks tasks={this.props.migration.tasks} />
           </div>
         }
       </div>

+ 3 - 7
src/components/MigrationView/MigrationView.js

@@ -21,7 +21,6 @@ import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './MigrationView.scss';
 import Header from '../Header';
 import Link from '../Link';
-import Dropdown from '../NewDropdown';
 import MigrationStore from '../../stores/MigrationStore';
 import MigrationActions from '../../actions/MigrationActions';
 import LoadingIcon from '../LoadingIcon';
@@ -76,12 +75,12 @@ class MigrationView extends Reflux.Component {
       confirmationDialog: {
         visible: true,
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           MigrationActions.deleteMigration(item)
           Location.push('/migrations')
         },
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
       }
     })
@@ -118,14 +117,13 @@ class MigrationView extends Reflux.Component {
 
       return (
         <div className={s.root}>
-          <Header title={title} linkUrl={item.type == "migration" ? "/migrations" : "/replicas"}/>
+          <Header title={title} linkUrl={item.type == "migration" ? "/migrations" : "/replicas"} />
           <div className={s.migrationHead}>
             <div className={s.container}>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
               <div className={s.migrationTypeImg + ' icon ' + item.type + "-large"}></div>
               <div className={s.migrationInfo}>
                 <h2>
-                  {/*{item.name ? item.name : "N/A"}*/}
                   <TextTruncate line={1} truncateText="..." text={item.name} />
                 </h2>
                 <div className={s.migrationStats}>
@@ -175,9 +173,7 @@ class MigrationView extends Reflux.Component {
         </div>
       </div>)
     }
-
   }
-
 }
 
 export default withStyles(MigrationView, s);

+ 2 - 4
src/components/MigrationWizard/MigrationWizard.js

@@ -20,8 +20,7 @@ import Reflux from 'reflux';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import WizardSource from '../WizardSource';
 import WizardTarget from '../WizardTarget';
-import Helper from '../Helper';
-import {migrationSteps} from '../../config';
+import { migrationSteps } from '../../config';
 import WizardVms from '../WizardVms';
 import WizardNetworks from '../WizardNetworks';
 import WizardOptions from '../WizardOptions';
@@ -57,7 +56,6 @@ class MigrationWizard extends Reflux.Component {
     super(props)
     this.stores = [MigrationStore, ConnectionStore, WizardStore]
     WizardActions.newState()
-
   }
 
   componentWillMount() {
@@ -182,7 +180,7 @@ class MigrationWizard extends Reflux.Component {
         />)
         break
       case "WizardOptions":
-        step = <WizardOptions setWizardState={(e) => this.setWizardState(e)} data={this.state}/>
+        step = <WizardOptions setWizardState={(e) => this.setWizardState(e)} data={this.state} />
         break
       case "WizardSchedule":
         step = (<WizardSchedule

+ 2 - 5
src/components/NewDropdown/NewDropdown.js

@@ -58,14 +58,11 @@ class NewDropdown extends Dropdown {
     let newChildProps = Object.assign({}, children[0].props)
     newChildProps.onFocus = () => {
       this.setState({
-        isOpen: true,
-        //hovered: this.state.selected.value == '' ? null : this.state.selected
+        isOpen: true
       })
     }
     newChildProps.onBlur = () => {this.setState({ isOpen: false })}
-    newChildProps.onKeyPress = (e) => {
-      console.log(e) // eslint-disable-line no-console
-    }
+    // newChildProps.onKeyPress = () => {}
     newChildProps.tabIndex = 0
 
     children[0] = React.cloneElement(children[0], newChildProps)

+ 5 - 7
src/components/NotificationDropdown/NotificationDropdown.js

@@ -19,7 +19,6 @@ import React from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './NotificationDropdown.scss';
 import Dropdown from 'react-dropdown';
-import Location from '../../core/Location';
 import UserStore from '../../stores/UserStore';
 import NotificationActions from '../../actions/NotificationActions';
 
@@ -35,12 +34,10 @@ class NotificationDropdown extends Dropdown {
   }
 
   buildMenu() {
-    let buildMenuResult = super.buildMenu.call(this)
     let notifications = <p className={s.noNotifications}>You have no notifications</p>
 
     if (this.props.notifications.length) {
-      notifications = this.props.notifications.map((notification, index) => {
-        return (
+      notifications = this.props.notifications.map((notification, index) => (
           <div
             className="notifications-wrapper"
             key={index}
@@ -51,8 +48,7 @@ class NotificationDropdown extends Dropdown {
               <div className="notification-message">{notification.message}</div>
             </div>
           </div>
-        )
-      }, this)
+        ), this)
     }
     return (
       <div>
@@ -84,7 +80,9 @@ class NotificationDropdown extends Dropdown {
     let children = Object.assign({}, result.props.children)
     children = [
       <div className={s.userIcon + (this.props.dark ? " dark" : "")} onMouseDown={(e) => this.handleMouseDown(e)}>
-        <span className={s.notificationCount + " count-" + this.unreadNotifications()}>{this.unreadNotifications()}</span>
+        <span className={s.notificationCount + " count-" + this.unreadNotifications()}>
+          {this.unreadNotifications()}
+        </span>
       </div>,
       children[1]
     ]

+ 1 - 1
src/components/NotificationIcon/NotificationIcon.js

@@ -40,7 +40,7 @@ class NotificationIcon extends Reflux.Component {
   render() {
     return (
       <div className={s.root}>
-        <NotificationDropdown notifications={this.state.allNotifications} dark={this.props.dark}/>
+        <NotificationDropdown notifications={this.state.allNotifications} dark={this.props.dark} />
       </div>
     );
   }

+ 13 - 20
src/components/Notifications/Notifications.js

@@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, {Component, PropTypes} from 'react';
+import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import NotificationActions from '../../actions/NotificationActions';
 import s from './Notifications.scss';
@@ -23,33 +23,16 @@ import NotificationSystem from 'react-notification-system';
 
 class Notifications extends Component {
 
-  _notificationSystem = null
-
-  _addNotification(event) {
-    event.preventDefault();
-    this._notificationSystem.addNotification({
-      message: 'Notification message',
-      level: 'success'
-    });
-  }
-
   static propTypes = {
     notifications: PropTypes.array
   }
 
-  constructor(props) {
-    super(props)
-  }
-
   componentDidMount() {
     this._notificationSystem = this.refs.notificationSystem;
   }
 
   componentWillReceiveProps(newProps, oldProps) {
     if (newProps != oldProps && newProps.notifications.length) {
-      if (newProps.notifications[0].objectId) {
-
-      }
       this.send(
         newProps.notifications[0].message,
         newProps.notifications[0].type,
@@ -65,6 +48,16 @@ class Notifications extends Component {
     }
   }
 
+  _addNotification(event) {
+    event.preventDefault();
+    this._notificationSystem.addNotification({
+      message: 'Notification message',
+      level: 'success'
+    });
+  }
+
+  _notificationSystem = null
+
   send(message, type = 'info', title = null, hideDelay = 5000, action = null) {
     if (title === null) {
       title = message
@@ -78,12 +71,12 @@ class Notifications extends Component {
       autoDismiss: 10,
       action: action
     })
-  };
+  }
 
   render() {
     return (
       <div>
-        <NotificationSystem ref="notificationSystem"/>
+        <NotificationSystem ref="notificationSystem" />
       </div>
     );
   }

+ 2 - 2
src/components/ProgressBar/ProgressBar.js

@@ -34,11 +34,11 @@ class ProgressBar extends Component {
     let progressBarStyle = {
       width: this.props.progress + "%"
     }
-    return <div className={s.root}>
+    return (<div className={s.root}>
       <div className={s.outer}>
         <div className={s.inner + " " + (this.props.progress == 100 ? s.completed : "")} style={progressBarStyle} />
       </div>
-    </div>
+    </div>)
   }
 
 }

+ 2 - 13
src/components/Project/Project.js

@@ -21,7 +21,6 @@ import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './Project.scss';
 import UserStore from '../../stores/UserStore';
 import Header from '../Header';
-import ConfirmationDialog from '../ConfirmationDialog';
 import LoadingIcon from '../LoadingIcon';
 import Location from '../../core/Location';
 
@@ -77,7 +76,7 @@ class Project extends Reflux.Component {
     if (item) {
       return (
         <div className={s.root}>
-          <Header linkUrl="/projects"/>
+          <Header linkUrl="/projects" />
           <div className={s.projectHead + " detailViewHead"}>
             <div className={s.container}>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
@@ -89,21 +88,13 @@ class Project extends Reflux.Component {
             </div>
           </div>
           <div className={s.container}>
-            <div className={s.sidebar}>
-
-            </div>
+            <div className={s.sidebar}></div>
             <div className={s.content}>
               {React.cloneElement(this.props.children, {
                 projects: this.state.currentUser ? this.state.currentUser.projects : null,
                 projectId: this.props.projectId })}
             </div>
           </div>
-          {/*<ConfirmationDialog
-            visible={this.state.confirmationDialog.visible}
-            message={this.state.confirmationDialog.message}
-            onConfirm={(e) => this.state.confirmationDialog.onConfirm(e)}
-            onCancel={(e) => this.state.confirmationDialog.onCancel(e)}
-          />*/}
         </div>
       );
     } else {
@@ -113,9 +104,7 @@ class Project extends Reflux.Component {
         </div>
       );
     }
-
   }
-
 }
 
 export default withStyles(Project, s);

+ 5 - 7
src/components/ProjectDetail/ProjectDetail.js

@@ -18,8 +18,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './ProjectDetail.scss';
-import Moment from 'react-moment';
-import TextTruncate from 'react-text-truncate';
 import LoadingIcon from '../LoadingIcon';
 
 const title = 'connection details';
@@ -41,6 +39,11 @@ class CloudConnectionDetail extends Component {
     }
   }
 
+  componentWillMount() {
+    this.context.onSetTitle(title);
+    this.componentWillReceiveProps(this.props)
+  }
+
   componentWillReceiveProps(props) {
     let project = null
     if (props.projects) {
@@ -54,11 +57,6 @@ class CloudConnectionDetail extends Component {
     this.setState({ project: project })
   }
 
-  componentWillMount() {
-    this.context.onSetTitle(title);
-    this.componentWillReceiveProps(this.props)
-  }
-
   render() {
     let item = this.state.project
     if (item) {

+ 8 - 17
src/components/ProjectList/ProjectList.js

@@ -31,32 +31,23 @@ import MainList from '../MainList';
 const title = 'Projects';
 
 const projectActions = null
-/* {
-  delete_action: {
-    label: "Delete",
-    action: (item) => {
-      console.log("Delete project action needed here")
-    },
-    confirm: true
-  }
-}
-*/
+
 class ProjectList extends Reflux.Component {
   filters = [
     {
       field: "enabled",
       options: [
-        { value: null, label: "All"},
-        { value: true, label: "Enabled"},
-        { value: false, label: "Disabled"}
+        { value: null, label: "All" },
+        { value: true, label: "Enabled" },
+        { value: false, label: "Disabled" }
       ]
     },
     {
       field: "is_domain",
       options: [
-        { value: null, label: "All"},
-        { value: true, label: "Is Domain"},
-        { value: false, label: "Is Not Domain"}
+        { value: null, label: "All" },
+        { value: true, label: "Is Domain" },
+        { value: false, label: "Is Not Domain" }
       ]
     }
   ]
@@ -121,7 +112,7 @@ class ProjectList extends Reflux.Component {
           <button
             className="wire gray"
             disabled={item.id == projectId}
-            onClick={(e) => this.switchProject(item)}
+            onClick={() => this.switchProject(item)}
           >{item.id == projectId ? "Current" : "Switch"}</button>
         </span>
       </div>

+ 5 - 5
src/components/ProjectsDropdown/ProjectsDropdown.js

@@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { Component, PropTypes } from 'react';
+import React from 'react';
 import Reflux from 'reflux';
 import UserStore from '../../stores/UserStore';
 import UserActions from '../../actions/UserActions';
@@ -43,8 +43,8 @@ class ProjectsDropdown extends Reflux.Component {
     let projects = []
     let currentProject = null
     if (this.state.currentUser.projects) {
-      projects = this.state.currentUser.projects.map(project => {
-        return {label: project.name, value: project.id}
+      projects = this.state.currentUser.projects.map(project => { //eslint-disable-line
+        return { label: project.name, value: project.id }
       })
 
       if (Reflux.GlobalState.userStore.currentUser.project) {
@@ -54,14 +54,14 @@ class ProjectsDropdown extends Reflux.Component {
         }
       }
     }
-    return <div className={s.root}>
+    return (<div className={s.root}>
       <Dropdown
         options={projects}
         placeholder="Switch Project"
         onChange={(e) => this.switchProject(e)}
         value={currentProject}
       />
-    </div>
+    </div>)
   }
 
 }

+ 6 - 21
src/components/ReplicaDetail/ReplicaDetail.js

@@ -33,7 +33,8 @@ class MigrationDetail extends Component {
   };
 
   static propTypes = {
-    replica: PropTypes.object
+    replica: PropTypes.object,
+    replicaId: PropTypes.string
   }
 
   constructor(props) {
@@ -61,13 +62,13 @@ class MigrationDetail extends Component {
       confirmationDialog: {
         visible: true,
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           let item = this.state.migrations.filter(migration => migration.id == this.props.replicaId)[0]
           MigrationActions.deleteMigration(item)
           Location.push('/cloud-endpoints')
         },
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
       }
     })
@@ -145,29 +146,14 @@ class MigrationDetail extends Component {
                   <a>{item.id}</a>
                 </div>
               </div>
-              {/*<div className={s.formGroup}>
-               <div className={s.title}>
-               Flavours
-               </div>
-               <div className={s.value}>
-               {item.autoFlavors ? "Automatic flavour selection" : "Manual flavour selection"}
-               </div>
-               </div>*/}
-              {/*<div className={s.formGroup}>
-               <div className={s.title}>
-               Disk Format
-               </div>
-               <div className={s.value}>
-               {item.diskFormat}
-               </div>
-               </div>*/}
             </div>
           </div>
           <MigrationNetworks migration={item} />
           <div className={s.container + " " + s.buttons}>
             { item.type == "replica" && <button
               onClick={(e) => this.createMigrationFromReplica(e, item)}
-              disabled={disabled} className={disabled ? "disabled": ""} >
+              disabled={disabled} className={disabled ? "disabled" : ""}
+            >
               Migrate Replica
             </button>}
             <button className="wire" onClick={(e) => this.deleteMigration(e)}>Delete</button>
@@ -183,7 +169,6 @@ class MigrationDetail extends Component {
     }
     return output
   }
-
 }
 
 export default withStyles(MigrationDetail, s);

+ 14 - 16
src/components/ReplicaExecutions/ReplicaExecutions.js

@@ -14,7 +14,7 @@ GNU Affero General Public License for more details.
 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
-
+/* eslint-disable no-trailing-spaces */
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './ReplicaExecutions.scss';
@@ -24,7 +24,7 @@ import moment from 'moment';
 import MigrationActions from '../../actions/MigrationActions';
 import Tasks from '../Tasks';
 import ExecutionsTimeline from '../ExecutionsTimeline';
-import {tasksPollTimeout} from '../../config'
+import { tasksPollTimeout } from '../../config'
 import ConfirmationDialog from '../ConfirmationDialog'
 
 
@@ -66,10 +66,6 @@ class ReplicaExecutions extends Component {
     this.pollTasks()
   }
 
-  componentWillUnmount() {
-    clearInterval(this.timeout)
-  }
-
   componentWillReceiveProps(newProps) {
     if (newProps.replica && newProps.replica.executions.length) {
       let execution = newProps.replica.executions[newProps.replica.executions.length - 1]
@@ -85,24 +81,28 @@ class ReplicaExecutions extends Component {
     }
   }
 
-  executeNow() {
-    MigrationActions.executeReplica(this.props.replica)
+  componentWillUnmount() {
     clearInterval(this.timeout)
-    this.timeout = setInterval((e) => this.pollTasks(e), tasksPollTimeout)
   }
 
   cancelExecution() {
-    MigrationActions.cancelMigration(this.props.replica, (replica, response) => {
+    MigrationActions.cancelMigration(this.props.replica, () => {
       this.refreshExecution()
     })
   }
 
+  executeNow() {
+    MigrationActions.executeReplica(this.props.replica)
+    clearInterval(this.timeout)
+    this.timeout = setInterval((e) => this.pollTasks(e), tasksPollTimeout)
+  }
+
   deleteExecution() {
     this.setState({
       confirmationDialog: {
         visible: true,
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           let index = this.props.replica.executions.indexOf(this.state.executionRef)
 
           MigrationActions.deleteReplicaExecution(this.props.replica, this.state.executionRef.id, () => {
@@ -116,7 +116,7 @@ class ReplicaExecutions extends Component {
           })
         },
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
       }
     })
@@ -128,7 +128,7 @@ class ReplicaExecutions extends Component {
         let props = this.props
         props.migration.tasks = response.data.execution.tasks
         MigrationActions.getReplicaExecutions(replica)
-        let state = this.processProps({ migration: {tasks: response.data.execution.tasks } }, null)
+        let state = this.processProps({ migration: { tasks: response.data.execution.tasks } }, null)
         this.setState(state)
       })
   }
@@ -197,7 +197,7 @@ class ReplicaExecutions extends Component {
                   {executionBtn}
                 </div>
               </div>
-              <Tasks tasks={this.state.tasks}/>
+              <Tasks tasks={this.state.tasks} />
             </div>
             <ConfirmationDialog
               visible={this.state.confirmationDialog.visible}
@@ -227,9 +227,7 @@ class ReplicaExecutions extends Component {
         </div>
       )
     }
-
   }
-
 }
 
 export default withStyles(ReplicaExecutions, s);

+ 2 - 12
src/components/ReplicaList/ReplicaList.js

@@ -141,22 +141,12 @@ class ReplicaList extends Reflux.Component {
           <span className={s.label}>Tasks remaining</span>
           <span className={s.value}>{tasksRemaining}</span>
         </span>
-        {/*<span className={"cell " + s.composite}>
-         <span className={s.label}>Current instance</span>
-         <span className={s.value}>{this.currentInstance(item)}</span>
-         </span>*/}
       </div>
     )
   }
 
-  currentInstance(migration) {
-    let instance = "N/A"
-    /*migration.vms.forEach((item) => {
-      if (item.selected) {
-        instance = item.name
-      }
-    })*/
-    return instance
+  currentInstance() {
+    return "N/A"
   }
 
   refreshList() {

+ 2 - 8
src/components/ReplicaView/ReplicaView.js

@@ -101,11 +101,6 @@ class ReplicaView extends Reflux.Component {
     if (item) {
       title = "Edit Replica"
 
-      let disabled = item.executions.length && item.executions[item.executions.length - 1].status != "COMPLETED"
-      if (item.executions.length == 0) {
-        disabled = true
-      }
-
       let itemStatus = item.status
       if (item.executions.length) {
         itemStatus = item.executions[item.executions.length - 1].status
@@ -132,7 +127,8 @@ class ReplicaView extends Reflux.Component {
                   <button
                     className="gray"
                     disabled={item.status === "RUNNING"}
-                    onClick={(e) => this.executeReplica(e)}>
+                    onClick={(e) => this.executeReplica(e)}
+                  >
                     Execute Now
                   </button>
                 </div>
@@ -176,9 +172,7 @@ class ReplicaView extends Reflux.Component {
         </div>
       </div>)
     }
-
   }
-
 }
 
 export default withStyles(ReplicaView, s);

+ 1 - 1
src/components/ScheduleItem/ScheduleItem.js

@@ -35,7 +35,7 @@ class ScheduleItem extends Component {
     super(props)
     this.state = this.props.data
     this.state.date = moment()
-    this.types = ["Execute Now"] //, "One time", "Every Day", "Once a week", "Once a month"]
+    this.types = ["Execute Now"] // "One time", "Every Day", "Once a week", "Once a month"]
     this.dateTypes = ["One time"]
     this.tods = ["AM", "PM"]
     this.timezones = ["EET", "EST", "GMT"]

+ 1 - 1
src/components/Table/Table.js

@@ -42,7 +42,7 @@ class Table extends Component {
     }
   }
 
-  componentWillReceiveProps(newProps, oldProps) {
+  componentWillReceiveProps(newProps) {
     let openState = []
     for (let i in newProps.listItems) {
       openState.push(newProps.listItems[i].openState)

+ 4 - 4
src/components/Tasks/Tasks.js

@@ -60,7 +60,7 @@ class Tasks extends Component {
     this.componentWillReceiveProps(this.props)
   }
 
-  componentWillReceiveProps(newProps, oldProps) {
+  componentWillReceiveProps(newProps) {
     let listItems = []
     if (newProps.tasks) {
       newProps.tasks.forEach((item) => {
@@ -90,7 +90,7 @@ class Tasks extends Component {
                   <span>
                     {item.progress_updates[i] && item.progress_updates[i].message}
                     {hasProgress(item.progress_updates[i].message) &&
-                    <ProgressBar progress={hasProgress(item.progress_updates[i].message)}/>
+                    <ProgressBar progress={hasProgress(item.progress_updates[i].message)} />
                     }
                   </span>
                 </div>)
@@ -117,7 +117,7 @@ class Tasks extends Component {
             <div className={s.detailTitle}>Exception details</div>
             <div className={s.detailValue}>
               {item.exception_details && item.exception_details.length ?
-                (<TextTruncate line={10} text={item.exception_details} truncateText="..."/>) : "N/A"}
+                (<TextTruncate line={10} text={item.exception_details} truncateText="..." />) : "N/A"}
             </div>
           </div>
           <div className={s.group}>
@@ -135,7 +135,7 @@ class Tasks extends Component {
 
         let newItem = {
           task_type: (<span>
-            <span className={"taskIcon " + item.status}/>
+            <span className={"taskIcon " + item.status} />
             <TextTruncate line={1} truncateText="..." text={taskType} />
           </span>),
           instance: <TextTruncate line={1} text={item.instance} truncateText="..." />,

+ 4 - 1
src/components/UserDropdown/UserDropdown.js

@@ -75,7 +75,10 @@ class UserDropdown extends Dropdown {
   render() {
     let result = super.render.call(this)
     let children = Object.assign({}, result.props.children)
-    children = [<div className={s.userIcon + (this.props.dark ? " dark" : "")} onMouseDown={(e) => this.handleMouseDown(e)}></div>, children[1]]
+    children = [(<div
+      className={s.userIcon + (this.props.dark ? " dark" : "")}
+      onMouseDown={(e) => this.handleMouseDown(e)}
+    />), children[1]]
     let newResult = React.cloneElement(result, { children: children })
     return newResult
   }

+ 1 - 1
src/components/UserIcon/UserIcon.js

@@ -40,7 +40,7 @@ class UserIcon extends Reflux.Component {
   render() {
     return (
       <div className={s.root}>
-        <UserDropdown userData={this.state.currentUser} dark={this.props.dark}/>
+        <UserDropdown userData={this.state.currentUser} dark={this.props.dark} />
       </div>
     );
   }

+ 13 - 13
src/components/ValidateEndpoint/ValidateEndpoint.js

@@ -37,6 +37,10 @@ class ValidateEndpoint extends Component {
     }
   }
 
+  componentDidMount() {
+    this.validate()
+  }
+
   close() {
     this.props.closeHandle()
   }
@@ -55,35 +59,31 @@ class ValidateEndpoint extends Component {
     })
   }
 
-  componentDidMount() {
-    this.validate()
-  }
-
   render() {
-    let message, buttons
+    let buttons
     switch (this.state.status) {
       case -1:
-        buttons = <div className={s.dualBtn}>
+        buttons = (<div className={s.dualBtn}>
           <button className="gray" onClick={(e) => this.close(e)}>Cancel</button>
           <button onClick={(e) => this.validate(e)}>Retry</button>
-        </div>
+        </div>)
         break;
       case 1:
-        buttons = <div className={s.singleBtn}>
+        buttons = (<div className={s.singleBtn}>
           <button onClick={(e) => this.close(e)}>Dismiss</button>
-        </div>
+        </div>)
         break;
       default:
-        buttons = <div className={s.singleBtn}>
+        buttons = (<div className={s.singleBtn}>
           <button className="gray" onClick={(e) => this.close(e)}>Cancel</button>
-        </div>
+        </div>)
     }
-    return <div className={s.root}>
+    return (<div className={s.root}>
       <div className={s.container + (this.state.status != 0 ? s.hidden : "")}>
         { this.state.status == 0 ? <LoadingIcon /> : <div className={s.message}>{this.state.message}</div> }
       </div>
       {buttons}
-    </div>
+    </div>)
   }
 
 }

+ 5 - 2
src/components/WithSidebar/WithSidebar.js

@@ -59,7 +59,7 @@ class WithSidebar extends Component {
       (
         <li
           key={"menu_" + index} className={item.route == this.props.route ? s.active : ""}
-          onClick={(e) => this.goToMenu(item)}
+          onClick={() => this.goToMenu(item)}
         >
           {item.label}
         </li>
@@ -68,7 +68,10 @@ class WithSidebar extends Component {
     return (
       <div className={s.root}>
         <div className={s.sidebar}>
-          <div className={s.logo + " logo coriolis-white"} onClick={(e) => this.goToMenu({ route: "/migrations" })}></div>
+          <div
+            className={s.logo + " logo coriolis-white"}
+            onClick={() => this.goToMenu({ route: "/migrations" })}
+          ></div>
           <ul>
             {menuItems}
           </ul>

+ 0 - 24
src/components/WizardMigrationType/WizardMigrationType.js

@@ -17,15 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
-import Helper from '../Helper';
 import s from './WizardMigrationType.scss';
 
 
 const title = 'Migration Type';
 
 class WizardMigrationType extends Component {
-  canMigrate = false
-  canReplicate = false
 
   static contextTypes = {
     onSetTitle: PropTypes.func.isRequired,
@@ -39,29 +36,12 @@ class WizardMigrationType extends Component {
 
   constructor(props) {
     super(props)
-    /*
-    if (props.data.sourceCloud.cloudRef.replica.export && props.data.targetCloud.cloudRef.replica.import) {
-      this.canReplicate = true
-    }
-    if (props.data.sourceCloud.cloudRef.migration.export && props.data.targetCloud.cloudRef.migration.import) {
-      this.canMigrate = true
-    }*/
 
     this.state = {
       migrationType: this.props.migrationType,
       valid: true,
       nextStep: "WizardSource"
     }
-    /*
-    // set default to migration
-    if (props.migrationType == null) {
-      if (!this.canMigrate) {
-        this.state.migrationType = "replica"
-        this.state.migrationName = Helper.generateMigrationName("replica")
-      } else {
-        this.state.migrationType = "migration"
-      }
-    }*/
   }
 
 
@@ -121,10 +101,6 @@ class WizardMigrationType extends Component {
               environment (migration phase).</p>
           </div>
         </div>
-        {/*<div className={s.migrationName}>
-          <h3>Notes</h3>
-          <textarea value={this.state.notes} onChange={(e) => this.handleChangeMigrationNotes(e)}></textarea>
-        </div>*/}
       </div>
     );
   }

+ 4 - 5
src/components/WizardNetworks/WizardNetworks.js

@@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './WizardNetworks.scss';
 import Dropdown from '../NewDropdown';
-import {targetNetworkMock} from '../../config';
+import { targetNetworkMock } from '../../config';
 
 const title = 'Network mapping';
 
@@ -36,10 +36,9 @@ class WizardNetworks extends Component {
 
   constructor(props) {
     super(props)
-    console.log("PROPS", props)
     let networks = this.props.data.networks
     networks.forEach(network => {network.selected = false})
-    /*this.props.data.vms.forEach((vm) => {
+    /* this.props.data.vms.forEach((vm) => {
       if (vm.selected) {
         networks.forEach((network) => {
           if (vm.networks.indexOf(network.id) != -1) {
@@ -50,7 +49,7 @@ class WizardNetworks extends Component {
           }
         })
       }
-    })*/
+    }) */
 
     this.state = {
       networks: networks,
@@ -59,7 +58,7 @@ class WizardNetworks extends Component {
     }
 
     this.networkOptions = ["Create new"]
-    //this.props.data.targetNetworks.forEach((network) => {
+    // this.props.data.targetNetworks.forEach((network) => {
     targetNetworkMock.forEach((network) => {
       this.networkOptions.push(network)
     }, this)

+ 11 - 16
src/components/WizardOptions/WizardOptions.js

@@ -15,14 +15,13 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { Component, PropTypes } from 'react';
+import React, { PropTypes } from 'react';
 import Reflux from 'reflux';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './WizardOptions.scss';
 import Dropdown from '../NewDropdown';
 import WizardActions from '../../actions/WizardActions';
 import WizardStore from '../../stores/WizardStore';
-import InfoIcon from '../InfoIcon';
 
 
 const title = 'Migration Options';
@@ -40,10 +39,6 @@ class WizardOptions extends Reflux.Component {
     super(props)
     this.store = WizardStore
 
-    this.diskFormats = ["VHD", "VHD2"]
-    this.fipPools = ["public", "private_01", "private_02"]
-
-
     this.state = {
       autoFlavors: true,
       diskFormat: "VHD",
@@ -62,14 +57,14 @@ class WizardOptions extends Reflux.Component {
   }
 
   componentDidMount() {
-    let destination_environment = this.state.destination_environment
+    let destinationEnvironment = this.state.destination_environment
     this.state.targetCloud.cloudRef["import_" + this.state.migrationType].fields.forEach(field => {
-      if (typeof field.default !== "undefined" && typeof destination_environment[field.name] === "undefined") {
-        destination_environment[field.name] = field.default
+      if (typeof field.default !== "undefined" && typeof destinationEnvironment[field.name] === "undefined") {
+        destinationEnvironment[field.name] = field.default
       }
     }, this)
 
-    WizardActions.updateWizardState({ destination_environment: destination_environment })
+    WizardActions.updateWizardState({ destination_environment: destinationEnvironment })
   }
 
   handleChangeAutoFlavor() {
@@ -105,13 +100,13 @@ class WizardOptions extends Reflux.Component {
   }
 
   handleOptionsFieldChange(e, field) {
-    let destination_environment = this.state.destination_environment
+    let destinationEnvironment = this.state.destination_environment
     if (field.type == 'dropdown') {
-      destination_environment[field.name] = e
+      destinationEnvironment[field.name] = e
     } else {
-      destination_environment[field.name] = e.target.value
+      destinationEnvironment[field.name] = e.target.value
     }
-    WizardActions.updateWizardState({ destination_environment: destination_environment })
+    WizardActions.updateWizardState({ destination_environment: destinationEnvironment })
   }
 
   renderField(field) {
@@ -231,12 +226,12 @@ class WizardOptions extends Reflux.Component {
   }
 
   render() {
-    let toggleAdvancedBtn = <button
+    let toggleAdvancedBtn = (<button
       onClick={(e) => this.toggleAdvancedOptions(e)}
       className={s.toggleAdvancedBtn + " wire"}
     >
       {this.state.showAdvancedOptions ? "Hide" : "Show"} Advanced Options
-    </button>
+    </button>)
 
     return (
       <div className={s.root}>

+ 3 - 3
src/components/WizardSchedule/WizardSchedule.js

@@ -102,10 +102,10 @@ class WizardSchedule extends Component {
         />
       )
     )
-    let newScheduleBtn = null
+    /* let newScheduleBtn = null
     if (this.props.migrationType == 'replica') {
       newScheduleBtn = <button className={s.addScheduleBtn} onClick={(e) => this.addSchedule(e)}>Add schedule</button>
-    }
+    } */
 
 
     return (
@@ -114,7 +114,7 @@ class WizardSchedule extends Component {
           <div className="items-list">
             {schedules}
           </div>
-          {/*{newScheduleBtn}*/}
+          {/* {newScheduleBtn} */}
         </div>
       </div>
     );

+ 5 - 5
src/components/WizardSource/WizardSource.js

@@ -68,20 +68,19 @@ class WizardSource extends Reflux.Component {
     if (cloudData) {
       let newCloudsState = this.state.clouds
       let vms
-      let networks
       let selected = false
       newCloudsState.forEach((item) => {
         if (item.name == cloudData.name) {
           selected = cloudData.credentials
 
           vms = []
-          /*item.vms.forEach((vm) => {
+          /* item.vms.forEach((vm) => {
             vms.push(Object.assign({}, vm))
           }, this)*/
 
-          /*item.networks.forEach((network) => {
+          /* item.networks.forEach((network) => {
             networks.push(Object.assign({}, network))
-          }, this)*/
+          }, this) */
         }
       })
 
@@ -101,7 +100,8 @@ class WizardSource extends Reflux.Component {
   nextCallback(callback) {
     let connection = this.props.cloud.credential
     // TODO: change this, shitty callback, go through stores
-    if (this.props.cloud.credential && this.props.cloud.credential.id === this.props.cloud.credential.name) { // new connection, does not have an ID yet, search it
+    // new connection, does not have an ID yet, search it
+    if (this.props.cloud.credential && this.props.cloud.credential.id === this.props.cloud.credential.name) {
       connection = this.state.connections.filter(item => item.name === connection.name)[0]
     }
 

+ 18 - 21
src/components/WizardSummary/WizardSummary.js

@@ -21,7 +21,7 @@ import s from './WizardSummary.scss';
 import moment from 'moment';
 import TextTruncate from 'react-text-truncate';
 import InfoIcon from '../InfoIcon';
-import {defaultLabels} from '../../config';
+import { defaultLabels } from '../../config';
 
 
 const title = 'Summary';
@@ -54,19 +54,19 @@ class WizardSummary extends Component {
 
   renderOptionsFields() {
     let fields = []
-    for (var i in this.props.summary.destination_environment) {
+    for (let i in this.props.summary.destination_environment) {
       fields.push({
         label: defaultLabels[i] ? defaultLabels[i] : i,
         value: this.props.summary.destination_environment[i]
       })
     }
 
-    return fields.map(field => {
-      return <div className={s.row} key={"destination_environment_" + field.label}>
+    return fields.map(field => (
+      <div className={s.row} key={"destination_environment_" + field.label}>
         <span>{field.label}</span>
         <span>{field.value}</span>
       </div>
-    })
+    ))
   }
 
   render() {
@@ -81,22 +81,20 @@ class WizardSummary extends Component {
         </div>
       ), this)
 
-    let instances = this.props.summary.selectedInstances.map((vm, index) => {
-      return (
-        <div className="item" key={"VM_" + index}>
-          <span className="cell">
-            <TextTruncate line={1} text={vm.name} truncateText="..." />
-          </span>
-          <span className="cell">
-            {vm.num_cpu} vCPU | {vm.memory_mb} MB RAM
-          </span>
-          {/*            <span className="cell">
-           {vm.status}
-           </span>*/}
-        </div>
-      )
+    let instances = this.props.summary.selectedInstances.map((vm, index) => (
+      <div className="item" key={"VM_" + index}>
+        <span className="cell">
+          <TextTruncate line={1} text={vm.name} truncateText="..." />
+        </span>
+        <span className="cell">
+          {vm.num_cpu} vCPU | {vm.memory_mb} MB RAM
+        </span>
+        {/*            <span className="cell">
+         {vm.status}
+         </span>*/}
+      </div>
+    ))
 
-    })
     let networks = this.props.summary.networks.map((network, index) => {
       if (network.selected || true) {
         return (
@@ -130,7 +128,6 @@ class WizardSummary extends Component {
                 <InfoIcon text="Helptext" />
               </h3>
               <div className={s.values}>
-                {/*<div className={s.row}><span>Name:</span><span>{this.props.summary.migrationName}</span></div>*/}
                 <div className={s.row}>
                   <span>Source: <br /> </span>
                   <span>

+ 3 - 3
src/components/WizardTarget/WizardTarget.js

@@ -21,7 +21,7 @@ import s from './WizardTarget.scss';
 import CloudItem from '../CloudItem';
 import ConnectionsActions from '../../actions/ConnectionsActions';
 import ConnectionStore from '../../stores/ConnectionsStore';
-import {networkMock} from '../../config';
+import { networkMock } from '../../config';
 
 const title = 'Select your target cloud';
 
@@ -35,7 +35,8 @@ class WizardTarget extends Component {
     clouds: PropTypes.array,
     cloud: PropTypes.object,
     setWizardState: PropTypes.func,
-    exclude: PropTypes.string
+    exclude: PropTypes.string,
+    type: PropTypes.string
   }
 
   constructor(props) {
@@ -77,7 +78,6 @@ class WizardTarget extends Component {
       let selected = false
       newCloudsState.forEach((item) => {
         if (item.name == cloudData.name) {
-          //item.selected = cloudData.credentials
           selected = cloudData.credentials
 
           // load import endpoints if missing

+ 2 - 2
src/config.sample.js

@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* eslint-disable max-len */
+/* eslint-disable */
 /* jscs:disable maximumLineLength */
 
 export const port = process.env.PORT || 3000;
@@ -33,7 +33,7 @@ export const itemsPerPage = 6;
  selected - true
 */
 export const networkMock = [
-  {id: "net1", name: "VM Network", migrateNetwork: "management", selected: true},
+  { id: "net1", name: "VM Network", migrateNetwork: "management", selected: true} ,
 ]
 // Target networks to show in dropdown
 export const targetNetworkMock = ["internal-coriolis-2", "coriolis-twenty", "management"]

+ 0 - 2
src/data/types/UserType.js

@@ -6,5 +6,3 @@
  * This source code is licensed under the MIT license found in the
  * LICENSE.txt file in the root directory of this source tree.
  */
-
-

+ 1 - 1
src/server.js

@@ -72,7 +72,7 @@ server.get('/login/facebook/return',
   }
 );
 
-server.post('/federation', async (req, res, next) => {
+server.post('/federation', async (req, res) => {
   let token = req.body.token
   if (token) {
     res.redirect('/federate/' + token);

+ 6 - 8
src/stores/UserStore/UserStore.js

@@ -68,11 +68,11 @@ class UserStore extends Reflux.Store
     Api.setDefaultHeader('X-Auth-Token', token)
     cookie.save('unscopedToken', token, { path: "/", expires: moment().add(1, 'hour').toDate() })
 
-    UserActions.getScopedProjects(response => {
-      if (response.data.projects) {
+    UserActions.getScopedProjects(res => {
+      if (res.data.projects) {
         let projectId = cookie.load('projectId')
         if (!projectId) {
-          projectId = response.data.projects[0].id
+          projectId = res.data.projects[0].id
         }
         UserActions.loginScope(token, projectId)
       } else {
@@ -94,7 +94,7 @@ class UserStore extends Reflux.Store
     cookie.save('projectId', currentUser.project.id, { path: "/", expires: moment().add(1, 'months').toDate() })
     Api.setDefaultHeader('X-Auth-Token', currentUser.token)
 
-    this.setState({currentUser: currentUser})
+    this.setState({ currentUser: currentUser })
 
     ConnectionsActions.loadProviders()
     ConnectionsActions.loadConnections()
@@ -111,7 +111,7 @@ class UserStore extends Reflux.Store
     UserActions.loginScope(token, this.state.currentUser.projects[0].id, false)
   }
 
-  onLoginFailed(response) {
+  onLoginFailed() {
     this.setState({ loadingState: false })
   }
 
@@ -124,7 +124,6 @@ class UserStore extends Reflux.Store
     .then(() => {
       cookie.remove('token');
       window.location.href = "/"
-
     })
     .catch(() => {
       cookie.remove('token');
@@ -141,7 +140,7 @@ class UserStore extends Reflux.Store
     Location.push('/login');
   }
 
-  onLogoutSuccess(response) {
+  onLogoutSuccess() {
     cookie.remove('token');
     cookie.remove('projectId');
     Location.push('/login');
@@ -156,7 +155,6 @@ class UserStore extends Reflux.Store
   }
 
   onSwitchProject(projectId) {
-    console.log("onSwitchProject", projectId)
     if (projectId) {
       let token = cookie.load('unscopedToken')
       Api.setDefaultHeader('X-Auth-Token', null)

+ 3 - 3
src/stores/WizardStore/WizardStore.js

@@ -19,7 +19,7 @@
 import Reflux from 'reflux';
 import WizardActions from '../../actions/WizardActions';
 import ConnectionsActions from '../../actions/ConnectionsActions';
-import {servicesUrl, itemsPerPage, networkMock, targetNetworkMock} from '../../config';
+import { servicesUrl, itemsPerPage, networkMock, targetNetworkMock } from '../../config';
 import Api from '../../components/ApiCaller';
 
 class UsersStore extends Reflux.Store
@@ -86,8 +86,8 @@ class UsersStore extends Reflux.Store
       url: url,
       method: "GET"
     }).then(response => {
-        ConnectionsActions.loadInstances.completed(response, page)
-      }, ConnectionsActions.loadInstances.failed)
+      ConnectionsActions.loadInstances.completed(response, page)
+    }, ConnectionsActions.loadInstances.failed)
       .catch(ConnectionsActions.loadInstances.failed);
   }