}
inputParametersHTML = (props) => {
let inputParameters = props.inputParameters;
- return inputParameters && inputParameters.map(function(input, i) {
- return (
- <div className="configure-nsd_section" key={i}>
- <h3 className="launchpadCard_title">Input Parameters</h3>
- <div className="inputControls">
- <TextInput label={ input.label || input.xpath } type="text" onChange={props.updateInputParam.bind(self, i)} />
- </div>
- </div>
- )
- })
+ const handleChange = (i, event) => props.updateInputParam(i, event.target.value);
+ let nsInputParamsHTML = [];
+ inputParameters && inputParameters.map(function(input, i) {
+ nsInputParamsHTML.push(
+ <div className="inputControls" key={i}>
+ <TextInput label={ input.label || input.xpath } value={input.value || input['default-value']} type="text" onChange={handleChange.bind(this, i)} />
+ </div>
+ );
+ });
+ var nsinput = (
+ <div className="configure-nsd_section" >
+ <h3 className="launchpadCard_title">NS Input Parameters</h3>
+ {
+ nsInputParamsHTML
+ }
+ </div>
+ );
+ return nsinput;
}
nsPlacementGroupsHTML = (props) => {
let nsPlacementGroups = props.nsPlacementGroups;
return (
<div className="input_group" key={j}>
- <TextInput type="text" onChange={props.nsFn.placementGroupUpdate.bind(self, i, j, 'key')} placeholder="KEY" value={key} />
- <TextInput type="text" onChange={props.nsFn.placementGroupUpdate.bind(self, i, j, 'value')} placeholder="VALUE" value={value} />
+ <TextInput type="text" onChange={props.nsFn.hostAggregateUpdate.bind(self, i, j, 'key')} placeholder="KEY" value={key} />
+ <TextInput type="text" onChange={props.nsFn.hostAggregateUpdate.bind(self, i, j, 'value')} placeholder="VALUE" value={value} />
<span onClick={props.nsFn.removeHostAggregate.bind(self, i, j)} className="removeInput"><img src={imgRemove} />Remove</span>
</div>
)
{vlds && vlds.map(function(v, i) {
let currentType = v.type;
let isVIM = (currentType == 'vim-network-name');
- let isUnknown = (currentType == 'unknown') || ((currentType != 'vim-network-name') && (currentType != 'ip-profile-ref'));
+ let isUnknown = (currentType == 'none') || ((currentType != 'vim-network-name') && (currentType != 'ip-profile-ref'));
return (
<div key={self.props.nsd.id + '-' + i} className="inputControls">
<h4 className="inputControls-title">VLD: {v['short-name'] ? v['short-name'] : v['name']}</h4>
+ <label><span>Specify VLD Parameters</span></label>
<div className="inputControls-radioGroup">
<label className="inputControls-radio" style={{display: ipProfileList ? 'flex' : 'none'}}>
<input type="radio" name={'vld-' + i } onChange={self.props.vldFn.updateType(i)} checked={!isVIM && !isUnknown} value='ip-profile-ref' />
VIM Network Name
</label>
<label className="inputControls-radio">
- <input type="radio" name={'vld-' + i } onChange={self.props.vldFn.updateType(i)} checked={isUnknown} value='unknown' />
- Unknown
+ <input type="radio" name={'vld-' + i } onChange={self.props.vldFn.updateType(i)} checked={isUnknown} value='none' />
+ None
</label>
</div>
{