重构消息通知弹窗
This commit is contained in:
parent
7bf536cb41
commit
46fb8fb5de
@ -46,12 +46,14 @@ const DeploymentFormModal: React.FC<DeploymentFormModalProps> = ({
|
|||||||
// ✅ 使用 useMemo 缓存预填充数据,避免每次渲染都创建新对象
|
// ✅ 使用 useMemo 缓存预填充数据,避免每次渲染都创建新对象
|
||||||
const prefillData = React.useMemo(() => {
|
const prefillData = React.useMemo(() => {
|
||||||
return {
|
return {
|
||||||
// Jenkins 配置
|
// 构建类型
|
||||||
jenkins: {
|
buildType: app.buildType || 'JENKINS',
|
||||||
|
// Jenkins 配置(仅当 buildType 为 JENKINS 时需要)
|
||||||
|
jenkins: app.buildType === 'JENKINS' ? {
|
||||||
serverId: app.deploySystemId?.toString() || '',
|
serverId: app.deploySystemId?.toString() || '',
|
||||||
jobName: app.deployJob || '',
|
jobName: app.deployJob || '',
|
||||||
branch: app.branch || 'master',
|
branch: app.branch || 'master',
|
||||||
},
|
} : undefined,
|
||||||
// 团队信息
|
// 团队信息
|
||||||
teamId: teamId?.toString() || '',
|
teamId: teamId?.toString() || '',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
|
|||||||
@ -38,12 +38,15 @@ export interface DeployRecord {
|
|||||||
duration?: number; // 持续时间(毫秒)
|
duration?: number; // 持续时间(毫秒)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BuildType = 'JENKINS' | 'NATIVE';
|
||||||
|
|
||||||
export interface ApplicationConfig {
|
export interface ApplicationConfig {
|
||||||
teamApplicationId: number;
|
teamApplicationId: number;
|
||||||
applicationId: number;
|
applicationId: number;
|
||||||
applicationCode: string;
|
applicationCode: string;
|
||||||
applicationName: string;
|
applicationName: string;
|
||||||
applicationDesc?: string;
|
applicationDesc?: string;
|
||||||
|
buildType?: BuildType; // 构建类型
|
||||||
branch: string;
|
branch: string;
|
||||||
deployBranch?: string; // 🆕 部署分支
|
deployBranch?: string; // 🆕 部署分支
|
||||||
deploySystemId?: number;
|
deploySystemId?: number;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user