File tree Expand file tree Collapse file tree 5 files changed +27
-20
lines changed
java/org/jenkinsci/plugins/scriptler
resources/org/jenkinsci/plugins/scriptler
git/GitScriptlerRepository Expand file tree Collapse file tree 5 files changed +27
-20
lines changed Original file line number Diff line number Diff line change 5757import org .jenkinsci .plugins .scriptler .share .ScriptInfoCatalog ;
5858import org .jenkinsci .plugins .scriptler .util .ScriptHelper ;
5959import org .jenkinsci .plugins .scriptler .util .UIHelper ;
60+ import org .kohsuke .accmod .Restricted ;
61+ import org .kohsuke .accmod .restrictions .NoExternalUse ;
6062import org .kohsuke .stapler .*;
6163import org .kohsuke .stapler .interceptor .RequirePOST ;
6264
@@ -343,7 +345,8 @@ private void commitFileToGitRepo(final String finalFileName) {
343345 getGitRepo ().addSingleFileToRepo (finalFileName );
344346 }
345347
346- private GitScriptlerRepository getGitRepo () {
348+ @ Restricted (NoExternalUse .class )
349+ public GitScriptlerRepository getGitRepo () {
347350 return ExtensionList .lookupSingleton (GitScriptlerRepository .class );
348351 }
349352
Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ public boolean hasPushPermission() {
9393 return Jenkins .get ().hasPermission (ScriptlerPermissions .CONFIGURE );
9494 }
9595
96+ public Object getScriptler () {
97+ return ExtensionList .lookupSingleton (ScriptlerManagement .class );
98+ }
99+
96100 /**
97101 * @see org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository#checkPushPermission()
98102 */
Original file line number Diff line number Diff line change 2020# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121# THE SOFTWARE.
2222
23- title =Remote Script catalogs
23+ title =Remote Script Catalogs
2424intro =The catalog allows you to import groovy scripts from a shared source server. \
2525 Just click the save icon and the script will be imported to your local script directory. Depending on the catalog, you can share your scripts too \
2626 - e.g. send pull requests to <a href="https://github.com/jenkinsci/jenkins-scripts">https://github.com/jenkinsci/jenkins-scripts</a>. \
Original file line number Diff line number Diff line change @@ -27,22 +27,22 @@ THE SOFTWARE.
2727 Side panel for Scriptler.
2828-->
2929<?jelly escape-by-default =' true' ?>
30- <j : jelly xmlns : j =" jelly:core" xmlns : st = " jelly:stapler " xmlns : d = " jelly:define " xmlns : l =" /lib/layout" xmlns : t = " /lib/hudson " xmlns : f = " /lib/form " xmlns : i = " jelly:fmt " >
30+ <j : jelly xmlns : j =" jelly:core" xmlns : l =" /lib/layout" >
3131 <l : header />
3232 <l : side-panel >
3333 <l : tasks >
34+ <j : set var =" scriptlerRoot" value =" ${rootURL}/${it.urlName}" />
3435 <j : if test =" ${it.hasAtLeastOneScriptlerPermission()}" >
35- <l : task icon =" icon-next icon-md" href =" ${rootURL}/scriptler " title =" ${%Run / Edit Scripts}" />
36+ <l : task icon =" icon-next icon-md" href =" ${scriptlerRoot} " title =" ${%Run / Edit Scripts}" />
3637 </j : if >
3738 <l : hasPermission permission =" ${it.scriptlerConfigure}" >
38- <l : task icon =" icon-new-package icon-md" href =" scriptSettings" title =" ${%Add a new Script}" />
39+ <l : task icon =" icon-new-package icon-md" href =" ${scriptlerRoot}/ scriptSettings" title =" ${%Add a New Script}" />
3940 <j : if test =" ${!it.disableRemoteCatalog()}" >
40- <l : task icon =" icon-folder icon-md" href =" catalog" title =" ${%Remote Script catalogs }" />
41+ <l : task icon =" icon-folder icon-md" href =" ${scriptlerRoot}/ catalog" title =" ${%Remote Script Catalogs }" />
4142 </j : if >
42- <l : task icon =" icon-setting icon-md" href =" settings" title =" ${%Scriptler settings }" />
43- <l : task icon =" symbol-git-compare-outline plugin-ionicons-api" href =" ${rootURL}/scriptler.git " title =" ${%Git repo }" />
43+ <l : task icon =" icon-setting icon-md" href =" ${scriptlerRoot}/ settings" title =" ${%Scriptler Settings }" />
44+ <l : task icon =" symbol-git-compare-outline plugin-ionicons-api" href =" ${rootURL}/${it.gitRepo.urlName} " title =" ${%Git Repo }" />
4445 </l : hasPermission >
4546 </l : tasks >
46- <t : executors computers =" ${h.singletonList(it)}" />
4747 </l : side-panel >
4848</j : jelly >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<?jelly escape-by-default =' true' ?>
3- <j : jelly xmlns : j =" jelly:core" xmlns : l =" /lib/layout" xmlns : f =" /lib/form" >
3+ <j : jelly xmlns : j =" jelly:core" xmlns : l =" /lib/layout" xmlns : f =" /lib/form" xmlns : st = " jelly:stapler " >
44 <l : layout title =" " >
5+ <st : include page =" sidepanel.jelly" it =" ${it.scriptler}" />
56 <l : main-panel >
67 <h1 >Accessing Scriptler scripts</h1 >
78 <p >${%blurb}</p >
@@ -12,25 +13,24 @@ ${%git_clone_command(it.httpCloneUrl)}
1213 <j : if test =" ${it.hasPushPermission()}" >
1314 <p >
1415 ${%reset}
15- <f : form method =" POST" action =" ${app.rootUrl}scriptler/hardResetGit" >
16+ <f : form method =" POST" action =" ${app.rootUrl}${it. scriptler.urlName} /hardResetGit" >
1617 <f : submit value =" ${%Hard reset}" />
1718 </f : form >
1819 </p >
1920 </j : if >
2021
21- <!--
22- <f:section title=" ${%Log}" >
22+ <div style = " padding-top: var(--section-padding) " >
23+ < h2 > ${%Log}</ h2 >
2324 <j : forEach items =" ${it.log}" var =" log" >
2425 <p >
25- <strong>commit ${log.name}</strong><br/>
26- <strong>Author:</strong> ${log.author} <br/>
27- <strong>Committer:</strong> ${log.committer} <br/>
28- <strong>Date:</strong> ${log.commitTime}<br/>
29- ${log.msg}
26+ <strong >commit ${log.name() }</strong ><br />
27+ <strong >Author:</strong > ${log.author().name} & lt;${log.author().emailAddress} & gt; <br />
28+ <strong >Committer:</strong > ${log.committer().name} & lt;${log.committer().emailAddress} & gt; <br />
29+ <strong >Date:</strong > ${log.commitTime() }<br />
30+ ${log.msg() }
3031 </p >
3132 </j : forEach >
32- </f:section>
33- -->
33+ </div >
3434 </l : main-panel >
3535 </l : layout >
3636</j : jelly >
You can’t perform that action at this time.
0 commit comments