diff --git a/node_modules/.cache/babel-loader/000234022385e7b29873235e876c67f8.json b/node_modules/.cache/babel-loader/000234022385e7b29873235e876c67f8.json deleted file mode 100644 index 468b590a..00000000 --- a/node_modules/.cache/babel-loader/000234022385e7b29873235e876c67f8.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import _regeneratorRuntime from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator\";\nimport _asyncToGenerator from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _classCallCheck from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _assertThisInitialized from \"/home/riddhi/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nvar _jsxFileName = \"/home/riddhi/frontend/src/components/App.js\";\nimport React, { Component } from 'react'; //import '../node_modules/bootstrap/dist/css/bootstrap.min.css';\n\nimport { Navigationbar } from './Navigationbar';\nimport Comp_image from './Comp_image';\nimport { Redirect, withRouter, Route, NavLink, Navbar, BrowserRouter as Router, Switch } from 'react-router-dom';\nimport './App.css';\nimport logo from '../images/spiri.png'; // Tell Webpack this JS file uses this image\n\nimport { withCookies } from 'react-cookie';\nimport { confirmAlert } from 'react-confirm-alert'; // Import\n\nimport 'react-confirm-alert/src/react-confirm-alert.css'; // Import css\n\nimport axios from 'axios';\nimport LoadingOverlay from 'react-loading-overlay';\nimport { thisExpression } from '@babel/types'; //import { withAuth } from '@okta/okta-react';\n\nvar App = /*#__PURE__*/function (_Component) {\n _inherits(App, _Component);\n\n function App(props) {\n var _this;\n\n _classCallCheck(this, App);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(App).call(this, props));\n _this.state = {\n isLoading: false,\n isAuthenticated: false,\n user: undefined,\n launch: false\n };\n var cookies = props.cookies;\n console.log(cookies);\n _this.state.csrfToken = cookies.get('XSRF-TOKEN');\n console.log(_this.state.csrfToken);\n _this.local = \"localhost:8080\";\n _this.prod = \"174.138.41.124:8080\";\n _this.status = \"local\";\n\n if (_this.status === \"local\") {\n _this.ip = _this.local;\n }\n\n _this.yourOktaDomain = \"dev-125890.okta.com\";\n _this.simulatorWindow = null;\n _this.shellWindow = null;\n _this.routeLogin = _this.routeLogin.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.login = _this.login.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.logout = _this.logout.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.routeMain = _this.routeMain.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.submit = _this.submit.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.getSimulator = _this.settingsSimulator.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.launchSimulator = _this.launchSimulator.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.attach = _this.attach.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.heartbeat = _this.heartbeat.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.wait = _this.wait.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n return _this;\n }\n\n _createClass(App, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var response, body;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(\"hereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\");\n _context.next = 3;\n return fetch(\"http://\".concat(this.ip, \"/api/user\"), {\n credentials: 'include'\n });\n\n case 3:\n response = _context.sent;\n console.log(response.ok);\n console.log(\"999999999999999999999999999999999999999\");\n _context.next = 8;\n return response.text();\n\n case 8:\n body = _context.sent;\n console.log(\"-----------------------\");\n console.log(response.ok);\n console.log(\"-----------------------\");\n\n if (body === '') {\n this.setState({\n isAuthenticated: false\n });\n } else {\n this.setState({\n isAuthenticated: true,\n user: JSON.parse(body)\n });\n }\n\n console.log(this.state.isAuthenticated);\n console.log(this.state.user);\n console.log(\"########################################\");\n console.log(this.state.isAuthenticated);\n\n case 17:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n }, {\n key: \"routeMain\",\n value: function routeMain() {\n var path = '/';\n this.props.history.push(path);\n }\n }, {\n key: \"login\",\n value: function login() {\n console.log(window.location);\n window.location.href = \"//\".concat(this.ip, \"/task/list\"); //window.location.href = `//${this.ip}/private`;\n }\n }, {\n key: \"wait\",\n value: function wait(ms) {\n var start = new Date().getTime();\n var end = start;\n\n while (end < start + ms) {\n end = new Date().getTime();\n }\n }\n }, {\n key: \"routeLogin\",\n value: function routeLogin() {\n var path = '/';\n this.props.history.push(path);\n } //http://174.138.41.124:8080/api/logout\n //https://${this.yourOktaDomain}/api/v1/users/${this.state.user.sub}/sessions\n\n }, {\n key: \"logout\",\n value: function () {\n var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {\n var _this2 = this;\n\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n //const proxyurl = `https://cors-anywhere.herokuapp.com/`;\n //const proxyurl = `https://arcane-beach-51923.herokuapp.com/`;\n //fetch(`https://${this.yourOktaDomain}/api/v1/users/${this.state.user.sub}/sessions`,\n fetch(\"https://\".concat(this.yourOktaDomain, \"/api/v1/sessions/me\"), {\n method: 'DELETE',\n //credentials: 'same-origin'\n credentials: 'include'\n }).then(function (response) {\n return response;\n }).then(function (json) {\n console.log('Gotcha');\n console.log(json.status === 204);\n console.log(json.status);\n console.log(_this2.state.isAuthenticated);\n\n if (json.status === 204) {\n _this2.state.isAuthenticated = false;\n\n _this2.routeMain();\n }\n\n if (json.status === 200) {\n _this2.state.isAuthenticated = false;\n\n _this2.routeMain();\n }\n\n console.log(_this2.state.isAuthenticated);\n }).then(function (reponse) {\n window.location.href = \"http://localhost:8080/api/logout\";\n }).then(function (reponse) {\n _this2.wait(3000);\n\n window.location.href = \"http://localhost:3000/\";\n }); //window.location.href = `http://localhost:8080/api/logout`;\n\n console.log(\"YYYYYYYYYYYYYYYYYYYYYYYYYY\");\n console.log(\"YYYYYYYYYYYYYYYYYYYYYYYYYY\");\n\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function logout() {\n return _logout.apply(this, arguments);\n }\n\n return logout;\n }()\n }, {\n key: \"submit\",\n value: function submit() {\n var _this3 = this;\n\n confirmAlert({\n title: 'Confirm to logout',\n message: 'Are you sure?',\n buttons: [{\n label: 'Yes',\n onClick: function onClick() {\n return _this3.logout();\n }\n }, {\n label: 'No',\n onClick: function onClick() {\n return _this3.routeMain();\n }\n }]\n });\n }\n }, {\n key: \"attach\",\n value: function attach() {\n var _this4 = this;\n\n this.timer = setInterval(function () {\n return _this4.heartbeat();\n }, 10000);\n }\n }, {\n key: \"heartbeat\",\n value: function () {\n var _heartbeat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n fetch(\"http://\".concat(this.ip, \"/simulator/logheartbeat/\").concat(this.state.user.sub), {\n credentials: 'include'\n }).then(function (response) {\n return response.json();\n }).then(function (responseData) {\n console.log(\"Heart Beating\");\n }).catch(function (error) {\n console.error(error);\n });\n\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function heartbeat() {\n return _heartbeat.apply(this, arguments);\n }\n\n return heartbeat;\n }() //launchSimulator(urlAction) {\n\n }, {\n key: \"launchSimulator\",\n value: function launchSimulator() {\n //const url = urlAction;\n //const url = \"http://localhost\";\n window.location.href = \"http://localhost:3000/simulator\"; //this.simulatorWindow = window.open(url + \":8888\", '_blank');\n //this.shellWindow = window.open(url + \":4200\", '_self');\n }\n }, {\n key: \"settingsSimulator\",\n value: function settingsSimulator(launch) {\n var _this5 = this;\n\n if (launch) {\n var httpClient = axios.create();\n httpClient.defaults.timeout = 600000; // TODO : detach the heartbeat\n\n httpClient.get(\"http://\".concat(this.ip, \"/simulator/stop/\").concat(this.state.user.sub), {\n withCredentials: true\n }).then(function (res) {\n _this5.setState({\n launch: false\n });\n });\n } else {\n /*this.setState({isLoading : true, launch: true});\n this.attach(this.state.launch);\n const httpClient = axios.create();\n httpClient.defaults.timeout = 600000;\n httpClient.get(`http://${this.ip}/simulator/start/${this.state.user.sub}/${this.state.user.given_name}/spiri-friend2019@`, { withCredentials: true })\n .then(res => {\n this.setState({simulator: res.data, isLoading: false});\n this.launchSimulator(this.state.simulator.publicIp);\n })*/\n this.launchSimulator();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var options = this.state.isAuthenticated ? /*#__PURE__*/React.createElement(\"div\", {\n id: \"navbar\",\n class: \"navbar-collapse\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 219,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"ul\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 220,\n columnNumber: 25\n }\n }, /*#__PURE__*/React.createElement(\"li\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 221,\n columnNumber: 27\n }\n }, /*#__PURE__*/React.createElement(NavLink, {\n style: {\n textDecoration: 'none'\n },\n onClick: this.submit,\n class: \"logout\",\n to: \"/\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 222,\n columnNumber: 31\n }\n }, \"Logout\")))) : /*#__PURE__*/React.createElement(\"div\", {\n id: \"navbar\",\n class: \"navbar-collapse\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 229,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"ul\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 230,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"li\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 231,\n columnNumber: 23\n }\n }, /*#__PURE__*/React.createElement(NavLink, {\n style: {\n textDecoration: 'none'\n },\n onClick: this.login,\n class: \"login\",\n to: \"\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 232,\n columnNumber: 27\n }\n }, \"Login\"))));\n var simulator = this.state.isAuthenticated ? /*#__PURE__*/React.createElement(\"div\", {\n class: \"SimulatorButton\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 242,\n columnNumber: 15\n }\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"SimulatorButton\",\n onClick: function onClick() {\n _this6.settingsSimulator(_this6.state.launch);\n },\n disabled: this.state.isLoading,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 244,\n columnNumber: 17\n }\n }, this.state.isLoading && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-refresh fa-spin\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 247,\n columnNumber: 48\n }\n }), !this.state.launch && /*#__PURE__*/React.createElement(\"span\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 248,\n columnNumber: 46\n }\n }, \" Launch Simulator \"), this.state.launch && /*#__PURE__*/React.createElement(\"span\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 249,\n columnNumber: 45\n }\n }, \" Stop Simulator \"))) : null;\n var mainBody = /*#__PURE__*/React.createElement(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 255,\n columnNumber: 24\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n class: \"SpiriImage\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 256,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: logo,\n width: '1000cm',\n height: '563cm',\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 257,\n columnNumber: 13\n }\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"Text\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 260,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(Comp_image, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 261,\n columnNumber: 13\n }\n })), /*#__PURE__*/React.createElement(\"footer\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 264,\n columnNumber: 9\n }\n }));\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"App\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 273,\n columnNumber: 9\n }\n }, mainBody);\n }\n }]);\n\n return App;\n}(Component);\n\nexport default withRouter(withCookies(App));","map":{"version":3,"sources":["/home/riddhi/frontend/src/components/App.js"],"names":["React","Component","Navigationbar","Comp_image","Redirect","withRouter","Route","NavLink","Navbar","BrowserRouter","Router","Switch","logo","withCookies","confirmAlert","axios","LoadingOverlay","thisExpression","App","props","state","isLoading","isAuthenticated","user","undefined","launch","cookies","console","log","csrfToken","get","local","prod","status","ip","yourOktaDomain","simulatorWindow","shellWindow","routeLogin","bind","login","logout","routeMain","submit","getSimulator","settingsSimulator","launchSimulator","attach","heartbeat","wait","fetch","credentials","response","ok","text","body","setState","JSON","parse","path","history","push","window","location","href","ms","start","Date","getTime","end","method","then","json","reponse","title","message","buttons","label","onClick","timer","setInterval","sub","responseData","catch","error","httpClient","create","defaults","timeout","withCredentials","res","options","textDecoration","simulator","mainBody"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,SAASC,QAAT,EAAmBC,UAAnB,EAA+BC,KAA/B,EAAsCC,OAAtC,EAA+CC,MAA/C,EAAuDC,aAAa,IAAIC,MAAxE,EAAgFC,MAAhF,QAAiG,kBAAjG;AACA,OAAO,WAAP;AACA,OAAOC,IAAP,MAAiB,qBAAjB,C,CAAuC;;AACvC,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,YAAT,QAA6B,qBAA7B,C,CAAoD;;AACpD,OAAO,iDAAP,C,CAA0D;;AAC1D,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,cAAP,MAA2B,uBAA3B;AACA,SAASC,cAAT,QAA+B,cAA/B,C,CACA;;IAGMC,G;;;AAQJ,eAAYC,KAAZ,EAAkB;AAAA;;AAAA;;AAChB,6EAAMA,KAAN;AADgB,UAPlBC,KAOkB,GAPV;AACNC,MAAAA,SAAS,EAAE,KADL;AAENC,MAAAA,eAAe,EAAE,KAFX;AAGNC,MAAAA,IAAI,EAAEC,SAHA;AAINC,MAAAA,MAAM,EAAE;AAJF,KAOU;AAAA,QAETC,OAFS,GAEEP,KAFF,CAETO,OAFS;AAGhBC,IAAAA,OAAO,CAACC,GAAR,CAAYF,OAAZ;AACA,UAAKN,KAAL,CAAWS,SAAX,GAAuBH,OAAO,CAACI,GAAR,CAAY,YAAZ,CAAvB;AACAH,IAAAA,OAAO,CAACC,GAAR,CAAY,MAAKR,KAAL,CAAWS,SAAvB;AACA,UAAKE,KAAL,GAAa,gBAAb;AACA,UAAKC,IAAL,GAAY,qBAAZ;AACA,UA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M,EAAE,OAAzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADe,eAKf;AAAK,QAAA,SAAS,EAAC,MAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBACI,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CALe,eASf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QATe,CAAjB;AAgBA,0BAEE;AAAK,QAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACIkF,QADJ,CAFF;AAOH;;;;EArQe7F,S;;AAuQlB,eAAeI,UAAU,CAACQ,WAAW,CAACK,GAAD,CAAZ,CAAzB","sourcesContent":["import React, { Component } from 'react';\n//import '../node_modules/bootstrap/dist/css/bootstrap.min.css';\nimport { Navigationbar } from './Navigationbar';\nimport Comp_image from './Comp_image';\nimport { Redirect, withRouter, Route, NavLink, Navbar, BrowserRouter as Router, Switch } from 'react-router-dom'\nimport './App.css';\nimport logo from '../images/spiri.png';// Tell Webpack this JS file uses this image\nimport { withCookies } from 'react-cookie';\nimport { confirmAlert } from 'react-confirm-alert'; // Import\nimport 'react-confirm-alert/src/react-confirm-alert.css'; // Import css\nimport axios from 'axios';\nimport LoadingOverlay from 'react-loading-overlay';\nimport { thisExpression } from '@babel/types';\n//import { withAuth } from '@okta/okta-react';\n\n\nclass App extends Component{\n state = {\n isLoading: false,\n isAuthenticated: false,\n user: undefined,\n launch: false\n };\n\n constructor(props){\n super(props);\n const {cookies} = props;\n console.log(cookies);\n this.state.csrfToken = cookies.get('XSRF-TOKEN');\n console.log(this.state.csrfToken);\n this.local = \"localhost:8080\";\n this.prod = \"174.138.41.124:8080\";\n this.status = \"local\"\n if (this.status === \"local\") {\n this.ip = this.local;\n }\n this.yourOktaDomain = \"dev-125890.okta.com\";\n this.simulatorWindow = null;\n this.shellWindow = null;\n this.routeLogin = this.routeLogin.bind(this);\n this.login = this.login.bind(this);\n this.logout = this.logout.bind(this);\n this.routeMain =this.routeMain.bind(this);\n this.submit = this.submit.bind(this);\n this.getSimulator = this.settingsSimulator.bind(this);\n this.launchSimulator = this.launchSimulator.bind(this);\n this.attach = this.attach.bind(this);\n this.heartbeat = this.heartbeat.bind(this);\n this.wait = this.wait.bind(this);\n }\n\n async componentDidMount() {\n console.log(\"hereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\");\n const response = await fetch(`http://${this.ip}/api/user`, {credentials: 'include'});\n console.log(response.ok);\n console.log(\"999999999999999999999999999999999999999\");\n const body = await response.text();\n console.log(\"-----------------------\");\n console.log(response.ok)\n console.log(\"-----------------------\");\n if (body === '') {\n this.setState(({isAuthenticated: false}))\n } else {\n this.setState({isAuthenticated: true, user: JSON.parse(body)})\n }\n console.log(this.state.isAuthenticated);\n \n console.log(this.state.user);\n console.log(\"########################################\");\n console.log(this.state.isAuthenticated);\n }\n\n routeMain() {\n let path = '/';\n this.props.history.push(path);\n }\n\n login() {\n console.log(window.location)\n window.location.href = `//${this.ip}/task/list`;\n //window.location.href = `//${this.ip}/private`;\n }\n wait(ms){\n var start = new Date().getTime();\n var end = start;\n while(end < start + ms) {\n end = new Date().getTime();\n }\n }\n\n routeLogin() {\n let path = '/';\n this.props.history.push(path);\n }\n\n //http://174.138.41.124:8080/api/logout\n //https://${this.yourOktaDomain}/api/v1/users/${this.state.user.sub}/sessions\n \n async logout() { \n //const proxyurl = `https://cors-anywhere.herokuapp.com/`;\n //const proxyurl = `https://arcane-beach-51923.herokuapp.com/`;\n \n //fetch(`https://${this.yourOktaDomain}/api/v1/users/${this.state.user.sub}/sessions`,\n fetch(`https://${this.yourOktaDomain}/api/v1/sessions/me`,\n {\n method : 'DELETE',\n //credentials: 'same-origin'\n credentials: 'include',\n })\n .then((response) => response) \n .then((json) => {\n console.log('Gotcha');\n console.log(json.status === 204);\n console.log(json.status);\n console.log(this.state.isAuthenticated);\n if (json.status === 204) {\n this.state.isAuthenticated = false;\n this.routeMain();\n }\n if (json.status === 200) {\n this.state.isAuthenticated = false;\n this.routeMain();\n }\n console.log(this.state.isAuthenticated);\n })\n .then(reponse => {\n window.location.href = \"http://localhost:8080/api/logout\";\n })\n .then(reponse => {\n this.wait(3000);\n window.location.href = \"http://localhost:3000/\";\n });\n\n \n\n //window.location.href = `http://localhost:8080/api/logout`;\n \n console.log(\"YYYYYYYYYYYYYYYYYYYYYYYYYY\");\n console.log(\"YYYYYYYYYYYYYYYYYYYYYYYYYY\");\n }\n\n submit() {\n confirmAlert({\n title: 'Confirm to logout',\n message: 'Are you sure?',\n buttons: [\n {\n label: 'Yes',\n onClick: () => this.logout()\n },\n {\n label: 'No',\n onClick: () => this.routeMain()\n }\n ]\n });\n };\n\n \n attach() {\n this.timer = setInterval(()=> this.heartbeat(), 10000);\n }\n \n async heartbeat(){\n fetch(`http://${this.ip}/simulator/logheartbeat/${this.state.user.sub}`, {credentials: 'include'})\n .then((response) => response.json())\n .then((responseData) =>\n {\n \n console.log(\"Heart Beating\")\n })\n .catch((error) => {\n console.error(error);\n });\n }\n\n //launchSimulator(urlAction) {\n launchSimulator() {\n //const url = urlAction;\n //const url = \"http://localhost\";\n window.location.href = \"http://localhost:3000/simulator\";\n //this.simulatorWindow = window.open(url + \":8888\", '_blank');\n //this.shellWindow = window.open(url + \":4200\", '_self');\n }\n\n settingsSimulator(launch) {\n if (launch){\n const httpClient = axios.create();\n httpClient.defaults.timeout = 600000;\n \n // TODO : detach the heartbeat\n \n httpClient.get(`http://${this.ip}/simulator/stop/${this.state.user.sub}`, { withCredentials: true })\n .then(res => {\n this.setState({launch: false});\n })\n }\n else {\n /*this.setState({isLoading : true, launch: true});\n this.attach(this.state.launch);\n\n const httpClient = axios.create();\n httpClient.defaults.timeout = 600000;\n\n httpClient.get(`http://${this.ip}/simulator/start/${this.state.user.sub}/${this.state.user.given_name}/spiri-friend2019@`, { withCredentials: true })\n .then(res => {\n this.setState({simulator: res.data, isLoading: false});\n this.launchSimulator(this.state.simulator.publicIp);\n })*/\n this.launchSimulator();\n }\n \n }\n \n \n\n render() {\n const options = this.state.isAuthenticated ? \n
\n :\n \n \n \n\n const simulator = this.state.isAuthenticated ?\nAbout US page body content
\nAbout US Bottom page body content
\nAbout US page body content
\nAbout US Bottom page body content
\nLoading...
;\n }\n \n const taskList = tasks.map(task => {\n returnTask Name | \nProgress | \nAction | \n
---|
About US page body content
\nLoading...
;\n }\n \n const taskList = tasks.map(task => {\n returnTask Name | \nProgress | \nAction | \n
---|
About US page body content
\nAbout US page body content
\nAbout US Bottom page body content
\nLoading...
;\n }\n \n const taskList = tasks.map(task => {\n returnTask Name | \nProgress | \nAction | \n
---|
About US page body content
\nAbout US page body content
\nAbout US Bottom page body content
\nAbout US page body content
\n- - - -
- -
- Sleek, intuitive, and powerful front-end framework for faster and easier web development.
-
- Explore Bootstrap docs »
-
-
- Report bug
- ·
- Request feature
- ·
- Themes
- ·
- Blog
-
`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Remove the bottom border in Firefox 39-.\n// 5. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-original-title] { // 1\n text-decoration: underline; // 2\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n border-bottom: 0; // 4\n text-decoration-skip-ink: none; // 5\n}\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // Undo browser default\n}\n\nblockquote {\n margin: 0 0 1rem;\n}\n\nb,\nstrong {\n font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari\n}\n\nsmall {\n @include font-size(80%); // Add the correct font size in all browsers\n}\n\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n//\n\nsub,\nsup {\n position: relative;\n @include font-size(75%);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n//\n// Links\n//\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n background-color: transparent; // Remove the gray background on active links in IE 10.\n\n @include hover() {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n color: inherit;\n text-decoration: none;\n\n @include hover() {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n//\n// Code\n//\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-monospace;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n}\n\npre {\n // Remove browser default top margin\n margin-top: 0;\n // Reset browser default of `1em` to use `rem`s\n margin-bottom: 1rem;\n // Don't allow content to break outside\n overflow: auto;\n // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,\n // making it impossible to interact with the content\n -ms-overflow-style: scrollbar;\n}\n\n\n//\n// Figures\n//\n\nfigure {\n // Apply a consistent margin strategy (matches our type styles).\n margin: 0 0 1rem;\n}\n\n\n//\n// Images and content\n//\n\nimg {\n vertical-align: middle;\n border-style: none; // Remove the border on images inside links in IE 10-.\n}\n\nsvg {\n // Workaround for the SVG overflow bug in IE10/11 is still required.\n // See https://github.com/twbs/bootstrap/issues/26878\n overflow: hidden;\n vertical-align: middle;\n}\n\n\n//\n// Tables\n//\n\ntable {\n border-collapse: collapse; // Prevent double borders\n}\n\ncaption {\n padding-top: $table-cell-padding;\n padding-bottom: $table-cell-padding;\n color: $table-caption-color;\n text-align: left;\n caption-side: bottom;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `