From 0d32bd2eac966fd584bdab56c6a0e2cdeb712c78 Mon Sep 17 00:00:00 2001 From: liuying Date: Mon, 1 Aug 2022 10:43:27 +0800 Subject: [PATCH] fix: the cluster log cannot be closed Signed-off-by: liuying --- src/stores/log.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/stores/log.js b/src/stores/log.js index b90533f0..6003d96c 100644 --- a/src/stores/log.js +++ b/src/stores/log.js @@ -15,18 +15,26 @@ */ import BaseStore from './base'; +import { makeObservable, observable } from 'mobx'; export default class LogStore extends BaseStore { logdata = ''; isExpand = false; - isOpen = false; - cumulativeSize = 0; isStepFinished = false; + constructor(props) { + super(props); + + makeObservable(this, { + isExpand: observable, + logdata: observable, + }); + } + async fetchStepLog(params) { const res = await request.get(`${this.apiVersion}/logs`, params); this.cumulativeSize += res.deliverySize || 0;