Skip to content

Commit

Permalink
1.0.28 日志查看器 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobaidadada committed Dec 22, 2024
1 parent f0eb7f0 commit dec038e
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/web/project/component/file/component/LogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import {deleteList} from "../../../../../common/ListUtil";

const history_max_line = 300; // 最多创建多少个dom对象

let open_watch_timer;
let open_watch = false;

let last_position = 0;
Expand Down Expand Up @@ -170,11 +169,6 @@ export default function LogViewer(props) {
if(open_watch)return;
open_watch = true;
set_progress(100);
if (open_watch_timer) {
clearTimeout(open_watch_timer);
open_watch_timer = null;
return;
}
ws.addMsg(CmdType.log_viewer_watch,(wsData: WsData<LogViewerPojo>)=>{
const pojo = wsData.context as LogViewerPojo;
if(!pojo) {
Expand All @@ -195,11 +189,8 @@ export default function LogViewer(props) {
const cancel_watch = ()=>{
if (!open_watch)return;
open_watch = false;
open_watch_timer = setTimeout(()=>{
ws.unConnect();
set_tip(false)
open_watch_timer = null;
},5000)
ws.unConnect();
set_tip(false)

// console.log('取消实时监听')
}
Expand All @@ -223,7 +214,7 @@ export default function LogViewer(props) {
if (position >= req.max_size) {
// if (!top_alert) {
// top_alert = true;
watch(position);
watch(position);
// NotyInfo('到达底部开始实时监听');
// }
// console.log(position,req.max_size)
Expand Down Expand Up @@ -288,7 +279,6 @@ export default function LogViewer(props) {

// set_go_progress(0)
set_tip(false);
open_watch_timer = null;
open_watch = false;
last_position = 0;
dom_children_list = [];
Expand Down

0 comments on commit dec038e

Please sign in to comment.