mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-29 18:38:32 +08:00
fix 新版本页面部分分页切换失效(构建详情、资产机器、逻辑节点)
This commit is contained in:
parent
2c1780da9c
commit
7a74c3cd76
@ -10,6 +10,7 @@
|
||||
4. 【server】升级 apache-sshd 版本(感谢@*斌)
|
||||
5. 【server】优化 项目列表 file 类型正常排序(不再排序到最后)(感谢[@pal865](https://gitee.com/pal865) [Gitee issues I8XU32](https://gitee.com/dromara/Jpom/issues/I8XU32) )
|
||||
6. 【all】修复 windows 环境保存配置并重启失败(感谢[@Robot](https://gitee.com/robot1937) [Gitee issues I8Y01T](https://gitee.com/dromara/Jpom/issues/I8Y01T) )
|
||||
7. 【server】修复 新版本页面部分分页切换失效(构建详情、资产机器、逻辑节点)(感谢@zac)
|
||||
|
||||
------
|
||||
|
||||
|
@ -1,161 +1,169 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-descriptions bordered size="small">
|
||||
<template #title>
|
||||
<a-space>
|
||||
{{ data.name }}
|
||||
<a-tooltip title="点击刷新构建信息">
|
||||
<a-button type="link" size="small" @click="refresh"> <ReloadOutlined /></a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<a-descriptions-item label="分组">
|
||||
{{ data.group }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="分组/标签"> {{ data.branchName }} {{ data.branchTagName }} </a-descriptions-item>
|
||||
<a-descriptions-item label="构建方式">
|
||||
<template v-if="data.buildMode === 1">
|
||||
<CloudOutlined />
|
||||
容器构建
|
||||
</template>
|
||||
<template v-else>
|
||||
<CodeOutlined />
|
||||
本地构建
|
||||
</template>
|
||||
</a-descriptions-item>
|
||||
|
||||
<a-descriptions-item label="最新构建ID">
|
||||
<span v-if="data.buildId <= 0"></span>
|
||||
<a-tag v-else color="#108ee9">#{{ data.buildId }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="构建状态">
|
||||
<a-tooltip :title="data.statusMsg">
|
||||
<a-tag :color="statusColor[data.status]">
|
||||
{{ statusMap[data.status] || '未知' }}
|
||||
|
||||
<InfoCircleOutlined v-if="data.statusMsg" />
|
||||
</a-tag>
|
||||
</a-tooltip>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="发布方式">{{ releaseMethodMap[data.releaseMethod] }} </a-descriptions-item>
|
||||
<a-descriptions-item label="定时构建">
|
||||
{{ data.autoBuildCron }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="别名码">
|
||||
{{ data.aliasCode }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="构建目录">
|
||||
<a-tag>{{ data.sourceDirExist ? '存在' : '不存在' }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="创建时间">
|
||||
{{ parseTime(data.createTimeMillis) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="最后修改时间"> {{ parseTime(data.modifyTimeMillis) }}</a-descriptions-item>
|
||||
<a-descriptions-item label="最后修改人">{{ data.modifyUser }}</a-descriptions-item>
|
||||
<a-descriptions-item label="产物" :span="3">
|
||||
{{ data.resultDirFile }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="源仓库" :span="3" v-if="tempRepository">{{
|
||||
`${tempRepository ? tempRepository.name + '[' + tempRepository.gitUrl + ']' : ''}`
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="仓库lastcommit" :span="3">{{ data.repositoryLastCommitId }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
|
||||
<a-row type="flex" justify="center">
|
||||
<a-divider v-if="listQuery.total > 0" dashed>构建历史</a-divider>
|
||||
<a-timeline mode="alternate" style="width: 100%">
|
||||
<a-timeline-item v-for="item in this.historyList" :key="item.id" :color="statusColor[item.status]">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<div>
|
||||
<a-space>
|
||||
<span :style="`color: ${statusColor[item.status]};`" @click="handleBuildLog(item)"
|
||||
>#{{ item.buildNumberId }} <EyeOutlined
|
||||
/></span>
|
||||
<span v-if="item.buildRemark">构建备注:{{ item.buildRemark }}</span>
|
||||
</a-space>
|
||||
</div>
|
||||
<div>
|
||||
<a-tooltip :title="item.statusMsg || statusMap[item.status] || '未知'">
|
||||
状态:<a-tag :color="statusColor[item.status]">{{ statusMap[item.status] || '未知' }}</a-tag>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<div>
|
||||
时间:{{ parseTime(item.startTime) }} ~
|
||||
{{ parseTime(item.endTime) }}
|
||||
</div>
|
||||
<div>触发类型:{{ triggerBuildTypeMap[item.triggerBuildType] || '未知' }}</div>
|
||||
<div>
|
||||
占用空间:{{ renderSize(item.resultFileSize) }}(产物)/{{ renderSize(item.buildLogFileSize) }}(日志)
|
||||
</div>
|
||||
|
||||
<div>构建耗时:{{ formatDuration((item.endTime || 0) - (item.startTime || 0), '', 2) }}</div>
|
||||
<div>
|
||||
发布方式:
|
||||
<a-tag> {{ releaseMethodMap[item.releaseMethod] || '未知' }}</a-tag>
|
||||
</div>
|
||||
<div>
|
||||
操作:
|
||||
<a-space>
|
||||
<a-tooltip title="下载构建日志,如果按钮不可用表示日志文件不存在,一般是构建历史相关文件被删除">
|
||||
<a-button size="small" type="primary" :disabled="!item.hasLog" @click="handleDownload(item)"
|
||||
><DownloadOutlined />日志</a-button
|
||||
>
|
||||
</a-tooltip>
|
||||
|
||||
<a-tooltip
|
||||
title="下载构建产物,如果按钮不可用表示产物文件不存在,一般是构建没有产生对应的文件或者构建历史相关文件被删除"
|
||||
>
|
||||
<a-button size="small" type="primary" :disabled="!item.hasFile" @click="handleFile(item)">
|
||||
<DownloadOutlined />
|
||||
产物
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<template v-if="item.releaseMethod !== 5">
|
||||
<a-button
|
||||
size="small"
|
||||
:disabled="!item.hasFile || item.releaseMethod === 0"
|
||||
type="primary"
|
||||
danger
|
||||
@click="handleRollback(item)"
|
||||
>回滚
|
||||
</a-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-tooltip title="Dockerfile 构建方式不支持在这里回滚">
|
||||
<a-button size="small" :disabled="true" type="primary" danger>回滚 </a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<a-descriptions bordered size="small">
|
||||
<template #title>
|
||||
<a-space>
|
||||
{{ data.name }}
|
||||
<a-tooltip title="点击刷新构建信息">
|
||||
<a-button type="link" size="small" @click="refresh"> <ReloadOutlined /></a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</a-timeline-item>
|
||||
</a-timeline>
|
||||
<a-divider v-if="listQuery.total / listQuery.limit > 1" dashed />
|
||||
</template>
|
||||
|
||||
<a-descriptions-item label="分组">
|
||||
{{ data.group }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="分组/标签"> {{ data.branchName }} {{ data.branchTagName }} </a-descriptions-item>
|
||||
<a-descriptions-item label="构建方式">
|
||||
<template v-if="data.buildMode === 1">
|
||||
<CloudOutlined />
|
||||
容器构建
|
||||
</template>
|
||||
<template v-else>
|
||||
<CodeOutlined />
|
||||
本地构建
|
||||
</template>
|
||||
</a-descriptions-item>
|
||||
|
||||
<a-descriptions-item label="最新构建ID">
|
||||
<span v-if="data.buildId <= 0"></span>
|
||||
<a-tag v-else color="#108ee9">#{{ data.buildId }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="构建状态">
|
||||
<a-tooltip :title="data.statusMsg">
|
||||
<a-tag :color="statusColor[data.status]">
|
||||
{{ statusMap[data.status] || '未知' }}
|
||||
|
||||
<InfoCircleOutlined v-if="data.statusMsg" />
|
||||
</a-tag>
|
||||
</a-tooltip>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="发布方式">{{ releaseMethodMap[data.releaseMethod] }} </a-descriptions-item>
|
||||
<a-descriptions-item label="定时构建">
|
||||
{{ data.autoBuildCron }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="别名码">
|
||||
{{ data.aliasCode }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="构建目录">
|
||||
<a-tag>{{ data.sourceDirExist ? '存在' : '不存在' }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="创建时间">
|
||||
{{ parseTime(data.createTimeMillis) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="最后修改时间"> {{ parseTime(data.modifyTimeMillis) }}</a-descriptions-item>
|
||||
<a-descriptions-item label="最后修改人">{{ data.modifyUser }}</a-descriptions-item>
|
||||
<a-descriptions-item label="产物" :span="3">
|
||||
{{ data.resultDirFile }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="源仓库" :span="3" v-if="tempRepository">{{
|
||||
`${tempRepository ? tempRepository.name + '[' + tempRepository.gitUrl + ']' : ''}`
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="仓库lastcommit" :span="3">{{ data.repositoryLastCommitId }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
|
||||
<!-- <a-row type="flex" justify="center"> -->
|
||||
<!-- <a-divider v-if="listQuery.total > 0" dashed> 构建历史 </a-divider> -->
|
||||
<a-card title="构建历史" v-if="listQuery.total > 0" size="small">
|
||||
<template #extra>
|
||||
<a-pagination
|
||||
size="small"
|
||||
v-model:current="listQuery.page"
|
||||
:showTotal="
|
||||
(total) => {
|
||||
return PAGE_DEFAULT_SHOW_TOTAL(total, listQuery)
|
||||
}
|
||||
"
|
||||
:showSizeChanger="true"
|
||||
:pageSizeOptions="PAGE_DEFAULT_SIZW_OPTIONS"
|
||||
v-model:pageSize="listQuery.limit"
|
||||
:total="listQuery.total"
|
||||
:hideOnSinglePage="true"
|
||||
@showSizeChange="
|
||||
(current, size) => {
|
||||
this.listQuery.limit = size
|
||||
this.listHistory()
|
||||
}
|
||||
"
|
||||
@change="this.listHistory"
|
||||
show-less-items
|
||||
/>
|
||||
</template>
|
||||
<a-timeline mode="alternate" style="width: 100%">
|
||||
<a-timeline-item v-for="item in this.historyList" :key="item.id" :color="statusColor[item.status]">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<div>
|
||||
<a-space>
|
||||
<span :style="`color: ${statusColor[item.status]};`" @click="handleBuildLog(item)"
|
||||
>#{{ item.buildNumberId }} <EyeOutlined
|
||||
/></span>
|
||||
<span v-if="item.buildRemark">构建备注:{{ item.buildRemark }}</span>
|
||||
</a-space>
|
||||
</div>
|
||||
<div>
|
||||
<a-tooltip :title="item.statusMsg || statusMap[item.status] || '未知'">
|
||||
状态:<a-tag :color="statusColor[item.status]">{{ statusMap[item.status] || '未知' }}</a-tag>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<div>
|
||||
时间:{{ parseTime(item.startTime) }} ~
|
||||
{{ parseTime(item.endTime) }}
|
||||
</div>
|
||||
<div>触发类型:{{ triggerBuildTypeMap[item.triggerBuildType] || '未知' }}</div>
|
||||
<div>
|
||||
占用空间:{{ renderSize(item.resultFileSize) }}(产物)/{{ renderSize(item.buildLogFileSize) }}(日志)
|
||||
</div>
|
||||
|
||||
<div>构建耗时:{{ formatDuration((item.endTime || 0) - (item.startTime || 0), '', 2) }}</div>
|
||||
<div>
|
||||
发布方式:
|
||||
<a-tag> {{ releaseMethodMap[item.releaseMethod] || '未知' }}</a-tag>
|
||||
</div>
|
||||
<div>
|
||||
操作:
|
||||
<a-space>
|
||||
<a-tooltip title="下载构建日志,如果按钮不可用表示日志文件不存在,一般是构建历史相关文件被删除">
|
||||
<a-button size="small" type="primary" :disabled="!item.hasLog" @click="handleDownload(item)"
|
||||
><DownloadOutlined />日志</a-button
|
||||
>
|
||||
</a-tooltip>
|
||||
|
||||
<a-tooltip
|
||||
title="下载构建产物,如果按钮不可用表示产物文件不存在,一般是构建没有产生对应的文件或者构建历史相关文件被删除"
|
||||
>
|
||||
<a-button size="small" type="primary" :disabled="!item.hasFile" @click="handleFile(item)">
|
||||
<DownloadOutlined />
|
||||
产物
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<template v-if="item.releaseMethod !== 5">
|
||||
<a-button
|
||||
size="small"
|
||||
:disabled="!item.hasFile || item.releaseMethod === 0"
|
||||
type="primary"
|
||||
danger
|
||||
@click="handleRollback(item)"
|
||||
>回滚
|
||||
</a-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-tooltip title="Dockerfile 构建方式不支持在这里回滚">
|
||||
<a-button size="small" :disabled="true" type="primary" danger>回滚 </a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-space>
|
||||
</div>
|
||||
</a-space>
|
||||
</a-timeline-item>
|
||||
</a-timeline>
|
||||
</a-card>
|
||||
</a-space>
|
||||
<!-- <a-divider v-if="listQuery.total / listQuery.limit > 1" dashed />
|
||||
<a-col>
|
||||
<a-pagination
|
||||
v-model:value="listQuery.page"
|
||||
:showTotal="
|
||||
(total) => {
|
||||
return PAGE_DEFAULT_SHOW_TOTAL(total, listQuery)
|
||||
}
|
||||
"
|
||||
:showSizeChanger="true"
|
||||
:pageSizeOptions="PAGE_DEFAULT_SIZW_OPTIONS"
|
||||
:pageSize="listQuery.limit"
|
||||
:total="listQuery.total"
|
||||
:hideOnSinglePage="true"
|
||||
@showSizeChange="
|
||||
(current, size) => {
|
||||
this.listQuery.limit = size
|
||||
this.listHistory()
|
||||
}
|
||||
"
|
||||
@change="this.listHistory"
|
||||
show-less-items
|
||||
/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-col> -->
|
||||
<!-- </a-row> -->
|
||||
|
||||
<!-- 构建日志 -->
|
||||
<build-log
|
||||
|
@ -304,41 +304,42 @@
|
||||
</a-form-item-rest>
|
||||
</a-tab-pane>
|
||||
</a-tabs> -->
|
||||
<code-editor
|
||||
height="40vh"
|
||||
:showTool="true"
|
||||
v-model:content="temp.script"
|
||||
:options="{ mode: 'yaml', tabSize: 2 }"
|
||||
v-show="dslEditTabKey === 'content'"
|
||||
placeholder="请填写构建 DSL 配置内容,可以点击上方切换 tab 查看配置示例"
|
||||
>
|
||||
<template #tool_before>
|
||||
<a-segmented
|
||||
v-model:value="dslEditTabKey"
|
||||
:options="[
|
||||
{ label: 'DSL 配置', value: 'content' },
|
||||
{ label: '配置示例', value: 'demo' }
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</code-editor>
|
||||
<code-editor
|
||||
v-show="dslEditTabKey === 'demo'"
|
||||
height="40vh"
|
||||
:showTool="true"
|
||||
v-model:content="dslDefault"
|
||||
:options="{ mode: 'yaml', tabSize: 2, readOnly: true }"
|
||||
>
|
||||
<template #tool_before>
|
||||
<a-segmented
|
||||
v-model:value="dslEditTabKey"
|
||||
:options="[
|
||||
{ label: 'DSL 配置', value: 'content' },
|
||||
{ label: '配置示例', value: 'demo' }
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</code-editor>
|
||||
<a-form-item-rest>
|
||||
<code-editor
|
||||
height="40vh"
|
||||
:showTool="true"
|
||||
v-model:content="temp.script"
|
||||
:options="{ mode: 'yaml', tabSize: 2 }"
|
||||
v-show="dslEditTabKey === 'content'"
|
||||
placeholder="请填写构建 DSL 配置内容,可以点击上方切换 tab 查看配置示例"
|
||||
>
|
||||
<template #tool_before>
|
||||
<a-segmented
|
||||
v-model:value="dslEditTabKey"
|
||||
:options="[
|
||||
{ label: 'DSL 配置', value: 'content' },
|
||||
{ label: '配置示例', value: 'demo' }
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</code-editor>
|
||||
<code-editor
|
||||
v-show="dslEditTabKey === 'demo'"
|
||||
height="40vh"
|
||||
:showTool="true"
|
||||
v-model:content="dslDefault"
|
||||
:options="{ mode: 'yaml', tabSize: 2, readOnly: true }"
|
||||
>
|
||||
<template #tool_before>
|
||||
<a-segmented
|
||||
v-model:value="dslEditTabKey"
|
||||
:options="[
|
||||
{ label: 'DSL 配置', value: 'content' },
|
||||
{ label: '配置示例', value: 'demo' }
|
||||
]"
|
||||
/>
|
||||
</template> </code-editor
|
||||
></a-form-item-rest>
|
||||
</a-form-item>
|
||||
<a-form-item v-if="temp.buildMode !== undefined" name="resultDirFile" class="jpom-target-dir">
|
||||
<template v-slot:label>
|
||||
|
@ -458,7 +458,7 @@
|
||||
<a-divider v-if="listQuery.total / listQuery.limit > 1" dashed />
|
||||
<a-col>
|
||||
<a-pagination
|
||||
v-model:value="listQuery.page"
|
||||
v-model:current="listQuery.page"
|
||||
:showTotal="
|
||||
(total) => {
|
||||
return PAGE_DEFAULT_SHOW_TOTAL(total, listQuery)
|
||||
@ -466,7 +466,7 @@
|
||||
"
|
||||
:showSizeChanger="true"
|
||||
:pageSizeOptions="sizeOptions"
|
||||
:pageSize="listQuery.limit"
|
||||
v-model:pageSize="listQuery.limit"
|
||||
:total="listQuery.total"
|
||||
:hideOnSinglePage="true"
|
||||
@showSizeChange="
|
||||
|
@ -194,7 +194,7 @@
|
||||
<a-divider v-if="listQuery.total / listQuery.limit > 1" dashed />
|
||||
<a-col>
|
||||
<a-pagination
|
||||
v-model:value="listQuery.page"
|
||||
v-model:current="listQuery.page"
|
||||
:showTotal="
|
||||
(total) => {
|
||||
return PAGE_DEFAULT_SHOW_TOTAL(total, listQuery)
|
||||
@ -202,7 +202,7 @@
|
||||
"
|
||||
:showSizeChanger="true"
|
||||
:pageSizeOptions="sizeOptions"
|
||||
:pageSize="listQuery.limit"
|
||||
v-model:pageSize="listQuery.limit"
|
||||
:total="listQuery.total"
|
||||
:hideOnSinglePage="true"
|
||||
@showSizeChange="
|
||||
|
Loading…
Reference in New Issue
Block a user