George Vrancianu 8 ani în urmă
părinte
comite
97c7187c29
56 a modificat fișierele cu 336 adăugiri și 488 ștergeri
  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 Reflux from 'reflux';
 import Api from '../../components/ApiCaller';
 import Api from '../../components/ApiCaller';
 import NotificationActions from '../NotificationActions'
 import NotificationActions from '../NotificationActions'
-import {servicesUrl, securityGroups} from '../../config';
+import { servicesUrl, securityGroups } from '../../config';
 
 
 let MigrationActions = Reflux.createActions({
 let MigrationActions = Reflux.createActions({
   loadMigrations: { children: ['completed', 'failed'], shouldEmit: () => {} },
   loadMigrations: { children: ['completed', 'failed'], shouldEmit: () => {} },
@@ -81,9 +81,9 @@ MigrationActions.loadMigration.listen((migration) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
 
 
   Api.sendAjaxRequest({
   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)
     .then(MigrationActions.loadMigration.completed, MigrationActions.loadMigration.failed)
     .catch(MigrationActions.loadMigration.failed);
     .catch(MigrationActions.loadMigration.failed);
 })
 })
@@ -159,27 +159,25 @@ MigrationActions.cancelMigration.listen((migration, callback = null) => {
   }
   }
 
 
   Api.sendAjaxRequest({
   Api.sendAjaxRequest({
-      url: url,
-      method: "POST",
-      data: payload
-    })
+    url: url,
+    method: "POST",
+    data: payload
+  })
     .then((response) => {
     .then((response) => {
       if (callback) {
       if (callback) {
         callback(migration, response)
         callback(migration, response)
       }
       }
-        MigrationActions.cancelMigration.completed(migration, response)
-      }, MigrationActions.cancelMigration.failed
-    )
+      MigrationActions.cancelMigration.completed(migration, response)
+    }, MigrationActions.cancelMigration.failed)
     .catch(MigrationActions.cancelMigration.failed);
     .catch(MigrationActions.cancelMigration.failed);
-
 })
 })
 
 
 MigrationActions.getReplicaExecutions.listen((replica, callback) => {
 MigrationActions.getReplicaExecutions.listen((replica, callback) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   Api.sendAjaxRequest({
   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) => {
     .then((response) => {
       MigrationActions.getReplicaExecutions.completed(replica, response)
       MigrationActions.getReplicaExecutions.completed(replica, response)
       if (callback) callback()
       if (callback) callback()
@@ -191,9 +189,9 @@ MigrationActions.getReplicaExecutions.listen((replica, callback) => {
 MigrationActions.getReplicaExecutionDetail.listen((replica, executionId, callback = null) => {
 MigrationActions.getReplicaExecutionDetail.listen((replica, executionId, callback = null) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   Api.sendAjaxRequest({
   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) => {
     .then((response) => {
       MigrationActions.getReplicaExecutionDetail.completed(replica, executionId, response)
       MigrationActions.getReplicaExecutionDetail.completed(replica, executionId, response)
       if (callback) {
       if (callback) {
@@ -228,14 +226,14 @@ MigrationActions.addMigration.listen((migration) => {
     }
     }
   })
   })
 
 
-  let network_map = {}
+  let networkMap = {}
   migration.networks.forEach(network => {
   migration.networks.forEach(network => {
-    network_map[network.name] = network.migrateNetwork
+    networkMap[network.name] = network.migrateNetwork
   })
   })
 
 
   let destinationEnv = {}
   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
     if (migration.destination_environment[i].label) { // removing label from dropdown if present
       destinationEnv[i] = migration.destination_environment[i].value
       destinationEnv[i] = migration.destination_environment[i].value
     } else {
     } 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] = {
   payload[migration.migrationType] = {
     origin_endpoint_id: migration.sourceCloud.credential.id,
     origin_endpoint_id: migration.sourceCloud.credential.id,
@@ -263,7 +261,6 @@ MigrationActions.addMigration.listen((migration) => {
   })
   })
     .then(MigrationActions.addMigration.completed, MigrationActions.addMigration.failed)
     .then(MigrationActions.addMigration.completed, MigrationActions.addMigration.failed)
     .catch(MigrationActions.addMigration.failed);
     .catch(MigrationActions.addMigration.failed);
-
 })
 })
 
 
 MigrationActions.createMigrationFromReplica.listen((replica) => {
 MigrationActions.createMigrationFromReplica.listen((replica) => {
@@ -278,13 +275,12 @@ MigrationActions.createMigrationFromReplica.listen((replica) => {
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
   let projectId = Reflux.GlobalState.userStore.currentUser.project.id
 
 
   Api.sendAjaxRequest({
   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)
     .then(MigrationActions.createMigrationFromReplica.completed, MigrationActions.createMigrationFromReplica.failed)
     .catch(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';
 import Reflux from 'reflux';
 
 
 let NotificationActions = Reflux.createActions({
 let NotificationActions = Reflux.createActions({
-  'removeNotification': {},
-  'keepNotification': {},
-  'markAsRead': {},
-  'notify': {}
+  removeNotification: {},
+  keepNotification: {},
+  markAsRead: {},
+  notify: {}
 })
 })
 
 
 export default NotificationActions;
 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 Reflux from 'reflux';
 import Api from '../../components/ApiCaller';
 import Api from '../../components/ApiCaller';
-import {servicesUrl, defaultDomain} from '../../config';
+import { servicesUrl, defaultDomain } from '../../config';
 import Location from '../../core/Location';
 import Location from '../../core/Location';
 
 
 let UserAction = Reflux.createActions({
 let UserAction = Reflux.createActions({
@@ -65,7 +65,6 @@ UserAction.login.listen(userData => {
       UserAction.login.success(response)
       UserAction.login.success(response)
       Location.push('/replicas')
       Location.push('/replicas')
     }, UserAction.login.failed)
     }, UserAction.login.failed)
-
 })
 })
 
 
 UserAction.loginScope.listen((token, projectId, fallback = true) => {
 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/>.
 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 Reflux from 'reflux';
 import emptyFunction from 'fbjs/lib/emptyFunction';
 import emptyFunction from 'fbjs/lib/emptyFunction';
 import s from './App.scss';
 import s from './App.scss';
@@ -90,13 +90,13 @@ class App extends Reflux.Component {
   }
   }
 
 
   componentWillUnmount() {
   componentWillUnmount() {
-    this.removeCss();
+    this.removeCss()
   }
   }
 
 
   render() {
   render() {
     return !this.props.error ? (
     return !this.props.error ? (
       <div className={s.root}>
       <div className={s.root}>
-        <Notifications notifications={this.state.notifications}/>
+        <Notifications notifications={this.state.notifications} />
         {this.props.children}
         {this.props.children}
       </div>
       </div>
     ) : (<div className={s.root}>
     ) : (<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 React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './CloudConnectionAuth.scss';
 import s from './CloudConnectionAuth.scss';
-import ConnectionsStore from '../../stores/ConnectionsStore';
-import {defaultLabels} from '../../config'
+import { defaultLabels } from '../../config'
 import LoadingIcon from "../LoadingIcon/LoadingIcon";
 import LoadingIcon from "../LoadingIcon/LoadingIcon";
 
 
 
 
@@ -41,10 +40,14 @@ class CloudConnectionAuth extends Component {
     this.state = { fields: fields }
     this.state = { fields: fields }
   }
   }
 
 
+  componentWillMount() {
+    this.context.onSetTitle(title);
+  }
+
   processProps(props) {
   processProps(props) {
     let fields = []
     let fields = []
     if (props.connection.credentials) {
     if (props.connection.credentials) {
-      for (var fieldName in props.connection.credentials) {
+      for (let fieldName in props.connection.credentials) {
         let value = props.connection.credentials[fieldName]
         let value = props.connection.credentials[fieldName]
         if (value.value) { // if dropdown
         if (value.value) { // if dropdown
           value = value.value
           value = value.value
@@ -61,14 +64,6 @@ class CloudConnectionAuth extends Component {
     return fields
     return fields
   }
   }
 
 
-  componentWillReceiveProps(newProps, oldProps) {
-
-  }
-
-  componentWillMount() {
-    this.context.onSetTitle(title);
-  }
-
   renderFields() {
   renderFields() {
     if (this.state.fields.length) {
     if (this.state.fields.length) {
       return this.state.fields.map((field, index) => (
       return this.state.fields.map((field, index) => (
@@ -83,7 +78,7 @@ class CloudConnectionAuth extends Component {
         )
         )
       )
       )
     } else {
     } else {
-      return <LoadingIcon/>
+      return <LoadingIcon />
     }
     }
   }
   }
 
 

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

@@ -29,10 +29,11 @@ import ValidateEndpoint from '../ValidateEndpoint';
 
 
 
 
 class CloudConnectionsView extends Component {
 class CloudConnectionsView extends Component {
-  title = ""
 
 
   static propTypes = {
   static propTypes = {
     connection: PropTypes.object,
     connection: PropTypes.object,
+    connections: PropTypes.array,
+    children: PropTypes.array,
     connectionId: PropTypes.string
     connectionId: PropTypes.string
   }
   }
 
 
@@ -69,7 +70,7 @@ class CloudConnectionsView extends Component {
 
 
   componentWillReceiveProps(newProps) {
   componentWillReceiveProps(newProps) {
     if (newProps.connections) {
     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 })
       this.setState({ connection: connection })
     }
     }
@@ -86,6 +87,8 @@ class CloudConnectionsView extends Component {
     }
     }
   }
   }
 
 
+  title = ""
+
   showEditConnectionModal() {
   showEditConnectionModal() {
     this.setState({ showModal: true })
     this.setState({ showModal: true })
   }
   }
@@ -95,12 +98,12 @@ class CloudConnectionsView extends Component {
       confirmationDialog: {
       confirmationDialog: {
         visible: true,
         visible: true,
         onConfirm: () => {
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           ConnectionsActions.deleteConnection(this.state.connection)
           ConnectionsActions.deleteConnection(this.state.connection)
           Location.push('/cloud-endpoints')
           Location.push('/cloud-endpoints')
         },
         },
         onCancel: () => {
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
         }
       }
       }
     })
     })
@@ -116,7 +119,7 @@ class CloudConnectionsView extends Component {
 
 
   closeModal() {
   closeModal() {
     this.setState({ showModal: false })
     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 })
     this.setState({ connection: connection })
   }
   }
@@ -167,7 +170,7 @@ class CloudConnectionsView extends Component {
     if (item) {
     if (item) {
       return (
       return (
         <div className={s.root}>
         <div className={s.root}>
-          <Header title={title} linkUrl="/cloud-endpoints"/>
+          <Header title={title} linkUrl="/cloud-endpoints" />
           <div className={s.connectionHead + " detailViewHead"}>
           <div className={s.connectionHead + " detailViewHead"}>
             <div className={s.container}>
             <div className={s.container}>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
@@ -241,9 +244,7 @@ class CloudConnectionsView extends Component {
           </div>
           </div>
         </div>)
         </div>)
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default withStyles(CloudConnectionsView, s);
 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 React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './CloudItem.scss';
 import s from './CloudItem.scss';
-import sApp from '../App/App.scss';
 import Dropdown from '../NewDropdown';
 import Dropdown from '../NewDropdown';
 import AddCloudConnection from '../AddCloudConnection';
 import AddCloudConnection from '../AddCloudConnection';
 import Modal from 'react-modal';
 import Modal from 'react-modal';
@@ -27,8 +26,10 @@ class CloudItem extends Component {
   static propTypes = {
   static propTypes = {
     cloud: PropTypes.object,
     cloud: PropTypes.object,
     addCredentialsCallback: PropTypes.func,
     addCredentialsCallback: PropTypes.func,
+    credentialSelected: PropTypes.array,
     callback: PropTypes.func,
     callback: PropTypes.func,
-    exclude: PropTypes.string
+    exclude: PropTypes.string,
+    selected: PropTypes.bool
   }
   }
 
 
   constructor(props) {
   constructor(props) {
@@ -67,7 +68,7 @@ class CloudItem extends Component {
   componentWillReceiveProps(nextProps) {
   componentWillReceiveProps(nextProps) {
     this.updateCredentialOptions(nextProps)
     this.updateCredentialOptions(nextProps)
     if (nextProps.selected === false && this.props.selected === true) {
     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) {
     if (props.cloud.credentials) {
       props.cloud.credentials.forEach((credential) => {
       props.cloud.credentials.forEach((credential) => {
         if (credential.id != this.props.exclude) {
         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 ..." })
       credentialsOptions.push({ value: "new", label: "Add New ..." })

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

@@ -34,10 +34,6 @@ class ConfirmationDialog extends Component {
     place: "right"
     place: "right"
   }
   }
 
 
-  constructor(props) {
-    super(props)
-  }
-
   onCancel() {
   onCancel() {
     if (this.props.onCancel) {
     if (this.props.onCancel) {
       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) {
     if (this.props.user) {
       projectOptions = this.props.user.projects.map(project => ({ label: project.name, id: project.id }))
       projectOptions = this.props.user.projects.map(project => ({ label: project.name, id: project.id }))
     }
     }
-    console.log(projectOptions)
+
     return (
     return (
       <div className={s.root}>
       <div className={s.root}>
         <div className={s.header}>
         <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/>.
 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 Location from '../../core/Location';
 import Reflux from 'reflux';
 import Reflux from 'reflux';
 import ConnectionStore from '../../stores/ConnectionsStore';
 import ConnectionStore from '../../stores/ConnectionsStore';
@@ -94,17 +94,15 @@ class EndpointLink extends Reflux.Component {
   render() {
   render() {
     const { to, ...props } = this.props; // eslint-disable-line no-use-before-define
     const { to, ...props } = this.props; // eslint-disable-line no-use-before-define
     if (this.state && this.state.connection) {
     if (this.state && this.state.connection) {
-      return <a
+      return (<a
         href={Location.createHref(`/cloud-endpoints/${this.state.connection.id}`)}
         href={Location.createHref(`/cloud-endpoints/${this.state.connection.id}`)}
         {...props}
         {...props}
         onClick={this.handleClick}
         onClick={this.handleClick}
-      >{this.state.connection.name}</a>;
+      >{this.state.connection.name}</a>)
     } else {
     } else {
       return null
       return null
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default EndpointLink;
 export default EndpointLink;

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

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

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

@@ -77,9 +77,7 @@ class ExecutionsTimeline extends Component {
       props = newProps
       props = newProps
     }
     }
     let executions = props.executions
     let executions = props.executions
-    executions.sort((a, b) => {
-      return a.number - b.number;
-    })
+    executions.sort((a, b) => a.number - b.number)
     return executions
     return executions
   }
   }
 
 
@@ -96,7 +94,7 @@ class ExecutionsTimeline extends Component {
         number = i
         number = i
       }
       }
     }
     }
-    return parseInt(number)
+    return parseInt(number, 10)
   }
   }
 
 
   render() {
   render() {
@@ -109,17 +107,17 @@ class ExecutionsTimeline extends Component {
       let offset = (numberOfExecutions - 1) / 2
       let offset = (numberOfExecutions - 1) / 2
       let style
       let style
       if (index < (number - offset)) { // if before
       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
       } else if (index > (number + offset)) { // if after
-        style = { left: "100%", transform: "scale(0)"}
+        style = { left: "100%", transform: "scale(0)" }
       } else { // in between
       } else { // in between
-        style = { left: (dotDistance * (index - number + offset + 1)) + "%", transform: "scale(1)"}
+        style = { left: (dotDistance * (index - number + offset + 1)) + "%", transform: "scale(1)" }
       }
       }
       return (
       return (
         <div
         <div
           className={s.executionDot + (index == number ? (" " + s.current) : "")}
           className={s.executionDot + (index == number ? (" " + s.current) : "")}
           style={style}
           style={style}
-          onClick={(e) => this.props.handleChangeExecution(execution)}
+          onClick={() => this.props.handleChangeExecution(execution)}
           key={"execution_" + index}
           key={"execution_" + index}
         >
         >
           <div className={"taskIcon " + execution.status}></div>
           <div className={"taskIcon " + execution.status}></div>
@@ -130,9 +128,9 @@ class ExecutionsTimeline extends Component {
     return (
     return (
       <div className={s.root}>
       <div className={s.root}>
         <div className={s.line}>
         <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>
           <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>
         </div>
         {executions}
         {executions}
       </div>
       </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/>.
 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 Location from '../../core/Location';
 import Reflux from 'reflux';
 import Reflux from 'reflux';
 import UserActions from '../../actions/UserActions';
 import UserActions from '../../actions/UserActions';
-import ConnectionStore from '../../stores/ConnectionsStore';
 
 
 
 
 class Federate extends Reflux.Component {
 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) {
     if (newProps.items) {
       this.setState({ filteredData: newProps.items }, () => {
       this.setState({ filteredData: newProps.items }, () => {
         this.searchItem()
         this.searchItem()

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

@@ -81,11 +81,11 @@ class Header extends Component {
             <div className="logo coriolis-white-topbar"></div>
             <div className="logo coriolis-white-topbar"></div>
           </Link>
           </Link>
           <div className={s.banner}>
           <div className={s.banner}>
-            {/*<h1 className={s.bannerTitle}>{this.props.title}</h1>*/}
+            {/* <h1 className={s.bannerTitle}>{this.props.title}</h1> */}
           </div>
           </div>
           <div className={s.userIcon}>
           <div className={s.userIcon}>
-            <UserIcon dark={true} />
-            <NotificationIcon dark={true} />
+            <UserIcon dark />
+            <NotificationIcon dark />
           </div>
           </div>
         </div>
         </div>
         <div
         <div
@@ -93,10 +93,10 @@ class Header extends Component {
           style={{ height: this.state.height }}
           style={{ height: this.state.height }}
         >
         >
           <ul>
           <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>
           </ul>
         </div>
         </div>
       </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
 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/>.
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 */
+/* eslint-disable max-len */
 
 
 import React, { Component, PropTypes } from 'react';
 import React, { Component, PropTypes } from 'react';
 import s from './LoadingIcon.scss';
 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="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="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>
                 <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>
         </g>
     </g>
     </g>
@@ -74,7 +74,7 @@ class LoadingIcon extends Component {
       <div
       <div
         className={!this.props.animate && "noAnimation"}
         className={!this.props.animate && "noAnimation"}
         style={loaderStyle}
         style={loaderStyle}
-        dangerouslySetInnerHTML={{__html: svgIcon}}
+        dangerouslySetInnerHTML={{ __html: svgIcon }}
       >
       >
       </div>
       </div>
       {this.props.text && (<div className={s.text}>{this.props.text}</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/>.
 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 withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './LoginPage.scss';
 import s from './LoginPage.scss';
 import Reflux from 'reflux';
 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.container + " " + (loginButtons.length <= 2 ? s.oneColumn : "")}>
           <div className={s.logo}>
           <div className={s.logo}>
             <div className={s.large}>
             <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 className={s.coriolisText} dangerouslySetInnerHTML={{ __html: coriolisTextSvg }}></div>
             </div>
             </div>
             <div className={s.small}>
             <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
  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/>.
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
  */
+/* eslint-disable react/sort-comp */
 
 
 import React, { Component, PropTypes } from 'react';
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import Dropdown from '../NewDropdown';
 import Dropdown from '../NewDropdown';
 import SearchBox from '../SearchBox';
 import SearchBox from '../SearchBox';
-import Moment from 'react-moment';
 import s from './MainList.scss';
 import s from './MainList.scss';
 import FilteredTable from '../FilteredTable';
 import FilteredTable from '../FilteredTable';
-import TextTruncate from 'react-text-truncate';
 import ConfirmationDialog from '../ConfirmationDialog'
 import ConfirmationDialog from '../ConfirmationDialog'
 
 
 
 
@@ -87,6 +86,51 @@ class MainList extends Component {
     this.setState({ items: newProps.items, filters: stateFilters })
     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() {
   selectedCount() {
     let count = 0
     let count = 0
     if (this.state.items) {
     if (this.state.items) {
@@ -137,60 +181,6 @@ class MainList extends Component {
     this.setState({ items: items, selectedAll: !selectedAll })
     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) {
   onActionChange(option) {
     let items = this.state.items.filter(item => item.selected)
     let items = this.state.items.filter(item => item.selected)
     if (this.props.actions[option.value].confirm) {
     if (this.props.actions[option.value].confirm) {
@@ -198,7 +188,7 @@ class MainList extends Component {
         confirmationDialog: {
         confirmationDialog: {
           visible: true,
           visible: true,
           onConfirm: () => {
           onConfirm: () => {
-            this.setState({ confirmationDialog: { visible: false }})
+            this.setState({ confirmationDialog: { visible: false } })
             if (this.props.actions[option.value].action) {
             if (this.props.actions[option.value].action) {
               items.forEach((item) => {
               items.forEach((item) => {
                 this.props.actions[option.value].action(item)
                 this.props.actions[option.value].action(item)
@@ -206,7 +196,7 @@ class MainList extends Component {
             }
             }
           },
           },
           onCancel: () => {
           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() {
   refreshList() {
     this.props.refresh()
     this.props.refresh()
   }
   }
@@ -244,7 +241,7 @@ class MainList extends Component {
                   id={"vm_check_all"}
                   id={"vm_check_all"}
                   type="checkbox"
                   type="checkbox"
                   checked={this.state.selectedAll[this.state.filterType]}
                   checked={this.state.selectedAll[this.state.filterType]}
-                  onChange={(e) => this.checkAll()}
+                  onChange={() => this.checkAll()}
                   className="checkbox-normal"
                   className="checkbox-normal"
                 />
                 />
                 <label htmlFor={"vm_check_all"}></label>
                 <label htmlFor={"vm_check_all"}></label>
@@ -287,7 +284,7 @@ class MainList extends Component {
               queryText={this.state.queryText}
               queryText={this.state.queryText}
               renderSearch={(e) => this.renderSearch(e)}
               renderSearch={(e) => this.renderSearch(e)}
               customClassName={s.mainTable}
               customClassName={s.mainTable}
-            ></FilteredTable>
+            />
           </div>
           </div>
         </div>
         </div>
         <ConfirmationDialog
         <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 withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './MigrationDetail.scss';
 import s from './MigrationDetail.scss';
 import Moment from 'react-moment';
 import Moment from 'react-moment';
-import LoadingIcon from "../LoadingIcon";
 import EndpointLink from '../EndpointLink';
 import EndpointLink from '../EndpointLink';
 import ConfirmationDialog from '../ConfirmationDialog'
 import ConfirmationDialog from '../ConfirmationDialog'
 import MigrationActions from '../../actions/MigrationActions';
 import MigrationActions from '../../actions/MigrationActions';
@@ -33,7 +32,8 @@ class MigrationDetail extends Component {
   };
   };
 
 
   static propTypes = {
   static propTypes = {
-    migration: PropTypes.object
+    migration: PropTypes.object,
+    migrationId: PropTypes.string
   }
   }
 
 
   constructor(props) {
   constructor(props) {
@@ -61,13 +61,13 @@ class MigrationDetail extends Component {
       confirmationDialog: {
       confirmationDialog: {
         visible: true,
         visible: true,
         onConfirm: () => {
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           let item = this.state.migrations.filter(migration => migration.id == this.props.migrationId)[0]
           let item = this.state.migrations.filter(migration => migration.id == this.props.migrationId)[0]
           MigrationActions.deleteMigration(item)
           MigrationActions.deleteMigration(item)
           Location.push('/cloud-endpoints')
           Location.push('/cloud-endpoints')
         },
         },
         onCancel: () => {
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
         }
       }
       }
     })
     })
@@ -143,29 +143,14 @@ class MigrationDetail extends Component {
                   <a>{item.id}</a>
                   <a>{item.id}</a>
                 </div>
                 </div>
               </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>
           </div>
           </div>
           <MigrationNetworks migration={item} />
           <MigrationNetworks migration={item} />
           <div className={s.container + " " + s.buttons}>
           <div className={s.container + " " + s.buttons}>
             { item.type == "replica" && <button
             { item.type == "replica" && <button
               onClick={(e) => this.createMigrationFromReplica(e, item)}
               onClick={(e) => this.createMigrationFromReplica(e, item)}
-              disabled={disabled} className={disabled ? "disabled": ""} >
+              disabled={disabled} className={disabled ? "disabled" : ""}
+            >
               Migrate Replica
               Migrate Replica
             </button>}
             </button>}
             <button className="wire" onClick={(e) => this.deleteMigration(e)}>Delete</button>
             <button className="wire" onClick={(e) => this.deleteMigration(e)}>Delete</button>
@@ -181,7 +166,6 @@ class MigrationDetail extends Component {
     }
     }
     return output
     return output
   }
   }
-
 }
 }
 
 
 export default withStyles(MigrationDetail, s);
 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} />
             <Moment format="MMM Do YYYY HH:mm" date={createdAt} />
           </span>
           </span>
         </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>
          <span className={s.label}>Notes</span>
          <TextTruncate line={2} truncateText="..." text={item.notes} />
          <TextTruncate line={2} truncateText="..." text={item.notes} />
-         </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}>Tasks remaining</span>
           <span className={s.label}>Tasks remaining</span>
           <span className={s.value}>{tasksRemaining}</span>
           <span className={s.value}>{tasksRemaining}</span>
         </span>
         </span>
-        {/*<span className={"cell " + s.composite}>
+        {/* <span className={"cell " + s.composite}>
          <span className={s.label}>Current instance</span>
          <span className={s.label}>Current instance</span>
          <span className={s.value}>{this.currentInstance(item)}</span>
          <span className={s.value}>{this.currentInstance(item)}</span>
-         </span>*/}
+         </span> */}
       </div>
       </div>
     )
     )
   }
   }
 
 
-  currentInstance(migration) {
+  currentInstance() {
     let instance = "N/A"
     let instance = "N/A"
     /* migration.vms.forEach((item) => {
     /* migration.vms.forEach((item) => {
       if (item.selected) {
       if (item.selected) {

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

@@ -44,33 +44,6 @@ class MigrationNetworks extends Component {
     this.processProps(props)
     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() {
   componentWillMount() {
     this.context.onSetTitle(title);
     this.context.onSetTitle(title);
   }
   }
@@ -85,6 +58,32 @@ class MigrationNetworks extends Component {
     return vms
     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() {
   render() {
     if (this.listItems.length) {
     if (this.listItems.length) {
       return (
       return (
@@ -97,9 +96,7 @@ class MigrationNetworks extends Component {
     } else {
     } else {
       return (<div className="no-results">No networks mapped</div>)
       return (<div className="no-results">No networks mapped</div>)
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default withStyles(MigrationNetworks, s);
 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 React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import moment from 'moment';
 import moment from 'moment';
-import Table from '../Table';
 import s from './MigrationTasks.scss';
 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 MigrationActions from '../../actions/MigrationActions';
-import {tasksPollTimeout} from '../../config'
+import { tasksPollTimeout } from '../../config'
 import Tasks from '../Tasks';
 import Tasks from '../Tasks';
 
 
 const title = 'Migration Tasks';
 const title = 'Migration Tasks';
 
 
 class MigrationTasks extends Component {
 class MigrationTasks extends Component {
 
 
-  timeout = null
-
   static propTypes = {
   static propTypes = {
     migration: PropTypes.object
     migration: PropTypes.object
   }
   }
@@ -59,17 +53,11 @@ class MigrationTasks extends Component {
     this.context.onSetTitle(title);
     this.context.onSetTitle(title);
     this.pollTasks()
     this.pollTasks()
   }
   }
-
-  componentWillUnmount() {
-    clearInterval(this.timeout)
-  }
-
   componentWillReceiveProps(props) {
   componentWillReceiveProps(props) {
     if (props.migration && props.migration.tasks) {
     if (props.migration && props.migration.tasks) {
       let loadMigration = false
       let loadMigration = false
       props.migration.tasks.forEach((item) => {
       props.migration.tasks.forEach((item) => {
         if (item.progress_updates.length) {
         if (item.progress_updates.length) {
-          let first = true
           if (item.progress_updates[0] != null) {
           if (item.progress_updates[0] != null) {
             item.progress_updates.sort((a, b) => moment(a.created_at).isAfter(moment(b.created_at)))
             item.progress_updates.sort((a, b) => moment(a.created_at).isAfter(moment(b.created_at)))
           } else {
           } else {
@@ -83,6 +71,11 @@ class MigrationTasks extends Component {
     }
     }
   }
   }
 
 
+  componentWillUnmount() {
+    clearInterval(this.timeout)
+  }
+
+  timeout = null
 
 
   pollTasks() {
   pollTasks() {
     if (this.props && this.props.migration &&
     if (this.props && this.props.migration &&
@@ -96,7 +89,7 @@ class MigrationTasks extends Component {
       <div className={s.root}>
       <div className={s.root}>
         { this.props.migration &&
         { this.props.migration &&
           <div className={s.container}>
           <div className={s.container}>
-            <Tasks tasks={this.props.migration.tasks}/>
+            <Tasks tasks={this.props.migration.tasks} />
           </div>
           </div>
         }
         }
       </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 s from './MigrationView.scss';
 import Header from '../Header';
 import Header from '../Header';
 import Link from '../Link';
 import Link from '../Link';
-import Dropdown from '../NewDropdown';
 import MigrationStore from '../../stores/MigrationStore';
 import MigrationStore from '../../stores/MigrationStore';
 import MigrationActions from '../../actions/MigrationActions';
 import MigrationActions from '../../actions/MigrationActions';
 import LoadingIcon from '../LoadingIcon';
 import LoadingIcon from '../LoadingIcon';
@@ -76,12 +75,12 @@ class MigrationView extends Reflux.Component {
       confirmationDialog: {
       confirmationDialog: {
         visible: true,
         visible: true,
         onConfirm: () => {
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           MigrationActions.deleteMigration(item)
           MigrationActions.deleteMigration(item)
           Location.push('/migrations')
           Location.push('/migrations')
         },
         },
         onCancel: () => {
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
         }
       }
       }
     })
     })
@@ -118,14 +117,13 @@ class MigrationView extends Reflux.Component {
 
 
       return (
       return (
         <div className={s.root}>
         <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.migrationHead}>
             <div className={s.container}>
             <div className={s.container}>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
               <div className={s.migrationTypeImg + ' icon ' + item.type + "-large"}></div>
               <div className={s.migrationTypeImg + ' icon ' + item.type + "-large"}></div>
               <div className={s.migrationInfo}>
               <div className={s.migrationInfo}>
                 <h2>
                 <h2>
-                  {/*{item.name ? item.name : "N/A"}*/}
                   <TextTruncate line={1} truncateText="..." text={item.name} />
                   <TextTruncate line={1} truncateText="..." text={item.name} />
                 </h2>
                 </h2>
                 <div className={s.migrationStats}>
                 <div className={s.migrationStats}>
@@ -175,9 +173,7 @@ class MigrationView extends Reflux.Component {
         </div>
         </div>
       </div>)
       </div>)
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default withStyles(MigrationView, s);
 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 withStyles from 'isomorphic-style-loader/lib/withStyles';
 import WizardSource from '../WizardSource';
 import WizardSource from '../WizardSource';
 import WizardTarget from '../WizardTarget';
 import WizardTarget from '../WizardTarget';
-import Helper from '../Helper';
-import {migrationSteps} from '../../config';
+import { migrationSteps } from '../../config';
 import WizardVms from '../WizardVms';
 import WizardVms from '../WizardVms';
 import WizardNetworks from '../WizardNetworks';
 import WizardNetworks from '../WizardNetworks';
 import WizardOptions from '../WizardOptions';
 import WizardOptions from '../WizardOptions';
@@ -57,7 +56,6 @@ class MigrationWizard extends Reflux.Component {
     super(props)
     super(props)
     this.stores = [MigrationStore, ConnectionStore, WizardStore]
     this.stores = [MigrationStore, ConnectionStore, WizardStore]
     WizardActions.newState()
     WizardActions.newState()
-
   }
   }
 
 
   componentWillMount() {
   componentWillMount() {
@@ -182,7 +180,7 @@ class MigrationWizard extends Reflux.Component {
         />)
         />)
         break
         break
       case "WizardOptions":
       case "WizardOptions":
-        step = <WizardOptions setWizardState={(e) => this.setWizardState(e)} data={this.state}/>
+        step = <WizardOptions setWizardState={(e) => this.setWizardState(e)} data={this.state} />
         break
         break
       case "WizardSchedule":
       case "WizardSchedule":
         step = (<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)
     let newChildProps = Object.assign({}, children[0].props)
     newChildProps.onFocus = () => {
     newChildProps.onFocus = () => {
       this.setState({
       this.setState({
-        isOpen: true,
-        //hovered: this.state.selected.value == '' ? null : this.state.selected
+        isOpen: true
       })
       })
     }
     }
     newChildProps.onBlur = () => {this.setState({ isOpen: false })}
     newChildProps.onBlur = () => {this.setState({ isOpen: false })}
-    newChildProps.onKeyPress = (e) => {
-      console.log(e) // eslint-disable-line no-console
-    }
+    // newChildProps.onKeyPress = () => {}
     newChildProps.tabIndex = 0
     newChildProps.tabIndex = 0
 
 
     children[0] = React.cloneElement(children[0], newChildProps)
     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 withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './NotificationDropdown.scss';
 import s from './NotificationDropdown.scss';
 import Dropdown from 'react-dropdown';
 import Dropdown from 'react-dropdown';
-import Location from '../../core/Location';
 import UserStore from '../../stores/UserStore';
 import UserStore from '../../stores/UserStore';
 import NotificationActions from '../../actions/NotificationActions';
 import NotificationActions from '../../actions/NotificationActions';
 
 
@@ -35,12 +34,10 @@ class NotificationDropdown extends Dropdown {
   }
   }
 
 
   buildMenu() {
   buildMenu() {
-    let buildMenuResult = super.buildMenu.call(this)
     let notifications = <p className={s.noNotifications}>You have no notifications</p>
     let notifications = <p className={s.noNotifications}>You have no notifications</p>
 
 
     if (this.props.notifications.length) {
     if (this.props.notifications.length) {
-      notifications = this.props.notifications.map((notification, index) => {
-        return (
+      notifications = this.props.notifications.map((notification, index) => (
           <div
           <div
             className="notifications-wrapper"
             className="notifications-wrapper"
             key={index}
             key={index}
@@ -51,8 +48,7 @@ class NotificationDropdown extends Dropdown {
               <div className="notification-message">{notification.message}</div>
               <div className="notification-message">{notification.message}</div>
             </div>
             </div>
           </div>
           </div>
-        )
-      }, this)
+        ), this)
     }
     }
     return (
     return (
       <div>
       <div>
@@ -84,7 +80,9 @@ class NotificationDropdown extends Dropdown {
     let children = Object.assign({}, result.props.children)
     let children = Object.assign({}, result.props.children)
     children = [
     children = [
       <div className={s.userIcon + (this.props.dark ? " dark" : "")} onMouseDown={(e) => this.handleMouseDown(e)}>
       <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>,
       </div>,
       children[1]
       children[1]
     ]
     ]

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

@@ -40,7 +40,7 @@ class NotificationIcon extends Reflux.Component {
   render() {
   render() {
     return (
     return (
       <div className={s.root}>
       <div className={s.root}>
-        <NotificationDropdown notifications={this.state.allNotifications} dark={this.props.dark}/>
+        <NotificationDropdown notifications={this.state.allNotifications} dark={this.props.dark} />
       </div>
       </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/>.
 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 withStyles from 'isomorphic-style-loader/lib/withStyles';
 import NotificationActions from '../../actions/NotificationActions';
 import NotificationActions from '../../actions/NotificationActions';
 import s from './Notifications.scss';
 import s from './Notifications.scss';
@@ -23,33 +23,16 @@ import NotificationSystem from 'react-notification-system';
 
 
 class Notifications extends Component {
 class Notifications extends Component {
 
 
-  _notificationSystem = null
-
-  _addNotification(event) {
-    event.preventDefault();
-    this._notificationSystem.addNotification({
-      message: 'Notification message',
-      level: 'success'
-    });
-  }
-
   static propTypes = {
   static propTypes = {
     notifications: PropTypes.array
     notifications: PropTypes.array
   }
   }
 
 
-  constructor(props) {
-    super(props)
-  }
-
   componentDidMount() {
   componentDidMount() {
     this._notificationSystem = this.refs.notificationSystem;
     this._notificationSystem = this.refs.notificationSystem;
   }
   }
 
 
   componentWillReceiveProps(newProps, oldProps) {
   componentWillReceiveProps(newProps, oldProps) {
     if (newProps != oldProps && newProps.notifications.length) {
     if (newProps != oldProps && newProps.notifications.length) {
-      if (newProps.notifications[0].objectId) {
-
-      }
       this.send(
       this.send(
         newProps.notifications[0].message,
         newProps.notifications[0].message,
         newProps.notifications[0].type,
         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) {
   send(message, type = 'info', title = null, hideDelay = 5000, action = null) {
     if (title === null) {
     if (title === null) {
       title = message
       title = message
@@ -78,12 +71,12 @@ class Notifications extends Component {
       autoDismiss: 10,
       autoDismiss: 10,
       action: action
       action: action
     })
     })
-  };
+  }
 
 
   render() {
   render() {
     return (
     return (
       <div>
       <div>
-        <NotificationSystem ref="notificationSystem"/>
+        <NotificationSystem ref="notificationSystem" />
       </div>
       </div>
     );
     );
   }
   }

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

@@ -34,11 +34,11 @@ class ProgressBar extends Component {
     let progressBarStyle = {
     let progressBarStyle = {
       width: this.props.progress + "%"
       width: this.props.progress + "%"
     }
     }
-    return <div className={s.root}>
+    return (<div className={s.root}>
       <div className={s.outer}>
       <div className={s.outer}>
         <div className={s.inner + " " + (this.props.progress == 100 ? s.completed : "")} style={progressBarStyle} />
         <div className={s.inner + " " + (this.props.progress == 100 ? s.completed : "")} style={progressBarStyle} />
       </div>
       </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 s from './Project.scss';
 import UserStore from '../../stores/UserStore';
 import UserStore from '../../stores/UserStore';
 import Header from '../Header';
 import Header from '../Header';
-import ConfirmationDialog from '../ConfirmationDialog';
 import LoadingIcon from '../LoadingIcon';
 import LoadingIcon from '../LoadingIcon';
 import Location from '../../core/Location';
 import Location from '../../core/Location';
 
 
@@ -77,7 +76,7 @@ class Project extends Reflux.Component {
     if (item) {
     if (item) {
       return (
       return (
         <div className={s.root}>
         <div className={s.root}>
-          <Header linkUrl="/projects"/>
+          <Header linkUrl="/projects" />
           <div className={s.projectHead + " detailViewHead"}>
           <div className={s.projectHead + " detailViewHead"}>
             <div className={s.container}>
             <div className={s.container}>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
               <div className="backBtn" onClick={(e) => this.goBack(e)}></div>
@@ -89,21 +88,13 @@ class Project extends Reflux.Component {
             </div>
             </div>
           </div>
           </div>
           <div className={s.container}>
           <div className={s.container}>
-            <div className={s.sidebar}>
-
-            </div>
+            <div className={s.sidebar}></div>
             <div className={s.content}>
             <div className={s.content}>
               {React.cloneElement(this.props.children, {
               {React.cloneElement(this.props.children, {
                 projects: this.state.currentUser ? this.state.currentUser.projects : null,
                 projects: this.state.currentUser ? this.state.currentUser.projects : null,
                 projectId: this.props.projectId })}
                 projectId: this.props.projectId })}
             </div>
             </div>
           </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>
         </div>
       );
       );
     } else {
     } else {
@@ -113,9 +104,7 @@ class Project extends Reflux.Component {
         </div>
         </div>
       );
       );
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default withStyles(Project, s);
 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 React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './ProjectDetail.scss';
 import s from './ProjectDetail.scss';
-import Moment from 'react-moment';
-import TextTruncate from 'react-text-truncate';
 import LoadingIcon from '../LoadingIcon';
 import LoadingIcon from '../LoadingIcon';
 
 
 const title = 'connection details';
 const title = 'connection details';
@@ -41,6 +39,11 @@ class CloudConnectionDetail extends Component {
     }
     }
   }
   }
 
 
+  componentWillMount() {
+    this.context.onSetTitle(title);
+    this.componentWillReceiveProps(this.props)
+  }
+
   componentWillReceiveProps(props) {
   componentWillReceiveProps(props) {
     let project = null
     let project = null
     if (props.projects) {
     if (props.projects) {
@@ -54,11 +57,6 @@ class CloudConnectionDetail extends Component {
     this.setState({ project: project })
     this.setState({ project: project })
   }
   }
 
 
-  componentWillMount() {
-    this.context.onSetTitle(title);
-    this.componentWillReceiveProps(this.props)
-  }
-
   render() {
   render() {
     let item = this.state.project
     let item = this.state.project
     if (item) {
     if (item) {

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

@@ -31,32 +31,23 @@ import MainList from '../MainList';
 const title = 'Projects';
 const title = 'Projects';
 
 
 const projectActions = null
 const projectActions = null
-/* {
-  delete_action: {
-    label: "Delete",
-    action: (item) => {
-      console.log("Delete project action needed here")
-    },
-    confirm: true
-  }
-}
-*/
+
 class ProjectList extends Reflux.Component {
 class ProjectList extends Reflux.Component {
   filters = [
   filters = [
     {
     {
       field: "enabled",
       field: "enabled",
       options: [
       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",
       field: "is_domain",
       options: [
       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
           <button
             className="wire gray"
             className="wire gray"
             disabled={item.id == projectId}
             disabled={item.id == projectId}
-            onClick={(e) => this.switchProject(item)}
+            onClick={() => this.switchProject(item)}
           >{item.id == projectId ? "Current" : "Switch"}</button>
           >{item.id == projectId ? "Current" : "Switch"}</button>
         </span>
         </span>
       </div>
       </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/>.
 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 Reflux from 'reflux';
 import UserStore from '../../stores/UserStore';
 import UserStore from '../../stores/UserStore';
 import UserActions from '../../actions/UserActions';
 import UserActions from '../../actions/UserActions';
@@ -43,8 +43,8 @@ class ProjectsDropdown extends Reflux.Component {
     let projects = []
     let projects = []
     let currentProject = null
     let currentProject = null
     if (this.state.currentUser.projects) {
     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) {
       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
       <Dropdown
         options={projects}
         options={projects}
         placeholder="Switch Project"
         placeholder="Switch Project"
         onChange={(e) => this.switchProject(e)}
         onChange={(e) => this.switchProject(e)}
         value={currentProject}
         value={currentProject}
       />
       />
-    </div>
+    </div>)
   }
   }
 
 
 }
 }

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

@@ -33,7 +33,8 @@ class MigrationDetail extends Component {
   };
   };
 
 
   static propTypes = {
   static propTypes = {
-    replica: PropTypes.object
+    replica: PropTypes.object,
+    replicaId: PropTypes.string
   }
   }
 
 
   constructor(props) {
   constructor(props) {
@@ -61,13 +62,13 @@ class MigrationDetail extends Component {
       confirmationDialog: {
       confirmationDialog: {
         visible: true,
         visible: true,
         onConfirm: () => {
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           let item = this.state.migrations.filter(migration => migration.id == this.props.replicaId)[0]
           let item = this.state.migrations.filter(migration => migration.id == this.props.replicaId)[0]
           MigrationActions.deleteMigration(item)
           MigrationActions.deleteMigration(item)
           Location.push('/cloud-endpoints')
           Location.push('/cloud-endpoints')
         },
         },
         onCancel: () => {
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
         }
       }
       }
     })
     })
@@ -145,29 +146,14 @@ class MigrationDetail extends Component {
                   <a>{item.id}</a>
                   <a>{item.id}</a>
                 </div>
                 </div>
               </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>
           </div>
           </div>
           <MigrationNetworks migration={item} />
           <MigrationNetworks migration={item} />
           <div className={s.container + " " + s.buttons}>
           <div className={s.container + " " + s.buttons}>
             { item.type == "replica" && <button
             { item.type == "replica" && <button
               onClick={(e) => this.createMigrationFromReplica(e, item)}
               onClick={(e) => this.createMigrationFromReplica(e, item)}
-              disabled={disabled} className={disabled ? "disabled": ""} >
+              disabled={disabled} className={disabled ? "disabled" : ""}
+            >
               Migrate Replica
               Migrate Replica
             </button>}
             </button>}
             <button className="wire" onClick={(e) => this.deleteMigration(e)}>Delete</button>
             <button className="wire" onClick={(e) => this.deleteMigration(e)}>Delete</button>
@@ -183,7 +169,6 @@ class MigrationDetail extends Component {
     }
     }
     return output
     return output
   }
   }
-
 }
 }
 
 
 export default withStyles(MigrationDetail, s);
 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
 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/>.
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 */
-
+/* eslint-disable no-trailing-spaces */
 import React, { Component, PropTypes } from 'react';
 import React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './ReplicaExecutions.scss';
 import s from './ReplicaExecutions.scss';
@@ -24,7 +24,7 @@ import moment from 'moment';
 import MigrationActions from '../../actions/MigrationActions';
 import MigrationActions from '../../actions/MigrationActions';
 import Tasks from '../Tasks';
 import Tasks from '../Tasks';
 import ExecutionsTimeline from '../ExecutionsTimeline';
 import ExecutionsTimeline from '../ExecutionsTimeline';
-import {tasksPollTimeout} from '../../config'
+import { tasksPollTimeout } from '../../config'
 import ConfirmationDialog from '../ConfirmationDialog'
 import ConfirmationDialog from '../ConfirmationDialog'
 
 
 
 
@@ -66,10 +66,6 @@ class ReplicaExecutions extends Component {
     this.pollTasks()
     this.pollTasks()
   }
   }
 
 
-  componentWillUnmount() {
-    clearInterval(this.timeout)
-  }
-
   componentWillReceiveProps(newProps) {
   componentWillReceiveProps(newProps) {
     if (newProps.replica && newProps.replica.executions.length) {
     if (newProps.replica && newProps.replica.executions.length) {
       let execution = newProps.replica.executions[newProps.replica.executions.length - 1]
       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)
     clearInterval(this.timeout)
-    this.timeout = setInterval((e) => this.pollTasks(e), tasksPollTimeout)
   }
   }
 
 
   cancelExecution() {
   cancelExecution() {
-    MigrationActions.cancelMigration(this.props.replica, (replica, response) => {
+    MigrationActions.cancelMigration(this.props.replica, () => {
       this.refreshExecution()
       this.refreshExecution()
     })
     })
   }
   }
 
 
+  executeNow() {
+    MigrationActions.executeReplica(this.props.replica)
+    clearInterval(this.timeout)
+    this.timeout = setInterval((e) => this.pollTasks(e), tasksPollTimeout)
+  }
+
   deleteExecution() {
   deleteExecution() {
     this.setState({
     this.setState({
       confirmationDialog: {
       confirmationDialog: {
         visible: true,
         visible: true,
         onConfirm: () => {
         onConfirm: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
           let index = this.props.replica.executions.indexOf(this.state.executionRef)
           let index = this.props.replica.executions.indexOf(this.state.executionRef)
 
 
           MigrationActions.deleteReplicaExecution(this.props.replica, this.state.executionRef.id, () => {
           MigrationActions.deleteReplicaExecution(this.props.replica, this.state.executionRef.id, () => {
@@ -116,7 +116,7 @@ class ReplicaExecutions extends Component {
           })
           })
         },
         },
         onCancel: () => {
         onCancel: () => {
-          this.setState({ confirmationDialog: { visible: false }})
+          this.setState({ confirmationDialog: { visible: false } })
         }
         }
       }
       }
     })
     })
@@ -128,7 +128,7 @@ class ReplicaExecutions extends Component {
         let props = this.props
         let props = this.props
         props.migration.tasks = response.data.execution.tasks
         props.migration.tasks = response.data.execution.tasks
         MigrationActions.getReplicaExecutions(replica)
         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)
         this.setState(state)
       })
       })
   }
   }
@@ -197,7 +197,7 @@ class ReplicaExecutions extends Component {
                   {executionBtn}
                   {executionBtn}
                 </div>
                 </div>
               </div>
               </div>
-              <Tasks tasks={this.state.tasks}/>
+              <Tasks tasks={this.state.tasks} />
             </div>
             </div>
             <ConfirmationDialog
             <ConfirmationDialog
               visible={this.state.confirmationDialog.visible}
               visible={this.state.confirmationDialog.visible}
@@ -227,9 +227,7 @@ class ReplicaExecutions extends Component {
         </div>
         </div>
       )
       )
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default withStyles(ReplicaExecutions, s);
 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.label}>Tasks remaining</span>
           <span className={s.value}>{tasksRemaining}</span>
           <span className={s.value}>{tasksRemaining}</span>
         </span>
         </span>
-        {/*<span className={"cell " + s.composite}>
-         <span className={s.label}>Current instance</span>
-         <span className={s.value}>{this.currentInstance(item)}</span>
-         </span>*/}
       </div>
       </div>
     )
     )
   }
   }
 
 
-  currentInstance(migration) {
-    let instance = "N/A"
-    /*migration.vms.forEach((item) => {
-      if (item.selected) {
-        instance = item.name
-      }
-    })*/
-    return instance
+  currentInstance() {
+    return "N/A"
   }
   }
 
 
   refreshList() {
   refreshList() {

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

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

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

@@ -35,7 +35,7 @@ class ScheduleItem extends Component {
     super(props)
     super(props)
     this.state = this.props.data
     this.state = this.props.data
     this.state.date = moment()
     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.dateTypes = ["One time"]
     this.tods = ["AM", "PM"]
     this.tods = ["AM", "PM"]
     this.timezones = ["EET", "EST", "GMT"]
     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 = []
     let openState = []
     for (let i in newProps.listItems) {
     for (let i in newProps.listItems) {
       openState.push(newProps.listItems[i].openState)
       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)
     this.componentWillReceiveProps(this.props)
   }
   }
 
 
-  componentWillReceiveProps(newProps, oldProps) {
+  componentWillReceiveProps(newProps) {
     let listItems = []
     let listItems = []
     if (newProps.tasks) {
     if (newProps.tasks) {
       newProps.tasks.forEach((item) => {
       newProps.tasks.forEach((item) => {
@@ -90,7 +90,7 @@ class Tasks extends Component {
                   <span>
                   <span>
                     {item.progress_updates[i] && item.progress_updates[i].message}
                     {item.progress_updates[i] && item.progress_updates[i].message}
                     {hasProgress(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>
                   </span>
                 </div>)
                 </div>)
@@ -117,7 +117,7 @@ class Tasks extends Component {
             <div className={s.detailTitle}>Exception details</div>
             <div className={s.detailTitle}>Exception details</div>
             <div className={s.detailValue}>
             <div className={s.detailValue}>
               {item.exception_details && item.exception_details.length ?
               {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>
           </div>
           <div className={s.group}>
           <div className={s.group}>
@@ -135,7 +135,7 @@ class Tasks extends Component {
 
 
         let newItem = {
         let newItem = {
           task_type: (<span>
           task_type: (<span>
-            <span className={"taskIcon " + item.status}/>
+            <span className={"taskIcon " + item.status} />
             <TextTruncate line={1} truncateText="..." text={taskType} />
             <TextTruncate line={1} truncateText="..." text={taskType} />
           </span>),
           </span>),
           instance: <TextTruncate line={1} text={item.instance} truncateText="..." />,
           instance: <TextTruncate line={1} text={item.instance} truncateText="..." />,

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

@@ -75,7 +75,10 @@ class UserDropdown extends Dropdown {
   render() {
   render() {
     let result = super.render.call(this)
     let result = super.render.call(this)
     let children = Object.assign({}, result.props.children)
     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 })
     let newResult = React.cloneElement(result, { children: children })
     return newResult
     return newResult
   }
   }

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

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

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

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

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

@@ -59,7 +59,7 @@ class WithSidebar extends Component {
       (
       (
         <li
         <li
           key={"menu_" + index} className={item.route == this.props.route ? s.active : ""}
           key={"menu_" + index} className={item.route == this.props.route ? s.active : ""}
-          onClick={(e) => this.goToMenu(item)}
+          onClick={() => this.goToMenu(item)}
         >
         >
           {item.label}
           {item.label}
         </li>
         </li>
@@ -68,7 +68,10 @@ class WithSidebar extends Component {
     return (
     return (
       <div className={s.root}>
       <div className={s.root}>
         <div className={s.sidebar}>
         <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>
           <ul>
             {menuItems}
             {menuItems}
           </ul>
           </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 React, { Component, PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
-import Helper from '../Helper';
 import s from './WizardMigrationType.scss';
 import s from './WizardMigrationType.scss';
 
 
 
 
 const title = 'Migration Type';
 const title = 'Migration Type';
 
 
 class WizardMigrationType extends Component {
 class WizardMigrationType extends Component {
-  canMigrate = false
-  canReplicate = false
 
 
   static contextTypes = {
   static contextTypes = {
     onSetTitle: PropTypes.func.isRequired,
     onSetTitle: PropTypes.func.isRequired,
@@ -39,29 +36,12 @@ class WizardMigrationType extends Component {
 
 
   constructor(props) {
   constructor(props) {
     super(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 = {
     this.state = {
       migrationType: this.props.migrationType,
       migrationType: this.props.migrationType,
       valid: true,
       valid: true,
       nextStep: "WizardSource"
       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>
               environment (migration phase).</p>
           </div>
           </div>
         </div>
         </div>
-        {/*<div className={s.migrationName}>
-          <h3>Notes</h3>
-          <textarea value={this.state.notes} onChange={(e) => this.handleChangeMigrationNotes(e)}></textarea>
-        </div>*/}
       </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 withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './WizardNetworks.scss';
 import s from './WizardNetworks.scss';
 import Dropdown from '../NewDropdown';
 import Dropdown from '../NewDropdown';
-import {targetNetworkMock} from '../../config';
+import { targetNetworkMock } from '../../config';
 
 
 const title = 'Network mapping';
 const title = 'Network mapping';
 
 
@@ -36,10 +36,9 @@ class WizardNetworks extends Component {
 
 
   constructor(props) {
   constructor(props) {
     super(props)
     super(props)
-    console.log("PROPS", props)
     let networks = this.props.data.networks
     let networks = this.props.data.networks
     networks.forEach(network => {network.selected = false})
     networks.forEach(network => {network.selected = false})
-    /*this.props.data.vms.forEach((vm) => {
+    /* this.props.data.vms.forEach((vm) => {
       if (vm.selected) {
       if (vm.selected) {
         networks.forEach((network) => {
         networks.forEach((network) => {
           if (vm.networks.indexOf(network.id) != -1) {
           if (vm.networks.indexOf(network.id) != -1) {
@@ -50,7 +49,7 @@ class WizardNetworks extends Component {
           }
           }
         })
         })
       }
       }
-    })*/
+    }) */
 
 
     this.state = {
     this.state = {
       networks: networks,
       networks: networks,
@@ -59,7 +58,7 @@ class WizardNetworks extends Component {
     }
     }
 
 
     this.networkOptions = ["Create new"]
     this.networkOptions = ["Create new"]
-    //this.props.data.targetNetworks.forEach((network) => {
+    // this.props.data.targetNetworks.forEach((network) => {
     targetNetworkMock.forEach((network) => {
     targetNetworkMock.forEach((network) => {
       this.networkOptions.push(network)
       this.networkOptions.push(network)
     }, this)
     }, 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/>.
 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 Reflux from 'reflux';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './WizardOptions.scss';
 import s from './WizardOptions.scss';
 import Dropdown from '../NewDropdown';
 import Dropdown from '../NewDropdown';
 import WizardActions from '../../actions/WizardActions';
 import WizardActions from '../../actions/WizardActions';
 import WizardStore from '../../stores/WizardStore';
 import WizardStore from '../../stores/WizardStore';
-import InfoIcon from '../InfoIcon';
 
 
 
 
 const title = 'Migration Options';
 const title = 'Migration Options';
@@ -40,10 +39,6 @@ class WizardOptions extends Reflux.Component {
     super(props)
     super(props)
     this.store = WizardStore
     this.store = WizardStore
 
 
-    this.diskFormats = ["VHD", "VHD2"]
-    this.fipPools = ["public", "private_01", "private_02"]
-
-
     this.state = {
     this.state = {
       autoFlavors: true,
       autoFlavors: true,
       diskFormat: "VHD",
       diskFormat: "VHD",
@@ -62,14 +57,14 @@ class WizardOptions extends Reflux.Component {
   }
   }
 
 
   componentDidMount() {
   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 => {
     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)
     }, this)
 
 
-    WizardActions.updateWizardState({ destination_environment: destination_environment })
+    WizardActions.updateWizardState({ destination_environment: destinationEnvironment })
   }
   }
 
 
   handleChangeAutoFlavor() {
   handleChangeAutoFlavor() {
@@ -105,13 +100,13 @@ class WizardOptions extends Reflux.Component {
   }
   }
 
 
   handleOptionsFieldChange(e, field) {
   handleOptionsFieldChange(e, field) {
-    let destination_environment = this.state.destination_environment
+    let destinationEnvironment = this.state.destination_environment
     if (field.type == 'dropdown') {
     if (field.type == 'dropdown') {
-      destination_environment[field.name] = e
+      destinationEnvironment[field.name] = e
     } else {
     } 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) {
   renderField(field) {
@@ -231,12 +226,12 @@ class WizardOptions extends Reflux.Component {
   }
   }
 
 
   render() {
   render() {
-    let toggleAdvancedBtn = <button
+    let toggleAdvancedBtn = (<button
       onClick={(e) => this.toggleAdvancedOptions(e)}
       onClick={(e) => this.toggleAdvancedOptions(e)}
       className={s.toggleAdvancedBtn + " wire"}
       className={s.toggleAdvancedBtn + " wire"}
     >
     >
       {this.state.showAdvancedOptions ? "Hide" : "Show"} Advanced Options
       {this.state.showAdvancedOptions ? "Hide" : "Show"} Advanced Options
-    </button>
+    </button>)
 
 
     return (
     return (
       <div className={s.root}>
       <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') {
     if (this.props.migrationType == 'replica') {
       newScheduleBtn = <button className={s.addScheduleBtn} onClick={(e) => this.addSchedule(e)}>Add schedule</button>
       newScheduleBtn = <button className={s.addScheduleBtn} onClick={(e) => this.addSchedule(e)}>Add schedule</button>
-    }
+    } */
 
 
 
 
     return (
     return (
@@ -114,7 +114,7 @@ class WizardSchedule extends Component {
           <div className="items-list">
           <div className="items-list">
             {schedules}
             {schedules}
           </div>
           </div>
-          {/*{newScheduleBtn}*/}
+          {/* {newScheduleBtn} */}
         </div>
         </div>
       </div>
       </div>
     );
     );

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

@@ -68,20 +68,19 @@ class WizardSource extends Reflux.Component {
     if (cloudData) {
     if (cloudData) {
       let newCloudsState = this.state.clouds
       let newCloudsState = this.state.clouds
       let vms
       let vms
-      let networks
       let selected = false
       let selected = false
       newCloudsState.forEach((item) => {
       newCloudsState.forEach((item) => {
         if (item.name == cloudData.name) {
         if (item.name == cloudData.name) {
           selected = cloudData.credentials
           selected = cloudData.credentials
 
 
           vms = []
           vms = []
-          /*item.vms.forEach((vm) => {
+          /* item.vms.forEach((vm) => {
             vms.push(Object.assign({}, vm))
             vms.push(Object.assign({}, vm))
           }, this)*/
           }, this)*/
 
 
-          /*item.networks.forEach((network) => {
+          /* item.networks.forEach((network) => {
             networks.push(Object.assign({}, network))
             networks.push(Object.assign({}, network))
-          }, this)*/
+          }, this) */
         }
         }
       })
       })
 
 
@@ -101,7 +100,8 @@ class WizardSource extends Reflux.Component {
   nextCallback(callback) {
   nextCallback(callback) {
     let connection = this.props.cloud.credential
     let connection = this.props.cloud.credential
     // TODO: change this, shitty callback, go through stores
     // 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]
       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 moment from 'moment';
 import TextTruncate from 'react-text-truncate';
 import TextTruncate from 'react-text-truncate';
 import InfoIcon from '../InfoIcon';
 import InfoIcon from '../InfoIcon';
-import {defaultLabels} from '../../config';
+import { defaultLabels } from '../../config';
 
 
 
 
 const title = 'Summary';
 const title = 'Summary';
@@ -54,19 +54,19 @@ class WizardSummary extends Component {
 
 
   renderOptionsFields() {
   renderOptionsFields() {
     let fields = []
     let fields = []
-    for (var i in this.props.summary.destination_environment) {
+    for (let i in this.props.summary.destination_environment) {
       fields.push({
       fields.push({
         label: defaultLabels[i] ? defaultLabels[i] : i,
         label: defaultLabels[i] ? defaultLabels[i] : i,
         value: this.props.summary.destination_environment[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.label}</span>
         <span>{field.value}</span>
         <span>{field.value}</span>
       </div>
       </div>
-    })
+    ))
   }
   }
 
 
   render() {
   render() {
@@ -81,22 +81,20 @@ class WizardSummary extends Component {
         </div>
         </div>
       ), this)
       ), 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) => {
     let networks = this.props.summary.networks.map((network, index) => {
       if (network.selected || true) {
       if (network.selected || true) {
         return (
         return (
@@ -130,7 +128,6 @@ class WizardSummary extends Component {
                 <InfoIcon text="Helptext" />
                 <InfoIcon text="Helptext" />
               </h3>
               </h3>
               <div className={s.values}>
               <div className={s.values}>
-                {/*<div className={s.row}><span>Name:</span><span>{this.props.summary.migrationName}</span></div>*/}
                 <div className={s.row}>
                 <div className={s.row}>
                   <span>Source: <br /> </span>
                   <span>Source: <br /> </span>
                   <span>
                   <span>

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

@@ -21,7 +21,7 @@ import s from './WizardTarget.scss';
 import CloudItem from '../CloudItem';
 import CloudItem from '../CloudItem';
 import ConnectionsActions from '../../actions/ConnectionsActions';
 import ConnectionsActions from '../../actions/ConnectionsActions';
 import ConnectionStore from '../../stores/ConnectionsStore';
 import ConnectionStore from '../../stores/ConnectionsStore';
-import {networkMock} from '../../config';
+import { networkMock } from '../../config';
 
 
 const title = 'Select your target cloud';
 const title = 'Select your target cloud';
 
 
@@ -35,7 +35,8 @@ class WizardTarget extends Component {
     clouds: PropTypes.array,
     clouds: PropTypes.array,
     cloud: PropTypes.object,
     cloud: PropTypes.object,
     setWizardState: PropTypes.func,
     setWizardState: PropTypes.func,
-    exclude: PropTypes.string
+    exclude: PropTypes.string,
+    type: PropTypes.string
   }
   }
 
 
   constructor(props) {
   constructor(props) {
@@ -77,7 +78,6 @@ class WizardTarget extends Component {
       let selected = false
       let selected = false
       newCloudsState.forEach((item) => {
       newCloudsState.forEach((item) => {
         if (item.name == cloudData.name) {
         if (item.name == cloudData.name) {
-          //item.selected = cloudData.credentials
           selected = cloudData.credentials
           selected = cloudData.credentials
 
 
           // load import endpoints if missing
           // 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/>.
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
  */
 
 
-/* eslint-disable max-len */
+/* eslint-disable */
 /* jscs:disable maximumLineLength */
 /* jscs:disable maximumLineLength */
 
 
 export const port = process.env.PORT || 3000;
 export const port = process.env.PORT || 3000;
@@ -33,7 +33,7 @@ export const itemsPerPage = 6;
  selected - true
  selected - true
 */
 */
 export const networkMock = [
 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
 // Target networks to show in dropdown
 export const targetNetworkMock = ["internal-coriolis-2", "coriolis-twenty", "management"]
 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
  * This source code is licensed under the MIT license found in the
  * LICENSE.txt file in the root directory of this source tree.
  * 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
   let token = req.body.token
   if (token) {
   if (token) {
     res.redirect('/federate/' + 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)
     Api.setDefaultHeader('X-Auth-Token', token)
     cookie.save('unscopedToken', token, { path: "/", expires: moment().add(1, 'hour').toDate() })
     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')
         let projectId = cookie.load('projectId')
         if (!projectId) {
         if (!projectId) {
-          projectId = response.data.projects[0].id
+          projectId = res.data.projects[0].id
         }
         }
         UserActions.loginScope(token, projectId)
         UserActions.loginScope(token, projectId)
       } else {
       } else {
@@ -94,7 +94,7 @@ class UserStore extends Reflux.Store
     cookie.save('projectId', currentUser.project.id, { path: "/", expires: moment().add(1, 'months').toDate() })
     cookie.save('projectId', currentUser.project.id, { path: "/", expires: moment().add(1, 'months').toDate() })
     Api.setDefaultHeader('X-Auth-Token', currentUser.token)
     Api.setDefaultHeader('X-Auth-Token', currentUser.token)
 
 
-    this.setState({currentUser: currentUser})
+    this.setState({ currentUser: currentUser })
 
 
     ConnectionsActions.loadProviders()
     ConnectionsActions.loadProviders()
     ConnectionsActions.loadConnections()
     ConnectionsActions.loadConnections()
@@ -111,7 +111,7 @@ class UserStore extends Reflux.Store
     UserActions.loginScope(token, this.state.currentUser.projects[0].id, false)
     UserActions.loginScope(token, this.state.currentUser.projects[0].id, false)
   }
   }
 
 
-  onLoginFailed(response) {
+  onLoginFailed() {
     this.setState({ loadingState: false })
     this.setState({ loadingState: false })
   }
   }
 
 
@@ -124,7 +124,6 @@ class UserStore extends Reflux.Store
     .then(() => {
     .then(() => {
       cookie.remove('token');
       cookie.remove('token');
       window.location.href = "/"
       window.location.href = "/"
-
     })
     })
     .catch(() => {
     .catch(() => {
       cookie.remove('token');
       cookie.remove('token');
@@ -141,7 +140,7 @@ class UserStore extends Reflux.Store
     Location.push('/login');
     Location.push('/login');
   }
   }
 
 
-  onLogoutSuccess(response) {
+  onLogoutSuccess() {
     cookie.remove('token');
     cookie.remove('token');
     cookie.remove('projectId');
     cookie.remove('projectId');
     Location.push('/login');
     Location.push('/login');
@@ -156,7 +155,6 @@ class UserStore extends Reflux.Store
   }
   }
 
 
   onSwitchProject(projectId) {
   onSwitchProject(projectId) {
-    console.log("onSwitchProject", projectId)
     if (projectId) {
     if (projectId) {
       let token = cookie.load('unscopedToken')
       let token = cookie.load('unscopedToken')
       Api.setDefaultHeader('X-Auth-Token', null)
       Api.setDefaultHeader('X-Auth-Token', null)

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

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