Loading js-apps/meep-frontend/src/js/containers/cfg/cfg-network-element-container.js +5 −5 Original line number Diff line number Diff line Loading @@ -296,7 +296,7 @@ const validateCpuValue = count => { const p = Number(count); if (p !== '' && p === 0) { return 'count !== 0'; return 'Must be a float greater than 0'; } return null; }; Loading @@ -313,7 +313,7 @@ const validateMemoryValue = count => { const p = Number(count); if (p !== '' && p === 0) { return 'count !== 0 '; return 'Must be an integer greater than 0'; } return null; }; Loading Loading @@ -689,7 +689,7 @@ const CpuGroup = ({ onUpdate, element }) => { element={element} validate={validateCpuValue} isNumber={true} label="Min CPU" label="Min CPU Count" fieldName={FIELD_CPU_MIN} cydata={CFG_ELEM_CPU_MIN} /> Loading @@ -699,7 +699,7 @@ const CpuGroup = ({ onUpdate, element }) => { element={element} validate={validateCpuValue} isNumber={true} label="Max CPU" label="Max CPU Count" fieldName={FIELD_CPU_MAX} cydata={CFG_ELEM_CPU_MAX} /> Loading @@ -726,7 +726,7 @@ const MemoryGroup = ({ onUpdate, element }) => { element={element} validate={validateMemoryValue} isNumber={true} label="Max memory (MB)" label="Max Memory (MB)" fieldName={FIELD_MEMORY_MAX} cydata={CFG_ELEM_MEMORY_MAX} /> Loading js-apps/meep-frontend/src/js/containers/cfg/cfg-page-container.js +2 −2 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ class CfgPageContainer extends Component { var cpuMax = getElemFieldVal(element, FIELD_CPU_MAX); if (cpuMin !== null && cpuMax !== null) { if (parseFloat(cpuMin) > parseFloat(cpuMax)) { this.props.cfgElemSetErrMsg('Min CPU > Max CPU which is not acceptable'); this.props.cfgElemSetErrMsg('Min CPU > Max CPU'); return false; } } Loading @@ -292,7 +292,7 @@ class CfgPageContainer extends Component { var memoryMax = getElemFieldVal(element, FIELD_MEMORY_MAX); if (memoryMin !== null && memoryMax !== null) { if (parseInt(memoryMin) > parseInt(memoryMax)) { this.props.cfgElemSetErrMsg('Min Memory > Max Memory which is not acceptable'); this.props.cfgElemSetErrMsg('Min Memory > Max Memory'); return false; } } Loading js-apps/meep-frontend/src/js/util/scenario-utils.js +8 −9 Original line number Diff line number Diff line Loading @@ -958,15 +958,14 @@ export function createProcess(uniqueId, name, type, element) { getElemFieldVal(element, FIELD_GPU_TYPE).toUpperCase(), count: gpuCount }; process.cpuConfig = { min: cpuMin && !isNaN(cpuMin) !== null ? parseFloat(cpuMin) : null, max: cpuMax && !isNaN(cpuMax) !== null ? parseFloat(cpuMax): null }; process.memoryConfig = { min: memoryMin !== null && !isNaN(memoryMin) ? parseInt(memoryMin) : null, max: memoryMax !== null && !isNaN(memoryMax) ? parseInt(memoryMax) : null }; process.cpuConfig = (cpuMin && !isNaN(cpuMin)) || (cpuMax && !isNaN(cpuMax)) ? { min: cpuMin && !isNaN(cpuMin) ? parseFloat(cpuMin) : null, max: cpuMax && !isNaN(cpuMax) ? parseFloat(cpuMax): null } : null; process.memoryConfig = (memoryMin && !isNaN(memoryMin)) || (memoryMax && !isNaN(memoryMax)) ? { min: memoryMin && !isNaN(memoryMin) ? parseInt(memoryMin) : null, max: memoryMax && !isNaN(memoryMax) ? parseInt(memoryMax) : null } : null; process.placementId = getElemFieldVal(element, FIELD_PLACEMENT_ID); } if (process.netChar) { Loading Loading
js-apps/meep-frontend/src/js/containers/cfg/cfg-network-element-container.js +5 −5 Original line number Diff line number Diff line Loading @@ -296,7 +296,7 @@ const validateCpuValue = count => { const p = Number(count); if (p !== '' && p === 0) { return 'count !== 0'; return 'Must be a float greater than 0'; } return null; }; Loading @@ -313,7 +313,7 @@ const validateMemoryValue = count => { const p = Number(count); if (p !== '' && p === 0) { return 'count !== 0 '; return 'Must be an integer greater than 0'; } return null; }; Loading Loading @@ -689,7 +689,7 @@ const CpuGroup = ({ onUpdate, element }) => { element={element} validate={validateCpuValue} isNumber={true} label="Min CPU" label="Min CPU Count" fieldName={FIELD_CPU_MIN} cydata={CFG_ELEM_CPU_MIN} /> Loading @@ -699,7 +699,7 @@ const CpuGroup = ({ onUpdate, element }) => { element={element} validate={validateCpuValue} isNumber={true} label="Max CPU" label="Max CPU Count" fieldName={FIELD_CPU_MAX} cydata={CFG_ELEM_CPU_MAX} /> Loading @@ -726,7 +726,7 @@ const MemoryGroup = ({ onUpdate, element }) => { element={element} validate={validateMemoryValue} isNumber={true} label="Max memory (MB)" label="Max Memory (MB)" fieldName={FIELD_MEMORY_MAX} cydata={CFG_ELEM_MEMORY_MAX} /> Loading
js-apps/meep-frontend/src/js/containers/cfg/cfg-page-container.js +2 −2 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ class CfgPageContainer extends Component { var cpuMax = getElemFieldVal(element, FIELD_CPU_MAX); if (cpuMin !== null && cpuMax !== null) { if (parseFloat(cpuMin) > parseFloat(cpuMax)) { this.props.cfgElemSetErrMsg('Min CPU > Max CPU which is not acceptable'); this.props.cfgElemSetErrMsg('Min CPU > Max CPU'); return false; } } Loading @@ -292,7 +292,7 @@ class CfgPageContainer extends Component { var memoryMax = getElemFieldVal(element, FIELD_MEMORY_MAX); if (memoryMin !== null && memoryMax !== null) { if (parseInt(memoryMin) > parseInt(memoryMax)) { this.props.cfgElemSetErrMsg('Min Memory > Max Memory which is not acceptable'); this.props.cfgElemSetErrMsg('Min Memory > Max Memory'); return false; } } Loading
js-apps/meep-frontend/src/js/util/scenario-utils.js +8 −9 Original line number Diff line number Diff line Loading @@ -958,15 +958,14 @@ export function createProcess(uniqueId, name, type, element) { getElemFieldVal(element, FIELD_GPU_TYPE).toUpperCase(), count: gpuCount }; process.cpuConfig = { min: cpuMin && !isNaN(cpuMin) !== null ? parseFloat(cpuMin) : null, max: cpuMax && !isNaN(cpuMax) !== null ? parseFloat(cpuMax): null }; process.memoryConfig = { min: memoryMin !== null && !isNaN(memoryMin) ? parseInt(memoryMin) : null, max: memoryMax !== null && !isNaN(memoryMax) ? parseInt(memoryMax) : null }; process.cpuConfig = (cpuMin && !isNaN(cpuMin)) || (cpuMax && !isNaN(cpuMax)) ? { min: cpuMin && !isNaN(cpuMin) ? parseFloat(cpuMin) : null, max: cpuMax && !isNaN(cpuMax) ? parseFloat(cpuMax): null } : null; process.memoryConfig = (memoryMin && !isNaN(memoryMin)) || (memoryMax && !isNaN(memoryMax)) ? { min: memoryMin && !isNaN(memoryMin) ? parseInt(memoryMin) : null, max: memoryMax && !isNaN(memoryMax) ? parseInt(memoryMax) : null } : null; process.placementId = getElemFieldVal(element, FIELD_PLACEMENT_ID); } if (process.netChar) { Loading