Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-console
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Larrosa
web-console
Commits
49a5c155
Commit
49a5c155
authored
Sep 09, 2021
by
ajlarrosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Saco menus no desarrollados
parent
e87fddb0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
184 deletions
+20
-184
.eslintcache
web/.eslintcache
+1
-1
Console.tsx
web/src/components/Console.tsx
+16
-76
Home.tsx
web/src/components/Home.tsx
+0
-5
Signin.tsx
web/src/components/Signin.tsx
+3
-102
No files found.
web/.eslintcache
View file @
49a5c155
[{"C:\\ProgramasGO\\ssh-web-console\\web\\src\\index.tsx":"1","C:\\ProgramasGO\\ssh-web-console\\web\\src\\serviceWorkerRegistration.ts":"2","C:\\ProgramasGO\\ssh-web-console\\web\\src\\reportWebVitals.ts":"3","C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\i18n.ts":"4","C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\config.ts":"5","C:\\ProgramasGO\\ssh-web-console\\web\\src\\App.tsx":"6","C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\locales.ts":"7","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Home.tsx":"8","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Console.tsx":"9","C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\api_routers.ts":"10","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\terminal-resize.ts":"11","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\term_theme.ts":"12","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\utils.ts":"13","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\sshwebsocket.ts":"14","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\string_format.ts":"15","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Signin.tsx":"16","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\FileTrans.tsx":"17","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Header.tsx":"18","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Footer.tsx":"19","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\XTerm.tsx":"20","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\files_types.ts":"21","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\PathNav.tsx":"22","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\SftpUpload.tsx":"23","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\GridFileItem.tsx":"24","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\DownloadingFile.tsx":"25","C:\\ProgramasGO\\web-console\\web\\src\\index.tsx":"26","C:\\ProgramasGO\\web-console\\web\\src\\serviceWorkerRegistration.ts":"27","C:\\ProgramasGO\\web-console\\web\\src\\reportWebVitals.ts":"28","C:\\ProgramasGO\\web-console\\web\\src\\config\\config.ts":"29","C:\\ProgramasGO\\web-console\\web\\src\\locales\\i18n.ts":"30","C:\\ProgramasGO\\web-console\\web\\src\\App.tsx":"31","C:\\ProgramasGO\\web-console\\web\\src\\locales\\locales.ts":"32","C:\\ProgramasGO\\web-console\\web\\src\\components\\Console.tsx":"33","C:\\ProgramasGO\\web-console\\web\\src\\components\\Home.tsx":"34","C:\\ProgramasGO\\web-console\\web\\src\\config\\api_routers.ts":"35","C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\term_theme.ts":"36","C:\\ProgramasGO\\web-console\\web\\src\\libs\\terminal-resize.ts":"37","C:\\ProgramasGO\\web-console\\web\\src\\libs\\utils.ts":"38","C:\\ProgramasGO\\web-console\\web\\src\\libs\\sshwebsocket.ts":"39","C:\\ProgramasGO\\web-console\\web\\src\\libs\\string_format.ts":"40","C:\\ProgramasGO\\web-console\\web\\src\\components\\FileTrans.tsx":"41","C:\\ProgramasGO\\web-console\\web\\src\\components\\Signin.tsx":"42","C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\XTerm.tsx":"43","C:\\ProgramasGO\\web-console\\web\\src\\components\\layout\\Header.tsx":"44","C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\files_types.ts":"45","C:\\ProgramasGO\\web-console\\web\\src\\components\\SftpUpload.tsx":"46","C:\\ProgramasGO\\web-console\\web\\src\\components\\PathNav.tsx":"47","C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\GridFileItem.tsx":"48","C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\DownloadingFile.tsx":"49"},{"size":1034,"mtime":1630768787964,"results":"50","hashOfConfig":"51"},{"size":5435,"mtime":1630760757965,"results":"52","hashOfConfig":"51"},{"size":440,"mtime":1630760788779,"results":"53","hashOfConfig":"51"},{"size":1628,"mtime":1630324329302,"results":"54","hashOfConfig":"51"},{"size":1657,"mtime":1630324302839,"results":"55","hashOfConfig":"51"},{"size":405,"mtime":1630324158904,"results":"56","hashOfConfig":"51"},{"size":6835,"mtime":1630324344127,"results":"57","hashOfConfig":"51"},{"size":1725,"mtime":1630354122775,"results":"58","hashOfConfig":"51"},{"size":10145,"mtime":1630290972581,"results":"59","hashOfConfig":"51"},{"size":670,"mtime":1630324289991,"results":"60","hashOfConfig":"51"},{"size":675,"mtime":1630324268633,"results":"61","hashOfConfig":"51"},{"size":1154,"mtime":1630324391856,"results":"62","hashOfConfig":"51"},{"size":1412,"mtime":1630324319263,"results":"63","hashOfConfig":"51"},{"size":1919,"mtime":1630324271105,"results":"64","hashOfConfig":"51"},{"size":357,"mtime":1630324270079,"results":"65","hashOfConfig":"51"},{"size":5759,"mtime":1630796150514,"results":"66","hashOfConfig":"51"},{"size":14281,"mtime":1630290983845,"results":"67","hashOfConfig":"51"},{"size":684,"mtime":1630290955236,"results":"68","hashOfConfig":"51"},{"size":973,"mtime":1630290867923,"results":"69","hashOfConfig":"51"},{"size":7409,"mtime":1630324390675,"results":"70","hashOfConfig":"51"},{"size":586,"mtime":1630324355567,"results":"71","hashOfConfig":"51"},{"size":2017,"mtime":1630290993235,"results":"72","hashOfConfig":"51"},{"size":4049,"mtime":1630291005021,"results":"73","hashOfConfig":"51"},{"size":5416,"mtime":1630290947773,"results":"74","hashOfConfig":"51"},{"size":1508,"mtime":1630291088613,"results":"75","hashOfConfig":"51"},{"size":1034,"mtime":1630768787964,"results":"76","hashOfConfig":"77"},{"size":5435,"mtime":1630760757965,"results":"78","hashOfConfig":"77"},{"size":440,"mtime":1630760788779,"results":"79","hashOfConfig":"77"},{"size":1657,"mtime":1630324302839,"results":"80","hashOfConfig":"77"},{"size":1628,"mtime":1630324329302,"results":"81","hashOfConfig":"77"},{"size":405,"mtime":1630324158904,"results":"82","hashOfConfig":"77"},{"size":6835,"mtime":1630324344127,"results":"83","hashOfConfig":"77"},{"size":10145,"mtime":1630290972581,"results":"84","hashOfConfig":"77"},{"size":1725,"mtime":1630354122775,"results":"85","hashOfConfig":"77"},{"size":670,"mtime":1630324289991,"results":"86","hashOfConfig":"77"},{"size":1154,"mtime":1630324391856,"results":"87","hashOfConfig":"77"},{"size":675,"mtime":1630324268633,"results":"88","hashOfConfig":"77"},{"size":1412,"mtime":1630324319263,"results":"89","hashOfConfig":"77"},{"size":1919,"mtime":1630324271105,"results":"90","hashOfConfig":"77"},{"size":357,"mtime":1630324270079,"results":"91","hashOfConfig":"77"},{"size":14281,"mtime":1630290983845,"results":"92","hashOfConfig":"77"},{"size":5735,"mtime":1630964996455,"results":"93","hashOfConfig":"77"},{"size":7409,"mtime":1630324390675,"results":"94","hashOfConfig":"77"},{"size":684,"mtime":1630290955236,"results":"95","hashOfConfig":"77"},{"size":586,"mtime":1630324355567,"results":"96","hashOfConfig":"77"},{"size":4049,"mtime":1630291005021,"results":"97","hashOfConfig":"77"},{"size":2017,"mtime":1630290993235,"results":"98","hashOfConfig":"77"},{"size":5416,"mtime":1630290947773,"results":"99","hashOfConfig":"77"},{"size":1508,"mtime":1630291088613,"results":"100","hashOfConfig":"77"},{"filePath":"101","messages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},"1d40y0f",{"filePath":"104","messages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"106","messages":"107","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"108","messages":"109","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"110","messages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"112","messages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"114","messages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"116","messages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"118","usedDeprecatedRules":"103"},{"filePath":"119","messages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"121","messages":"122","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"123","messages":"124","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"125","messages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"127","messages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"129","messages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"131","messages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"133","messages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"135","usedDeprecatedRules":"103"},{"filePath":"136","messages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"138","messages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"140","messages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"142"},{"filePath":"143","messages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"145","messages":"146","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"147","messages":"148","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"149","messages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"151","messages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"153","messages":"154","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"155"},{"filePath":"156","messages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},"1b6yqyj",{"filePath":"159","messages":"160","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"161","messages":"162","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"163","messages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"165","messages":"166","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"167","messages":"168","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"169","messages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"171","messages":"172","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"173","messages":"174","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"118","usedDeprecatedRules":"158"},{"filePath":"175","messages":"176","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"177","messages":"178","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"179","messages":"180","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"181","messages":"182","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"183","messages":"184","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"185","messages":"186","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"187","messages":"188","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"189","messages":"190","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"191","messages":"192","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"193","messages":"194","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"195","messages":"196","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"197","messages":"198","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"199","messages":"200","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"201","messages":"202","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"203","messages":"204","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\ProgramasGO\\ssh-web-console\\web\\src\\index.tsx",[],[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\serviceWorkerRegistration.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\reportWebVitals.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\i18n.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\config.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\App.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\locales.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Home.tsx",["205"],"import React from 'react';\r\nimport { NavLink, Route, Switch } from 'react-router-dom';\r\nimport { Button, Pane, Heading } from 'evergreen-ui';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport Footer from './layout/Footer';\r\nimport Header from './layout/Header';\r\nimport Signin from './Signin';\r\n\r\nimport './home.less';\r\nimport headerLogo from '../assets/ssh.png';\r\n\r\nconst MainPage = () => {\r\n const { t } = useTranslation(['home']);\r\n return (\r\n <>\r\n <Pane\r\n alignItems=\"center\"\r\n justifyContent=\"center\"\r\n display=\"flex\"\r\n flexDirection=\"column\">\r\n <div\r\n style={{\r\n minHeight: '360px',\r\n marginTop: '10rem',\r\n textAlign: 'center',\r\n }}>\r\n <img src={headerLogo} className=\"App-logo\" alt=\"logo\" />\r\n <Heading marginBottom=\"0.6rem\" marginTop=\"0.6rem\" size={700}>\r\n {t('home:welcome')}\r\n </Heading>\r\n <div>\r\n <NavLink to=\"/signin\" className=\"focus-ring-link\">\r\n <Button appearance=\"primary\"> {t('home:goto_signin')} </Button>\r\n </NavLink>\r\n </div>\r\n </div>\r\n </Pane>\r\n </>\r\n );\r\n};\r\n\r\nconst Home = () => {\r\n return (\r\n <div className=\"home-container\">\r\n <header className=\"home-content-header\">\r\n <Header />\r\n </header>\r\n <main className=\"home-content-main main-content-container\">\r\n <Switch>\r\n <Route exact path={`/`} component={MainPage} />\r\n <Route path={`/signin`} component={Signin} />\r\n </Switch>\r\n </main>\r\n {/*<footer className=\"home-content-footer\">\r\n <Footer />\r\n </footer>\r\n */}\r\n </div>\r\n );\r\n};\r\n\r\nexport default Home;\r\n","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Console.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\api_routers.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\terminal-resize.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\term_theme.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\utils.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\sshwebsocket.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\string_format.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Signin.tsx",["206"],"import React, { useState } from 'react';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport {\r\n //Button,\r\n Pane,\r\n Heading,\r\n //TextInputField,\r\n //GeolocationIcon,\r\n //FormField,\r\n toaster,\r\n} from 'evergreen-ui';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport Config from '../config/config';\r\nimport Utils from '../libs/utils';\r\nimport apiRouters from '../config/api_routers';\r\n\r\n{\r\n /*interface FieldState {\r\n isInvalid: boolean;\r\n validationMessage: string | undefined;\r\n value: string;\r\n}\r\n\r\nconst checkHostFormat = (host: string) => {\r\n if (!host || host === '') {\r\n return [false, '', 22];\r\n }\r\n const hostList = host.split(':');\r\n if (hostList.length === 1) {\r\n return [true, host, 22];\r\n }\r\n const ok =\r\n hostList.length === 2 &&\r\n hostList[1].length !== 0 &&\r\n !isNaN(Number(hostList[1]));\r\n if (ok) {\r\n return [true, hostList[0], parseInt(hostList[1])];\r\n } else {\r\n return [false, host, 22];\r\n }\r\n};*/\r\n}\r\nconst Signin = (props: RouteComponentProps) => {\r\n React.useEffect(() => {\r\n window.addEventListener('message', (event) => {\r\n if (event.origin !== process.env.REACT_APP_CLUSTER_URL) return;\r\n\r\n doSignin(event.data);\r\n });\r\n }, []);\r\n\r\n const { t } = useTranslation(['signin']);\r\n\r\n const doSignin = (data: Record<string, string>) => {\r\n console.log(data);\r\n Utils.axiosInstance\r\n .post(Utils.loadUrl(apiRouters.router.sign_in, null), {\r\n // _xsrf: Utils.base64Decode(xsrf.split(\"|\")[0]), // todo\r\n host: data.host,\r\n port: data.port,\r\n username: data.username,\r\n passwd: data.password,\r\n })\r\n .then((response) => {\r\n try {\r\n if (!response.data || response.data.has_error) {\r\n // self.$Loading.error();\r\n switch (response.data.message) {\r\n case 0:\r\n toaster.danger(t('signin:form_has_error'));\r\n break;\r\n case 1:\r\n toaster.danger(t('signin:form_error_passport'));\r\n break;\r\n case 2:\r\n toaster.danger(t('signin:form_error_ssh_login'));\r\n break;\r\n }\r\n } else {\r\n if (!response.data.addition) {\r\n // self.$Loading.error();\r\n toaster.danger(t('signin:form_error_remote_server'));\r\n } else {\r\n // self.$Loading.finish();\r\n toaster.success(t('signin:signin_success'));\r\n localStorage.setItem('user.host', data.host);\r\n localStorage.setItem('user.username', data.username);\r\n sessionStorage.setItem(\r\n Config.jwt.tokenName,\r\n response.data.addition,\r\n );\r\n\r\n props.history.push('/console');\r\n }\r\n }\r\n } catch (e) {\r\n // self.$Loading.error();\r\n toaster.danger(t('signin:form_error_ssh_login'));\r\n }\r\n })\r\n .catch((e: Error) => {\r\n // self.$Loading.error();\r\n toaster.danger(t('signin:form_error_ssh_login') + ': ' + e.message);\r\n });\r\n };\r\n\r\n return (\r\n <Pane\r\n alignItems=\"center\"\r\n justifyContent=\"center\"\r\n display=\"flex\"\r\n flexDirection=\"column\">\r\n <div\r\n style={{ minHeight: '360px', marginTop: '10rem', textAlign: 'center' }}>\r\n <Heading marginBottom=\"0.6rem\" marginTop=\"0.6rem\" size={700}>\r\n {t('signin:form_title')}\r\n </Heading>\r\n {/*\r\n <form\r\n onSubmit={(event: React.FormEvent<HTMLFormElement>) => {\r\n event.preventDefault();\r\n doSignin();\r\n return false;\r\n }}>\r\n <Pane textAlign=\"left\">\r\n <TextInputField\r\n value={hostField.value}\r\n isInvalid={hostField.isInvalid}\r\n validationMessage={hostField.validationMessage}\r\n label={t('signin:form_fullhost_label')}\r\n onChange={onHostChanged}\r\n onBlur={onHostChanged}\r\n placeholder={t('signin:form_fullhost_ph')}\r\n marginBottom=\"8px\"\r\n />\r\n <TextInputField\r\n value={unameField.value}\r\n isInvalid={unameField.isInvalid}\r\n label={t('signin:form_username_label')}\r\n onChange={onUsernameChanged}\r\n onBlur={onUsernameChanged}\r\n placeholder={t('signin:form_username_ph')}\r\n validationMessage={unameField.validationMessage}\r\n marginBottom=\"8px\"\r\n />\r\n <TextInputField\r\n label={t('signin:form_passwd_label')}\r\n type=\"password\"\r\n placeholder={t('signin:form_passwd_ph')}\r\n marginBottom=\"24px\"\r\n onChange={onPasswdChanged}\r\n onBlur={onPasswdChanged}\r\n onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n // 'keypress' event misbehaves on mobile so we track 'Enter' key via 'keydown' event\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n doSignin();\r\n }\r\n }}\r\n />\r\n </Pane>\r\n <FormField>\r\n <Button\r\n isLoading={submitLoading}\r\n type=\"submit\"\r\n width=\"100%\"\r\n appearance=\"primary\"\r\n justifyContent=\"center\"\r\n intent=\"success\"\r\n iconBefore={GeolocationIcon}>\r\n {t('signin:form_submit_btn')}\r\n </Button>\r\n </FormField>\r\n </form>\r\n */}\r\n </div>\r\n </Pane>\r\n );\r\n};\r\n\r\nexport default Signin;\r\n","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\FileTrans.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Header.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Footer.tsx",[],[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\XTerm.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\files_types.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\PathNav.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\SftpUpload.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\GridFileItem.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\DownloadingFile.tsx",[],[],"C:\\ProgramasGO\\web-console\\web\\src\\index.tsx",[],[],"C:\\ProgramasGO\\web-console\\web\\src\\serviceWorkerRegistration.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\reportWebVitals.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\config\\config.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\locales\\i18n.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\App.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\locales\\locales.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\Console.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\Home.tsx",["207"],"C:\\ProgramasGO\\web-console\\web\\src\\config\\api_routers.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\term_theme.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\terminal-resize.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\utils.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\sshwebsocket.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\string_format.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\FileTrans.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\Signin.tsx",["208"],"C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\XTerm.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\layout\\Header.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\files_types.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\SftpUpload.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\PathNav.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\GridFileItem.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\DownloadingFile.tsx",[],{"ruleId":"209","severity":1,"message":"210","line":6,"column":8,"nodeType":"211","messageId":"212","endLine":6,"endColumn":14},{"ruleId":"209","severity":1,"message":"213","line":1,"column":17,"nodeType":"211","messageId":"212","endLine":1,"endColumn":25},{"ruleId":"209","severity":1,"message":"210","line":6,"column":8,"nodeType":"211","messageId":"212","endLine":6,"endColumn":14},{"ruleId":"209","severity":1,"message":"213","line":1,"column":17,"nodeType":"211","messageId":"212","endLine":1,"endColumn":25},"@typescript-eslint/no-unused-vars","'Footer' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used."]
[{"C:\\ProgramasGO\\ssh-web-console\\web\\src\\index.tsx":"1","C:\\ProgramasGO\\ssh-web-console\\web\\src\\serviceWorkerRegistration.ts":"2","C:\\ProgramasGO\\ssh-web-console\\web\\src\\reportWebVitals.ts":"3","C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\i18n.ts":"4","C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\config.ts":"5","C:\\ProgramasGO\\ssh-web-console\\web\\src\\App.tsx":"6","C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\locales.ts":"7","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Home.tsx":"8","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Console.tsx":"9","C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\api_routers.ts":"10","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\terminal-resize.ts":"11","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\term_theme.ts":"12","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\utils.ts":"13","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\sshwebsocket.ts":"14","C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\string_format.ts":"15","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Signin.tsx":"16","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\FileTrans.tsx":"17","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Header.tsx":"18","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Footer.tsx":"19","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\XTerm.tsx":"20","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\files_types.ts":"21","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\PathNav.tsx":"22","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\SftpUpload.tsx":"23","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\GridFileItem.tsx":"24","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\DownloadingFile.tsx":"25","C:\\ProgramasGO\\web-console\\web\\src\\index.tsx":"26","C:\\ProgramasGO\\web-console\\web\\src\\serviceWorkerRegistration.ts":"27","C:\\ProgramasGO\\web-console\\web\\src\\reportWebVitals.ts":"28","C:\\ProgramasGO\\web-console\\web\\src\\config\\config.ts":"29","C:\\ProgramasGO\\web-console\\web\\src\\locales\\i18n.ts":"30","C:\\ProgramasGO\\web-console\\web\\src\\App.tsx":"31","C:\\ProgramasGO\\web-console\\web\\src\\locales\\locales.ts":"32","C:\\ProgramasGO\\web-console\\web\\src\\components\\Console.tsx":"33","C:\\ProgramasGO\\web-console\\web\\src\\components\\Home.tsx":"34","C:\\ProgramasGO\\web-console\\web\\src\\config\\api_routers.ts":"35","C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\term_theme.ts":"36","C:\\ProgramasGO\\web-console\\web\\src\\libs\\terminal-resize.ts":"37","C:\\ProgramasGO\\web-console\\web\\src\\libs\\utils.ts":"38","C:\\ProgramasGO\\web-console\\web\\src\\libs\\sshwebsocket.ts":"39","C:\\ProgramasGO\\web-console\\web\\src\\libs\\string_format.ts":"40","C:\\ProgramasGO\\web-console\\web\\src\\components\\FileTrans.tsx":"41","C:\\ProgramasGO\\web-console\\web\\src\\components\\Signin.tsx":"42","C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\XTerm.tsx":"43","C:\\ProgramasGO\\web-console\\web\\src\\components\\layout\\Header.tsx":"44","C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\files_types.ts":"45","C:\\ProgramasGO\\web-console\\web\\src\\components\\SftpUpload.tsx":"46","C:\\ProgramasGO\\web-console\\web\\src\\components\\PathNav.tsx":"47","C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\GridFileItem.tsx":"48","C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\DownloadingFile.tsx":"49"},{"size":1034,"mtime":1630768787964,"results":"50","hashOfConfig":"51"},{"size":5435,"mtime":1630760757965,"results":"52","hashOfConfig":"51"},{"size":440,"mtime":1630760788779,"results":"53","hashOfConfig":"51"},{"size":1628,"mtime":1630324329302,"results":"54","hashOfConfig":"51"},{"size":1657,"mtime":1630324302839,"results":"55","hashOfConfig":"51"},{"size":405,"mtime":1630324158904,"results":"56","hashOfConfig":"51"},{"size":6835,"mtime":1630324344127,"results":"57","hashOfConfig":"51"},{"size":1725,"mtime":1630354122775,"results":"58","hashOfConfig":"51"},{"size":10145,"mtime":1630290972581,"results":"59","hashOfConfig":"51"},{"size":670,"mtime":1630324289991,"results":"60","hashOfConfig":"51"},{"size":675,"mtime":1630324268633,"results":"61","hashOfConfig":"51"},{"size":1154,"mtime":1630324391856,"results":"62","hashOfConfig":"51"},{"size":1412,"mtime":1630324319263,"results":"63","hashOfConfig":"51"},{"size":1919,"mtime":1630324271105,"results":"64","hashOfConfig":"51"},{"size":357,"mtime":1630324270079,"results":"65","hashOfConfig":"51"},{"size":5759,"mtime":1630796150514,"results":"66","hashOfConfig":"51"},{"size":14281,"mtime":1630290983845,"results":"67","hashOfConfig":"51"},{"size":684,"mtime":1630290955236,"results":"68","hashOfConfig":"51"},{"size":973,"mtime":1630290867923,"results":"69","hashOfConfig":"51"},{"size":7409,"mtime":1630324390675,"results":"70","hashOfConfig":"51"},{"size":586,"mtime":1630324355567,"results":"71","hashOfConfig":"51"},{"size":2017,"mtime":1630290993235,"results":"72","hashOfConfig":"51"},{"size":4049,"mtime":1630291005021,"results":"73","hashOfConfig":"51"},{"size":5416,"mtime":1630290947773,"results":"74","hashOfConfig":"51"},{"size":1508,"mtime":1630291088613,"results":"75","hashOfConfig":"51"},{"size":1034,"mtime":1630768787964,"results":"76","hashOfConfig":"77"},{"size":5435,"mtime":1630760757965,"results":"78","hashOfConfig":"77"},{"size":440,"mtime":1630760788779,"results":"79","hashOfConfig":"77"},{"size":1657,"mtime":1630324302839,"results":"80","hashOfConfig":"77"},{"size":1628,"mtime":1630324329302,"results":"81","hashOfConfig":"77"},{"size":405,"mtime":1631155881829,"results":"82","hashOfConfig":"77"},{"size":6835,"mtime":1630324344127,"results":"83","hashOfConfig":"77"},{"size":8120,"mtime":1631157199089,"results":"84","hashOfConfig":"77"},{"size":1595,"mtime":1631184380498,"results":"85","hashOfConfig":"77"},{"size":670,"mtime":1630324289991,"results":"86","hashOfConfig":"77"},{"size":1154,"mtime":1630324391856,"results":"87","hashOfConfig":"77"},{"size":675,"mtime":1630324268633,"results":"88","hashOfConfig":"77"},{"size":1412,"mtime":1630324319263,"results":"89","hashOfConfig":"77"},{"size":1919,"mtime":1630324271105,"results":"90","hashOfConfig":"77"},{"size":357,"mtime":1630324270079,"results":"91","hashOfConfig":"77"},{"size":14281,"mtime":1630290983845,"results":"92","hashOfConfig":"77"},{"size":2640,"mtime":1631184354206,"results":"93","hashOfConfig":"77"},{"size":7409,"mtime":1630324390675,"results":"94","hashOfConfig":"77"},{"size":684,"mtime":1630290955236,"results":"95","hashOfConfig":"77"},{"size":586,"mtime":1630324355567,"results":"96","hashOfConfig":"77"},{"size":4049,"mtime":1630291005021,"results":"97","hashOfConfig":"77"},{"size":2017,"mtime":1630290993235,"results":"98","hashOfConfig":"77"},{"size":5416,"mtime":1630290947773,"results":"99","hashOfConfig":"77"},{"size":1508,"mtime":1630291088613,"results":"100","hashOfConfig":"77"},{"filePath":"101","messages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},"1d40y0f",{"filePath":"104","messages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"106","messages":"107","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"108","messages":"109","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"110","messages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"112","messages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"114","messages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"116","messages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"118","usedDeprecatedRules":"103"},{"filePath":"119","messages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"121","messages":"122","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"123","messages":"124","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"125","messages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"127","messages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"129","messages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"131","messages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"133","messages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"135","usedDeprecatedRules":"103"},{"filePath":"136","messages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"138","messages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"140","messages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"142"},{"filePath":"143","messages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"145","messages":"146","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"147","messages":"148","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"149","messages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"151","messages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"103"},{"filePath":"153","messages":"154","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"155"},{"filePath":"156","messages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},"1b6yqyj",{"filePath":"159","messages":"160","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"161","messages":"162","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"163","messages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"165","messages":"166","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"167","messages":"168","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"169","messages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"171","messages":"172","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"173","usedDeprecatedRules":"158"},{"filePath":"174","messages":"175","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"176","messages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"178","messages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"180","messages":"181","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"182","messages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"184","messages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"186","messages":"187","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"188","messages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"190","messages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"194","messages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"196","messages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"198","messages":"199","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"200","messages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"202","messages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"158"},{"filePath":"204","messages":"205","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\ProgramasGO\\ssh-web-console\\web\\src\\index.tsx",[],[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\serviceWorkerRegistration.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\reportWebVitals.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\i18n.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\config.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\App.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\locales\\locales.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Home.tsx",["206"],"import React from 'react';\r\nimport { NavLink, Route, Switch } from 'react-router-dom';\r\nimport { Button, Pane, Heading } from 'evergreen-ui';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport Footer from './layout/Footer';\r\nimport Header from './layout/Header';\r\nimport Signin from './Signin';\r\n\r\nimport './home.less';\r\nimport headerLogo from '../assets/ssh.png';\r\n\r\nconst MainPage = () => {\r\n const { t } = useTranslation(['home']);\r\n return (\r\n <>\r\n <Pane\r\n alignItems=\"center\"\r\n justifyContent=\"center\"\r\n display=\"flex\"\r\n flexDirection=\"column\">\r\n <div\r\n style={{\r\n minHeight: '360px',\r\n marginTop: '10rem',\r\n textAlign: 'center',\r\n }}>\r\n <img src={headerLogo} className=\"App-logo\" alt=\"logo\" />\r\n <Heading marginBottom=\"0.6rem\" marginTop=\"0.6rem\" size={700}>\r\n {t('home:welcome')}\r\n </Heading>\r\n <div>\r\n <NavLink to=\"/signin\" className=\"focus-ring-link\">\r\n <Button appearance=\"primary\"> {t('home:goto_signin')} </Button>\r\n </NavLink>\r\n </div>\r\n </div>\r\n </Pane>\r\n </>\r\n );\r\n};\r\n\r\nconst Home = () => {\r\n return (\r\n <div className=\"home-container\">\r\n <header className=\"home-content-header\">\r\n <Header />\r\n </header>\r\n <main className=\"home-content-main main-content-container\">\r\n <Switch>\r\n <Route exact path={`/`} component={MainPage} />\r\n <Route path={`/signin`} component={Signin} />\r\n </Switch>\r\n </main>\r\n {/*<footer className=\"home-content-footer\">\r\n <Footer />\r\n </footer>\r\n */}\r\n </div>\r\n );\r\n};\r\n\r\nexport default Home;\r\n","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Console.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\config\\api_routers.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\terminal-resize.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\term_theme.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\utils.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\sshwebsocket.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\libs\\string_format.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\Signin.tsx",["207"],"import React, { useState } from 'react';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport {\r\n //Button,\r\n Pane,\r\n Heading,\r\n //TextInputField,\r\n //GeolocationIcon,\r\n //FormField,\r\n toaster,\r\n} from 'evergreen-ui';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport Config from '../config/config';\r\nimport Utils from '../libs/utils';\r\nimport apiRouters from '../config/api_routers';\r\n\r\n{\r\n /*interface FieldState {\r\n isInvalid: boolean;\r\n validationMessage: string | undefined;\r\n value: string;\r\n}\r\n\r\nconst checkHostFormat = (host: string) => {\r\n if (!host || host === '') {\r\n return [false, '', 22];\r\n }\r\n const hostList = host.split(':');\r\n if (hostList.length === 1) {\r\n return [true, host, 22];\r\n }\r\n const ok =\r\n hostList.length === 2 &&\r\n hostList[1].length !== 0 &&\r\n !isNaN(Number(hostList[1]));\r\n if (ok) {\r\n return [true, hostList[0], parseInt(hostList[1])];\r\n } else {\r\n return [false, host, 22];\r\n }\r\n};*/\r\n}\r\nconst Signin = (props: RouteComponentProps) => {\r\n React.useEffect(() => {\r\n window.addEventListener('message', (event) => {\r\n if (event.origin !== process.env.REACT_APP_CLUSTER_URL) return;\r\n\r\n doSignin(event.data);\r\n });\r\n }, []);\r\n\r\n const { t } = useTranslation(['signin']);\r\n\r\n const doSignin = (data: Record<string, string>) => {\r\n console.log(data);\r\n Utils.axiosInstance\r\n .post(Utils.loadUrl(apiRouters.router.sign_in, null), {\r\n // _xsrf: Utils.base64Decode(xsrf.split(\"|\")[0]), // todo\r\n host: data.host,\r\n port: data.port,\r\n username: data.username,\r\n passwd: data.password,\r\n })\r\n .then((response) => {\r\n try {\r\n if (!response.data || response.data.has_error) {\r\n // self.$Loading.error();\r\n switch (response.data.message) {\r\n case 0:\r\n toaster.danger(t('signin:form_has_error'));\r\n break;\r\n case 1:\r\n toaster.danger(t('signin:form_error_passport'));\r\n break;\r\n case 2:\r\n toaster.danger(t('signin:form_error_ssh_login'));\r\n break;\r\n }\r\n } else {\r\n if (!response.data.addition) {\r\n // self.$Loading.error();\r\n toaster.danger(t('signin:form_error_remote_server'));\r\n } else {\r\n // self.$Loading.finish();\r\n toaster.success(t('signin:signin_success'));\r\n localStorage.setItem('user.host', data.host);\r\n localStorage.setItem('user.username', data.username);\r\n sessionStorage.setItem(\r\n Config.jwt.tokenName,\r\n response.data.addition,\r\n );\r\n\r\n props.history.push('/console');\r\n }\r\n }\r\n } catch (e) {\r\n // self.$Loading.error();\r\n toaster.danger(t('signin:form_error_ssh_login'));\r\n }\r\n })\r\n .catch((e: Error) => {\r\n // self.$Loading.error();\r\n toaster.danger(t('signin:form_error_ssh_login') + ': ' + e.message);\r\n });\r\n };\r\n\r\n return (\r\n <Pane\r\n alignItems=\"center\"\r\n justifyContent=\"center\"\r\n display=\"flex\"\r\n flexDirection=\"column\">\r\n <div\r\n style={{ minHeight: '360px', marginTop: '10rem', textAlign: 'center' }}>\r\n <Heading marginBottom=\"0.6rem\" marginTop=\"0.6rem\" size={700}>\r\n {t('signin:form_title')}\r\n </Heading>\r\n {/*\r\n <form\r\n onSubmit={(event: React.FormEvent<HTMLFormElement>) => {\r\n event.preventDefault();\r\n doSignin();\r\n return false;\r\n }}>\r\n <Pane textAlign=\"left\">\r\n <TextInputField\r\n value={hostField.value}\r\n isInvalid={hostField.isInvalid}\r\n validationMessage={hostField.validationMessage}\r\n label={t('signin:form_fullhost_label')}\r\n onChange={onHostChanged}\r\n onBlur={onHostChanged}\r\n placeholder={t('signin:form_fullhost_ph')}\r\n marginBottom=\"8px\"\r\n />\r\n <TextInputField\r\n value={unameField.value}\r\n isInvalid={unameField.isInvalid}\r\n label={t('signin:form_username_label')}\r\n onChange={onUsernameChanged}\r\n onBlur={onUsernameChanged}\r\n placeholder={t('signin:form_username_ph')}\r\n validationMessage={unameField.validationMessage}\r\n marginBottom=\"8px\"\r\n />\r\n <TextInputField\r\n label={t('signin:form_passwd_label')}\r\n type=\"password\"\r\n placeholder={t('signin:form_passwd_ph')}\r\n marginBottom=\"24px\"\r\n onChange={onPasswdChanged}\r\n onBlur={onPasswdChanged}\r\n onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n // 'keypress' event misbehaves on mobile so we track 'Enter' key via 'keydown' event\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n doSignin();\r\n }\r\n }}\r\n />\r\n </Pane>\r\n <FormField>\r\n <Button\r\n isLoading={submitLoading}\r\n type=\"submit\"\r\n width=\"100%\"\r\n appearance=\"primary\"\r\n justifyContent=\"center\"\r\n intent=\"success\"\r\n iconBefore={GeolocationIcon}>\r\n {t('signin:form_submit_btn')}\r\n </Button>\r\n </FormField>\r\n </form>\r\n */}\r\n </div>\r\n </Pane>\r\n );\r\n};\r\n\r\nexport default Signin;\r\n","C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\FileTrans.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Header.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\layout\\Footer.tsx",[],[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\term\\XTerm.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\files_types.ts",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\PathNav.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\SftpUpload.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\GridFileItem.tsx",[],"C:\\ProgramasGO\\ssh-web-console\\web\\src\\components\\files\\DownloadingFile.tsx",[],[],"C:\\ProgramasGO\\web-console\\web\\src\\index.tsx",[],[],"C:\\ProgramasGO\\web-console\\web\\src\\serviceWorkerRegistration.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\reportWebVitals.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\config\\config.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\locales\\i18n.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\App.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\locales\\locales.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\Console.tsx",["208"],"import React, { useEffect, useRef, useState } from 'react';\r\nimport {\r\n Pane,\r\n Text,\r\n Heading,\r\n Badge,\r\n Menu,\r\n Popover,\r\n Position,\r\n Avatar,\r\n Button,\r\n toaster,\r\n CornerDialog,\r\n} from 'evergreen-ui';\r\nimport {\r\n FullCircleIcon,\r\n UngroupObjectsIcon,\r\n ErrorIcon,\r\n DisableIcon,\r\n} from 'evergreen-ui';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { FitAddon } from 'xterm-addon-fit';\r\nimport { WebLinksAddon } from 'xterm-addon-web-links';\r\n\r\nimport XTerm from './term/XTerm';\r\nimport theme from './term/term_theme';\r\nimport FileTrans, { NodeConfig, ConnStatus } from './FileTrans';\r\nimport sshWebSocket from '../libs/sshwebsocket';\r\nimport terminalResize from '../libs/terminal-resize';\r\nimport Util from '../libs/utils';\r\nimport apiRouters from '../config/api_routers';\r\nimport Config from '../config/config';\r\nimport stringFormat from '../libs/string_format';\r\n\r\nimport './console.less';\r\n\r\ntype ConnStatusProps = {\r\n host: string;\r\n status: ConnStatus;\r\n};\r\n\r\nconst ConnectionStatus = (props: ConnStatusProps) => {\r\n if (props.status === ConnStatus.Connecting) {\r\n return (\r\n <>\r\n <UngroupObjectsIcon\r\n verticalAlign=\"baseline\"\r\n size={10}\r\n color=\"info\"\r\n marginRight={8}\r\n />\r\n <Badge isInteractive textTransform=\"lowercase\" color=\"blue\">\r\n waiting connection\r\n </Badge>\r\n </>\r\n );\r\n } else if (props.status === ConnStatus.ConnectionLost) {\r\n return (\r\n <>\r\n <DisableIcon\r\n verticalAlign=\"baseline\"\r\n size={10}\r\n color=\"#FAE2E2\"\r\n marginRight={8}\r\n />\r\n <Badge isInteractive color=\"red\">\r\n connection lost\r\n </Badge>\r\n </>\r\n );\r\n } else {\r\n return (\r\n <>\r\n <FullCircleIcon\r\n verticalAlign=\"baseline\"\r\n size={10}\r\n color=\"success\"\r\n marginRight={8}\r\n />\r\n <Badge isInteractive textTransform=\"lowercase\" color=\"green\">\r\n {props.host}\r\n </Badge>\r\n </>\r\n );\r\n }\r\n};\r\n\r\nconst Console = (props: RouteComponentProps) => {\r\n const [isSideSheetShown, setSideSheetShwon] = useState<boolean>(false);\r\n const terminalRef = useRef<XTerm>(null);\r\n const { t } = useTranslation(['translation', 'console']);\r\n const [fitAddon] = useState<FitAddon>(new FitAddon());\r\n const [webLinksAddon] = useState<WebLinksAddon>(new WebLinksAddon());\r\n const [fullscreen, setFullscreen] = useState<boolean>(false);\r\n const [connecting, setConnecting] = useState<ConnStatus>(\r\n ConnStatus.Connecting,\r\n );\r\n const [nodeConfig, setNodeConfig] = useState<NodeConfig>({\r\n host: 'waiting connection',\r\n username: 'Loading',\r\n });\r\n const [showCornerDialog, setShowCornerDialog] = useState<boolean>(false);\r\n\r\n let ws: WebSocket | null = null;\r\n\r\n useEffect(() => {\r\n const lhost = window.localStorage.getItem('user.host');\r\n const luname = window.localStorage.getItem('user.username');\r\n if (lhost === null) {\r\n return;\r\n }\r\n if (luname === null) {\r\n return;\r\n }\r\n setNodeConfig({ host: lhost, username: luname });\r\n }, []);\r\n\r\n useEffect(() => {\r\n // Once the terminal is loaded write a new line to it.\r\n const term = terminalRef.current!.terminal;\r\n fitAddon.fit();\r\n term.writeln('Welcome to SSH web-console!');\r\n\r\n const _t = sessionStorage.getItem(Config.jwt.tokenName);\r\n if (_t === null) {\r\n toaster.danger(t('console:web_socket_expire'));\r\n props.history.push('/signin');\r\n return;\r\n }\r\n\r\n ws = new WebSocket(\r\n Util.loadWebSocketUrl(\r\n apiRouters.router.ws_ssh,\r\n stringFormat.format(\r\n apiRouters.params.ws_ssh,\r\n term.cols + '',\r\n term.rows + '',\r\n _t,\r\n ),\r\n ),\r\n );\r\n ws.binaryType = 'arraybuffer';\r\n ws.onopen = () => {\r\n setConnecting(ConnStatus.ConnectionAlive);\r\n };\r\n\r\n ws.onclose = (ev) => {\r\n term.setOption('cursorBlink', false);\r\n sessionStorage.removeItem(Config.jwt.tokenName);\r\n setConnecting(ConnStatus.ConnectionLost);\r\n setShowCornerDialog(true);\r\n\r\n send(ev);\r\n };\r\n\r\n const send = (e: CloseEvent) => {\r\n e.preventDefault();\r\n\r\n if (window && window.parent) {\r\n window.parent.postMessage(\r\n {\r\n message: 'close',\r\n },\r\n '*',\r\n );\r\n }\r\n };\r\n\r\n sshWebSocket.bindTerminal(term, ws!, true, -1);\r\n terminalResize.bindTerminalResize(term, ws!);\r\n return () => {\r\n if (ws !== null) {\r\n ws.close();\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n fitAddon.fit();\r\n }, [fullscreen]);\r\n\r\n const onWindowResize = () => {\r\n fitAddon.fit();\r\n };\r\n const closeWindowListener = (ev: BeforeUnloadEvent) => {\r\n ev.preventDefault();\r\n ev.returnValue = t('console:make_sure_to_leave');\r\n };\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', onWindowResize);\r\n window.addEventListener('beforeunload', closeWindowListener);\r\n return () => {\r\n window.removeEventListener('resize', onWindowResize);\r\n window.removeEventListener('beforeunload', closeWindowListener);\r\n };\r\n }, []);\r\n\r\n return (\r\n <Pane height=\"100vh\" display=\"flex\" flexDirection=\"column\" borderRadius={3}>\r\n <Pane\r\n display=\"flex\"\r\n flexDirection=\"row\"\r\n alignItems=\"center\"\r\n background=\"rgba(27,33,47,0.86)\">\r\n <Heading padding={18} color=\"white\">\r\n {' '}\r\n {t('title')}\r\n </Heading>\r\n <Pane\r\n padding={18}\r\n flex={1}\r\n alignItems=\"center\"\r\n alignContent=\"center\"\r\n textAlign=\"center\">\r\n <ConnectionStatus status={connecting} host={nodeConfig.host} />\r\n </Pane>\r\n <Popover\r\n position={Position.BOTTOM_LEFT}\r\n content={\r\n <Menu>\r\n <Menu.Group>\r\n <Menu.Item>\r\n {'@'} {nodeConfig.username}{' '}\r\n </Menu.Item>\r\n </Menu.Group>\r\n <Menu.Divider />\r\n </Menu>\r\n }>\r\n <Avatar\r\n isSolid\r\n name={nodeConfig.username}\r\n size={36}\r\n marginRight={36}\r\n cursor=\"pointer\"\r\n />\r\n </Popover>\r\n </Pane>\r\n <Pane flex={1} overflowY=\"hidden\">\r\n <XTerm\r\n className={\r\n fullscreen ? 'term-container fullscreen' : 'term-container'\r\n }\r\n options={{\r\n cursorBlink: true,\r\n bellStyle: 'sound',\r\n theme: theme.default_theme,\r\n }}\r\n addons={[fitAddon, webLinksAddon]}\r\n ref={terminalRef}\r\n />\r\n </Pane>\r\n <Pane display=\"flex\" alignItems=\"center\">\r\n <FileTrans\r\n isShown={isSideSheetShown}\r\n node={{ host: nodeConfig.host, username: nodeConfig.username }}\r\n sshStatus={connecting}\r\n hideSideSheeeet={() => {\r\n setSideSheetShwon(false);\r\n }}\r\n />\r\n <Button intent=\"success\" onClick={() => setSideSheetShwon(true)}>\r\n SFTP\r\n </Button>\r\n <Pane flex=\"1\"></Pane>\r\n <Text marginRight=\"0.4rem\">active time: 0:00:00</Text>\r\n </Pane>\r\n <CornerDialog\r\n title={\r\n <Text size={500} color=\"danger\" alignItems=\"center\" display=\"flex\">\r\n <ErrorIcon marginRight=\"0.2rem\" />{' '}\r\n {t('console:ssh_disconn_dialog_title')}\r\n </Text>\r\n }\r\n isShown={showCornerDialog}\r\n hasClose={false}\r\n cancelLabel={t('console:ssh_disconn_dialog_cancel_btn')}\r\n confirmLabel={t('console:ssh_disconn_dialog_confirm_btn')}\r\n onConfirm={() => {\r\n props.history.push('/signin');\r\n }}\r\n containerProps={{ zIndex: 20 }}\r\n onCloseComplete={() => setShowCornerDialog(false)}>\r\n {t('console:ssh_disconn_dialog_text')}\r\n </CornerDialog>\r\n </Pane>\r\n );\r\n};\r\n\r\nexport default Console;\r\n","C:\\ProgramasGO\\web-console\\web\\src\\components\\Home.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\config\\api_routers.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\term_theme.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\terminal-resize.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\utils.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\sshwebsocket.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\libs\\string_format.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\FileTrans.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\Signin.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\term\\XTerm.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\layout\\Header.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\files_types.ts",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\SftpUpload.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\PathNav.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\GridFileItem.tsx",[],"C:\\ProgramasGO\\web-console\\web\\src\\components\\files\\DownloadingFile.tsx",[],{"ruleId":"209","severity":1,"message":"210","line":6,"column":8,"nodeType":"211","messageId":"212","endLine":6,"endColumn":14},{"ruleId":"209","severity":1,"message":"213","line":1,"column":17,"nodeType":"211","messageId":"212","endLine":1,"endColumn":25},{"ruleId":"209","severity":1,"message":"214","line":95,"column":22,"nodeType":"211","messageId":"212","endLine":95,"endColumn":35},"@typescript-eslint/no-unused-vars","'Footer' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used.","'setFullscreen' is assigned a value but never used."]
\ No newline at end of file
\ No newline at end of file
web/src/components/Console.tsx
View file @
49a5c155
...
@@ -8,7 +8,6 @@ import {
...
@@ -8,7 +8,6 @@ import {
Popover
,
Popover
,
Position
,
Position
,
Avatar
,
Avatar
,
Portal
,
Button
,
Button
,
toaster
,
toaster
,
CornerDialog
,
CornerDialog
,
...
@@ -16,12 +15,6 @@ import {
...
@@ -16,12 +15,6 @@ import {
import
{
import
{
FullCircleIcon
,
FullCircleIcon
,
UngroupObjectsIcon
,
UngroupObjectsIcon
,
RefreshIcon
,
SwapVerticalIcon
,
FullscreenIcon
,
MinimizeIcon
,
LogOutIcon
,
CogIcon
,
ErrorIcon
,
ErrorIcon
,
DisableIcon
,
DisableIcon
,
}
from
'evergreen-ui'
;
}
from
'evergreen-ui'
;
...
@@ -132,7 +125,6 @@ const Console = (props: RouteComponentProps) => {
...
@@ -132,7 +125,6 @@ const Console = (props: RouteComponentProps) => {
const
_t
=
sessionStorage
.
getItem
(
Config
.
jwt
.
tokenName
);
const
_t
=
sessionStorage
.
getItem
(
Config
.
jwt
.
tokenName
);
if
(
_t
===
null
)
{
if
(
_t
===
null
)
{
toaster
.
danger
(
t
(
'console:web_socket_expire'
));
toaster
.
danger
(
t
(
'console:web_socket_expire'
));
// setConnecting(ConnStatus.ConnectionLost)
props
.
history
.
push
(
'/signin'
);
props
.
history
.
push
(
'/signin'
);
return
;
return
;
}
}
...
@@ -153,11 +145,26 @@ const Console = (props: RouteComponentProps) => {
...
@@ -153,11 +145,26 @@ const Console = (props: RouteComponentProps) => {
setConnecting
(
ConnStatus
.
ConnectionAlive
);
setConnecting
(
ConnStatus
.
ConnectionAlive
);
};
};
ws
.
onclose
=
()
=>
{
ws
.
onclose
=
(
ev
)
=>
{
term
.
setOption
(
'cursorBlink'
,
false
);
term
.
setOption
(
'cursorBlink'
,
false
);
sessionStorage
.
removeItem
(
Config
.
jwt
.
tokenName
);
sessionStorage
.
removeItem
(
Config
.
jwt
.
tokenName
);
setConnecting
(
ConnStatus
.
ConnectionLost
);
setConnecting
(
ConnStatus
.
ConnectionLost
);
setShowCornerDialog
(
true
);
setShowCornerDialog
(
true
);
send
(
ev
);
};
const
send
=
(
e
:
CloseEvent
)
=>
{
e
.
preventDefault
();
if
(
window
&&
window
.
parent
)
{
window
.
parent
.
postMessage
(
{
message
:
'close'
,
},
'*'
,
);
}
};
};
sshWebSocket
.
bindTerminal
(
term
,
ws
!
,
true
,
-
1
);
sshWebSocket
.
bindTerminal
(
term
,
ws
!
,
true
,
-
1
);
...
@@ -219,16 +226,6 @@ const Console = (props: RouteComponentProps) => {
...
@@ -219,16 +226,6 @@ const Console = (props: RouteComponentProps) => {
</
Menu
.
Item
>
</
Menu
.
Item
>
</
Menu
.
Group
>
</
Menu
.
Group
>
<
Menu
.
Divider
/>
<
Menu
.
Divider
/>
<
Menu
.
Group
>
<
Menu
.
Item
icon=
{
LogOutIcon
}
intent=
"danger"
onSelect=
{
()
=>
{
toaster
.
notify
(
'under develop!'
,
{
id
:
'dev'
});
}
}
>
{
t
(
'console:nav_user_exit'
)
}
</
Menu
.
Item
>
</
Menu
.
Group
>
</
Menu
>
</
Menu
>
}
>
}
>
<
Avatar
<
Avatar
...
@@ -266,14 +263,6 @@ const Console = (props: RouteComponentProps) => {
...
@@ -266,14 +263,6 @@ const Console = (props: RouteComponentProps) => {
<
Button
intent=
"success"
onClick=
{
()
=>
setSideSheetShwon
(
true
)
}
>
<
Button
intent=
"success"
onClick=
{
()
=>
setSideSheetShwon
(
true
)
}
>
SFTP
SFTP
</
Button
>
</
Button
>
<
Button
intent=
"none"
marginLeft=
"0.05rem"
onClick=
{
()
=>
{
toaster
.
notify
(
'under develop!'
,
{
id
:
'dev'
});
}
}
>
Paste
</
Button
>
<
Pane
flex=
"1"
></
Pane
>
<
Pane
flex=
"1"
></
Pane
>
<
Text
marginRight=
"0.4rem"
>
active time: 0:00:00
</
Text
>
<
Text
marginRight=
"0.4rem"
>
active time: 0:00:00
</
Text
>
</
Pane
>
</
Pane
>
...
@@ -295,55 +284,6 @@ const Console = (props: RouteComponentProps) => {
...
@@ -295,55 +284,6 @@ const Console = (props: RouteComponentProps) => {
onCloseComplete=
{
()
=>
setShowCornerDialog
(
false
)
}
>
onCloseComplete=
{
()
=>
setShowCornerDialog
(
false
)
}
>
{
t
(
'console:ssh_disconn_dialog_text'
)
}
{
t
(
'console:ssh_disconn_dialog_text'
)
}
</
CornerDialog
>
</
CornerDialog
>
<
Portal
>
<
Pane
className=
"toolbar"
zIndex=
{
10
}
borderRadius=
{
4
}
display=
"flex"
flexDirection=
"column"
background=
"#2d8cf0"
padding=
{
0
}
position=
"fixed"
top=
{
120
}
right=
{
64
}
>
<
Button
appearance=
"minimal"
marginY=
{
8
}
className=
"toolbar-item"
onClick=
{
()
=>
{
toaster
.
notify
(
'under develop!'
,
{
id
:
'dev'
});
}
}
>
<
RefreshIcon
color=
"white"
size=
{
10
}
/>
</
Button
>
<
Button
appearance=
"minimal"
marginY=
{
8
}
className=
"toolbar-item"
onClick=
{
()
=>
setSideSheetShwon
(
true
)
}
>
<
SwapVerticalIcon
color=
"white"
size=
{
10
}
/>
</
Button
>
<
Button
appearance=
"minimal"
marginY=
{
8
}
className=
"toolbar-item"
onClick=
{
()
=>
{
setFullscreen
(
!
fullscreen
);
}
}
>
{
!
fullscreen
&&
<
FullscreenIcon
color=
"white"
size=
{
10
}
/>
}
{
fullscreen
&&
<
MinimizeIcon
color=
"white"
size=
{
10
}
/>
}
</
Button
>
<
Button
appearance=
"minimal"
marginY=
{
8
}
className=
"toolbar-item"
onClick=
{
()
=>
{
toaster
.
notify
(
'under develop!'
,
{
id
:
'dev'
});
}
}
>
<
CogIcon
color=
"white"
size=
{
10
}
/>
</
Button
>
</
Pane
>
</
Portal
>
</
Pane
>
</
Pane
>
);
);
};
};
...
...
web/src/components/Home.tsx
View file @
49a5c155
...
@@ -3,7 +3,6 @@ import { NavLink, Route, Switch } from 'react-router-dom';
...
@@ -3,7 +3,6 @@ import { NavLink, Route, Switch } from 'react-router-dom';
import
{
Button
,
Pane
,
Heading
}
from
'evergreen-ui'
;
import
{
Button
,
Pane
,
Heading
}
from
'evergreen-ui'
;
import
{
useTranslation
}
from
'react-i18next'
;
import
{
useTranslation
}
from
'react-i18next'
;
import
Footer
from
'./layout/Footer'
;
import
Header
from
'./layout/Header'
;
import
Header
from
'./layout/Header'
;
import
Signin
from
'./Signin'
;
import
Signin
from
'./Signin'
;
...
@@ -52,10 +51,6 @@ const Home = () => {
...
@@ -52,10 +51,6 @@ const Home = () => {
<
Route
path=
{
`/signin`
}
component=
{
Signin
}
/>
<
Route
path=
{
`/signin`
}
component=
{
Signin
}
/>
</
Switch
>
</
Switch
>
</
main
>
</
main
>
{
/*<footer className="home-content-footer">
<Footer />
</footer>
*/
}
</
div
>
</
div
>
);
);
};
};
...
...
web/src/components/Signin.tsx
View file @
49a5c155
import
React
,
{
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
RouteComponentProps
}
from
'react-router-dom'
;
import
{
RouteComponentProps
}
from
'react-router-dom'
;
import
{
import
{
Pane
,
Heading
,
toaster
}
from
'evergreen-ui'
;
//Button,
Pane
,
Heading
,
//TextInputField,
//GeolocationIcon,
//FormField,
toaster
,
}
from
'evergreen-ui'
;
import
{
useTranslation
}
from
'react-i18next'
;
import
{
useTranslation
}
from
'react-i18next'
;
import
Config
from
'../config/config'
;
import
Config
from
'../config/config'
;
import
Utils
from
'../libs/utils'
;
import
Utils
from
'../libs/utils'
;
import
apiRouters
from
'../config/api_routers'
;
import
apiRouters
from
'../config/api_routers'
;
{
/*interface FieldState {
isInvalid: boolean;
validationMessage: string | undefined;
value: string;
}
const checkHostFormat = (host: string) => {
if (!host || host === '') {
return [false, '', 22];
}
const hostList = host.split(':');
if (hostList.length === 1) {
return [true, host, 22];
}
const ok =
hostList.length === 2 &&
hostList[1].length !== 0 &&
!isNaN(Number(hostList[1]));
if (ok) {
return [true, hostList[0], parseInt(hostList[1])];
} else {
return [false, host, 22];
}
};*/
}
const
Signin
=
(
props
:
RouteComponentProps
)
=>
{
const
Signin
=
(
props
:
RouteComponentProps
)
=>
{
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
window
.
addEventListener
(
'message'
,
(
event
)
=>
{
window
.
addEventListener
(
'message'
,
(
event
)
=>
{
if
(
event
.
origin
!==
process
.
env
.
REACT_APP_CLUSTER_URL
)
return
;
if
(
event
.
origin
!==
process
.
env
.
REACT_APP_CLUSTER_URL
)
return
;
doSignin
(
event
.
data
);
doSignin
(
event
.
data
);
});
});
},
[]);
},
[]);
...
@@ -55,7 +20,6 @@ const Signin = (props: RouteComponentProps) => {
...
@@ -55,7 +20,6 @@ const Signin = (props: RouteComponentProps) => {
const
doSignin
=
(
data
:
Record
<
string
,
string
>
)
=>
{
const
doSignin
=
(
data
:
Record
<
string
,
string
>
)
=>
{
Utils
.
axiosInstance
Utils
.
axiosInstance
.
post
(
Utils
.
loadUrl
(
apiRouters
.
router
.
sign_in
,
null
),
{
.
post
(
Utils
.
loadUrl
(
apiRouters
.
router
.
sign_in
,
null
),
{
// _xsrf: Utils.base64Decode(xsrf.split("|")[0]), // todo
host
:
data
.
host
,
host
:
data
.
host
,
port
:
data
.
port
,
port
:
data
.
port
,
username
:
data
.
username
,
username
:
data
.
username
,
...
@@ -64,7 +28,6 @@ const Signin = (props: RouteComponentProps) => {
...
@@ -64,7 +28,6 @@ const Signin = (props: RouteComponentProps) => {
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
try
{
try
{
if
(
!
response
.
data
||
response
.
data
.
has_error
)
{
if
(
!
response
.
data
||
response
.
data
.
has_error
)
{
// self.$Loading.error();
switch
(
response
.
data
.
message
)
{
switch
(
response
.
data
.
message
)
{
case
0
:
case
0
:
toaster
.
danger
(
t
(
'signin:form_has_error'
));
toaster
.
danger
(
t
(
'signin:form_has_error'
));
...
@@ -78,10 +41,8 @@ const Signin = (props: RouteComponentProps) => {
...
@@ -78,10 +41,8 @@ const Signin = (props: RouteComponentProps) => {
}
}
}
else
{
}
else
{
if
(
!
response
.
data
.
addition
)
{
if
(
!
response
.
data
.
addition
)
{
// self.$Loading.error();
toaster
.
danger
(
t
(
'signin:form_error_remote_server'
));
toaster
.
danger
(
t
(
'signin:form_error_remote_server'
));
}
else
{
}
else
{
// self.$Loading.finish();
toaster
.
success
(
t
(
'signin:signin_success'
));
toaster
.
success
(
t
(
'signin:signin_success'
));
localStorage
.
setItem
(
'user.host'
,
data
.
host
);
localStorage
.
setItem
(
'user.host'
,
data
.
host
);
localStorage
.
setItem
(
'user.username'
,
data
.
username
);
localStorage
.
setItem
(
'user.username'
,
data
.
username
);
...
@@ -94,12 +55,10 @@ const Signin = (props: RouteComponentProps) => {
...
@@ -94,12 +55,10 @@ const Signin = (props: RouteComponentProps) => {
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
// self.$Loading.error();
toaster
.
danger
(
t
(
'signin:form_error_ssh_login'
));
toaster
.
danger
(
t
(
'signin:form_error_ssh_login'
));
}
}
})
})
.
catch
((
e
:
Error
)
=>
{
.
catch
((
e
:
Error
)
=>
{
// self.$Loading.error();
toaster
.
danger
(
t
(
'signin:form_error_ssh_login'
)
+
': '
+
e
.
message
);
toaster
.
danger
(
t
(
'signin:form_error_ssh_login'
)
+
': '
+
e
.
message
);
});
});
};
};
...
@@ -115,65 +74,7 @@ const Signin = (props: RouteComponentProps) => {
...
@@ -115,65 +74,7 @@ const Signin = (props: RouteComponentProps) => {
<
Heading
marginBottom=
"0.6rem"
marginTop=
"0.6rem"
size=
{
700
}
>
<
Heading
marginBottom=
"0.6rem"
marginTop=
"0.6rem"
size=
{
700
}
>
{
t
(
'signin:form_title'
)
}
{
t
(
'signin:form_title'
)
}
</
Heading
>
</
Heading
>
{
/*
<
span
>
Waiting for loging
</
span
>
<form
onSubmit={(event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
doSignin();
return false;
}}>
<Pane textAlign="left">
<TextInputField
value={hostField.value}
isInvalid={hostField.isInvalid}
validationMessage={hostField.validationMessage}
label={t('signin:form_fullhost_label')}
onChange={onHostChanged}
onBlur={onHostChanged}
placeholder={t('signin:form_fullhost_ph')}
marginBottom="8px"
/>
<TextInputField
value={unameField.value}
isInvalid={unameField.isInvalid}
label={t('signin:form_username_label')}
onChange={onUsernameChanged}
onBlur={onUsernameChanged}
placeholder={t('signin:form_username_ph')}
validationMessage={unameField.validationMessage}
marginBottom="8px"
/>
<TextInputField
label={t('signin:form_passwd_label')}
type="password"
placeholder={t('signin:form_passwd_ph')}
marginBottom="24px"
onChange={onPasswdChanged}
onBlur={onPasswdChanged}
onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>): void => {
// 'keypress' event misbehaves on mobile so we track 'Enter' key via 'keydown' event
if (event.key === 'Enter') {
event.preventDefault();
event.stopPropagation();
doSignin();
}
}}
/>
</Pane>
<FormField>
<Button
isLoading={submitLoading}
type="submit"
width="100%"
appearance="primary"
justifyContent="center"
intent="success"
iconBefore={GeolocationIcon}>
{t('signin:form_submit_btn')}
</Button>
</FormField>
</form>
*/
}
</
div
>
</
div
>
</
Pane
>
</
Pane
>
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment