diff --git a/core/src/main/java/hudson/console/ConsoleAnnotator.java b/core/src/main/java/hudson/console/ConsoleAnnotator.java index c19ac974b686..475badceb689 100644 --- a/core/src/main/java/hudson/console/ConsoleAnnotator.java +++ b/core/src/main/java/hudson/console/ConsoleAnnotator.java @@ -91,41 +91,42 @@ public static ConsoleAnnotator cast(ConsoleAnnotator a) { return (ConsoleAnnotator)a; } - /** - * Bundles all the given {@link ConsoleAnnotator} into a single annotator. - */ - public static ConsoleAnnotator combine(Collection> all) { - switch (all.size()) { - case 0: return null; // none - case 1: return cast(all.iterator().next()); // just one - } - - class Aggregator extends ConsoleAnnotator { - List> list; + private static final class ConsoleAnnotatorAggregator extends ConsoleAnnotator { + List> list; - Aggregator(Collection list) { - this.list = new ArrayList>(list); - } + ConsoleAnnotatorAggregator(Collection list) { + this.list = new ArrayList>(list); + } - public ConsoleAnnotator annotate(T context, MarkupText text) { - ListIterator> itr = list.listIterator(); - while (itr.hasNext()) { - ConsoleAnnotator a = itr.next(); - ConsoleAnnotator b = a.annotate(context,text); - if (a!=b) { - if (b==null) itr.remove(); - else itr.set(b); - } + public ConsoleAnnotator annotate(T context, MarkupText text) { + ListIterator> itr = list.listIterator(); + while (itr.hasNext()) { + ConsoleAnnotator a = itr.next(); + ConsoleAnnotator b = a.annotate(context,text); + if (a!=b) { + if (b==null) itr.remove(); + else itr.set(b); } + } - switch (list.size()) { + switch (list.size()) { case 0: return null; // no more annotator left case 1: return list.get(0); // no point in aggregating default: return this; - } } } - return new Aggregator(all); + } + + /** + * Bundles all the given {@link ConsoleAnnotator} into a single annotator. + */ + public static ConsoleAnnotator combine(Collection> all) { + switch (all.size()) { + case 0: return null; // none + case 1: return cast(all.iterator().next()); // just one + } + + return new ConsoleAnnotatorAggregator(all); } /** diff --git a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java index 348673043bef..8ecb52bf2f8d 100644 --- a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java +++ b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java @@ -34,6 +34,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.concurrent.TimeUnit; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; import javax.servlet.ServletException; @@ -133,7 +134,8 @@ public void _doBuild(StaplerRequest req, StaplerResponse rsp) throws IOException * This method is supposed to be invoked from {@link ParameterizedJobMixIn#doBuild(StaplerRequest, StaplerResponse, TimeDuration)}. */ public void _doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { - if (delay==null) delay=new TimeDuration(getJob().getQuietPeriod()); + if (delay==null) + delay=new TimeDuration(TimeUnit.MILLISECONDS.convert(getJob().getQuietPeriod(), TimeUnit.SECONDS)); List values = new ArrayList(); @@ -182,7 +184,8 @@ public void buildWithParameters(StaplerRequest req, StaplerResponse rsp, @CheckF values.add(value); } } - if (delay==null) delay=new TimeDuration(getJob().getQuietPeriod()); + if (delay==null) + delay=new TimeDuration(TimeUnit.MILLISECONDS.convert(getJob().getQuietPeriod(), TimeUnit.SECONDS)); Queue.Item item = Jenkins.getInstance().getQueue().schedule2( getJob(), delay.getTimeInSeconds(), new ParametersAction(values), ParameterizedJobMixIn.getBuildCause(getJob(), req)).getItem(); diff --git a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java index 55301e4f8636..e83f3526efb6 100644 --- a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java +++ b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java @@ -54,6 +54,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.concurrent.TimeUnit; import javax.annotation.CheckForNull; import javax.servlet.ServletException; import static javax.servlet.http.HttpServletResponse.SC_CREATED; @@ -190,7 +191,7 @@ public final boolean isParameterized() { @SuppressWarnings("deprecation") public final void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { if (delay == null) { - delay = new TimeDuration(asJob().getQuietPeriod()); + delay=new TimeDuration(TimeUnit.MILLISECONDS.convert(asJob().getQuietPeriod(), TimeUnit.SECONDS)); } if (!asJob().isBuildable()) { diff --git a/core/src/main/resources/hudson/security/SecurityRealm/loginLink_es.properties b/core/src/main/resources/hudson/security/SecurityRealm/loginLink_es.properties index 5387de844125..be0e40f1c076 100644 --- a/core/src/main/resources/hudson/security/SecurityRealm/loginLink_es.properties +++ b/core/src/main/resources/hudson/security/SecurityRealm/loginLink_es.properties @@ -20,4 +20,4 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -login=Iniciar sesión +login=Iniciar sesi\u00F3n diff --git a/core/src/main/resources/jenkins/install/Messages_zh_CN.properties b/core/src/main/resources/jenkins/install/Messages_zh_CN.properties new file mode 100644 index 000000000000..4baea254d148 --- /dev/null +++ b/core/src/main/resources/jenkins/install/Messages_zh_CN.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2018 suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +SetupWizard_ConfigureInstance_ValidationErrors=\u6709\u975E\u6CD5\u8BBE\u7F6E\u3002\u8BF7\u67E5\u770B\u9519\u8BEF\u4FE1\u606F\u4E2D\u8BE6\u60C5\u3002 +SetupWizard_ConfigureInstance_RootUrl_Empty=URL \u4E0D\u80FD\u4E3A\u7A7A +SetupWizard_ConfigureInstance_RootUrl_Invalid=URL \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u786E\u8BA4\u4F60\u4F7F\u7528 http:// \u6216 https:// \u7B49\u5408\u6CD5\u7684\u57DF\u540D\u3002 diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_CN.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_CN.properties new file mode 100644 index 000000000000..1d59784cbc32 --- /dev/null +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_CN.properties @@ -0,0 +1,26 @@ +# +# The MIT License +# +# Copyright (c) 2018, suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +Manage\ Jenkins=\u7BA1\u7406 Jenkins +tooltip=\u6709 {0} \u4E2A\u6D3B\u8DC3\u7684\u7BA1\u7406\u76D1\u63A7\u3002 \ No newline at end of file diff --git a/core/src/main/resources/jenkins/management/Messages_zh_CN.properties b/core/src/main/resources/jenkins/management/Messages_zh_CN.properties index 1252700dde75..a1c3c76a50ff 100644 --- a/core/src/main/resources/jenkins/management/Messages_zh_CN.properties +++ b/core/src/main/resources/jenkins/management/Messages_zh_CN.properties @@ -1,7 +1,7 @@ # # The MIT License # -# Copyright (c) 2012, CloudBees, Intl., Nicolas De loof +# Copyright (c) 2018, CloudBees, Intl., Nicolas De loof, suren # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -48,3 +48,6 @@ SystemInfoLink.DisplayName=\u7CFB\u7EDF\u4FE1\u606F SystemLogLink.DisplayName=\u7CFB\u7EDF\u65E5\u5FD7 SystemLogLink.Description=\u7CFB\u7EDF\u65E5\u5FD7\u4ECEjava.util.logging\u6355\u83B7Jenkins\u76F8\u5173\u7684\u65E5\u5FD7\u4FE1\u606F\u3002 ShutdownLink.DisplayName_cancel=\u53D6\u6D88\u5173\u673A + +CliLink.DisplayName=Jenkins \u547D\u4EE4\u884C\u63A5\u53E3 +AdministrativeMonitorsDecorator.DisplayName=\u7BA1\u7406\u76D1\u63A7\u901A\u77E5 diff --git a/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config_es.properties b/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config_es.properties index f12fe2f32279..6ce8a979eb8a 100644 --- a/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config_es.properties +++ b/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config_es.properties @@ -20,5 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Jenkins\ URL=Dirección web de Jenkins -Sender\ E-mail\ Address=Dirección de remitente +Jenkins\ URL=Direcci\u00F3n web de Jenkins +Sender\ E-mail\ Address=Direcci\u00F3n de remitente diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/config_zh_CN.properties b/core/src/main/resources/jenkins/security/ApiTokenProperty/config_zh_CN.properties index c4bb98365d2e..ca8f3ae3fbb2 100644 --- a/core/src/main/resources/jenkins/security/ApiTokenProperty/config_zh_CN.properties +++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/config_zh_CN.properties @@ -45,3 +45,4 @@ Cancel=\u53D6\u6D88 Show\ Legacy\ API\ Token=\u663E\u793A\u9057\u7559\u7684 API Token Legacy\ API\ Token=\u9057\u7559\u7684 API Token Change\ API\ Token=\u4FEE\u6539 API Token +TokenNeverUsedValue=Token \u4ECE\u672A\u7528\u8FC7\u7684\u503C diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config_zh_CN.properties b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config_zh_CN.properties index ffdfdcdd8203..727776df192c 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config_zh_CN.properties +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config_zh_CN.properties @@ -23,3 +23,4 @@ tokenGenerationOnCreationEnabled=\u4E3A\u6BCF\u4E2A\u65B0\u521B\u5EFA\u7684\u7528\u6237\u751F\u6210\u4E00\u4E2A\u9057\u7559\u7684 API token \uFF08\u4E0D\u5EFA\u8BAE\uFF09 creationOfLegacyTokenEnabled=\u5141\u8BB8\u7528\u6237\u624B\u52A8\u521B\u5EFA\u4E00\u4E2A\u9057\u7559\u7684 API token \uFF08\u4E0D\u5EFA\u8BAE\uFF09 usageStatisticsEnabled=\u542F\u7528 API Token \u4F7F\u7528\u7EDF\u8BA1 +API\ Token=API Token diff --git a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage_zh_CN.properties b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage_zh_CN.properties index b575a8d42f91..25dccf56c860 100644 --- a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage_zh_CN.properties +++ b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage_zh_CN.properties @@ -58,4 +58,8 @@ RevokeAllSelected_nothing=\u6CA1\u6709\u9009\u62E9 Token\uFF0C\u8BF7\u81F3\u5C11 Select=\u9009\u62E9 only\ recent=\u4EC5\u6700\u8FD1\u7528\u8FC7\u7684 only\ fresh=\u4EC5\u65B0\u7684 -all=\u6240\u6709 \ No newline at end of file +all=\u6240\u6709 +Recently\ used\ token=\u6700\u8FD1\u4F7F\u7528\u8FC7\u7684 Token +No\ fresh\ token=\u6CA1\u6709\u65B0\u7684 Token +Fresh\ token=\u65B0\u7684 Token +No\ recently\ used\ token=\u6CA1\u6709\u6700\u8FD1\u4F7F\u7528\u8FC7\u7684 Token diff --git a/core/src/main/resources/jenkins/security/csrf/Messages_zh_CN.properties b/core/src/main/resources/jenkins/security/csrf/Messages_zh_CN.properties new file mode 100644 index 000000000000..06e21c04c3ec --- /dev/null +++ b/core/src/main/resources/jenkins/security/csrf/Messages_zh_CN.properties @@ -0,0 +1,25 @@ +# +# The MIT License +# +# Copyright (c) 2018, suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +CSRFAdministrativeMonitor.displayName=\u8DE8\u7AD9\u8BF7\u6C42\u4F2A\u9020\uFF08CSRF\uFF09\u4FDD\u62A4\u76D1\u63A7 diff --git a/core/src/main/resources/jenkins/security/s2m/AdminCallableMonitor/message_zh_CN.properties b/core/src/main/resources/jenkins/security/s2m/AdminCallableMonitor/message_zh_CN.properties new file mode 100644 index 000000000000..bded8c0b7b5b --- /dev/null +++ b/core/src/main/resources/jenkins/security/s2m/AdminCallableMonitor/message_zh_CN.properties @@ -0,0 +1,28 @@ +# +# The MIT License +# +# Copyright (c) 2018, suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +blurb=\u7531\u4E8E\u6211\u4EEC\u4E0D\u786E\u5B9A\u5B83\u662F\u5426\u5141\u8BB8\u4EE3\u7406\u6267\u884C\uFF0CJenkins \u5DF2\u7ECF\u62D2\u7EDD\u4E86\u90E8\u5206\u6765\u81EA\u4EE3\u7406\u7684\u547D\u4EE4\uFF0C\u8FD9\u53EF\u80FD\u4F1A\u5F71\u54CD\u90E8\u5206\u6784\u5EFA\u3002\ + \u60A8\u56E0\u8BE5\u68C0\u67E5\u8BE5\u60C5\u51B5\uFF0C\u51B3\u5B9A\u662F\u5426\u628A\u8FD9\u4E9B\u547D\u4EE4\u6DFB\u52A0\u5230\u767D\u540D\u5355\u3002 +Dismiss=\u53D6\u6D88 +Examine=\u68C0\u67E5 \ No newline at end of file diff --git a/core/src/main/resources/jenkins/security/s2m/AdminWhitelistRule/index_zh_CN.properties b/core/src/main/resources/jenkins/security/s2m/AdminWhitelistRule/index_zh_CN.properties new file mode 100644 index 000000000000..fe6a966d95b1 --- /dev/null +++ b/core/src/main/resources/jenkins/security/s2m/AdminWhitelistRule/index_zh_CN.properties @@ -0,0 +1,27 @@ +# +# The MIT License +# +# Copyright (c) 2018, suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +Whitelist=\u767D\u540D\u5355 +Agent\ &\#8594;\ Master\ Access\ Control=Master \u5BF9\u4EE3\u7406\u7684\u8BBF\u95EE\u63A7\u5236 +Update=\u66F4\u65B0 diff --git a/core/src/main/resources/jenkins/security/s2m/MasterKillSwitchWarning/message_zh_CN.properties b/core/src/main/resources/jenkins/security/s2m/MasterKillSwitchWarning/message_zh_CN.properties new file mode 100644 index 000000000000..cf3bfadcb5be --- /dev/null +++ b/core/src/main/resources/jenkins/security/s2m/MasterKillSwitchWarning/message_zh_CN.properties @@ -0,0 +1,28 @@ +# +# The MIT License +# +# Copyright (c) 2018, suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +blurb=\u4ECE\u4EE3\u7406\u5230 Master \u7684\u5B89\u5168\u5B50\u7CFB\u7EDF\u5DF2\u5173\u95ED\u3002 + \u8BF7\u67E5\u770B\u6587\u6863\u540E\u8003\u8651\u662F\u5426\u8981\u6253\u5F00\u5B89\u5168\u8BBE\u7F6E\u3002 +Dismiss=\u53D6\u6D88 +Examine=\u68C0\u67E5 diff --git a/core/src/main/resources/jenkins/security/s2m/Messages_zh_CN.properties b/core/src/main/resources/jenkins/security/s2m/Messages_zh_CN.properties new file mode 100644 index 000000000000..3ed723a2675c --- /dev/null +++ b/core/src/main/resources/jenkins/security/s2m/Messages_zh_CN.properties @@ -0,0 +1,26 @@ +# +# The MIT License +# +# Copyright (c) 2018, suren +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +AdminCallableMonitor.DisplayName=\u62D2\u7EDD\u4EE3\u7406\u5230 Master \u7684\u8BBF\u95EE +MasterKillSwitchWarning.DisplayName=\u7981\u7528\u4EE3\u7406\u5230 Master \u7684\u8BBF\u95EE\u63A7\u5236 diff --git a/test/src/test/java/jenkins/model/ParameterizedJobMixInTest.java b/test/src/test/java/jenkins/model/ParameterizedJobMixInTest.java index d6a971558539..c94daee83e2b 100644 --- a/test/src/test/java/jenkins/model/ParameterizedJobMixInTest.java +++ b/test/src/test/java/jenkins/model/ParameterizedJobMixInTest.java @@ -23,12 +23,13 @@ */ package jenkins.model; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import hudson.model.FreeStyleProject; import hudson.model.ParametersDefinitionProperty; +import hudson.model.Queue; import hudson.model.StringParameterDefinition; -import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.Issue; @@ -62,4 +63,26 @@ public void doBuildWithParameters_shouldFailWhenInvokingDisabledProject() throws final JenkinsRule.WebClient webClient = j.createWebClient(); webClient.assertFails(project.getUrl() + "buildWithParameters", HttpServletResponse.SC_CONFLICT); } + + @Test + @Issue("JENKINS-48770") + public void doBuildQuietPeriodInSeconds() throws Exception { + final int projectQuietPeriodInSeconds = 50; + + final FreeStyleProject project = j.createFreeStyleProject(); + project.setQuietPeriod(projectQuietPeriodInSeconds); + + final JenkinsRule.WebClient webClient = j.createWebClient(); + webClient.goTo(project.getUrl() + "build", ""); + long triggerTime = System.currentTimeMillis(); + + Queue.Item item = Jenkins.get().getQueue().getItem(1); + Assert.assertTrue(item instanceof Queue.WaitingItem); + Assert.assertTrue(item.task instanceof FreeStyleProject); + + Queue.WaitingItem waitingItem = (Queue.WaitingItem) item; + Assert.assertTrue((waitingItem.timestamp.getTimeInMillis() - triggerTime) > 45000); + + Jenkins.get().getQueue().doCancelItem(1); + } }