Просмотр исходного кода

Updates Summary page with destination environment variables

George Vrancianu 9 лет назад
Родитель
Сommit
d131e1f5ad

+ 19 - 6
src/components/WizardSummary/WizardSummary.js

@@ -21,6 +21,7 @@ import s from './WizardSummary.scss';
 import moment from 'moment';
 import TextTruncate from 'react-text-truncate';
 import InfoIcon from '../InfoIcon';
+import {defaultLabels} from '../../config';
 
 
 const title = 'Summary';
@@ -51,6 +52,23 @@ class WizardSummary extends Component {
     this.context.onSetTitle(title);
   }
 
+  renderOptionsFields() {
+    let fields = []
+    for (var i in this.props.summary.destination_environment) {
+      fields.push({
+        label: defaultLabels[i] ? defaultLabels[i] : i,
+        value: this.props.summary.destination_environment[i]
+      })
+    }
+
+    return fields.map(field => {
+      return <div className={s.row} key={"destination_environment_" + field.label}>
+        <span>{field.label}</span>
+        <span>{field.value}</span>
+      </div>
+    })
+  }
+
   render() {
     let schedules = this.props.summary.schedules.map((item, index) => (
         <div className="item" key={"schedule_" + index}>
@@ -141,12 +159,7 @@ class WizardSummary extends Component {
                     {this.props.summary.migrationType == "replica" ? "Coriolis Replica" : "Coriolis Migration"}
                   </span>
                 </div>
-                <div className={s.row}>
-                  <span>Flavor:</span>
-                  <span>{this.props.summary.sourceCloud.autoFlavors ?
-                    "Automatic Flavor Selection" : "Manual Flavor Selection"}</span>
-                </div>
-                <div className={s.row}><span>FIP Pool:</span><span>{this.props.summary.fipPool}</span></div>
+                {this.renderOptionsFields()}
               </div>
             </div>
             <div className={s.group}>

+ 2 - 2
src/components/WizardSummary/WizardSummary.scss

@@ -38,13 +38,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     & > span {
       display: inline-block;
       &:first-child {
-        width: 80px;
+        width: 96px;
         float: left
       }
       &:nth-child(2) {
         color: $blue;
         float: left;
-        width: 256px;
+        width: 240px;
         box-sizing: border-box;
       }
     }