Przeglądaj źródła

Merge branch 'staging'

* staging:
  - Moves Networking step after Options step in Wizard - Adds env parameter to networks API call

# Conflicts:
#	src/components/WizardNetworks/WizardNetworks.js
George Vrancianu 8 lat temu
rodzic
commit
6611f39d33

+ 10 - 10
src/components/CloudConnectionsView/CloudConnectionsView.js

@@ -141,13 +141,13 @@ class CloudConnectionsView extends Component {
     let title = "Edit Connection"
 
     let modalStyle = {
-      overlay : {
+      overlay: {
         position: "fixed",
         top: 0,
         left: 0,
         right: 0,
         bottom: 0,
-        backgroundColor:"rgba(164, 170, 181, 0.69)"
+        backgroundColor: "rgba(164, 170, 181, 0.69)"
       },
       content: {
         padding: "0px",
@@ -163,14 +163,14 @@ class CloudConnectionsView extends Component {
     }
 
     let validationModalStyle = {
-      overlay : {
-          position: "fixed",
-          top: 0,
-          left: 0,
-          right: 0,
-          bottom: 0,
-          backgroundColor:"rgba(164, 170, 181, 0.69)"
-        },
+      overlay: {
+        position: "fixed",
+        top: 0,
+        left: 0,
+        right: 0,
+        bottom: 0,
+        backgroundColor: "rgba(164, 170, 181, 0.69)"
+      },
       content: {
         padding: "0px",
         borderRadius: "4px",

+ 8 - 8
src/components/CloudItem/CloudItem.js

@@ -136,14 +136,14 @@ class CloudItem extends Component {
     }
 
     let modalStyle = {
-      overlay : {
-          position: "fixed",
-          top: 0,
-          left: 0,
-          right: 0,
-          bottom: 0,
-          backgroundColor:"rgba(164, 170, 181, 0.69)"
-        },
+      overlay: {
+        position: "fixed",
+        top: 0,
+        left: 0,
+        right: 0,
+        bottom: 0,
+        backgroundColor: "rgba(164, 170, 181, 0.69)"
+      },
       content: {
         padding: "0px",
         borderRadius: "4px",

+ 8 - 8
src/components/ConfirmationDialog/ConfirmationDialog.js

@@ -48,14 +48,14 @@ class ConfirmationDialog extends Component {
 
   render() {
     let modalStyle = {
-      overlay : {
-          position: "fixed",
-          top: 0,
-          left: 0,
-          right: 0,
-          bottom: 0,
-          backgroundColor:"rgba(164, 170, 181, 0.69)"
-        },
+      overlay: {
+        position: "fixed",
+        top: 0,
+        left: 0,
+        right: 0,
+        bottom: 0,
+        backgroundColor: "rgba(164, 170, 181, 0.69)"
+      },
       content: {
         padding: "16px",
         borderRadius: "4px",

+ 8 - 8
src/components/EndpointList/EndpointList.js

@@ -133,14 +133,14 @@ class EndpointList extends Reflux.Component {
 
   render() {
     let modalStyle = {
-      overlay : {
-          position: "fixed",
-          top: 0,
-          left: 0,
-          right: 0,
-          bottom: 0,
-          backgroundColor:"rgba(164, 170, 181, 0.69)"
-        },
+      overlay: {
+        position: "fixed",
+        top: 0,
+        left: 0,
+        right: 0,
+        bottom: 0,
+        backgroundColor: "rgba(164, 170, 181, 0.69)"
+      },
       content: {
         padding: "0px",
         borderRadius: "4px",

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

@@ -40,14 +40,6 @@ class WizardNetworks extends Component {
     super(props)
 
     this.networkOptions = [] // [{ label: "Create new", value: null }]
-    if (this.props.data.targetNetworks && this.props.data.targetNetworks.length) {
-      this.props.data.targetNetworks.forEach((network) => {
-        this.networkOptions.push({
-          label: network.name,
-          value: network.name
-        })
-      }, this)
-    }
     ConnectionsActions.loadNetworks(this.props.data.targetCloud.credential)
 
     props.data.selectedInstances.forEach((vm) => {
@@ -106,6 +98,15 @@ class WizardNetworks extends Component {
     if (networks.length == 0) {
       networks = null
     }
+    if (props.data.targetNetworks && props.data.targetNetworks.length) {
+      this.networkOptions = []
+      props.data.targetNetworks.forEach((network) => {
+        this.networkOptions.push({
+          label: network.name,
+          value: network.name
+        })
+      }, this)
+    }
     this.setState({ networks: networks })
   }
 

+ 0 - 1
src/components/WizardSummary/WizardSummary.js

@@ -20,7 +20,6 @@ import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import s from './WizardSummary.scss';
 import moment from 'moment';
 import TextTruncate from 'react-text-truncate';
-import InfoIcon from '../InfoIcon';
 import { defaultLabels } from '../../config';
 
 

+ 0 - 1
src/stores/UserStore/UserStore.js

@@ -136,7 +136,6 @@ class UserStore extends Reflux.Store
     let currentUser = this.state.currentUser
     currentUser.email = response.data.user.email
     this.setState({ currentUser: currentUser })
-    console.log("onGetUserInfo", response)
   }
 
   onSetUserInfoSuccess() {

+ 1 - 2
src/stores/WizardStore/WizardStore.js

@@ -19,7 +19,7 @@
 import Reflux from 'reflux';
 import WizardActions from '../../actions/WizardActions';
 import ConnectionsActions from '../../actions/ConnectionsActions';
-import { servicesUrl, itemsPerPage, networkMock, targetNetworkMock } from '../../config';
+import { servicesUrl, itemsPerPage } from '../../config';
 import Api from '../../components/ApiCaller';
 
 class UsersStore extends Reflux.Store
@@ -130,7 +130,6 @@ class UsersStore extends Reflux.Store
         selectedInstances[index] = response.data.instance
       }
     })
-    console.log("selectedInstances", selectedInstances)
     this.setState({ selectedInstances: selectedInstances })
   }