From e7da6cac23c4634782bc4aa1a17d8c764277bb12 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sat, 23 Apr 2022 12:26:17 +0200 Subject: [PATCH 01/18] markup formatted description for node --- .../src/main/resources/hudson/model/Computer/index.jelly | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index aec2a86e2072..bf8eae648a4d 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -57,11 +57,14 @@ THE SOFTWARE. ${it.caption} - - (${it.node.nodeDescription}) - + +
+ +
+
+ From ed91cfebdea1bffc7938eac2370e8ceb8942af44 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Mon, 25 Apr 2022 21:42:56 +0200 Subject: [PATCH 02/18] markup node description --- .../hudson/model/Computer/index.jelly | 28 +++++++++---------- .../slaves/DumbSlave/configure-entries.jelly | 8 ++++-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index bf8eae648a4d..a66129a8ddac 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -28,7 +28,20 @@ THE SOFTWARE. - + + +

+ + + + ${it.caption} +

+ + +
+ +
+
@@ -52,19 +65,6 @@ THE SOFTWARE.
-

- - - - ${it.caption} -

- - -
- -
-
- diff --git a/core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly b/core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly index 2edb944ece4b..f3f902f4f6ad 100644 --- a/core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly +++ b/core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly @@ -28,9 +28,11 @@ THE SOFTWARE. - - - +
+ + + +
From b3569572b2af1bbb5449b01b1cb1278cb871d804 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Tue, 26 Apr 2022 22:21:37 +0200 Subject: [PATCH 03/18] node description in system info page --- .../hudson/slaves/SlaveComputer/systemInfo.jelly | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly b/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly index 3c0793e1600c..e792261f3693 100644 --- a/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly +++ b/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly @@ -39,10 +39,12 @@ THE SOFTWARE. ${it.caption} ${%System Information} - - (${it.node.nodeDescription}) - + +
+ +
+
From d5953716dc7286f523f215d690933ce29e71e8af Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Wed, 27 Apr 2022 21:23:02 +0200 Subject: [PATCH 04/18] fix padding for description field --- core/src/main/resources/hudson/model/Computer/index.jelly | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index a66129a8ddac..04d742b487b0 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -38,10 +38,11 @@ THE SOFTWARE. -
+
- + +
From 51dd1fbb4aa4439c5277a8d3ca53c2a4ad8e2cae Mon Sep 17 00:00:00 2001 From: mPokornyETM <89339813+mPokornyETM@users.noreply.github.com> Date: Tue, 24 May 2022 09:34:12 +0200 Subject: [PATCH 05/18] comments --- core/src/main/resources/hudson/model/Computer/index.jelly | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 04d742b487b0..9e438db72f71 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -28,8 +28,7 @@ THE SOFTWARE. - - +

@@ -37,11 +36,13 @@ THE SOFTWARE. ${it.caption}

+
+
From 966aa5d9b19eba1229417c4820766e3883d01536 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Fri, 10 Jun 2022 16:38:29 +0200 Subject: [PATCH 06/18] use medium icon size --- core/src/main/resources/hudson/model/Computer/index.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 9e438db72f71..629a8061f2a6 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -30,7 +30,7 @@ THE SOFTWARE.

- + ${it.caption} From a185f3664f1d2d1c5c00161a152c9d81c77f5255 Mon Sep 17 00:00:00 2001 From: mPokornyETM <89339813+mPokornyETM@users.noreply.github.com> Date: Fri, 10 Jun 2022 18:30:17 +0200 Subject: [PATCH 07/18] Update core/src/main/resources/hudson/model/Computer/index.jelly Co-authored-by: Adrien Lecharpentier --- core/src/main/resources/hudson/model/Computer/index.jelly | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 629a8061f2a6..debdf43ef124 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -30,9 +30,7 @@ THE SOFTWARE.

- - - + ${it.caption}

From ca5adf99841a631b2bf77190e83123a2599f3c33 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Thu, 7 Jul 2022 00:53:06 +0200 Subject: [PATCH 08/18] built-in node description --- .../main/resources/hudson/model/Computer/index.jelly | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index debdf43ef124..62e232a5b6d3 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -32,13 +32,17 @@ THE SOFTWARE.

${it.caption} + + (${it.node.nodeDescription}) +

- -
- -
+ + +
+ +
From ae3e1c0ccaf1b7a07d4d3e039d3d22ff0b8e5456 Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Fri, 15 Jul 2022 16:24:21 +0200 Subject: [PATCH 09/18] Split description of built-in node from other nodes', more descriptive --- .../hudson/model/Computer/index-top.jelly | 15 +++++++++++++++ .../hudson/model/Computer/index.jelly | 18 +----------------- .../Jenkins/MasterComputer/index-top.jelly | 13 +++++++++++++ .../MasterComputer/index-top.properties | 4 ++++ 4 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 core/src/main/resources/hudson/model/Computer/index-top.jelly create mode 100644 core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly create mode 100644 core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties diff --git a/core/src/main/resources/hudson/model/Computer/index-top.jelly b/core/src/main/resources/hudson/model/Computer/index-top.jelly new file mode 100644 index 000000000000..8ddb3cace584 --- /dev/null +++ b/core/src/main/resources/hudson/model/Computer/index-top.jelly @@ -0,0 +1,15 @@ + + + +

+ + ${it.caption} +

+ + + +
+ +
+
+
diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 62e232a5b6d3..6114629889e8 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -27,23 +27,7 @@ THE SOFTWARE. - - -

- - ${it.caption} - - (${it.node.nodeDescription}) - -

- - - - -
- -
-
+
diff --git a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly new file mode 100644 index 000000000000..75845dd9d2f9 --- /dev/null +++ b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly @@ -0,0 +1,13 @@ + + + +

+ + ${it.caption} +

+ + +
+ ${%blurb} +
+
diff --git a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties new file mode 100644 index 000000000000..a12080b81d3e --- /dev/null +++ b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties @@ -0,0 +1,4 @@ +blurb = This is the Jenkins controller''s built-in node. \ + Builds running on this node will execute on the same system and as the same user as the Jenkins controller. \ + This is appropriate e.g. for special jobs performing backups, but in general you should run builds on agents. \ + Learn more about distributed builds. From 94d5752aef054d4ba501ff356976445ab2af2fb9 Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Fri, 15 Jul 2022 17:22:16 +0200 Subject: [PATCH 10/18] Add inline editing of node description --- .../main/java/hudson/slaves/SlaveComputer.java | 15 +++++++++++++++ .../AbstractModelObject/descriptionForm.jelly | 12 ++++++++++-- .../resources/hudson/model/Computer/index.jelly | 7 +------ .../lib/hudson/editable-description.js | 15 +++++++++++++++ .../lib/hudson/editableDescription.jelly | 17 +++++++++++++---- war/src/main/webapp/scripts/hudson-behavior.js | 7 ++++++- 6 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 core/src/main/resources/lib/hudson/editable-description.js diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index 0f8b9255357b..e202bb1ee449 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -80,6 +80,7 @@ import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; +import javax.servlet.ServletException; import jenkins.agents.AgentComputerUtil; import jenkins.model.Jenkins; import jenkins.security.ChannelConfigurator; @@ -780,6 +781,20 @@ public List getLogRecords() throws IOException, InterruptedException return channel.call(new SlaveLogFetcher()); } + /** + * Inline editing of description + */ + @RequirePOST + public synchronized void doSubmitDescription(StaplerResponse rsp, @QueryParameter String description) throws IOException { + checkPermission(CONFIGURE); + + final Slave node = this.getNode(); + if (node != null) { // TODO consider error handling here + node.setNodeDescription(description); + } + rsp.sendRedirect("."); + } + @RequirePOST public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) { if (channel != null) { diff --git a/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly b/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly index 2d793ab4b91d..633e67f3568f 100644 --- a/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly +++ b/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly @@ -30,11 +30,19 @@ THE SOFTWARE. + + + + + + + + -
+ -
diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 62e232a5b6d3..c6619837f8e0 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -38,12 +38,7 @@ THE SOFTWARE.

- - -
- -
-
+
diff --git a/core/src/main/resources/lib/hudson/editable-description.js b/core/src/main/resources/lib/hudson/editable-description.js new file mode 100644 index 000000000000..0bb6f87cea64 --- /dev/null +++ b/core/src/main/resources/lib/hudson/editable-description.js @@ -0,0 +1,15 @@ +(function(){ + document.addEventListener("DOMContentLoaded", function() { + let descriptionLink = document.querySelector('#description-link'); + descriptionLink.addEventListener('click', function(e) { + e.preventDefault(); + let url = descriptionLink.getAttribute('data-url'); + let description = descriptionLink.getAttribute('data-description'); + if (url == null && description == null) { + return replaceDescription(); + } else { + return replaceDescription(description, url); + } + }); + }); +})(); diff --git a/core/src/main/resources/lib/hudson/editableDescription.jelly b/core/src/main/resources/lib/hudson/editableDescription.jelly index 33890930882a..e92b24970417 100644 --- a/core/src/main/resources/lib/hudson/editableDescription.jelly +++ b/core/src/main/resources/lib/hudson/editableDescription.jelly @@ -32,21 +32,30 @@ THE SOFTWARE. If the current user doesn't have this permission, the description is not editable. + + Optional value of the description. If not specified, will use '${it.description}'. + + + Optional submission URL. If not specified, will use 'submitDescription'. + -
+ + +
- +
- + + - + ${%add description} diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 01c7ac69028a..872ea1cefbb2 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -1566,12 +1566,17 @@ function xor(a,b) { } // used by editableDescription.jelly to replace the description field with a form -function replaceDescription() { +function replaceDescription(initialDescription, submissionUrl) { var d = document.getElementById("description"); $(d).down().next().innerHTML = "
"; + let parameters = {}; + if (initialDescription !== undefined && submissionUrl !== undefined) { + parameters = { 'description': initialDescription, 'submissionUrl': submissionUrl }; + } new Ajax.Request( "./descriptionForm", { + parameters: parameters, onComplete : function(x) { d.innerHTML = x.responseText; evalInnerHtmlScripts(x.responseText,function() { From 358c62ae92a5f6234a7dbe36d212a8972db8de29 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 31 Jul 2022 00:14:38 +0200 Subject: [PATCH 11/18] error handling --- core/src/main/java/hudson/slaves/SlaveComputer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index e202bb1ee449..63b47ff129c5 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -789,8 +789,10 @@ public synchronized void doSubmitDescription(StaplerResponse rsp, @QueryParamete checkPermission(CONFIGURE); final Slave node = this.getNode(); - if (node != null) { // TODO consider error handling here + if (node != null) { node.setNodeDescription(description); + } else { // Node has been disabled/removed during other session tries to change the description. + throw new IOException("Node " + nodeName + " has been deleted during other session tries to change the description"); } rsp.sendRedirect("."); } From eb7d32830b5da2d4b6f4a3be43cc6b9bcf107e02 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 31 Jul 2022 01:10:13 +0200 Subject: [PATCH 12/18] some style fixes --- .../resources/hudson/model/Computer/index-top.jelly | 9 +++------ .../hudson/slaves/SlaveComputer/systemInfo.jelly | 10 ++++++---- .../model/Jenkins/MasterComputer/index-top.jelly | 3 ++- .../resources/lib/hudson/editableDescription.jelly | 4 +++- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index-top.jelly b/core/src/main/resources/hudson/model/Computer/index-top.jelly index 8ddb3cace584..4cf93b7a46ec 100644 --- a/core/src/main/resources/hudson/model/Computer/index-top.jelly +++ b/core/src/main/resources/hudson/model/Computer/index-top.jelly @@ -1,5 +1,6 @@ - + +

@@ -7,9 +8,5 @@

- -
- -
-
+
diff --git a/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly b/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly index e792261f3693..587239fb7d84 100644 --- a/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly +++ b/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly @@ -31,17 +31,19 @@ THE SOFTWARE. + -

+

${%System Information}

+

- ${it.caption} ${%System Information} -

+ ${it.caption} + -
+
diff --git a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly index 75845dd9d2f9..6064af54bb65 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly +++ b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly @@ -1,5 +1,6 @@ +

@@ -7,7 +8,7 @@

-
+
${%blurb}
diff --git a/core/src/main/resources/lib/hudson/editableDescription.jelly b/core/src/main/resources/lib/hudson/editableDescription.jelly index e92b24970417..4986f0be7e64 100644 --- a/core/src/main/resources/lib/hudson/editableDescription.jelly +++ b/core/src/main/resources/lib/hudson/editableDescription.jelly @@ -40,9 +40,11 @@ THE SOFTWARE. + + -
+
From 4ecea00bbd84d12a6e4f2aebcbb3082a1100d3bd Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sat, 13 Aug 2022 17:16:57 +0200 Subject: [PATCH 13/18] use jenkins library style --- .../hudson/model/Computer/index-top.jelly | 1 - .../slaves/SlaveComputer/systemInfo.jelly | 17 +++++------------ .../Jenkins/MasterComputer/index-top.jelly | 3 +-- .../lib/hudson/editableDescription.jelly | 4 +--- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/core/src/main/resources/hudson/model/Computer/index-top.jelly b/core/src/main/resources/hudson/model/Computer/index-top.jelly index 4cf93b7a46ec..2d2e116c059a 100644 --- a/core/src/main/resources/hudson/model/Computer/index-top.jelly +++ b/core/src/main/resources/hudson/model/Computer/index-top.jelly @@ -1,6 +1,5 @@ -

diff --git a/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly b/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly index 587239fb7d84..770a642fb3ec 100644 --- a/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly +++ b/core/src/main/resources/hudson/slaves/SlaveComputer/systemInfo.jelly @@ -31,22 +31,15 @@ THE SOFTWARE. - - + -

${%System Information}

-

+

- - ${it.caption} -

- -
- -
-
+ ${it.caption} + ${%System Information} +

diff --git a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly index 6064af54bb65..d3b03a03b22e 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly +++ b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly @@ -1,6 +1,5 @@ -

@@ -8,7 +7,7 @@

-
+
${%blurb}
diff --git a/core/src/main/resources/lib/hudson/editableDescription.jelly b/core/src/main/resources/lib/hudson/editableDescription.jelly index 4986f0be7e64..8b5669f04a67 100644 --- a/core/src/main/resources/lib/hudson/editableDescription.jelly +++ b/core/src/main/resources/lib/hudson/editableDescription.jelly @@ -40,11 +40,9 @@ THE SOFTWARE. - - -
+
From a62d088286833387b44b4df04227e7689d17db52 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sat, 13 Aug 2022 17:27:28 +0200 Subject: [PATCH 14/18] PR review --- core/src/main/java/hudson/slaves/SlaveComputer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index 63b47ff129c5..0b17228ec75d 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -792,7 +792,7 @@ public synchronized void doSubmitDescription(StaplerResponse rsp, @QueryParamete if (node != null) { node.setNodeDescription(description); } else { // Node has been disabled/removed during other session tries to change the description. - throw new IOException("Node " + nodeName + " has been deleted during other session tries to change the description"); + throw new IOException("Description will be not set. The node " + nodeName + " does not exist (anymore)."); } rsp.sendRedirect("."); } From 37d212174f5fbc319f2924f394cb4295c45c3cc7 Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Fri, 26 Aug 2022 11:06:51 +0200 Subject: [PATCH 15/18] Thanks Spotless --- core/src/main/java/hudson/slaves/SlaveComputer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index b6139d1037c4..e2a4b7c9d09f 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -80,7 +80,6 @@ import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; -import javax.servlet.ServletException; import jenkins.agents.AgentComputerUtil; import jenkins.model.Jenkins; import jenkins.security.ChannelConfigurator; From 404b1032552fd744e70a50dc502863d372b32e62 Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Fri, 26 Aug 2022 11:10:27 +0200 Subject: [PATCH 16/18] This was fun because we have no documentation for any of this --- core/src/main/resources/lib/hudson/editable-description.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/resources/lib/hudson/editable-description.js b/core/src/main/resources/lib/hudson/editable-description.js index 7b66c1473cc8..30a5e01efdaf 100644 --- a/core/src/main/resources/lib/hudson/editable-description.js +++ b/core/src/main/resources/lib/hudson/editable-description.js @@ -1,3 +1,4 @@ +/* global replaceDescription */ (function () { document.addEventListener("DOMContentLoaded", function () { let descriptionLink = document.querySelector("#description-link"); From f55352e897229eb0bded60fa4b50e197c2a258ab Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Sat, 31 Dec 2022 11:04:10 +0000 Subject: [PATCH 17/18] Update core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> --- .../jenkins/model/Jenkins/MasterComputer/index-top.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties index a12080b81d3e..f66557ace431 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties @@ -1,4 +1,4 @@ blurb = This is the Jenkins controller''s built-in node. \ Builds running on this node will execute on the same system and as the same user as the Jenkins controller. \ This is appropriate e.g. for special jobs performing backups, but in general you should run builds on agents. \ -
Learn more about distributed builds. + Learn more about distributed builds. From 9f85ab706216109c15253b43852d7f830673804e Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 31 Dec 2022 16:50:32 +0000 Subject: [PATCH 18/18] Mark as restricted --- core/src/main/java/hudson/slaves/SlaveComputer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index 94680ae3c90f..ccc90ec0873b 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -784,6 +784,7 @@ public List getLogRecords() throws IOException, InterruptedException * Inline editing of description */ @RequirePOST + @Restricted(NoExternalUse.class) public synchronized void doSubmitDescription(StaplerResponse rsp, @QueryParameter String description) throws IOException { checkPermission(CONFIGURE);