From 8ab2318e18a961c084ef017d8e21d030f4693d83 Mon Sep 17 00:00:00 2001 From: Manuel Recena Date: Thu, 14 Sep 2017 21:51:19 +0200 Subject: [PATCH 1/3] [JENKINS-43786] Adapted the administrative monitor to the new UI definition --- .../admin/GitHubHookRegisterProblemMonitor/message.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy index ce7c1f180..1a993d9a2 100644 --- a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy +++ b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy @@ -2,10 +2,10 @@ package org.jenkinsci.plugins.github.admin.GitHubHookRegisterProblemMonitor def f = namespace(lib.FormTagLib) -div(class: 'warning') { +div(class: 'alert alert-warning') { form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { - text(_('hook.registering.problem')) f.submit(name: 'yes', value: _('view')) f.submit(name: 'no', value: _('dismiss')) } + text(_('hook.registering.problem')) } From e88b36e1999b2f963cb0945169c635758f8467f9 Mon Sep 17 00:00:00 2001 From: Manuel Recena Date: Sun, 29 Oct 2017 12:27:13 +0100 Subject: [PATCH 2/3] [JENKINS-43786] Typo --- .../admin/GitHubHookRegisterProblemMonitor/message.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties index e5907840c..cdb2c7bc3 100644 --- a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties +++ b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties @@ -1,3 +1,3 @@ view=View dismiss=Dismiss -hook.registering.problem=There were some problems while registering or removing one ore more GitHub webhooks. Would you like to view the problems? +hook.registering.problem=There were some problems while registering or removing one or more GitHub webhooks. Would you like to view the problems? From 22bb3fb49f6e18730da2e73d3ec4c86c4ee20dd4 Mon Sep 17 00:00:00 2001 From: Manuel Recena Date: Sun, 29 Oct 2017 19:32:00 +0100 Subject: [PATCH 3/3] [JENKINS-43786] More compatible --- .../message.groovy | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy index 1a993d9a2..45d62601a 100644 --- a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy +++ b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy @@ -1,11 +1,24 @@ package org.jenkinsci.plugins.github.admin.GitHubHookRegisterProblemMonitor +import hudson.util.VersionNumber +import jenkins.model.Jenkins + def f = namespace(lib.FormTagLib) -div(class: 'alert alert-warning') { - form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { - f.submit(name: 'yes', value: _('view')) - f.submit(name: 'no', value: _('dismiss')) +if (Jenkins.getVersion().isNewerThan(new VersionNumber("2.88"))) { + div(class: 'alert alert-warning') { + form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { + f.submit(name: 'yes', value: _('view')) + f.submit(name: 'no', value: _('dismiss')) + } + text(_('hook.registering.problem')) + } +} else { + div(class: 'warning') { + form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { + text(_('hook.registering.problem')) + f.submit(name: 'yes', value: _('view')) + f.submit(name: 'no', value: _('dismiss')) + } } - text(_('hook.registering.problem')) -} +} \ No newline at end of file