From: Laurence Maultsby Date: Tue, 17 Jan 2017 19:19:51 +0000 (-0500) Subject: Config parameter map styling, 3 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=commitdiff_plain;h=refs%2Fchanges%2F73%2F973%2F1 Config parameter map styling, 3 Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/composer/src/src/components/ConfigPrimitiveParameters/ConfigPrimitiveParameters.js b/skyquake/plugins/composer/src/src/components/ConfigPrimitiveParameters/ConfigPrimitiveParameters.js index 848f0b4e3..dd371d3b1 100644 --- a/skyquake/plugins/composer/src/src/components/ConfigPrimitiveParameters/ConfigPrimitiveParameters.js +++ b/skyquake/plugins/composer/src/src/components/ConfigPrimitiveParameters/ConfigPrimitiveParameters.js @@ -62,87 +62,6 @@ function configParameterMapMap(ap, i) { ) - /* - // const colors = fg.colors; - // const stylePrimary = {borderColor: colors.primary}; - // const styleSecondary = {borderColor: colors.secondary}; - - // context.stylePrimary = stylePrimary; - // context.styleSecondary = styleSecondary; - - // const rspMap = fg.rsp.reduce((map, rsp) => { - // map[rsp.id] = rsp; - // rsp.classifier = []; - // return map; - // }, {}); - - // fg.classifier.forEach(classifier => { - // const rsp = rspMap[classifier.model['rsp-id-ref']]; - // if (rsp) { - // rsp.classifier.push(classifier); - // } - // }); - - // function onClickRemoveForwardingGraph(fg, event) { - // event.preventDefault(); - // const root = fg.getRoot(); - // fg.remove(); - // CatalogItemsActions.catalogItemDescriptorChanged(root); - // } - - // function onClickAddClassifier(context, fg, event) { - // event.preventDefault(); - // fg.createClassifier(); - // CatalogItemsActions.catalogItemDescriptorChanged(fg.getRoot()); - // } - - // function onClickToggleShowAllFGPaths(fg, event) { - // //event.preventDefault(); - // event.stopPropagation(); - // fg.uiState.showPaths = event.target.checked; - // fg.rsp.forEach(rsp => rsp.uiState.showPath = event.target.checked); - // CatalogItemsActions.catalogItemMetaDataChanged(fg.getRoot().model); - // } - - // if (!fg.uiState.hasOwnProperty('showPaths')) { - // fg.uiState.showPaths = true; - // fg.rsp.forEach(d => d.uiState.showPath = true); - // } - - // const toggleSelectAllPaths = ( - // {}} onClick={onClickToggleShowAllFGPaths.bind(null, fg)} /> - // ); - - // const srpFactory = DescriptorModelFactory.newRecordServicePathFactory({}, fg); - // srpFactory.uid = fg.uid + i; - - // const hasServiceFunctionVNFDs = context.containers.filter(d => DescriptorModelFactory.isConstituentVnfdWithServiceChain(d, 'SF')).length > 0; - - // return ( - //
- //
- //
- //
- // }> - // {fg.title} - // - //
- //

Rendered Service Paths

- // {hasServiceFunctionVNFDs ? fg.recordServicePaths.concat(srpFactory).map(mapRecordServicePath.bind(null, context)) : A VNFD with the chain SF is required to build Rendered Service Paths.} - //
- //
- //

Classifiers

- // {fg.classifier.map(mapClassifier.bind(null, context))} - //
- //
- //
- //
- //
- //
- // ); - */ } @@ -211,22 +130,26 @@ const ConfigPrimitiveParameters = React.createClass({ } return (
- { - containers.map(function(c, i) { - if(c.className == 'ConfigParameterMap') { - return - } - }) - } +
+
+
+ Request +
+
+ Source +
+
+ { + containers.map(function(c, i) { + if(c.className == 'ConfigParameterMap') { + return + } + }) + } +
We need this so when the user closes the panel it won't shift away and scare the bj out of them!
+
) - // return ( - //
- //
- // {containers.filter(d => d.type === 'nsd').map(mapNSD.bind(context))} - //
- // ); - } }); diff --git a/skyquake/plugins/composer/src/src/components/EditConfigParameterMap.js b/skyquake/plugins/composer/src/src/components/EditConfigParameterMap.js index bbf771bb2..f89b14a1b 100644 --- a/skyquake/plugins/composer/src/src/components/EditConfigParameterMap.js +++ b/skyquake/plugins/composer/src/src/components/EditConfigParameterMap.js @@ -425,14 +425,8 @@ export default function EditDescriptorModelProperties(props, type) { const hasBasicFields = basicProperties.length > 0; const closeGroup = basicProperties.length > 0; return ( -
-
- Request -
-
- Source -
- {properties.map((property,i) => { + + properties.map((property,i) => { const path = [property.name]; const value = container.model[property.name]; if(path == 'id') { @@ -446,18 +440,16 @@ export default function EditDescriptorModelProperties(props, type) { let vnfd = catalogs[1].descriptors.filter((v) => v.id == vnfdIdRef)[0]; let primitiveName = vnfd['config-parameter']['config-parameter-request'].filter((p) => p.name == value['config-parameter-request-ref'] )[0].parameter[0]['config-primitive-name-ref']; return ( -
- {`${vnfd['short-name']}(${vnfdIndexRef}) / ${primitiveName} / ${value['config-parameter-request-ref']}`} +
+ {`${vnfd['short-name']} (${vnfdIndexRef}) / ${primitiveName} / ${value['config-parameter-request-ref']}`}
) } else if(path == 'config-parameter-source') { //Builds Source - return
{build(container, property, path, value, _.assign({toggle: true, width: props.width}, props), value['member-vnf-index-ref'])}
+ return
{build(container, property, path, value, _.assign({toggle: true, width: props.width}, props), value['member-vnf-index-ref'])}
} - })} -
We need this so when the user closes the panel it won't shift away and scare the bj out of them!
-
+ }) ); } @@ -477,7 +469,7 @@ export default function EditDescriptorModelProperties(props, type) { path.push(container); return ( -
+
{buildAdvancedGroup()}
); diff --git a/skyquake/plugins/composer/src/src/styles/CanvasPanelTray.scss b/skyquake/plugins/composer/src/src/styles/CanvasPanelTray.scss index 899eb8fc5..94f2b4352 100644 --- a/skyquake/plugins/composer/src/src/styles/CanvasPanelTray.scss +++ b/skyquake/plugins/composer/src/src/styles/CanvasPanelTray.scss @@ -74,13 +74,9 @@ $tray-head-height: 25px; top:31px; } .ConfigParameterMap { - + padding: 10px 20px; background: $panel-bg-color; - .EditDescriptorModelProperties { - margin-left: 8px; - } - .toggleable { display:-ms-flexbox; display:flex; diff --git a/skyquake/plugins/composer/src/src/styles/EditConfigParameterMap.scss b/skyquake/plugins/composer/src/src/styles/EditConfigParameterMap.scss index ed16003a9..352fa95d7 100644 --- a/skyquake/plugins/composer/src/src/styles/EditConfigParameterMap.scss +++ b/skyquake/plugins/composer/src/src/styles/EditConfigParameterMap.scss @@ -17,6 +17,7 @@ */ @import "main"; +@import "variables"; @import "ColorGroups"; .config-parameter-map { @@ -33,13 +34,41 @@ - width: 600px; - + max-width: 980px; + .config-parameter-titles { + display: -ms-flexbox; + display: flex; + -ms-flex: 1 1 100%; + flex: 1 1 100%; + padding-bottom:10px; + color: #AEAEAE; + text-transform:uppercase; + .config-parameter { + padding-left: 10px; + } + } .config-parameter { + display:-ms-flexbox; + display:flex; -ms-flex: 1 1 50%; flex: 1 1 50%; &-source, &-request { - border-top:1px solid $vld-primary-color; + -ms-flex: 1 1 50%; + flex: 1 1 50%; + border-top:1px solid silver; + padding: 10px 10px; + } + &-request{ + line-height: 25px; + } + &-group { + -ms-flex: 1 1 100%; + flex: 1 1 100%; + display:-ms-flexbox; + display:flex; + &:nth-child(2) { + background: $panel-bg-color-contrast; + } } }