Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-18057] Run os cmd needs to use POST method instead of GET
Signed-off-by: Joey Jiao <joey.jiaojg@gmail.com>
  • Loading branch information
JoeyJiao committed May 23, 2013
1 parent 2c57e9d commit 6c0a833
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions pom.xml
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.397</version>
<version>1.515</version>
</parent>

<artifactId>terminal</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.5-SNAPSHOT</version>
<packaging>hpi</packaging>
<name>Jenkins Terminal Plugin</name>
<url>http://wiki.jenkins-ci.org/display/JENKINS/Terminal+Plugin</url>
Expand All @@ -30,13 +30,17 @@
<id>kiy0taka</id>
<name>Kiyotaka Oku</name>
</developer>
<developer>
<id>joeyjiao</id>
<name>Joey Jiao</name>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jquery-ui</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/index.jelly
@@ -1,3 +1,3 @@
<div>
This plugin allows you to execute OS commands.
This plugin allows you to execute OS commands and list/change node.
</div>
1 change: 1 addition & 0 deletions src/main/webapp/js/terminal.js
Expand Up @@ -111,6 +111,7 @@ Terminal.prototype = {
$.ajax({
'url' : rootURL + (self.node=='master'?'/script':'/computer/'+self.node+'/script'),
'data' : 'script=' + encodeURIComponent('println(("""' + command.split(/[^\\]\|/).join('""".execute() | """') + '""".execute()).text)'),
'type' : 'POST',
'beforeSend': function(xhr) {
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
},
Expand Down

0 comments on commit 6c0a833

Please sign in to comment.