feat: add download instance log button

This commit is contained in:
jialin
2025-02-27 18:03:28 +08:00
parent 4b73457f7f
commit 8464e0ea3f
8 changed files with 201 additions and 35 deletions
@@ -10,6 +10,7 @@ import {
} from '@/pages/resources/config/types';
import {
DeleteOutlined,
DownloadOutlined,
HddFilled,
InfoCircleOutlined,
ThunderboltFilled
@@ -48,6 +49,18 @@ const childActionList = [
],
icon: <IconFont type="icon-logs" />
},
{
label: 'common.button.downloadLog',
key: 'download',
status: [
InstanceStatusMap.Initializing,
InstanceStatusMap.Running,
InstanceStatusMap.Error,
InstanceStatusMap.Starting,
InstanceStatusMap.Downloading
],
icon: <DownloadOutlined />
},
{
label: 'common.button.delrecreate',
key: 'delete',
@@ -60,7 +73,7 @@ const childActionList = [
const setChildActionList = (item: ModelInstanceListItem) => {
return _.filter(childActionList, (action: any) => {
if (action.key === 'viewlog') {
if (action.key === 'viewlog' || action.key === 'download') {
return action.status.includes(item.state);
}
return true;