{"version":3,"sources":["webpack:///./src/views/labs/terminal/index.vue?456d","webpack:///./src/views/labs/terminal/index.vue?c044","webpack:///./src/views/labs/terminal/index.vue?76ec","webpack:///./src/views/labs/terminal/index.vue?e195","webpack:///./src/views/labs/terminal/index.vue","webpack:///enums.ts","webpack:///./src/views/labs/terminal/index.vue?8a70","webpack:///timeHelpers.ts"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","ref","attrs","on","iframeLoad","_e","slot","_v","class","active","isSSHConnection","$event","navigateToConnection","isRDPConnection","isPSConnection","isWRDPConnection","modalTitle","dialogVisible","handleClose","_s","modalMessage","handleGuacAuthentication","staticRenderFns","actionOptions","connectionType","SSH","document","addEventListener","refocusGuacamole","$router","currentRoute","meta","title","RDP","verifyGuacAuthentication","removeEventListener","PS","WRDP","e","path","rootPath","substring","lastIndexOf","push","focused","activeElement","controlPanelItem","$refs","$el","collapseContent","firstChild","body","iframe","guac","focus","name","component","ConnectionTypes","MachineType"],"mappings":"+FACAA,EAAOC,QAAU,CAAC,gBAAkB,UAAU,eAAiB,OAAO,OAAS,UAAU,SAAW,UAAU,eAAiB,S,2CCD/H,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAAEN,EAAmB,gBAAEI,EAAG,SAAS,CAACG,IAAI,OAAOC,MAAM,CAAC,GAAK,OAAO,QAAU,2DAA2D,IAAM,4DAA4DC,GAAG,CAAC,KAAOT,EAAIU,cAAcV,EAAIW,KAAMX,EAAmB,gBAAEI,EAAG,SAAS,CAACG,IAAI,OAAOC,MAAM,CAAC,GAAK,UAAU,QAAU,2DAA2D,IAAM,gEAAgER,EAAIW,KAAKP,EAAG,cAAc,CAACI,MAAM,CAAC,GAAK,QAAQ,UAAY,KAAK,CAACJ,EAAG,mBAAmB,CAACG,IAAI,mBAAmBC,MAAM,CAAC,G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AC5C,OAAO,EAAU,KAGN,EAAgC,WAC3C,IAAI,EAAkB,EAAsB,kBAC5C,OAAO,EAAU,KAGN,EAA2B,WACrC,OAAO,KACL,2DACA,UAEF,eAAoC,IAAI,OAG9B,EAA0B,WACrC,OAAO,KACL,6DACA,UAEF,eAAmC,IAAI","file":"js/terminal.69dcbb1e.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"activeIconColor\":\"#00acac\",\"menuColorHover\":\"#fff\",\"menuBg\":\"#2d353c\",\"menuText\":\"#a8acb1\",\"menuActiveText\":\"#fff\"};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"terminal-container\"},[(_vm.isSSHConnection)?_c('iframe',{ref:\"guac\",attrs:{\"id\":\"guac\",\"sandbox\":\"allow-same-origin allow-scripts allow-popups allow-forms\",\"src\":\"https://shell.cyberlab.evolvesecurity.com:8443/guacamole\"},on:{\"load\":_vm.iframeLoad}}):_vm._e(),(_vm.isRDPConnection)?_c('iframe',{ref:\"guac\",attrs:{\"id\":\"guacRdp\",\"sandbox\":\"allow-same-origin allow-scripts allow-popups allow-forms\",\"src\":\"https://desktop.cyberlab.evolvesecurity.com:8443/guacamole\"}}):_vm._e(),_c('el-collapse',{attrs:{\"id\":\"panel\",\"accordion\":\"\"}},[_c('el-collapse-item',{ref:\"controlPanelItem\",attrs:{\"id\":\"panel-item\",\"name\":\"1\"}},[_c('template',{slot:\"title\"},[_c('span',[_vm._v(\"Control Panel\")])]),_c('div',{staticClass:\"white-background-color bottom-padding\"},[_c('div',{staticClass:\"panel-header\"},[_vm._v(\"ESA Linux\")]),_c('div',{staticClass:\"center-text-align\"},[_c('el-button',{staticClass:\"green-background\",class:{active: _vm.isSSHConnection},on:{\"click\":function($event){return _vm.navigateToConnection('SSH')}}},[_c('console-icon',{staticClass:\"icon-4x\"}),_c('div',{staticClass:\"display-inline-block middle-vertical-align margin-left-1\"},[_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"START\")]),_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"SSH\")])])],1),_c('el-button',{staticClass:\"green-background\",class:{active: _vm.isRDPConnection},on:{\"click\":function($event){return _vm.navigateToConnection('RDP')}}},[_c('desktop-mac-icon',{staticClass:\"icon-4x\"}),_c('div',{staticClass:\"display-inline-block middle-vertical-align small-margin-left\"},[_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"START\")]),_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"DESKTOP\")])])],1)],1),_c('div',{staticClass:\"center-text-align small-margin-top\"},[_c('el-button',{staticClass:\"blue-background\"},[_c('timelapse-icon'),_c('span',{staticClass:\"medium-margin-left el-button-label\"},[_vm._v(\"ADD TIME\")])],1),_c('el-button',{staticClass:\"black-background\"},[_c('restart-icon'),_c('span',{staticClass:\"medium-margin-left el-button-label\"},[_vm._v(\"RESTART\")])],1)],1)]),_c('div',{staticClass:\"grey-background-color bottom-padding bottom-radius\"},[_c('div',{staticClass:\"panel-header white-color\"},[_vm._v(\"Window Server\")]),_c('div',{staticClass:\"center-text-align\"},[_c('el-button',{staticClass:\"green-background\",class:{active: _vm.isPSConnection},on:{\"click\":function($event){return _vm.navigateToConnection('PS')}}},[_c('powershell-icon',{staticClass:\"icon-4x\"}),_c('div',{staticClass:\"display-inline-block middle-vertical-align margin-left-1\"},[_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"START\")]),_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"SSH\")])])],1),_c('el-button',{staticClass:\"green-background\",class:{active: _vm.isWRDPConnection},on:{\"click\":function($event){return _vm.navigateToConnection('WRDP')}}},[_c('desktop-mac-icon',{staticClass:\"icon-4x\"}),_c('div',{staticClass:\"display-inline-block middle-vertical-align small-margin-left\"},[_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"START\")]),_c('span',{staticClass:\"display-block el-button-label\"},[_vm._v(\"DESKTOP\")])])],1)],1),_c('div',{staticClass:\"center-text-align small-margin-top\"},[_c('el-button',{staticClass:\"blue-background\"},[_c('timelapse-icon'),_c('span',{staticClass:\"medium-margin-left el-button-label\"},[_vm._v(\"ADD TIME\")])],1),_c('el-button',{staticClass:\"black-background\"},[_c('restart-icon'),_c('span',{staticClass:\"medium-margin-left el-button-label\"},[_vm._v(\"RESTART\")])],1)],1)])],2)],1),_c('el-dialog',{attrs:{\"title\":_vm.modalTitle,\"visible\":_vm.dialogVisible,\"width\":\"30%\",\"before-close\":_vm.handleClose},on:{\"update:visible\":function($event){_vm.dialogVisible=$event}}},[_c('span',[_vm._v(_vm._s(_vm.modalMessage))]),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleGuacAuthentication}},[_vm._v(\"Authenticate\")])],1)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport {Component, Vue, Watch} from \"vue-property-decorator\";\nimport {Route} from \"vue-router\";\nimport {Form as ElForm, Input} from \"element-ui\";\nimport {UserModule} from \"@/store/modules/user\";\nimport {isValidUsername} from \"@/utils/validate\";\nimport {ConnectionTypes} from \"@/api/enums\";\nimport {isGuacAuthenticatedForTerminal, isGuacAuthenticatedForDesktop, authenticateGuacTerminal, authenticateGuacDesktop} from \"@/utils/timeHelpers\";\n\n@Component({\n name: \"Terminal\"\n})\nexport default class extends Vue {\n private dialogVisible: boolean = false;\n private actionOptions = [\"Start\", \"Stop\", \"Reset\", \"Terminate\"];\n private connectionType: ConnectionTypes = ConnectionTypes.SSH;\n private modalTitle: string = \"\";\n private modalMessage: string = \"\";\n\n created() {\n document.addEventListener(\"click\", this.refocusGuacamole);\n document.addEventListener(\"keydown\", this.refocusGuacamole);\n this.connectionType = this.$router.currentRoute.meta.title === \"CyberLAB Terminal\" ? ConnectionTypes.SSH : ConnectionTypes.RDP;\n this.verifyGuacAuthentication();\n }\n\n destroyed() {\n document.removeEventListener(\"click\", this.refocusGuacamole);\n document.removeEventListener(\"keydown\", this.refocusGuacamole);\n }\n\n private verifyGuacAuthentication() {\n if (this.isSSHConnection) {\n if (!isGuacAuthenticatedForTerminal()) {\n this.modalTitle = \"Guacamole Terminal - Session expired\";\n this.modalMessage = \"Session for Guacamole Terminal expired. Redirect for authentication.\";\n this.dialogVisible = true;\n }\n } else {\n if (!isGuacAuthenticatedForDesktop()) {\n this.modalTitle = \"Guacamole Desktop - Session expired\";\n this.modalMessage = \"Session for Guacamole Desktop expired. Redirect for authentication.\";\n this.dialogVisible = true;\n }\n }\n }\n\n private handleGuacAuthentication() {\n if (this.isSSHConnection) {\n authenticateGuacTerminal()\n } else {\n authenticateGuacDesktop()\n }\n this.dialogVisible = false;\n }\n\n private handleClose() {\n this.dialogVisible = false;\n }\n\n get isSSHConnection(): boolean {\n return this.connectionType === ConnectionTypes.SSH;\n }\n\n get isRDPConnection(): boolean {\n return this.connectionType === ConnectionTypes.RDP;\n }\n\n get isPSConnection(): boolean {\n return this.connectionType === ConnectionTypes.PS;\n }\n\n get isWRDPConnection(): boolean {\n return this.connectionType === ConnectionTypes.WRDP;\n }\n\n iframeLoad(e: any) {\n }\n\n navigateToConnection(connectionType: string) {\n let path: string = this.$router.currentRoute.path;\n let rootPath: string = path.substring(0, path.lastIndexOf('/'));\n switch(connectionType) {\n case \"SSH\": {\n if (this.connectionType !== ConnectionTypes.SSH) {\n this.$router.push({path: `${rootPath}/terminal`})\n }\n break;\n }\n case \"RDP\": {\n if (this.connectionType !== ConnectionTypes.RDP) {\n this.$router.push({path: `${rootPath}/rdp`})\n }\n break;\n }\n case \"PS\": {\n break;\n }\n case \"WRDP\": {\n break;\n }\n }\n }\n\n refocusGuacamole() {\n // Do not refocus if focus is on an input field\n let focused = document.activeElement;\n let controlPanelItem = (this.$refs.controlPanelItem as Vue)\n .$el as HTMLElement;\n\n let collapseContent = controlPanelItem.firstChild as HTMLElement;\n\n // if (focused && focused !== controlPanel)\n // controlPanelItem.classList.remove(\"is-active\");\n if (\n focused &&\n focused !== document.body &&\n focused !== collapseContent.firstChild\n )\n return;\n // Ensure iframe is focused\n let iframe = this.$refs.guac as HTMLElement;\n iframe.focus();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=78a6e748&\"\nimport script from \"./index.vue?vue&type=script&lang=ts&\"\nexport * from \"./index.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export var ConnectionTypes;\n(function(ConnectionTypes) {\n ConnectionTypes[(ConnectionTypes[\"SSH\"] = 0)] = \"SSH\";\n ConnectionTypes[(ConnectionTypes[\"RDP\"] = 1)] = \"RDP\";\n ConnectionTypes[(ConnectionTypes[\"PS\"] = 2)] = \"PS\";\n ConnectionTypes[(ConnectionTypes[\"WRDP\"] = 3)] = \"WRDP\"; // Windows RDP\n})(ConnectionTypes || (ConnectionTypes = {}));\nexport var MachineType;\n(function(MachineType) {\n MachineType[(MachineType[\"Linux\"] = 717580000)] = \"Linux\";\n MachineType[(MachineType[\"Window\"] = 717580001)] = \"Window\";\n MachineType[(MachineType[\"Ubuntu\"] = 717580002)] = \"Ubuntu\";\n})(MachineType || (MachineType = {}));\n//# sourceMappingURL=enums.js.map\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/style-resources-loader/lib/index.js??ref--8-oneOf-1-4!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&lang=scss&\"","import { getAuthenticatedTimeForGuacTerminal, setAuthenticatedTimeForGuacTerminal, getAuthenticatedTimeForGuacDesktop, setAuthenticatedTimeForGuacDesktop } from \"@/utils/cookies\";\nexport const getMinutesDiffFromNow = (time) => {\n let loginTimeStr = time || new Date(2019, 1, 1).toString();\n let loginTime = new Date(loginTimeStr);\n let minutes = Math.floor((Date.now() - loginTime.getTime()) / 1000 / 60);\n return minutes;\n};\nexport const isGuacAuthenticatedForTerminal = () => {\n let minutes = getMinutesDiffFromNow(getAuthenticatedTimeForGuacTerminal());\n return minutes < 238;\n};\nexport const isGuacAuthenticatedForDesktop = () => {\n let minutes = getMinutesDiffFromNow(getAuthenticatedTimeForGuacDesktop());\n return minutes < 238;\n};\nexport const authenticateGuacTerminal = () => {\n window.open(\"https://shell.cyberlab.evolvesecurity.com:8443/guacamole\", \"_blank\");\n setAuthenticatedTimeForGuacTerminal(new Date());\n};\nexport const authenticateGuacDesktop = () => {\n window.open(\"https://desktop.cyberlab.evolvesecurity.com:8443/guacamole\", \"_blank\");\n setAuthenticatedTimeForGuacDesktop(new Date());\n};\n//# sourceMappingURL=timeHelpers.js.map"],"sourceRoot":""}