Loading go-apps/meep-virt-engine/server/virt-engine.go +0 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ func terminateScenario(sandboxName string) { if err == nil && chartsToDelete == 0 { // Remove modle & cached scenario ve.activeScenarioNames[sandboxName] = "" ve.activeModels[sandboxName] = nil ticker.Stop() return } else { Loading js-apps/meep-frontend/src/js/components/dialogs/id-delete-sandbox-dialog.js 0 → 100644 +53 −0 Original line number Diff line number Diff line /* * Copyright (c) 2019 InterDigital Communications, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React, { Component } from 'react'; import IDDialog from './id-dialog'; import { MEEP_DLG_DELETE_SANDBOX } from '../../meep-constants'; class IDDeleteSandboxDialog extends Component { constructor(props) { super(props); this.state = {}; } render() { return ( <IDDialog title={this.props.title} open={this.props.open} onClose={this.props.onClose} onSubmit={this.props.deleteSandbox} cydata={MEEP_DLG_DELETE_SANDBOX} > <span style={styles.text}> { 'Are you sure you want to delete the current sandbox?' } </span> </IDDialog> ); } } const styles = { text: { color: 'gray' } }; export default IDDeleteSandboxDialog; js-apps/meep-frontend/src/js/components/dialogs/id-deploy-scenario-dialog.js +4 −16 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import React, { Component } from 'react'; import IDDialog from './id-dialog'; import IDSelect from '../helper-components/id-select'; import { SANDBOX_NAME, MEEP_DLG_DEPLOY_SCENARIO, MEEP_DLG_DEPLOY_SCENARIO_SELECT } from '../../meep-constants'; Loading @@ -39,19 +38,10 @@ class IDDeployScenarioDialog extends Component { return; } // this.props.api.activateScenario( // this.state.selectedScenario, // null, // this.props.activateScenarioCb // ); var sandboxConfig = { scenarioName: this.state.selectedScenario }; this.props.api.createSandboxWithName( SANDBOX_NAME, sandboxConfig, this.props.createSandboxWithNameCb this.props.api.activateScenario( this.state.selectedScenario, null, this.props.activateScenarioCb ); } Loading Loading @@ -81,5 +71,3 @@ class IDDeployScenarioDialog extends Component { } export default IDDeployScenarioDialog; // js-apps/meep-frontend/src/js/components/dialogs/id-new-sandbox-dialog.js 0 → 100644 +77 −0 Original line number Diff line number Diff line /* * Copyright (c) 2019 InterDigital Communications, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React, { Component } from 'react'; import { TextField, TextFieldHelperText } from '@rmwc/textfield'; import IDDialog from './id-dialog'; import { MEEP_DLG_NEW_SANDBOX, MEEP_DLG_NEW_SANDBOX_NAME } from '../../meep-constants'; class IDNewSandboxDialog extends Component { constructor(props) { super(props); this.state = { sandboxName: '', err: null }; } changeSandboxName(name) { var err = null; if (name) { if (name.length > 20) { err = 'Maximum 20 characters'; } else if (!name.match(/^(([a-z0-9][-a-z0-9.]*)?[a-z0-9])+$/)) { err = 'Lowercase alphanumeric or \'-\''; } } this.setState({ sandboxName: name, err: err }); } render() { return ( <IDDialog title={this.props.title} open={this.props.open} onClose={this.props.onClose} onSubmit={() => {this.props.createSandbox(this.state.sandboxName);}} cydata={MEEP_DLG_NEW_SANDBOX} > <TextField outlined style={{ width: '100%' }} label={'Sandbox Name'} onChange={e => { this.changeSandboxName(e.target.value); }} value={this.state.sandboxName} invalid={this.state.err ? true : false} data-cy={MEEP_DLG_NEW_SANDBOX_NAME} /> <TextFieldHelperText validationMsg={true}> <span>{this.state.err}</span> </TextFieldHelperText> </IDDialog> ); } } export default IDNewSandboxDialog; js-apps/meep-frontend/src/js/containers/exec/dashboard-container.js +4 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import { } from '../../state/ui'; import { SANDBOX_NAME, TYPE_EXEC, VIEW_NAME_NONE, NET_TOPOLOGY_VIEW, Loading Loading @@ -130,6 +129,7 @@ const getUrl = (dashboardName, dashboardOptions) => { }; const ViewForName = ({ sandboxName, scenarioName, selectedSource, selectedDest, Loading Loading @@ -163,7 +163,7 @@ const ViewForName = ({ selectedUrl = selectedUrl.replace(passVarsStr, ''); // Prepend sandbox name to scenario name and replace '-' with '_' var sandboxScenario = SANDBOX_NAME + '_' + scenarioName; var sandboxScenario = sandboxName + '_' + scenarioName; var scenario = sandboxScenario.replace(/-/g, '_'); var url = new URL(selectedUrl); Loading Loading @@ -303,6 +303,7 @@ class DashboardContainer extends Component { const view1 = ( <ViewForName sandboxName={this.props.sandbox} scenarioName={this.props.scenarioName} selectedSource={selectedSource} selectedDest={selectedDest} Loading @@ -313,6 +314,7 @@ class DashboardContainer extends Component { const view2 = ( <ViewForName sandboxName={this.props.sandbox} scenarioName={this.props.scenarioName} selectedSource={selectedSource} selectedDest={selectedDest} Loading Loading
go-apps/meep-virt-engine/server/virt-engine.go +0 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ func terminateScenario(sandboxName string) { if err == nil && chartsToDelete == 0 { // Remove modle & cached scenario ve.activeScenarioNames[sandboxName] = "" ve.activeModels[sandboxName] = nil ticker.Stop() return } else { Loading
js-apps/meep-frontend/src/js/components/dialogs/id-delete-sandbox-dialog.js 0 → 100644 +53 −0 Original line number Diff line number Diff line /* * Copyright (c) 2019 InterDigital Communications, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React, { Component } from 'react'; import IDDialog from './id-dialog'; import { MEEP_DLG_DELETE_SANDBOX } from '../../meep-constants'; class IDDeleteSandboxDialog extends Component { constructor(props) { super(props); this.state = {}; } render() { return ( <IDDialog title={this.props.title} open={this.props.open} onClose={this.props.onClose} onSubmit={this.props.deleteSandbox} cydata={MEEP_DLG_DELETE_SANDBOX} > <span style={styles.text}> { 'Are you sure you want to delete the current sandbox?' } </span> </IDDialog> ); } } const styles = { text: { color: 'gray' } }; export default IDDeleteSandboxDialog;
js-apps/meep-frontend/src/js/components/dialogs/id-deploy-scenario-dialog.js +4 −16 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import React, { Component } from 'react'; import IDDialog from './id-dialog'; import IDSelect from '../helper-components/id-select'; import { SANDBOX_NAME, MEEP_DLG_DEPLOY_SCENARIO, MEEP_DLG_DEPLOY_SCENARIO_SELECT } from '../../meep-constants'; Loading @@ -39,19 +38,10 @@ class IDDeployScenarioDialog extends Component { return; } // this.props.api.activateScenario( // this.state.selectedScenario, // null, // this.props.activateScenarioCb // ); var sandboxConfig = { scenarioName: this.state.selectedScenario }; this.props.api.createSandboxWithName( SANDBOX_NAME, sandboxConfig, this.props.createSandboxWithNameCb this.props.api.activateScenario( this.state.selectedScenario, null, this.props.activateScenarioCb ); } Loading Loading @@ -81,5 +71,3 @@ class IDDeployScenarioDialog extends Component { } export default IDDeployScenarioDialog; //
js-apps/meep-frontend/src/js/components/dialogs/id-new-sandbox-dialog.js 0 → 100644 +77 −0 Original line number Diff line number Diff line /* * Copyright (c) 2019 InterDigital Communications, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React, { Component } from 'react'; import { TextField, TextFieldHelperText } from '@rmwc/textfield'; import IDDialog from './id-dialog'; import { MEEP_DLG_NEW_SANDBOX, MEEP_DLG_NEW_SANDBOX_NAME } from '../../meep-constants'; class IDNewSandboxDialog extends Component { constructor(props) { super(props); this.state = { sandboxName: '', err: null }; } changeSandboxName(name) { var err = null; if (name) { if (name.length > 20) { err = 'Maximum 20 characters'; } else if (!name.match(/^(([a-z0-9][-a-z0-9.]*)?[a-z0-9])+$/)) { err = 'Lowercase alphanumeric or \'-\''; } } this.setState({ sandboxName: name, err: err }); } render() { return ( <IDDialog title={this.props.title} open={this.props.open} onClose={this.props.onClose} onSubmit={() => {this.props.createSandbox(this.state.sandboxName);}} cydata={MEEP_DLG_NEW_SANDBOX} > <TextField outlined style={{ width: '100%' }} label={'Sandbox Name'} onChange={e => { this.changeSandboxName(e.target.value); }} value={this.state.sandboxName} invalid={this.state.err ? true : false} data-cy={MEEP_DLG_NEW_SANDBOX_NAME} /> <TextFieldHelperText validationMsg={true}> <span>{this.state.err}</span> </TextFieldHelperText> </IDDialog> ); } } export default IDNewSandboxDialog;
js-apps/meep-frontend/src/js/containers/exec/dashboard-container.js +4 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import { } from '../../state/ui'; import { SANDBOX_NAME, TYPE_EXEC, VIEW_NAME_NONE, NET_TOPOLOGY_VIEW, Loading Loading @@ -130,6 +129,7 @@ const getUrl = (dashboardName, dashboardOptions) => { }; const ViewForName = ({ sandboxName, scenarioName, selectedSource, selectedDest, Loading Loading @@ -163,7 +163,7 @@ const ViewForName = ({ selectedUrl = selectedUrl.replace(passVarsStr, ''); // Prepend sandbox name to scenario name and replace '-' with '_' var sandboxScenario = SANDBOX_NAME + '_' + scenarioName; var sandboxScenario = sandboxName + '_' + scenarioName; var scenario = sandboxScenario.replace(/-/g, '_'); var url = new URL(selectedUrl); Loading Loading @@ -303,6 +303,7 @@ class DashboardContainer extends Component { const view1 = ( <ViewForName sandboxName={this.props.sandbox} scenarioName={this.props.scenarioName} selectedSource={selectedSource} selectedDest={selectedDest} Loading @@ -313,6 +314,7 @@ class DashboardContainer extends Component { const view2 = ( <ViewForName sandboxName={this.props.sandbox} scenarioName={this.props.scenarioName} selectedSource={selectedSource} selectedDest={selectedDest} Loading