删除环境的枚举
This commit is contained in:
parent
2868e294d3
commit
fdfc951e2d
@ -2,10 +2,16 @@ import {BaseResponse, BaseRequest, BaseQuery} from '@/types/base';
|
|||||||
import {Environment} from '../../Environment/List/types';
|
import {Environment} from '../../Environment/List/types';
|
||||||
import {Application} from '../../Application/List/types';
|
import {Application} from '../../Application/List/types';
|
||||||
import {DevelopmentLanguageTypeEnum} from '../../Application/List/types';
|
import {DevelopmentLanguageTypeEnum} from '../../Application/List/types';
|
||||||
import {BuildTypeEnum} from '../../Environment/List/types';
|
|
||||||
import type {JsonNode} from '@/types/common';
|
import type {JsonNode} from '@/types/common';
|
||||||
import type {WorkflowDefinition} from '@/pages/Workflow/Definition/types';
|
import type {WorkflowDefinition} from '@/pages/Workflow/Definition/types';
|
||||||
|
|
||||||
|
// 构建方式枚举
|
||||||
|
export enum BuildTypeEnum {
|
||||||
|
JENKINS = 'JENKINS',
|
||||||
|
GITLAB_RUNNER = 'GITLAB_RUNNER',
|
||||||
|
GITHUB_ACTION = 'GITHUB_ACTION'
|
||||||
|
}
|
||||||
|
|
||||||
// 部署配置模板
|
// 部署配置模板
|
||||||
export interface DeployConfigTemplate {
|
export interface DeployConfigTemplate {
|
||||||
code: string;
|
code: string;
|
||||||
|
|||||||
@ -8,12 +8,10 @@ import {
|
|||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from '@/components/ui/dialog';
|
} from '@/components/ui/dialog';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Badge } from '@/components/ui/badge';
|
|
||||||
import { AlertCircle } from 'lucide-react';
|
import { AlertCircle } from 'lucide-react';
|
||||||
import { useToast } from '@/components/ui/use-toast';
|
import { useToast } from '@/components/ui/use-toast';
|
||||||
import { deleteEnvironment } from '../service';
|
import { deleteEnvironment } from '../service';
|
||||||
import type { Environment } from '../types';
|
import type { Environment } from '../types';
|
||||||
import { getBuildTypeInfo, getDeployTypeInfo } from '../utils';
|
|
||||||
|
|
||||||
interface DeleteDialogProps {
|
interface DeleteDialogProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@ -53,9 +51,6 @@ const DeleteDialog: React.FC<DeleteDialogProps> = ({
|
|||||||
|
|
||||||
if (!record) return null;
|
if (!record) return null;
|
||||||
|
|
||||||
const buildInfo = getBuildTypeInfo(record.buildType);
|
|
||||||
const deployInfo = getDeployTypeInfo(record.deployType);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||||
<DialogContent className="sm:max-w-[500px]">
|
<DialogContent className="sm:max-w-[500px]">
|
||||||
@ -75,14 +70,12 @@ const DeleteDialog: React.FC<DeleteDialogProps> = ({
|
|||||||
<span className="text-muted-foreground">环境名称:</span>
|
<span className="text-muted-foreground">环境名称:</span>
|
||||||
<span className="font-medium">{record.envName}</span>
|
<span className="font-medium">{record.envName}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
{record.envDesc && (
|
||||||
<span className="text-muted-foreground">构建类型:</span>
|
<div className="flex items-center justify-between">
|
||||||
<Badge variant="outline">{buildInfo.label}</Badge>
|
<span className="text-muted-foreground">环境描述:</span>
|
||||||
</div>
|
<span className="font-medium">{record.envDesc}</span>
|
||||||
<div className="flex items-center justify-between">
|
</div>
|
||||||
<span className="text-muted-foreground">部署类型:</span>
|
)}
|
||||||
<Badge variant="secondary">{deployInfo.label}</Badge>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|||||||
@ -11,10 +11,9 @@ import { Input } from '@/components/ui/input';
|
|||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Textarea } from '@/components/ui/textarea';
|
import { Textarea } from '@/components/ui/textarea';
|
||||||
import { Switch } from '@/components/ui/switch';
|
import { Switch } from '@/components/ui/switch';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
|
||||||
import { useToast } from '@/components/ui/use-toast';
|
import { useToast } from '@/components/ui/use-toast';
|
||||||
import { createEnvironment, updateEnvironment } from '../service';
|
import { createEnvironment, updateEnvironment } from '../service';
|
||||||
import type { Environment, CreateEnvironmentRequest, BuildTypeEnum, DeployTypeEnum } from '../types';
|
import type { Environment, CreateEnvironmentRequest } from '../types';
|
||||||
|
|
||||||
interface EditDialogProps {
|
interface EditDialogProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@ -46,8 +45,6 @@ const EditDialog: React.FC<EditDialogProps> = ({
|
|||||||
envCode: record.envCode,
|
envCode: record.envCode,
|
||||||
envName: record.envName,
|
envName: record.envName,
|
||||||
envDesc: record.envDesc,
|
envDesc: record.envDesc,
|
||||||
buildType: record.buildType,
|
|
||||||
deployType: record.deployType,
|
|
||||||
sort: record.sort,
|
sort: record.sort,
|
||||||
enabled: record.enabled,
|
enabled: record.enabled,
|
||||||
});
|
});
|
||||||
@ -72,14 +69,6 @@ const EditDialog: React.FC<EditDialogProps> = ({
|
|||||||
toast({ title: '提示', description: '请输入环境名称', variant: 'destructive' });
|
toast({ title: '提示', description: '请输入环境名称', variant: 'destructive' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!formData.buildType) {
|
|
||||||
toast({ title: '提示', description: '请选择构建类型', variant: 'destructive' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!formData.deployType) {
|
|
||||||
toast({ title: '提示', description: '请选择部署类型', variant: 'destructive' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (record) {
|
if (record) {
|
||||||
await updateEnvironment({ ...formData, id: record.id } as any);
|
await updateEnvironment({ ...formData, id: record.id } as any);
|
||||||
@ -151,40 +140,6 @@ const EditDialog: React.FC<EditDialogProps> = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-2">
|
|
||||||
<Label htmlFor="buildType">构建类型 *</Label>
|
|
||||||
<Select
|
|
||||||
value={formData.buildType}
|
|
||||||
onValueChange={(value) => setFormData({ ...formData, buildType: value as BuildTypeEnum })}
|
|
||||||
>
|
|
||||||
<SelectTrigger>
|
|
||||||
<SelectValue placeholder="请选择构建类型" />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value="JENKINS">Jenkins构建</SelectItem>
|
|
||||||
<SelectItem value="GITLAB_RUNNER">GitLab Runner构建</SelectItem>
|
|
||||||
<SelectItem value="GITHUB_ACTION">GitHub Action构建</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid gap-2">
|
|
||||||
<Label htmlFor="deployType">部署类型 *</Label>
|
|
||||||
<Select
|
|
||||||
value={formData.deployType}
|
|
||||||
onValueChange={(value) => setFormData({ ...formData, deployType: value as DeployTypeEnum })}
|
|
||||||
>
|
|
||||||
<SelectTrigger>
|
|
||||||
<SelectValue placeholder="请选择部署类型" />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value="K8S">Kubernetes集群部署</SelectItem>
|
|
||||||
<SelectItem value="DOCKER">Docker容器部署</SelectItem>
|
|
||||||
<SelectItem value="VM">虚拟机部署</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<Label htmlFor="sort">显示排序 *</Label>
|
<Label htmlFor="sort">显示排序 *</Label>
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import React, {useState} from 'react';
|
import React, {useState} from 'react';
|
||||||
import {Modal, Form, Input, Select, Switch, InputNumber, message} from 'antd';
|
import {Modal, Form, Input, Switch, InputNumber, message} from 'antd';
|
||||||
import type {Environment} from '../types';
|
import type {Environment} from '../types';
|
||||||
import {BuildTypeEnum, DeployTypeEnum} from '../types';
|
|
||||||
import {createEnvironment, updateEnvironment} from '../service';
|
import {createEnvironment, updateEnvironment} from '../service';
|
||||||
|
|
||||||
interface EnvironmentModalProps {
|
interface EnvironmentModalProps {
|
||||||
@ -100,38 +99,6 @@ const EnvironmentModal: React.FC<EnvironmentModalProps> = ({
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
|
||||||
name="buildType"
|
|
||||||
label="构建类型"
|
|
||||||
rules={[{required: true, message: '请选择构建类型'}]}
|
|
||||||
tooltip="环境的构建类型,创建后不可修改"
|
|
||||||
>
|
|
||||||
<Select
|
|
||||||
placeholder="请选择构建类型"
|
|
||||||
disabled={isEdit}
|
|
||||||
>
|
|
||||||
<Select.Option value={BuildTypeEnum.JENKINS}>Jenkins</Select.Option>
|
|
||||||
<Select.Option value={BuildTypeEnum.GITLAB_RUNNER}>GitLab Runner</Select.Option>
|
|
||||||
<Select.Option value={BuildTypeEnum.GITHUB_ACTION}>GitHub Action</Select.Option>
|
|
||||||
</Select>
|
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
<Form.Item
|
|
||||||
name="deployType"
|
|
||||||
label="部署类型"
|
|
||||||
rules={[{required: true, message: '请选择部署类型'}]}
|
|
||||||
tooltip="环境的部署类型,创建后不可修改"
|
|
||||||
>
|
|
||||||
<Select
|
|
||||||
placeholder="请选择部署类型"
|
|
||||||
disabled={isEdit}
|
|
||||||
>
|
|
||||||
<Select.Option value={DeployTypeEnum.K8S}>Kubernetes</Select.Option>
|
|
||||||
<Select.Option value={DeployTypeEnum.DOCKER}>Docker</Select.Option>
|
|
||||||
<Select.Option value={DeployTypeEnum.VM}>虚拟机</Select.Option>
|
|
||||||
</Select>
|
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="envDesc"
|
name="envDesc"
|
||||||
label="环境描述"
|
label="环境描述"
|
||||||
|
|||||||
@ -17,15 +17,13 @@ import {
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
|
||||||
import { useToast } from '@/components/ui/use-toast';
|
import { useToast } from '@/components/ui/use-toast';
|
||||||
import { DataTablePagination } from '@/components/ui/pagination';
|
import { DataTablePagination } from '@/components/ui/pagination';
|
||||||
import { Plus, Edit, Trash2, Server, Activity, Database } from 'lucide-react';
|
import { Plus, Edit, Trash2, Server, Activity, Database } from 'lucide-react';
|
||||||
import EditDialog from './components/EditDialog';
|
import EditDialog from './components/EditDialog';
|
||||||
import DeleteDialog from './components/DeleteDialog';
|
import DeleteDialog from './components/DeleteDialog';
|
||||||
import { getEnvironmentPage, deleteEnvironment } from './service';
|
import { getEnvironmentPage, deleteEnvironment } from './service';
|
||||||
import type { Environment, EnvironmentQueryParams, BuildTypeEnum, DeployTypeEnum } from './types';
|
import type { Environment, EnvironmentQueryParams } from './types';
|
||||||
import { getBuildTypeInfo, getDeployTypeInfo } from './utils';
|
|
||||||
|
|
||||||
const DEFAULT_PAGE_SIZE = 10;
|
const DEFAULT_PAGE_SIZE = 10;
|
||||||
|
|
||||||
@ -148,32 +146,6 @@ const EnvironmentList: React.FC = () => {
|
|||||||
onChange={(e) => setQuery({ ...query, envName: e.target.value })}
|
onChange={(e) => setQuery({ ...query, envName: e.target.value })}
|
||||||
className="max-w-[200px]"
|
className="max-w-[200px]"
|
||||||
/>
|
/>
|
||||||
<Select
|
|
||||||
value={query.buildType}
|
|
||||||
onValueChange={(value) => setQuery({ ...query, buildType: value as BuildTypeEnum })}
|
|
||||||
>
|
|
||||||
<SelectTrigger className="max-w-[200px]">
|
|
||||||
<SelectValue placeholder="构建类型" />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value="JENKINS">Jenkins构建</SelectItem>
|
|
||||||
<SelectItem value="GITLAB_RUNNER">GitLab Runner构建</SelectItem>
|
|
||||||
<SelectItem value="GITHUB_ACTION">GitHub Action构建</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
<Select
|
|
||||||
value={query.deployType}
|
|
||||||
onValueChange={(value) => setQuery({ ...query, deployType: value as DeployTypeEnum })}
|
|
||||||
>
|
|
||||||
<SelectTrigger className="max-w-[200px]">
|
|
||||||
<SelectValue placeholder="部署类型" />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value="K8S">Kubernetes集群部署</SelectItem>
|
|
||||||
<SelectItem value="DOCKER">Docker容器部署</SelectItem>
|
|
||||||
<SelectItem value="VM">虚拟机部署</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
<Button variant="outline" onClick={handleReset}>
|
<Button variant="outline" onClick={handleReset}>
|
||||||
重置
|
重置
|
||||||
</Button>
|
</Button>
|
||||||
@ -196,9 +168,7 @@ const EnvironmentList: React.FC = () => {
|
|||||||
<TableRow>
|
<TableRow>
|
||||||
<TableHead className="w-[120px]">环境编码</TableHead>
|
<TableHead className="w-[120px]">环境编码</TableHead>
|
||||||
<TableHead className="w-[150px]">环境名称</TableHead>
|
<TableHead className="w-[150px]">环境名称</TableHead>
|
||||||
<TableHead className="w-[200px]">环境描述</TableHead>
|
<TableHead className="w-[300px]">环境描述</TableHead>
|
||||||
<TableHead className="w-[150px]">构建类型</TableHead>
|
|
||||||
<TableHead className="w-[150px]">部署类型</TableHead>
|
|
||||||
<TableHead className="w-[80px]">排序</TableHead>
|
<TableHead className="w-[80px]">排序</TableHead>
|
||||||
<TableHead className="w-[100px]">状态</TableHead>
|
<TableHead className="w-[100px]">状态</TableHead>
|
||||||
<TableHead className="w-[200px]">操作</TableHead>
|
<TableHead className="w-[200px]">操作</TableHead>
|
||||||
@ -207,31 +177,17 @@ const EnvironmentList: React.FC = () => {
|
|||||||
<TableBody>
|
<TableBody>
|
||||||
{list.length === 0 ? (
|
{list.length === 0 ? (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={8} className="h-24 text-center">
|
<TableCell colSpan={6} className="h-24 text-center">
|
||||||
暂无数据
|
暂无数据
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
) : (
|
) : (
|
||||||
list.map((item) => {
|
list.map((item) => {
|
||||||
const buildInfo = getBuildTypeInfo(item.buildType);
|
|
||||||
const deployInfo = getDeployTypeInfo(item.deployType);
|
|
||||||
return (
|
return (
|
||||||
<TableRow key={item.id}>
|
<TableRow key={item.id}>
|
||||||
<TableCell className="font-medium">{item.envCode}</TableCell>
|
<TableCell className="font-medium">{item.envCode}</TableCell>
|
||||||
<TableCell>{item.envName}</TableCell>
|
<TableCell>{item.envName}</TableCell>
|
||||||
<TableCell className="text-muted-foreground">{item.envDesc || '-'}</TableCell>
|
<TableCell className="text-muted-foreground">{item.envDesc || '-'}</TableCell>
|
||||||
<TableCell>
|
|
||||||
<Badge variant="outline" className="inline-flex items-center gap-1">
|
|
||||||
{buildInfo.icon}
|
|
||||||
{buildInfo.label}
|
|
||||||
</Badge>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell>
|
|
||||||
<Badge variant="secondary" className="inline-flex items-center gap-1">
|
|
||||||
{deployInfo.icon}
|
|
||||||
{deployInfo.label}
|
|
||||||
</Badge>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell>{item.sort}</TableCell>
|
<TableCell>{item.sort}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Badge variant={item.enabled ? "default" : "secondary"} className="inline-flex">
|
<Badge variant={item.enabled ? "default" : "secondary"} className="inline-flex">
|
||||||
|
|||||||
@ -1,27 +1,11 @@
|
|||||||
import {BaseResponse, BaseRequest, BaseQuery} from '@/types/base';
|
import {BaseResponse, BaseRequest, BaseQuery} from '@/types/base';
|
||||||
|
|
||||||
// 构建方式枚举
|
|
||||||
export enum BuildTypeEnum {
|
|
||||||
JENKINS = 'JENKINS',
|
|
||||||
GITLAB_RUNNER = 'GITLAB_RUNNER',
|
|
||||||
GITHUB_ACTION = 'GITHUB_ACTION'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 部署方式枚举
|
|
||||||
export enum DeployTypeEnum {
|
|
||||||
K8S = 'K8S',
|
|
||||||
DOCKER = 'DOCKER',
|
|
||||||
VM = 'VM'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 环境基础信息
|
// 环境基础信息
|
||||||
export interface Environment extends BaseResponse {
|
export interface Environment extends BaseResponse {
|
||||||
tenantCode: string;
|
tenantCode: string;
|
||||||
envCode: string;
|
envCode: string;
|
||||||
envName: string;
|
envName: string;
|
||||||
envDesc?: string;
|
envDesc?: string;
|
||||||
buildType: BuildTypeEnum;
|
|
||||||
deployType: DeployTypeEnum;
|
|
||||||
sort: number;
|
sort: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,8 +15,6 @@ export interface CreateEnvironmentRequest extends BaseRequest {
|
|||||||
envCode: string;
|
envCode: string;
|
||||||
envName: string;
|
envName: string;
|
||||||
envDesc?: string;
|
envDesc?: string;
|
||||||
buildType: BuildTypeEnum;
|
|
||||||
deployType: DeployTypeEnum;
|
|
||||||
sort: number;
|
sort: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,6 +27,4 @@ export interface UpdateEnvironmentRequest extends CreateEnvironmentRequest {
|
|||||||
export interface EnvironmentQueryParams extends BaseQuery {
|
export interface EnvironmentQueryParams extends BaseQuery {
|
||||||
envCode?: string;
|
envCode?: string;
|
||||||
envName?: string;
|
envName?: string;
|
||||||
buildType?: BuildTypeEnum;
|
|
||||||
deployType?: DeployTypeEnum;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,76 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
GithubOutlined,
|
|
||||||
GitlabOutlined,
|
|
||||||
CloudServerOutlined,
|
|
||||||
CloudOutlined,
|
|
||||||
DesktopOutlined,
|
|
||||||
ApiOutlined,
|
|
||||||
} from '@ant-design/icons';
|
|
||||||
import {BuildTypeEnum, DeployTypeEnum} from './types';
|
|
||||||
|
|
||||||
interface TypeInfo {
|
|
||||||
label: string;
|
|
||||||
color: string;
|
|
||||||
icon: React.ReactNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取构建方式信息
|
|
||||||
export const getBuildTypeInfo = (type: BuildTypeEnum): TypeInfo => {
|
|
||||||
switch (type) {
|
|
||||||
case BuildTypeEnum.JENKINS:
|
|
||||||
return {
|
|
||||||
label: 'Jenkins构建',
|
|
||||||
color: '#D24939',
|
|
||||||
icon: <ApiOutlined/>,
|
|
||||||
};
|
|
||||||
case BuildTypeEnum.GITLAB_RUNNER:
|
|
||||||
return {
|
|
||||||
label: 'GitLab Runner构建',
|
|
||||||
color: '#FC6D26',
|
|
||||||
icon: <GitlabOutlined/>,
|
|
||||||
};
|
|
||||||
case BuildTypeEnum.GITHUB_ACTION:
|
|
||||||
return {
|
|
||||||
label: 'GitHub Action构建',
|
|
||||||
color: '#2088FF',
|
|
||||||
icon: <GithubOutlined/>,
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
return {
|
|
||||||
label: type || '未知',
|
|
||||||
color: '#666666',
|
|
||||||
icon: <ApiOutlined/>,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取部署方式信息
|
|
||||||
export const getDeployTypeInfo = (type: DeployTypeEnum): TypeInfo => {
|
|
||||||
switch (type) {
|
|
||||||
case DeployTypeEnum.K8S:
|
|
||||||
return {
|
|
||||||
label: 'Kubernetes集群部署',
|
|
||||||
color: '#326CE5',
|
|
||||||
icon: <CloudServerOutlined/>,
|
|
||||||
};
|
|
||||||
case DeployTypeEnum.DOCKER:
|
|
||||||
return {
|
|
||||||
label: 'Docker容器部署',
|
|
||||||
color: '#2496ED',
|
|
||||||
icon: <CloudOutlined/>,
|
|
||||||
};
|
|
||||||
case DeployTypeEnum.VM:
|
|
||||||
return {
|
|
||||||
label: '虚拟机部署',
|
|
||||||
color: '#F7B93E',
|
|
||||||
icon: <DesktopOutlined/>,
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
return {
|
|
||||||
label: type || '未知',
|
|
||||||
color: '#666666',
|
|
||||||
icon: <CloudServerOutlined/>,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Loading…
Reference in New Issue
Block a user