Loading examples/demo3/entrypoint.sh +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ set -e echo "mode: advantedge" >app_instance.yaml echo "sandbox:" >>app_instance.yaml echo "mecplatform: ${MEEP_MEP_NAME}" >>app_instance.yaml echo "appid:" ${MEEP_INSTANCE_ID} >>app_instance.yaml echo "appid:" ${MEEP_APP_ID} >>app_instance.yaml echo "localurl: ${MEEP_POD_NAME}" >>app_instance.yaml echo "port:" >>app_instance.yaml Loading examples/demo3/src/frontend/src/js/containers/Homepage.js +8 −20 Original line number Diff line number Diff line Loading @@ -134,7 +134,6 @@ export default function Homepage() { setAppInfo({}); setAmsLog([]); setRegisteration(false); setTerminalDevices([]); appInfoApi.deregister((err, data, resp) => { if (err !== null) { // console.log(err); Loading @@ -156,34 +155,23 @@ export default function Homepage() { }); }; const [terminalDevices, setTerminalDevices] = useState([]); const removeAmsDevice = async (device) => { let mutableArray = terminalDevices; appInfoApi.deleteAmsDevice(device, (err, data, resp) => { if (err !== null) { // console.log(err); } else { const result = mutableArray.filter((e) => e != device); setTerminalDevices(result); } }); }; const addTerminalDevices = () => { let devices = terminalDevices; let deviceMap = new Set(devices); if (!deviceMap.has(textValue)) { appInfoApi.updateAmsDevices(textValue, (err, data, resp) => { if (err !== null) { // console.log(err); } else { setTerminalDevices((e) => [...e, textValue]); } }); } }; ; return ( <ThemeProvider theme={theme}> Loading Loading
examples/demo3/entrypoint.sh +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ set -e echo "mode: advantedge" >app_instance.yaml echo "sandbox:" >>app_instance.yaml echo "mecplatform: ${MEEP_MEP_NAME}" >>app_instance.yaml echo "appid:" ${MEEP_INSTANCE_ID} >>app_instance.yaml echo "appid:" ${MEEP_APP_ID} >>app_instance.yaml echo "localurl: ${MEEP_POD_NAME}" >>app_instance.yaml echo "port:" >>app_instance.yaml Loading
examples/demo3/src/frontend/src/js/containers/Homepage.js +8 −20 Original line number Diff line number Diff line Loading @@ -134,7 +134,6 @@ export default function Homepage() { setAppInfo({}); setAmsLog([]); setRegisteration(false); setTerminalDevices([]); appInfoApi.deregister((err, data, resp) => { if (err !== null) { // console.log(err); Loading @@ -156,34 +155,23 @@ export default function Homepage() { }); }; const [terminalDevices, setTerminalDevices] = useState([]); const removeAmsDevice = async (device) => { let mutableArray = terminalDevices; appInfoApi.deleteAmsDevice(device, (err, data, resp) => { if (err !== null) { // console.log(err); } else { const result = mutableArray.filter((e) => e != device); setTerminalDevices(result); } }); }; const addTerminalDevices = () => { let devices = terminalDevices; let deviceMap = new Set(devices); if (!deviceMap.has(textValue)) { appInfoApi.updateAmsDevices(textValue, (err, data, resp) => { if (err !== null) { // console.log(err); } else { setTerminalDevices((e) => [...e, textValue]); } }); } }; ; return ( <ThemeProvider theme={theme}> Loading