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