Config Parameter Map enhancements 18/1018/1
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 25 Jan 2017 20:43:28 +0000 (15:43 -0500)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 25 Jan 2017 20:43:28 +0000 (15:43 -0500)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/composer/src/src/components/ConfigPrimitiveParameters/ConfigPrimitiveParameters.js
skyquake/plugins/composer/src/src/stores/ComposerAppStore.js
skyquake/plugins/composer/src/src/styles/EditConfigParameterMap.scss

index 912895c..4c7bbdd 100644 (file)
@@ -157,16 +157,16 @@ const ConfigPrimitiveParameters = React.createClass({
 
         return (
                 <div className="ConfigParameterMap">
-                    <div className="config-parameter-map">
-                        <div className="config-parameter-titles">
-                            <div className="config-parameter">
-                                Request
-                            </div>
-                            <div className="config-parameter">
-                                Source
-                            </div>
-                        </div>
+
                         <div className="config-parameter-map">
+                            <div className="config-parameter-titles">
+                                <div className="config-parameter">
+                                    Primitive Parameter Request
+                                </div>
+                                <div className="config-parameter">
+                                    Data Source
+                                </div>
+                            </div>
                             {
                                 MapData.Requests.map(function(r, i) {
                                     let currentValue = {};
@@ -181,7 +181,9 @@ const ConfigPrimitiveParameters = React.createClass({
                                             requestValue: r.name,
                                             requestIndex: r.vnfdIndex
                                         }
-                                        SourceOptions.push(<option value={JSON.stringify(value)} key={`${j}-${i}`} >{`${s.vnfdName} (${s.vnfdIndex}) / ${s.name}`}</option>)
+                                        if (r.vnfdIndex !== s.vnfdIndex) {
+                                            SourceOptions.push(<option value={JSON.stringify(value)} key={`${j}-${i}`} >{`${s.vnfdName} (${s.vnfdIndex}): ${s.name}`}</option>)
+                                        }
                                     })
                                     //Finds current value
                                     NSContainer.model['config-parameter-map'] && NSContainer.model['config-parameter-map'].map((c)=>{
@@ -202,7 +204,7 @@ const ConfigPrimitiveParameters = React.createClass({
                                     let currentMapIndex = (mapCounter > 0) ? (mapCounter) - 1: 0;
                                     return (
                                             <div key={i} className="EditDescriptorModelProperties -is-tree-view config-parameter config-parameter-group">
-                                                <div  className="config-parameter-request" >{`${r.vnfdName} (${r.vnfdIndex}) / ${r.parameter && r.parameter[0]['config-primitive-name-ref']} / ${r.parameter && r.parameter[0]['config-primitive-parameter-ref']}`}</div>
+                                                <div  className="config-parameter-request" >{`${r.vnfdName} (${r.vnfdIndex}): ${r.name}`}</div>
                                                 <div className="config-parameter-source">
                                                     <select
                                                         onChange={onFormFieldValueChanged.bind(NSContainer, i)}
@@ -220,7 +222,6 @@ const ConfigPrimitiveParameters = React.createClass({
                                 })
                             }
                         </div>
-                    </div>
                 </div>
         )
     }
index b30193a..156fe76 100644 (file)
@@ -125,6 +125,7 @@ class ComposerAppStore {
                this.files = false;
                this.filesState = {};
                this.downloadJobs = {};
+               this.displayedPanel = 'forwarding' //or parameter
                //End File  manager values
                this.bindListeners({
                        onResize: PanelResizeAction.RESIZE,
@@ -355,7 +356,9 @@ class ComposerAppStore {
                } else {
                        this.openCanvasPanelTray();
                }
-               this.setState({displayedPanel: panelEvent})
+               if(panelEvent != 'arrow'){
+                       this.setState({displayedPanel: panelEvent})
+               }
        }
 
        openCanvasPanelTray() {
index 352fa95..58cf6a2 100644 (file)
@@ -26,7 +26,7 @@
        $field-background-color: white;
        $child-indent-left-right-margin: 5px;
 
-       font-size: smaller;
+       /* font-size: smaller;*/
        display:-ms-flexbox;
        display:flex;
        -ms-flex-wrap: wrap;
@@ -50,8 +50,8 @@
        .config-parameter {
                display:-ms-flexbox;
                display:flex;
-               -ms-flex: 1 1 50%;
-                   flex: 1 1 50%;
+               -ms-flex: 1 0 50%;
+                   flex: 1 0 50%;
                    &-source, &-request {
                        -ms-flex: 1 1 50%;
                        flex: 1 1 50%;