#feature: add Jenkins batch build trigger

Add an admin Jenkins build page that reuses notification-enabled project config, loads Jenkins build parameters, supports persisted selections, and triggers selected jobs in one action.
This commit is contained in:
2026-06-01 18:03:33 +08:00
parent 1de5fe1ff9
commit ba916f5ce1
7 changed files with 867 additions and 27 deletions
@@ -79,6 +79,9 @@
<!-- 定时任务管理页面 -->
<scheduled-tasks v-else-if="currentPage === 'scheduled-tasks'" />
<!-- Jenkins 一键构建页面 -->
<jenkins-builds v-else-if="currentPage === 'jenkins-builds'" />
</admin-layout>
</template>
@@ -99,6 +102,7 @@ import OperationLogs from './OperationLogs.vue';
import IpUserMappings from './IpUserMappings.vue';
import ProjectManagement from './ProjectManagement.vue';
import ScheduledTasks from './ScheduledTasks.vue';
import JenkinsBuilds from './JenkinsBuilds.vue';
export default {
name: 'AdminDashboard',
@@ -118,7 +122,8 @@ export default {
OperationLogs,
IpUserMappings,
ProjectManagement,
ScheduledTasks
ScheduledTasks,
JenkinsBuilds
},
data() {
return {
@@ -148,7 +153,7 @@ export default {
}
},
handleMenuChange(menu) {
if ((menu === 'ip-mappings' || menu === 'projects' || menu === 'scheduled-tasks') && !this.isAdmin) {
if ((menu === 'ip-mappings' || menu === 'projects' || menu === 'scheduled-tasks' || menu === 'jenkins-builds') && !this.isAdmin) {
this.redirectToDefault();
return;
}
@@ -171,7 +176,8 @@ export default {
'logs': '操作日志',
'ip-mappings': 'IP 用户映射',
'projects': '项目配置管理',
'scheduled-tasks': '定时任务管理'
'scheduled-tasks': '定时任务管理',
'jenkins-builds': 'Jenkins 一键构建'
};
this.pageTitle = titles[menu] || '环境配置管理';
@@ -211,9 +217,11 @@ export default {
page = 'projects';
} else if (path === '/scheduled-tasks') {
page = 'scheduled-tasks';
} else if (path === '/jenkins-builds') {
page = 'jenkins-builds';
}
if ((page === 'ip-mappings' || page === 'projects' || page === 'scheduled-tasks') && !this.isAdmin) {
if ((page === 'ip-mappings' || page === 'projects' || page === 'scheduled-tasks' || page === 'jenkins-builds') && !this.isAdmin) {
this.redirectToDefault();
return;
}