#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:
@@ -72,6 +72,31 @@
|
||||
定时任务
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="#"
|
||||
@click.prevent="setActiveMenu('jenkins-builds')"
|
||||
v-if="isAdmin"
|
||||
:class="[
|
||||
'group flex items-center px-3 py-2 text-sm font-medium rounded-lg transition-colors duration-200',
|
||||
activeMenu === 'jenkins-builds'
|
||||
? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700'
|
||||
: 'text-gray-700 hover:bg-gray-50 hover:text-gray-900'
|
||||
]"
|
||||
>
|
||||
<svg
|
||||
:class="[
|
||||
'mr-3 h-5 w-5 transition-colors duration-200',
|
||||
activeMenu === 'jenkins-builds' ? 'text-blue-500' : 'text-gray-400 group-hover:text-gray-500'
|
||||
]"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
Jenkins 构建
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="#"
|
||||
@click.prevent="setActiveMenu('env')"
|
||||
@@ -447,7 +472,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setActiveMenu(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) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -492,9 +517,11 @@ export default {
|
||||
menu = 'projects';
|
||||
} else if (path === '/scheduled-tasks') {
|
||||
menu = 'scheduled-tasks';
|
||||
} else if (path === '/jenkins-builds') {
|
||||
menu = 'jenkins-builds';
|
||||
}
|
||||
|
||||
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) {
|
||||
menu = 'env';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user