1
This commit is contained in:
parent
6da8bcb072
commit
b1bfd0540f
@ -133,7 +133,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}, [currentJenkinsId]);
|
}, [currentJenkinsId]);
|
||||||
|
|
||||||
const formatTime = (time: string | null) => {
|
const formatTime = (time: string | null | undefined) => {
|
||||||
if (!time) return 'Never';
|
if (!time) return 'Never';
|
||||||
return time;
|
return time;
|
||||||
};
|
};
|
||||||
@ -154,7 +154,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<PageContainer>
|
<PageContainer>
|
||||||
<div className="flex items-center justify-between mb-6">
|
<div className="flex items-center justify-between mb-6">
|
||||||
<h2 className="text-3xl font-bold tracking-tight">Jenkins Management</h2>
|
<h2 className="text-3xl font-bold tracking-tight">Jenkins 三方管理</h2>
|
||||||
<Select
|
<Select
|
||||||
value={currentJenkinsId}
|
value={currentJenkinsId}
|
||||||
onValueChange={handleJenkinsChange}
|
onValueChange={handleJenkinsChange}
|
||||||
@ -188,7 +188,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
<span className="text-2xl font-bold">{instanceDetails?.totalViews || 0}</span>
|
<span className="text-2xl font-bold">{instanceDetails?.totalViews || 0}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<span className="text-sm text-muted-foreground">Last sync: {formatTime(currentJenkins.lastSyncTime)}</span>
|
<span className="text-sm text-muted-foreground">Last sync: {formatTime(instanceDetails?.lastSyncViewsTime)}</span>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
@ -196,7 +196,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
disabled={syncing.views}
|
disabled={syncing.views}
|
||||||
>
|
>
|
||||||
<RefreshCw className={`h-4 w-4 ${syncing.views ? 'animate-spin' : ''}`} />
|
<RefreshCw className={`h-4 w-4 ${syncing.views ? 'animate-spin' : ''}`} />
|
||||||
<span className="ml-2">Sync Views</span>
|
<span className="ml-2">同步视图</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -207,7 +207,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
<span className="text-2xl font-bold">{instanceDetails?.totalJobs || 0}</span>
|
<span className="text-2xl font-bold">{instanceDetails?.totalJobs || 0}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<span className="text-sm text-muted-foreground">Last sync: {formatTime(currentJenkins.lastSyncTime)}</span>
|
<span className="text-sm text-muted-foreground">Last sync: {formatTime(instanceDetails?.lastSyncJobsTime)}</span>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
@ -215,7 +215,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
disabled={syncing.jobs}
|
disabled={syncing.jobs}
|
||||||
>
|
>
|
||||||
<RefreshCw className={`h-4 w-4 ${syncing.jobs ? 'animate-spin' : ''}`} />
|
<RefreshCw className={`h-4 w-4 ${syncing.jobs ? 'animate-spin' : ''}`} />
|
||||||
<span className="ml-2">Sync Jobs</span>
|
<span className="ml-2">同步任务</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -226,7 +226,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
<span className="text-2xl font-bold">{instanceDetails?.totalBuilds || 0}</span>
|
<span className="text-2xl font-bold">{instanceDetails?.totalBuilds || 0}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<span className="text-sm text-muted-foreground">Last sync: {formatTime(currentJenkins.lastSyncTime)}</span>
|
<span className="text-sm text-muted-foreground">Last sync: {formatTime(instanceDetails?.lastSyncBuildsTime)}</span>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
@ -234,7 +234,7 @@ const JenkinsManagerList: React.FC = () => {
|
|||||||
disabled={syncing.builds}
|
disabled={syncing.builds}
|
||||||
>
|
>
|
||||||
<RefreshCw className={`h-4 w-4 ${syncing.builds ? 'animate-spin' : ''}`} />
|
<RefreshCw className={`h-4 w-4 ${syncing.builds ? 'animate-spin' : ''}`} />
|
||||||
<span className="ml-2">Sync Builds</span>
|
<span className="ml-2">同步构建信息</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,6 +9,9 @@ export interface JenkinsInstanceDTO extends BaseResponse {
|
|||||||
totalViews: number;
|
totalViews: number;
|
||||||
totalJobs: number;
|
totalJobs: number;
|
||||||
totalBuilds: number;
|
totalBuilds: number;
|
||||||
|
lastSyncViewsTime?: string;
|
||||||
|
lastSyncJobsTime?: string;
|
||||||
|
lastSyncBuildsTime?: string;
|
||||||
jenkinsViewList: JenkinsViewDTO[];
|
jenkinsViewList: JenkinsViewDTO[];
|
||||||
jenkinsJobList: JenkinsJobDTO[];
|
jenkinsJobList: JenkinsJobDTO[];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user