From 837eb0ba8edd9a9fe7c09c5b33857af798cdd6a5 Mon Sep 17 00:00:00 2001 From: KIRAN KASHALKAR Date: Mon, 27 Feb 2017 13:43:27 -0500 Subject: [PATCH] RIFT-15669: Launchpad UI - RIFT.ware DEB install - Viewport - service primitive tab for ping_vnfd Signed-off-by: KIRAN KASHALKAR --- skyquake/plugins/launchpad/api/launchpad.js | 4 ++-- .../launchpad/src/launchpad_card/vnfrConfigPrimitives.jsx | 8 ++++---- .../plugins/launchpad/src/recordViewer/recordCard.jsx | 2 +- .../plugins/launchpad/src/recordViewer/recordViewStore.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/skyquake/plugins/launchpad/api/launchpad.js b/skyquake/plugins/launchpad/api/launchpad.js index 6fb01704a..688d7756d 100644 --- a/skyquake/plugins/launchpad/api/launchpad.js +++ b/skyquake/plugins/launchpad/api/launchpad.js @@ -838,7 +838,7 @@ NSR.addVnfrDataPromise = function(req, nsrs) { } } var vnfrNfviMetrics = buildNfviGraphs(vnfr.vdur, vnfrName); - if (vnfr['vnf-configuration'] && vnfr['vnf-configuration']['service-primitive'] && vnfr['vnf-configuration']['service-primitive'].length > 0) { + if (vnfr['vnf-configuration'] && vnfr['vnf-configuration']['config-primitive'] && vnfr['vnf-configuration']['config-primitive'].length > 0) { vnfrObj['service-primitives-present'] = true; } else { vnfrObj['service-primitives-present'] = false; @@ -1276,7 +1276,7 @@ VNFR.get = function(req) { returnData.forEach(function(vnfr) { vnfr['nfvi-metrics'] = buildNfviGraphs(vnfr.vdur); vnfr['epa-params'] = epa_aggregator(vnfr.vdur); - vnfr['service-primitives-present'] = (vnfr['vnf-configuration'] && vnfr['vnf-configuration']['service-primitive'] && vnfr['vnf-configuration']['service-primitive'].length > 0) ? true : false; + vnfr['service-primitives-present'] = (vnfr['vnf-configuration'] && vnfr['vnf-configuration']['config-primitive'] && vnfr['vnf-configuration']['config-primitive'].length > 0) ? true : false; vnfr['vdur'] && vnfr['vdur'].map(function(vdur, vdurIndex) { // This console-url is what front-end will hit to generate a real console-url vdur['console-url'] = 'api/vnfr/' + vnfr.id + '/vdur/' + vdur.id + '/console-url'; diff --git a/skyquake/plugins/launchpad/src/launchpad_card/vnfrConfigPrimitives.jsx b/skyquake/plugins/launchpad/src/launchpad_card/vnfrConfigPrimitives.jsx index d9b718238..94ad3020b 100644 --- a/skyquake/plugins/launchpad/src/launchpad_card/vnfrConfigPrimitives.jsx +++ b/skyquake/plugins/launchpad/src/launchpad_card/vnfrConfigPrimitives.jsx @@ -46,7 +46,7 @@ handleParamChange = (paramIndex, configPrimitiveIndex, vnfrIndex, e) => { let vnfrs = this.state.vnfrs; - vnfrs[vnfrIndex]["vnf-configuration"]["service-primitive"][configPrimitiveIndex]["parameter"][paramIndex].value = e.target.value + vnfrs[vnfrIndex]["vnf-configuration"]["config-primitive"][configPrimitiveIndex]["parameter"][paramIndex].value = e.target.value this.setState({ vnfrs: vnfrs }) @@ -63,8 +63,8 @@ constructConfigPrimitiveTabs = (tabList, tabPanels) => { let mandatoryFieldValue = 'true'; this.state.vnfrs && this.state.vnfrs.map((vnfr, vnfrIndex) => { - if (vnfr['vnf-configuration'] && vnfr['vnf-configuration']['service-primitive'] && vnfr['vnf-configuration']['service-primitive'].length > 0) { - vnfr['vnf-configuration']['service-primitive'].map((configPrimitive, configPrimitiveIndex) => { + if (vnfr['vnf-configuration'] && vnfr['vnf-configuration']['config-primitive'] && vnfr['vnf-configuration']['config-primitive'].length > 0) { + vnfr['vnf-configuration']['config-primitive'].map((configPrimitive, configPrimitiveIndex) => { let params = []; if (configPrimitive['parameter'] && configPrimitive['parameter'].length > 0) { configPrimitive['parameter'].map((param, paramIndex) => { @@ -123,7 +123,7 @@ return (
- SERVICE-PRIMITIVES {displayConfigStatus} + CONFIG-PRIMITIVES {displayConfigStatus}
diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index 88ff709a4..54cfab8a6 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx @@ -329,7 +329,7 @@ export default class RecordCard extends React.Component { if (this.props.type == 'nsr') { primitivesTabTitle = 'Service Primitive'; } else if (this.props.type == 'vnfr') { - primitivesTabTitle = 'Service Primitive' + primitivesTabTitle = 'Config Primitive' } tabList.push( diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordViewStore.js b/skyquake/plugins/launchpad/src/recordViewer/recordViewStore.js index a7770a7fa..bf6485968 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordViewStore.js +++ b/skyquake/plugins/launchpad/src/recordViewer/recordViewStore.js @@ -137,7 +137,7 @@ class RecordViewStore { let configPrimitiveIndex = data.configPrimitiveIndex; let payload = {}; let isValid = true; - let configPrimitive = vnfrs[vnfrIndex]['vnf-configuration']['service-primitive'][configPrimitiveIndex]; + let configPrimitive = vnfrs[vnfrIndex]['vnf-configuration']['config-primitive'][configPrimitiveIndex]; payload['name'] = ''; payload['nsr_id_ref'] = vnfrs[vnfrIndex]['nsr-id-ref']; -- 2.25.1