!isOpenMano(props.ro) ?
(
<label>Select VIM Account
- <SelectOption options={constructCloudAccountOptions(props.cloudAccounts)} initial={true} onChange={props.vnfFn.updateSelectedCloudAccount.bind(v['member-vnf-index'])} defaultValue={defaultValue} />
+ <SelectOption options={constructCloudAccountOptions(props.cloudAccounts)} initial={true} onChange={props.vnfFn.updateSelectedCloudAccount.bind(null, v['member-vnf-index'])} defaultValue={defaultValue} />
</label>
)
: null
isOpenMano(props.ro) ?
dataCentersHTML(
props.dataCenters[props.ro.name],
- props.vnfFn.updateSelectedDataCenter.bind(null, v['member-vnf-index']))
+ props.vnfFn.updateSelectedDataCenter.bind(null, v['member-vnf-index']), true)
: null
}
{
let isUnknown = (currentType == 'unknown') || ((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']}</h4>
+ <h4 className="inputControls-title">VLD: {v['short-name'] ? v['short-name'] : v['name']}</h4>
<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' />
);
}
ipProfilesHTML = (props) => {
+ let vldHasIPprofile = false;
+ props.vlds && props.vlds.map(function(v){
+ if(v.type == 'ip-profile-ref') {
+ vldHasIPprofile = true;
+ }
+ })
let ipProfileList = props.ipProfileList;
- return ipProfileList &&
+ return ipProfileList && vldHasIPprofile &&
(
<div className="configure-nsd_section">
<h3 className="launchpadCard_title">IP Profiles</h3>
{
sshKeysRef.map(function(ref, i) {
+ let keyref = JSON.stringify(ref)
return (
- <div key={i} className="inputControls inputControls-sshkeys">
+ <div key={keyref.name + '-' + i} className="inputControls inputControls-sshkeys">
<label>
<div>
<SelectOption
})}
ref="keyPairSelection"
initial={false}
- defaultValue={sshKeysList[0].name}
- onChange={self.props.updateSshKeyRef(i)}>
+ defaultValue={keyref.name || sshKeysList[0].name}
+ onChange={props.sshFn.updateKeyRef(i)}>
</SelectOption>
</div>
</label>
<label>
- <span onClick={self.props.updateSshKeyRef(i, true)} className="removeInput">
+ <span onClick={props.sshFn.updateKeyRef(i, true)} className="removeInput">
<img src={imgRemove} />
Remove
</span>
<div className="inputControls inputControls-sshkeys ">
<label style={{display: 'flex', 'flexDirection': 'row'}}>
SSH KEY PAIR
- <span onClick={self.props.updateSshKeyRef().bind(null, {target:{value: JSON.stringify(sshKeysList[0])}})} className="addInput">
+ <span onClick={props.sshFn.updateKeyRef().bind(null, {target:{value: JSON.stringify(sshKeysList[0])}})} className="addInput">
<img src={imgAdd} />
ADD
</span>
});
return CloudAccountOptions;
}
-function dataCentersHTML(dataCenters, onChange) {
+function dataCentersHTML(dataCenters, onChange, initial) {
//Build DataCenter options
//Relook at this, why is it an object?
let DataCenterOptions = [];
if (dataCenters && dataCenters.length > 0) {
return (
<label>Select Data Center
- <SelectOption options={DataCenterOptions} onChange={onChange} />
+ <SelectOption initial={!!initial} options={DataCenterOptions} onChange={onChange} />
</label>
)
}