1
This commit is contained in:
parent
635959ced8
commit
1aeafd6fc8
@ -256,11 +256,6 @@ const ApplicationList: React.FC = () => {
|
||||
cell: ({row}) => (
|
||||
<div className="flex items-center gap-2">
|
||||
<span>{row.original.projectGroup?.projectGroupName}</span>
|
||||
{row.original.projectGroup?.type && (
|
||||
<Badge variant="outline">
|
||||
{getProjectTypeInfo(row.original.projectGroup.type).label}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
@ -270,17 +265,30 @@ const ApplicationList: React.FC = () => {
|
||||
size: 200,
|
||||
},
|
||||
{
|
||||
accessorKey: 'repoUrl',
|
||||
header: '仓库地址',
|
||||
id: 'externalSystem',
|
||||
header: '外部系统',
|
||||
size: 150,
|
||||
cell: ({row}) => (
|
||||
<div className="flex items-center gap-2">
|
||||
<span>{row.original.externalSystem?.name || '-'}</span>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'repository',
|
||||
header: '代码仓库',
|
||||
size: 200,
|
||||
cell: ({row}) => row.original.repoUrl ? (
|
||||
cell: ({row}) => {
|
||||
const project = row.original.repositoryProject;
|
||||
return project ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<GithubOutlined/>
|
||||
<a href={row.original.repoUrl} target="_blank" rel="noopener noreferrer" className="text-blue-500 hover:text-blue-700">
|
||||
{row.original.repoUrl}
|
||||
<a href={project.webUrl} target="_blank" rel="noopener noreferrer" className="text-blue-500 hover:text-blue-700">
|
||||
{project.name}
|
||||
</a>
|
||||
</div>
|
||||
) : '-',
|
||||
) : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'language',
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import type {BaseQuery} from '@/types/base';
|
||||
import {ProjectGroup} from "@/pages/Deploy/ProjectGroup/List/types";
|
||||
import {ExternalSystemResponse} from "@/pages/Deploy/External/types";
|
||||
import {BaseResponse} from "@/types/base";
|
||||
|
||||
export enum DevelopmentLanguageTypeEnum {
|
||||
JAVA = 'JAVA',
|
||||
@ -8,8 +10,7 @@ export enum DevelopmentLanguageTypeEnum {
|
||||
GO = 'GO'
|
||||
}
|
||||
|
||||
export interface Application {
|
||||
id: number;
|
||||
export interface Application extends BaseResponse {
|
||||
appCode: string;
|
||||
appName: string;
|
||||
appDesc: string;
|
||||
@ -17,30 +18,16 @@ export interface Application {
|
||||
enabled: boolean;
|
||||
sort: number;
|
||||
projectGroupId: number;
|
||||
projectGroup?: ProjectGroup;
|
||||
externalSystemId: number;
|
||||
externalSystem?: ExternalSystemResponse;
|
||||
repoGroupId: number;
|
||||
repositoryGroup?: RepositoryGroup;
|
||||
repoProjectId: number;
|
||||
repositoryProject?: RepositoryProject;
|
||||
}
|
||||
|
||||
export type CreateApplicationRequest = Omit<Application, 'id'>;
|
||||
export type UpdateApplicationRequest = Application;
|
||||
export type ApplicationFormValues = CreateApplicationRequest;
|
||||
|
||||
export interface ApplicationQuery extends BaseQuery {
|
||||
projectGroupId?: number;
|
||||
appCode?: string;
|
||||
appName?: string;
|
||||
enabled?: boolean;
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export interface DevelopmentLanguageType {
|
||||
code: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface RepositoryGroup {
|
||||
id: number;
|
||||
export interface RepositoryGroup extends BaseResponse {
|
||||
name: string;
|
||||
description?: string;
|
||||
groupId: number;
|
||||
@ -56,7 +43,7 @@ export interface RepositoryGroup {
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface RepositoryProject {
|
||||
export interface RepositoryProject extends BaseResponse {
|
||||
name: string;
|
||||
path: string;
|
||||
description: string;
|
||||
@ -70,3 +57,20 @@ export interface RepositoryProject {
|
||||
externalSystemId: number;
|
||||
projectId: number;
|
||||
}
|
||||
|
||||
export type CreateApplicationRequest = Omit<Application, 'id' | keyof BaseResponse>;
|
||||
export type UpdateApplicationRequest = Application;
|
||||
export type ApplicationFormValues = CreateApplicationRequest;
|
||||
|
||||
export interface ApplicationQuery extends BaseQuery {
|
||||
projectGroupId?: number;
|
||||
appCode?: string;
|
||||
appName?: string;
|
||||
enabled?: boolean;
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export interface DevelopmentLanguageType {
|
||||
code: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user