+ //"vnfd-catalog/vnfd[id=../../../constituent-vnfd[0]/vnfd-id-ref]/version";
+
+ vnfInputParametersHTML = (props) => {
+ let vnfInputParams = props.vnfInputParams;
+ const handleChange = (vnfIndex, parameterIndex, event) => props.updateVnfInputParam(vnfIndex, parameterIndex, event.target.value);
+ let vnfInputParamsHTML = [];
+ vnfInputParams && vnfInputParams.map(function(input, i) {
+ vnfInputParamsHTML.push(
+ <div className="configure-nsd_section" key={i}>
+ <h3 className="launchpadCard_title">{`VNF Input Parameters: ${input['name']}:${input['member-vnf-index-ref']}`}</h3>
+ {
+ input['input-parameter'].filter(function(p){
+ let regex = /vnfd\[(?:vnfd:)?id\s*=\s*'?"?(\S+?)'?"?\s*\]/
+ // if has id, then it belongs in a vnfd section
+ if (p.xpath.match(regex)) {
+ // look for matching vnfd
+ if ((p.xpath.match(regex)[1] == input['vnfd-id-ref'])) {
+ return true
+ } else {
+ return false;
+ }
+ } else {
+ return true;
+ }
+ }).map(function(p, j){
+ let param = vnfInputParams[i]['input-parameter'][j];
+ return (<div className="inputControls" key={j}>
+ <TextInput label={(p.label || p.xpath)} value={param.value || param['default-value']} type="text" onChange={handleChange.bind(this, i, j)} />
+ </div>)
+ })
+ }
+ </div>
+ );
+ })
+
+ return <div>{vnfInputParamsHTML}</div>;
+ }