diff --git a/spug_api/libs/ssh.py b/spug_api/libs/ssh.py index 1fbd3a4..0366482 100644 --- a/spug_api/libs/ssh.py +++ b/spug_api/libs/ssh.py @@ -28,6 +28,8 @@ class SSH: 'password': password, 'pkey': RSAKey.from_private_key(StringIO(pkey)) if isinstance(pkey, str) else pkey, 'timeout': connect_timeout, + 'allow_agent': False, + 'look_for_keys': False, 'banner_timeout': 30 } diff --git a/spug_web/src/pages/ssh/FileManager.js b/spug_web/src/pages/ssh/FileManager.js index 114cb02..ab64e59 100644 --- a/spug_web/src/pages/ssh/FileManager.js +++ b/spug_web/src/pages/ssh/FileManager.js @@ -70,8 +70,9 @@ class FileManager extends React.Component { key: 'action', render: info => info.kind === '-' ? ( - } onClick={() => this.handleDownload(info.name)}/> - } + } + onClick={() => this.handleDownload(info.name)}/> + } onClick={() => this.handleDelete(info.name)}/> ) : null diff --git a/spug_web/src/pages/ssh/index.module.less b/spug_web/src/pages/ssh/index.module.less index 70764e8..cb76574 100644 --- a/spug_web/src/pages/ssh/index.module.less +++ b/spug_web/src/pages/ssh/index.module.less @@ -1,105 +1,114 @@ .container { + display: flex; + min-height: 100vh; + + .sider { display: flex; - min-height: 100vh; + flex-direction: column; + width: 280px; + background-color: #fafafa; + position: relative; - .sider { - display: flex; - flex-direction: column; - width: 280px; + .split { + position: absolute; + width: 6px; + height: 100vh; + right: -3px; + cursor: ew-resize; + } + + .logo { + height: 42px; + display: flex; + justify-content: center; + align-items: center; + background-color: #f0f0f0; + + img { + height: 30px; + } + } + + .hosts { + :global(.ant-tree-node-content-wrapper) { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + :global(.ant-tree) { background-color: #fafafa; - position: relative; + height: calc(100vh - 98px); + overflow: auto; + } - .split { - position: absolute; - width: 6px; - height: 100vh; - right: -3px; - cursor: ew-resize; - } - - .logo { - height: 42px; - display: flex; - justify-content: center; - align-items: center; - background-color: #f0f0f0; - img { - height: 30px; - } - } - .hosts { - :global(.ant-tree-node-content-wrapper) { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - :global(.ant-tree) { - background-color: #fafafa; - height: calc(100vh - 98px); - overflow: auto; - } - - .search { - margin: 12px 10px; - width: calc(100% - 60px); - } - } + .search { + margin: 12px 10px; + width: calc(100% - 60px); + } } - .content { - flex: 1; - display: flex; - flex-direction: column; + } - .tips { - position: absolute; - top: 12px; - left: 12px; - font-size: 12px; - color: #666; - } + .content { + flex: 1; + display: flex; + flex-direction: column; - :global(.ant-tabs-nav) { - height: 42px; - margin: 0; - } - - :global(.ant-tabs-tab-active) { - border-bottom: 2px solid #1890ff !important; - transition: unset; - } + .tips { + position: absolute; + top: 12px; + left: 12px; + font-size: 12px; + color: #666; } + + .tabRender { + user-select: none; + padding: 8px 8px 8px 16px; + margin: 0 -8px 0 -16px; + } + + :global(.ant-tabs-nav) { + height: 42px; + margin: 0; + } + + :global(.ant-tabs-tab-active) { + border-bottom: 2px solid #1890ff !important; + transition: unset; + } + } } .terminal { - flex: 1; - display: flex; - background-color: #2b2b2b; - padding-left: 5px; - height: calc(100vh - 42px); + flex: 1; + display: flex; + background-color: #2b2b2b; + padding-left: 5px; + height: calc(100vh - 42px); } .fig { - flex: 1; - background-color: #2b2b2b; - color: #A9B7C6; - padding-top: 200px; - margin-bottom: 0; - text-align: center; + flex: 1; + background-color: #2b2b2b; + color: #A9B7C6; + padding-top: 200px; + margin-bottom: 0; + text-align: center; } .fileSize { - padding-right: 24px !important; + padding-right: 24px !important; } .drawerHeader { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 15px; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; } -.tabRender { - user-select: none; - padding: 8px 8px 8px 16px; - margin: 0 -8px 0 -16px; +.drawerBtn { + height: 22px; + width: 22px; } \ No newline at end of file