-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow formatted markup for node descriptions (#6511)
Co-authored-by: Adrien Lecharpentier <[email protected]> Co-authored-by: Daniel Beck <[email protected]> Co-authored-by: Alexander Brandes <[email protected]> Co-authored-by: Daniel Beck <[email protected]> Co-authored-by: Basil Crow <[email protected]> Co-authored-by: Tim Jacomb <[email protected]> Co-authored-by: Tim Jacomb <[email protected]>
- Loading branch information
1 parent
4dda635
commit 5522f60
Showing
11 changed files
with
104 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
core/src/main/resources/hudson/model/Computer/index-top.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"> | ||
<!-- Node name and status --> | ||
<h1> | ||
<l:icon src="${it.iconClassName}" class="icon-xlg" /> | ||
${it.caption} | ||
</h1> | ||
|
||
<!-- Node description --> | ||
<t:editableDescription permission="${it.CONFIGURE}" description="${it.node.nodeDescription}" submissionUrl="submitDescription" /> | ||
</j:jelly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout"> | ||
<!-- Node name and status --> | ||
<h1> | ||
<l:icon src="${it.iconClassName}" class="icon-xlg" /> | ||
${it.caption} | ||
</h1> | ||
|
||
<!-- Node description --> | ||
<div class="jenkins-!-margin-bottom-5"> | ||
${%blurb} | ||
</div> | ||
</j:jelly> |
4 changes: 4 additions & 0 deletions
4
core/src/main/resources/jenkins/model/Jenkins/MasterComputer/index-top.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. \ | ||
<a rel="noopener noreferrer nofollow" target="_blank" href="http://www.jenkins.io/redirect/distributed-builds/">Learn more about distributed builds.</a> |
16 changes: 16 additions & 0 deletions
16
core/src/main/resources/lib/hudson/editable-description.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* global replaceDescription */ | ||
(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); | ||
} | ||
}); | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters