删除未使用的代码

This commit is contained in:
dushixiang
2021-01-24 17:24:20 +08:00
parent 7c4860ce28
commit 5f9f324d78
3 changed files with 7 additions and 9 deletions

View File

@ -7,13 +7,6 @@ import "./Console.css"
import {getToken} from "../../utils/utils";
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 {
state = {
@ -100,6 +93,8 @@ class Console extends Component {
term.writeln(`\x1B[1;3;31m${msg['content']}\x1B[0m `)
webSocket.close();
break;
default:
break;
}
if (!executedCommand) {

View File

@ -1,5 +1,5 @@
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 {itemRender} from "../../utils/utils";
import Logout from "../user/Logout";
@ -100,7 +100,7 @@ class BatchCommand extends Component {
})
}
}}
>
>
<Console assetId={item.id} command={this.state.command}
width={(window.innerWidth - 350) / 2}
height={420}