Loading js-apps/frontend/src/js/app-constants.js +37 −0 Changes for js-apps/frontend/src/js/app-constants.js: 37 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -15,6 +15,43 @@ export const PAGE_DASHBOARD = 'DASHBOARD'; // Networks export const DEFAULT_NO_NETWORK_FILE_SELECTED = 'Select a network'; export const SIMU5G_SCENARIO_NAMES = ['monaco-harbor', 'monaco-harbor-lite']; export function isSimu5gScenarioName(name) { return SIMU5G_SCENARIO_NAMES.indexOf(name) !== -1; } export function isExternalNwSimulatorType(type) { var t = (type || '').toLowerCase(); return t === 'simu5g' || t === 'oai'; } export function isExternalNwSimulatorScenario(name, scenario) { if (isSimu5gScenarioName(name)) { return true; } try { var meta = scenario && scenario.deployment && scenario.deployment.userMeta; if (!meta) { return false; } if (meta['network-info']) { var info = JSON.parse(meta['network-info']); if (isExternalNwSimulatorType(info.type)) { return true; } } if (meta['mec-sandbox']) { var ms = JSON.parse(meta['mec-sandbox']); if (isExternalNwSimulatorType(ms.connectivityModel)) { return true; } } } catch (e) { return false; } return false; } // Minimum screen resolution export const MIN_SCREEN_WIDTH = 840; Loading js-apps/frontend/src/js/containers/sandbox/configuration-pane.js +12 −0 Changes for js-apps/frontend/src/js/containers/sandbox/configuration-pane.js: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import { import { PAGE_SANDBOX, DEFAULT_NO_NETWORK_FILE_SELECTED, isSimu5gScenarioName, isExternalNwSimulatorScenario, NO_SCENARIO_NAME, ALERT_DEGRADED_NETWORK, ALERT_NEM_NOT_RUNNING, Loading Loading @@ -406,6 +408,16 @@ class ConfigPane extends Component { updateAutomation(pauseButtonEnabled) { this.props.changeUpdateAutomationInProgressCount(2); if (isSimu5gScenarioName(this.props.networkFileSelected) || isSimu5gScenarioName(this.props.activationInProgressScenarioName) || isExternalNwSimulatorScenario(this.props.networkFileSelected, this.props.scenario) || isExternalNwSimulatorScenario(this.props.activationInProgressScenarioName, this.props.scenario)) { this.props.automationApi.setAutomationStateByName('MOVEMENT', false); this.props.automationApi.setAutomationStateByName('MOBILITY', !pauseButtonEnabled); this.props.automationApi.setAutomationStateByName('POAS-IN-RANGE', true); this.props.automationApi.setAutomationStateByName('NETWORK-CHARACTERISTICS-UPDATE', false); return; } this.props.automationApi.setAutomationStateByName('MOVEMENT', !pauseButtonEnabled); this.props.automationApi.setAutomationStateByName('MOBILITY', !pauseButtonEnabled); } Loading Loading
js-apps/frontend/src/js/app-constants.js +37 −0 Changes for js-apps/frontend/src/js/app-constants.js: 37 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -15,6 +15,43 @@ export const PAGE_DASHBOARD = 'DASHBOARD'; // Networks export const DEFAULT_NO_NETWORK_FILE_SELECTED = 'Select a network'; export const SIMU5G_SCENARIO_NAMES = ['monaco-harbor', 'monaco-harbor-lite']; export function isSimu5gScenarioName(name) { return SIMU5G_SCENARIO_NAMES.indexOf(name) !== -1; } export function isExternalNwSimulatorType(type) { var t = (type || '').toLowerCase(); return t === 'simu5g' || t === 'oai'; } export function isExternalNwSimulatorScenario(name, scenario) { if (isSimu5gScenarioName(name)) { return true; } try { var meta = scenario && scenario.deployment && scenario.deployment.userMeta; if (!meta) { return false; } if (meta['network-info']) { var info = JSON.parse(meta['network-info']); if (isExternalNwSimulatorType(info.type)) { return true; } } if (meta['mec-sandbox']) { var ms = JSON.parse(meta['mec-sandbox']); if (isExternalNwSimulatorType(ms.connectivityModel)) { return true; } } } catch (e) { return false; } return false; } // Minimum screen resolution export const MIN_SCREEN_WIDTH = 840; Loading
js-apps/frontend/src/js/containers/sandbox/configuration-pane.js +12 −0 Changes for js-apps/frontend/src/js/containers/sandbox/configuration-pane.js: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import { import { PAGE_SANDBOX, DEFAULT_NO_NETWORK_FILE_SELECTED, isSimu5gScenarioName, isExternalNwSimulatorScenario, NO_SCENARIO_NAME, ALERT_DEGRADED_NETWORK, ALERT_NEM_NOT_RUNNING, Loading Loading @@ -406,6 +408,16 @@ class ConfigPane extends Component { updateAutomation(pauseButtonEnabled) { this.props.changeUpdateAutomationInProgressCount(2); if (isSimu5gScenarioName(this.props.networkFileSelected) || isSimu5gScenarioName(this.props.activationInProgressScenarioName) || isExternalNwSimulatorScenario(this.props.networkFileSelected, this.props.scenario) || isExternalNwSimulatorScenario(this.props.activationInProgressScenarioName, this.props.scenario)) { this.props.automationApi.setAutomationStateByName('MOVEMENT', false); this.props.automationApi.setAutomationStateByName('MOBILITY', !pauseButtonEnabled); this.props.automationApi.setAutomationStateByName('POAS-IN-RANGE', true); this.props.automationApi.setAutomationStateByName('NETWORK-CHARACTERISTICS-UPDATE', false); return; } this.props.automationApi.setAutomationStateByName('MOVEMENT', !pauseButtonEnabled); this.props.automationApi.setAutomationStateByName('MOBILITY', !pauseButtonEnabled); } Loading