/hudson-core/src/main/resources/lib/hudson/scriptConsole.jelly

http://github.com/hudson/hudson · Unknown · 57 lines · 49 code · 8 blank · 0 comment · 0 complexity · 7e9ed2863080466b40700d968b3885cd MD5 · raw file

  1. <!--
  2. The MIT License
  3. Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman, Romain Seguy
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated documentation files (the "Software"), to deal
  6. in the Software without restriction, including without limitation the rights
  7. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. copies of the Software, and to permit persons to whom the Software is
  9. furnished to do so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. THE SOFTWARE.
  19. -->
  20. <!--
  21. Called from doScript() to display the execution result and the form.
  22. -->
  23. <?jelly escape-by-default='true'?>
  24. <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">
  25. <l:layout norefresh="true">
  26. <st:include page="sidepanel.jelly" />
  27. <l:main-panel>
  28. <h1>${%Script Console}</h1>
  29. <p>
  30. ${%description}
  31. </p>
  32. <!-- this is where the example goes -->
  33. <d:invokeBody />
  34. <form action="script" method="post">
  35. <textarea id="script" name="script" style="width:100%; height:10em">${request.getParameter('script')}</textarea>
  36. <div align="right">
  37. <f:submit value="${%Run}"/>
  38. </div>
  39. <script>
  40. $('script').focus();
  41. </script>
  42. </form>
  43. <j:if test="${output!=null}">
  44. <h2>${%Result}</h2>
  45. <pre><st:out value="${output}"/></pre>
  46. </j:if>
  47. </l:main-panel>
  48. </l:layout>
  49. </j:jelly>