删除未使用的代码
This commit is contained in:
@ -19,6 +19,9 @@ Next Terminal基于 [Apache Guacamole](!https://guacamole.apache.org/) 开发,
|
|||||||
- 在线会话管理(监控、强制断开)
|
- 在线会话管理(监控、强制断开)
|
||||||
- 离线会话管理(查看录屏)
|
- 离线会话管理(查看录屏)
|
||||||
- 双因素认证 感谢 [naiba](!https://github.com/naiba) 贡献
|
- 双因素认证 感谢 [naiba](!https://github.com/naiba) 贡献
|
||||||
|
- 资产标签
|
||||||
|
- 资产授权
|
||||||
|
- 用户分组
|
||||||
|
|
||||||
## 在线体验
|
## 在线体验
|
||||||
|
|
||||||
|
@ -7,13 +7,6 @@ import "./Console.css"
|
|||||||
import {getToken} from "../../utils/utils";
|
import {getToken} from "../../utils/utils";
|
||||||
import {FitAddon} from 'xterm-addon-fit'
|
import {FitAddon} from 'xterm-addon-fit'
|
||||||
|
|
||||||
|
|
||||||
function getGeometry(width, height) {
|
|
||||||
const cols = Math.floor(width / 9);
|
|
||||||
const rows = Math.floor(height / 17) - 1;
|
|
||||||
return [cols, rows];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Console extends Component {
|
class Console extends Component {
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
@ -100,6 +93,8 @@ class Console extends Component {
|
|||||||
term.writeln(`\x1B[1;3;31m${msg['content']}\x1B[0m `)
|
term.writeln(`\x1B[1;3;31m${msg['content']}\x1B[0m `)
|
||||||
webSocket.close();
|
webSocket.close();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!executedCommand) {
|
if (!executedCommand) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import {Card, Input, List, PageHeader, Popconfirm} from "antd";
|
import {Card, Input, List, PageHeader} from "antd";
|
||||||
import Console from "../access/Console";
|
import Console from "../access/Console";
|
||||||
import {itemRender} from "../../utils/utils";
|
import {itemRender} from "../../utils/utils";
|
||||||
import Logout from "../user/Logout";
|
import Logout from "../user/Logout";
|
||||||
@ -100,7 +100,7 @@ class BatchCommand extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Console assetId={item.id} command={this.state.command}
|
<Console assetId={item.id} command={this.state.command}
|
||||||
width={(window.innerWidth - 350) / 2}
|
width={(window.innerWidth - 350) / 2}
|
||||||
height={420}
|
height={420}
|
||||||
|
Reference in New Issue
Block a user