fix: Fix action log popup with debounce
Fix action log popup with debounce Change-Id: I412bb4091b987755c1be12b6eec353119de3c3e2
This commit is contained in:
parent
f15ea203a2
commit
1491201580
@ -269,7 +269,7 @@
|
||||
"Compute Services": "计算服务",
|
||||
"Compute Start Instance": "启动",
|
||||
"Compute Stop Instance": "关闭",
|
||||
"Compute Suspend Instance": "挂起",
|
||||
"Compute Suspend Instance": "云主机挂起",
|
||||
"Compute Unpause Instance": "恢复",
|
||||
"Compute service:": "计算服务(nova):",
|
||||
"Conductor Live Migrate Instance": "执行热迁移实例",
|
||||
|
@ -474,16 +474,22 @@ export const actionEvent = {
|
||||
|
||||
function PopUpContent({ id, requestId }) {
|
||||
const [event, setEvent] = useState([]);
|
||||
const [isLoading, setLoaidng] = useState(false);
|
||||
const [loading, setLoaidng] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
let timeout = null;
|
||||
(async function () {
|
||||
setLoaidng(true);
|
||||
const cb = await globalActionLogStore.fetchDetail({ id, requestId });
|
||||
const { events = [] } = cb;
|
||||
setEvent(events.reverse());
|
||||
setLoaidng(false);
|
||||
timeout = setTimeout(() => {
|
||||
setLoaidng(false);
|
||||
setEvent(events.slice().reverse());
|
||||
}, 200);
|
||||
})();
|
||||
return () => {
|
||||
clearTimeout(timeout);
|
||||
};
|
||||
}, []);
|
||||
const columns = [
|
||||
{
|
||||
@ -516,7 +522,7 @@ function PopUpContent({ id, requestId }) {
|
||||
columns={columns}
|
||||
dataSource={event}
|
||||
pagination={false}
|
||||
loading={isLoading}
|
||||
loading={loading}
|
||||
size="small"
|
||||
rowKey="event"
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user