mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-29 18:38:32 +08:00
fix
This commit is contained in:
parent
1a9917bb12
commit
c1d6df347c
@ -143,21 +143,22 @@ public class CronUtils {
|
||||
Scheduler scheduler = CronUtil.getScheduler();
|
||||
Set<Map.Entry<String, TaskStat>> entries = TASK_STAT.entrySet();
|
||||
return entries.stream()
|
||||
.map(entry -> {
|
||||
TaskStat taskStat = entry.getValue();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("taskId", entry.getKey());
|
||||
CronPattern pattern = scheduler.getPattern(entry.getKey());
|
||||
Optional.ofNullable(pattern).ifPresent(cronPattern -> jsonObject.put("cron", cronPattern.toString()));
|
||||
if (taskStat != null) {
|
||||
jsonObject.put("executeCount", taskStat.executeCount.get());
|
||||
jsonObject.put("failedCount", taskStat.failedCount.get());
|
||||
jsonObject.put("succeedCount", taskStat.succeedCount.get());
|
||||
jsonObject.put("lastExecuteTime", taskStat.lastExecuteTime);
|
||||
}
|
||||
return jsonObject;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
.map(entry -> {
|
||||
TaskStat taskStat = entry.getValue();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("taskId", entry.getKey());
|
||||
CronPattern pattern = scheduler.getPattern(entry.getKey());
|
||||
Optional.ofNullable(pattern).ifPresent(cronPattern -> jsonObject.put("cron", cronPattern.toString()));
|
||||
if (taskStat != null) {
|
||||
jsonObject.put("executeCount", taskStat.executeCount.get());
|
||||
jsonObject.put("failedCount", taskStat.failedCount.get());
|
||||
jsonObject.put("succeedCount", taskStat.succeedCount.get());
|
||||
jsonObject.put("lastExecuteTime", taskStat.lastExecuteTime);
|
||||
jsonObject.put("desc", taskStat.desc);
|
||||
}
|
||||
return jsonObject;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<!-- 数据表格 -->
|
||||
<a-table
|
||||
<CustomTable
|
||||
is-show-tools
|
||||
default-auto-refresh
|
||||
:auto-refresh-time="30"
|
||||
:active-page="activePage"
|
||||
table-name="build-history-list"
|
||||
empty-description="没有任何构建历史"
|
||||
:data-source="list"
|
||||
size="middle"
|
||||
:columns="columns"
|
||||
@ -13,6 +19,7 @@
|
||||
x: 'max-content'
|
||||
}"
|
||||
@change="change"
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
@ -73,17 +80,19 @@
|
||||
>
|
||||
批量删除
|
||||
</a-button>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>构建历史是用于记录每次构建的信息,可以保留构建产物信息,构建日志。同时还可以快速回滚发布</div>
|
||||
<div>如果不需要保留较多构建历史信息可以到服务端修改构建相关配置参数</div>
|
||||
<div>构建历史可能占有较多硬盘空间,建议根据实际情况配置保留个数</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template #tableHelp>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>构建历史是用于记录每次构建的信息,可以保留构建产物信息,构建日志。同时还可以快速回滚发布</div>
|
||||
<div>如果不需要保留较多构建历史信息可以到服务端修改构建相关配置参数</div>
|
||||
<div>构建历史可能占有较多硬盘空间,建议根据实际情况配置保留个数</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #tableBodyCell="{ column, text, record }">
|
||||
<template v-if="column.tooltip">
|
||||
<a-tooltip :title="text">
|
||||
<span>{{ text || '' }}</span>
|
||||
@ -187,7 +196,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</CustomTable>
|
||||
<!-- 构建日志 -->
|
||||
<build-log
|
||||
v-if="buildLogVisible > 0"
|
||||
@ -375,6 +384,9 @@ export default {
|
||||
pagination() {
|
||||
return COMPUTED_PAGINATION(this.listQuery)
|
||||
},
|
||||
activePage() {
|
||||
return this.$attrs.routerUrl === this.$route.path
|
||||
},
|
||||
rowSelection() {
|
||||
return {
|
||||
onChange: this.tableSelectionChange,
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 数据表格 -->
|
||||
<a-table
|
||||
<CustomTable
|
||||
is-show-tools
|
||||
default-auto-refresh
|
||||
:auto-refresh-time="30"
|
||||
:active-page="activePage"
|
||||
table-name="dispatch-log-list"
|
||||
empty-description="没有任何分发日志"
|
||||
size="middle"
|
||||
:data-source="list"
|
||||
:columns="columns"
|
||||
@ -11,6 +17,7 @@
|
||||
x: 'max-content'
|
||||
}"
|
||||
@change="changePage"
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
@ -31,7 +38,7 @@
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template #tableBodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'outGivingId'">
|
||||
<a-tooltip placement="topLeft" :title="text">
|
||||
<span>{{ text }}</span>
|
||||
@ -107,7 +114,7 @@
|
||||
<a-button type="primary" size="small" @click="handleDetail(record)">详情</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</CustomTable>
|
||||
<!-- 详情区 -->
|
||||
<a-modal v-model:open="detailVisible" destroy-on-close width="600px" title="详情信息" :footer="null">
|
||||
<a-list item-layout="horizontal" :data-source="detailData">
|
||||
@ -235,6 +242,9 @@ export default {
|
||||
computed: {
|
||||
pagination() {
|
||||
return COMPUTED_PAGINATION(this.listQuery)
|
||||
},
|
||||
activePage() {
|
||||
return this.$attrs.routerUrl === this.$route.path
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<!-- 数据表格 -->
|
||||
<a-table
|
||||
<CustomTable
|
||||
is-show-tools
|
||||
default-auto-refresh
|
||||
:auto-refresh-time="30"
|
||||
:active-page="activePage"
|
||||
table-name="node-script-list"
|
||||
empty-description="没有任何节点脚本"
|
||||
:data-source="list"
|
||||
size="middle"
|
||||
:columns="columns"
|
||||
@ -12,6 +18,7 @@
|
||||
x: 'max-content'
|
||||
}"
|
||||
@change="changePage"
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
@ -56,24 +63,25 @@
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<a-button v-else type="primary" danger @click="sync(nodeId)"> <SyncOutlined />同步缓存 </a-button>
|
||||
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>节点脚本模版是存储在节点中的命令脚本用于在线管理一些脚本命令,如初始化软件环境、管理应用程序等</div>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>执行时候默认不加载全部环境变量、需要脚本里面自行加载</li>
|
||||
<li>命令文件将在 ${插件端数据目录}/script/xxxx.sh 、bat 执行</li>
|
||||
<li>新增脚本模版需要到节点管理中去新增</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template #tableHelp>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>节点脚本模版是存储在节点中的命令脚本用于在线管理一些脚本命令,如初始化软件环境、管理应用程序等</div>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>执行时候默认不加载全部环境变量、需要脚本里面自行加载</li>
|
||||
<li>命令文件将在 ${插件端数据目录}/script/xxxx.sh 、bat 执行</li>
|
||||
<li>新增脚本模版需要到节点管理中去新增</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #tableBodyCell="{ column, text, record }">
|
||||
<template v-if="column.tooltip">
|
||||
<a-tooltip placement="topLeft" :title="text">
|
||||
<span>{{ text }}</span>
|
||||
@ -140,7 +148,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</CustomTable>
|
||||
<!-- 编辑区 -->
|
||||
<ScriptEdit
|
||||
v-if="editScriptVisible"
|
||||
@ -366,6 +374,9 @@ export default {
|
||||
computed: {
|
||||
pagination() {
|
||||
return COMPUTED_PAGINATION(this.listQuery)
|
||||
},
|
||||
activePage() {
|
||||
return this.$attrs.routerUrl === this.$route.path
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 表格 -->
|
||||
<a-table
|
||||
<CustomTable
|
||||
is-show-tools
|
||||
default-auto-refresh
|
||||
:auto-refresh-time="30"
|
||||
:active-page="activePage"
|
||||
table-name="repository-list"
|
||||
empty-description="没有任何仓库"
|
||||
size="middle"
|
||||
:columns="columns"
|
||||
:data-source="list"
|
||||
@ -18,6 +24,7 @@
|
||||
loadData()
|
||||
}
|
||||
"
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
@ -69,30 +76,32 @@
|
||||
</template>
|
||||
<a-button type="primary" @click="handleAddGitee"><QuestionCircleOutlined />令牌导入</a-button>
|
||||
</a-tooltip>
|
||||
<a-button type="primary" @click="handlerExportData">导出</a-button>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1">
|
||||
<a-button type="primary" @click="handlerImportTemplate()">下载导入模板</a-button>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
|
||||
<a-upload
|
||||
name="file"
|
||||
accept=".csv"
|
||||
action=""
|
||||
:show-upload-list="false"
|
||||
:multiple="false"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<a-button type="primary"><UploadOutlined /> 导入 <DownOutlined /> </a-button>
|
||||
</a-upload>
|
||||
</a-dropdown>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record, index }">
|
||||
<template #toolPrefix>
|
||||
<a-button type="primary" size="small" @click="handlerExportData"><DownloadOutlined />导出</a-button>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1">
|
||||
<a-button type="primary" size="small" @click="handlerImportTemplate()">下载导入模板</a-button>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
|
||||
<a-upload
|
||||
name="file"
|
||||
accept=".csv"
|
||||
action=""
|
||||
:show-upload-list="false"
|
||||
:multiple="false"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<a-button type="primary" size="small"><UploadOutlined /> 导入 <DownOutlined /> </a-button>
|
||||
</a-upload>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<template #tableBodyCell="{ column, text, record, index }">
|
||||
<template v-if="column.tooltip">
|
||||
<a-tooltip placement="topLeft" :title="text">
|
||||
<span>{{ text }}</span>
|
||||
@ -161,7 +170,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</CustomTable>
|
||||
<!-- 编辑区 -->
|
||||
<a-modal
|
||||
v-model:open="editVisible"
|
||||
@ -712,6 +721,9 @@ export default {
|
||||
reposPagination() {
|
||||
return COMPUTED_PAGINATION(this.giteeImportForm, this.PAGE_DEFAULT_SIZW_OPTIONS)
|
||||
},
|
||||
activePage() {
|
||||
return this.$attrs.routerUrl === this.$route.path
|
||||
},
|
||||
rowSelection() {
|
||||
return {
|
||||
onChange: (selectedRowKeys) => {
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 数据表格 -->
|
||||
<a-table
|
||||
<CustomTable
|
||||
is-show-tools
|
||||
default-auto-refresh
|
||||
:auto-refresh-time="30"
|
||||
:active-page="activePage"
|
||||
table-name="server-script-list"
|
||||
empty-description="没有任何脚本"
|
||||
:data-source="list"
|
||||
size="middle"
|
||||
:columns="columns"
|
||||
@ -13,6 +19,7 @@
|
||||
x: 'max-content'
|
||||
}"
|
||||
@change="changePage"
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
@ -53,23 +60,25 @@
|
||||
@click="syncToWorkspaceShow"
|
||||
>工作空间同步</a-button
|
||||
>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>脚本模版是存储在服务端中的命令脚本用于在线管理一些脚本命令,如初始化软件环境、管理应用程序等</div>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>执行时候默认不加载全部环境变量、需要脚本里面自行加载</li>
|
||||
<li>命令文件将在 ${数据目录}/script/xxxx.sh、bat 执行</li>
|
||||
<li>分发节点是指在编辑完脚本后自动将脚本内容同步节点的脚本,一般用户节点分发功能中的 DSL 模式</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template #tableHelp>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>脚本模版是存储在服务端中的命令脚本用于在线管理一些脚本命令,如初始化软件环境、管理应用程序等</div>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>执行时候默认不加载全部环境变量、需要脚本里面自行加载</li>
|
||||
<li>命令文件将在 ${数据目录}/script/xxxx.sh、bat 执行</li>
|
||||
<li>分发节点是指在编辑完脚本后自动将脚本内容同步节点的脚本,一般用户节点分发功能中的 DSL 模式</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #tableBodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'nodeId'">
|
||||
<a-tooltip placement="topLeft" :title="text">
|
||||
<span>{{ nodeMap[text] }}</span>
|
||||
@ -129,7 +138,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</CustomTable>
|
||||
<!-- 编辑区 -->
|
||||
<a-modal
|
||||
v-model:open="editScriptVisible"
|
||||
@ -564,6 +573,9 @@ export default {
|
||||
pagination() {
|
||||
return COMPUTED_PAGINATION(this.listQuery)
|
||||
},
|
||||
activePage() {
|
||||
return this.$attrs.routerUrl === this.$route.path
|
||||
},
|
||||
rowSelection() {
|
||||
return {
|
||||
onChange: (selectedRowKeys) => {
|
||||
|
@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-table
|
||||
<CustomTable
|
||||
is-show-tools
|
||||
default-auto-refresh
|
||||
:auto-refresh-time="30"
|
||||
:active-page="activePage"
|
||||
table-name="ssh-command-list"
|
||||
empty-description="没有任何SSH脚本命令"
|
||||
:data-source="commandList"
|
||||
:columns="columns"
|
||||
size="middle"
|
||||
@ -12,6 +18,7 @@
|
||||
x: 'max-content'
|
||||
}"
|
||||
@change="changePage"
|
||||
@refresh="getCommandData"
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
@ -52,30 +59,32 @@
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>命令模版是用于在线管理一些脚本命令,如初始化软件环境、管理应用程序等</div>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>命令内容支持工作空间环境变量</li>
|
||||
<li>
|
||||
执行命令将自动替换为 sh
|
||||
命令文件、并自动加载环境变量:/etc/profile、/etc/bashrc、~/.bashrc、~/.bash_profile
|
||||
</li>
|
||||
<li>
|
||||
执行命令包含:<b>#disabled-template-auto-evn</b>
|
||||
将取消自动加载环境变量(注意是整行不能包含空格)
|
||||
</li>
|
||||
<li>命令文件将上传至 ${user.home}/.jpom/xxxx.sh 执行完成将自动删除</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template #tableHelp>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<div>命令模版是用于在线管理一些脚本命令,如初始化软件环境、管理应用程序等</div>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>命令内容支持工作空间环境变量</li>
|
||||
<li>
|
||||
执行命令将自动替换为 sh
|
||||
命令文件、并自动加载环境变量:/etc/profile、/etc/bashrc、~/.bashrc、~/.bash_profile
|
||||
</li>
|
||||
<li>
|
||||
执行命令包含:<b>#disabled-template-auto-evn</b>
|
||||
将取消自动加载环境变量(注意是整行不能包含空格)
|
||||
</li>
|
||||
<li>命令文件将上传至 ${user.home}/.jpom/xxxx.sh 执行完成将自动删除</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #tableBodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'name'">
|
||||
<a-tooltip placement="topLeft" :title="text">
|
||||
<span>{{ text }}</span>
|
||||
@ -96,7 +105,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</CustomTable>
|
||||
<!-- 编辑命令 -->
|
||||
<a-modal
|
||||
v-model:open="editCommandVisible"
|
||||
@ -490,6 +499,9 @@ export default {
|
||||
pagination() {
|
||||
return COMPUTED_PAGINATION(this.listQuery)
|
||||
},
|
||||
activePage() {
|
||||
return this.$attrs.routerUrl === this.$route.path
|
||||
},
|
||||
rowSelection() {
|
||||
return {
|
||||
onChange: (selectedRowKeys) => {
|
||||
|
@ -11,6 +11,9 @@
|
||||
<a-tooltip v-else-if="column.dataIndex === 'lastExecuteTime'" :title="parseTime(text)">
|
||||
<span>{{ parseTime(text) }}</span>
|
||||
</a-tooltip>
|
||||
<a-tooltip v-else-if="column.dataIndex === 'desc'" :title="text">
|
||||
<span>{{ text }}</span>
|
||||
</a-tooltip>
|
||||
<a-tooltip v-else-if="column.dataIndex === 'cron'" placement="topLeft" :title="text">
|
||||
<a-button v-if="text" type="link" style="padding: 0" size="small" @click="toCronTaskList(text)">
|
||||
{{ text }} <UnorderedListOutlined />
|
||||
@ -67,7 +70,12 @@ export default {
|
||||
{
|
||||
title: 'cron',
|
||||
dataIndex: 'cron'
|
||||
|
||||
// sorter: (a, b) => (a && b ? a.localeCompare(b, "zh-CN") : 0),
|
||||
// sortDirections: ["descend", "ascend"],
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'desc'
|
||||
// sorter: (a, b) => (a && b ? a.localeCompare(b, "zh-CN") : 0),
|
||||
// sortDirections: ["descend", "ascend"],
|
||||
},
|
||||
|
@ -45,7 +45,7 @@
|
||||
@finish="onPingSubmit"
|
||||
>
|
||||
<a-form-item label="提示" name="">
|
||||
<a-alert message="不等同于 PING 测试,此处测试成功表示网络一定互通,此处测试失败网络不一定不通畅" banner />
|
||||
<a-alert message="不等同于 PING 测试,此处测试成功表示网络一定通畅,此处测试失败网络不一定不通畅" banner />
|
||||
</a-form-item>
|
||||
<a-form-item label="HOST" name="host">
|
||||
<a-input
|
||||
|
@ -94,7 +94,7 @@ const columns = [
|
||||
dataIndex: 'createTimeMillis',
|
||||
sorter: true,
|
||||
customRender: ({ text, record }) => parseTime(text || record.optTime),
|
||||
width: 160
|
||||
width: '170px'
|
||||
},
|
||||
{ title: '浏览器', dataIndex: 'userAgent', ellipsis: true, width: 100 }
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user