diff --git a/src/locales/zh.json b/src/locales/zh.json index 55c0f068..9e8fec41 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -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": "执行热迁移实例", diff --git a/src/resources/instance.jsx b/src/resources/instance.jsx index e91d000c..c3a1ae08 100644 --- a/src/resources/instance.jsx +++ b/src/resources/instance.jsx @@ -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" />