提交 27949aab 编写于 作者: M Matt Sicker

Merge branch 'master' into flaky-util-test

......@@ -76,7 +76,6 @@ import org.kohsuke.stapler.interceptor.RequirePOST;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.annotation.OverridingMethodsMustInvokeSuper;
import javax.servlet.ServletException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
......@@ -716,7 +715,7 @@ public class SlaveComputer extends Computer {
}
@RequirePOST
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException {
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) {
if (channel!=null) {
//does nothing in case computer is already disconnected
checkPermission(DISCONNECT);
......@@ -741,11 +740,18 @@ public class SlaveComputer extends Computer {
}
@RequirePOST
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
@Override
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException {
checkPermission(CONNECT);
if(channel!=null) {
req.getView(this,"already-launched.jelly").forward(req, rsp);
try {
req.getView(this, "already-launched.jelly").forward(req, rsp);
} catch (IOException x) {
throw x;
} catch (/*Servlet*/Exception x) {
throw new IOException(x);
}
return;
}
......@@ -778,7 +784,7 @@ public class SlaveComputer extends Computer {
}
@WebMethod(name="slave-agent.jnlp")
public HttpResponse doSlaveAgentJnlp(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
public HttpResponse doSlaveAgentJnlp(StaplerRequest req, StaplerResponse res) {
return new EncryptedSlaveAgentJnlpFile(this, "slave-agent.jnlp.jelly", getName(), CONNECT);
}
......
.copy-button {
display: inline-block;
}
.copy-button BUTTON {
background: url('clipboard.png') center center no-repeat;
.copy-button button {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZlcnNpb249IjEuMSIgIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJyZ2IoMCwwLDApIiBkPSJNMTcsOUg3VjdIMTdNMTcsMTNIN1YxMUgxN00xNCwxN0g3VjE1SDE0TTEyLDNBMSwxIDAgMCwxIDEzLDRBMSwxIDAgMCwxIDEyLDVBMSwxIDAgMCwxIDExLDRBMSwxIDAgMCwxIDEyLDNNMTksM0gxNC44MkMxNC40LDEuODQgMTMuMywxIDEyLDFDMTAuNywxIDkuNiwxLjg0IDkuMTgsM0g1QTIsMiAwIDAsMCAzLDVWMTlBMiwyIDAgMCwwIDUsMjFIMTlBMiwyIDAgMCwwIDIxLDE5VjVBMiwyIDAgMCwwIDE5LDNaIiAvPjwvc3ZnPg==');
background-size: 18px;
background-position: center center;
background-repeat: no-repeat;
width: 20px;
height: 20px;
}
// @include org.kohsuke.stapler.zeroclipboard
Behaviour.specify("span.copy-button", 'copyButton', 0, function(e) {
var btn = e.firstChild;
var id = "copy-button"+(iota++);
btn.id = id;
var btn = e.firstChild;
var id = "copy-button"+(iota++);
btn.id = id;
makeButton(btn, function() {
//make an invisible textarea element containing the text
var el = document.createElement('textarea');
el.value = e.getAttribute("text");
el.style.width = "1px";
el.style.height = "1px";
el.style.border = "none";
el.style.padding = "0px";
document.body.appendChild(el);
var clip = new ZeroClipboard(e);
makeButton(btn);
clip.setHandCursor(true);
//select the text and copy it to the clipboard
el.select();
document.execCommand('copy');
var container = e.getAttribute("container");
if (container) {
container = $(e).up(container);
container.style.position = "relative";
}
//remove the textarea element
document.body.removeChild(el);
clip.on('datarequested',function() {
clip.setText(e.getAttribute("text"));
});
clip.on('complete',function() {
notificationBar.show(e.getAttribute("message"));
});
clip.on('mouseOver',function() {
$(id).addClassName('yui-button-hover')
});
clip.on('mouseOut',function() {
$(id).removeClassName('yui-button-hover')
});
clip.on('mouseDown',function() {
$(id).addClassName('yui-button-active')
});
clip.on('mouseUp',function() {
$(id).removeClassName('yui-button-active')
});
//show the notification
notificationBar.show(e.getAttribute("message"));
});
});
---
ath:
useLocalSnapshots: false
athRevision: "06caf67d37d945ec5228a80d73714fac692c28d3"
athImage: "jenkins/ath:acceptance-test-harness-1.62"
athRevision: "809fb7629c311ebddc6cada91fc865a950155bb0"
athImage: "jenkins/ath:acceptance-test-harness-1.63"
categories:
- org.jenkinsci.test.acceptance.junit.SmokeTest
......@@ -76,7 +76,7 @@ THE SOFTWARE.
</issueManagement>
<properties>
<revision>2.156</revision>
<revision>2.157</revision>
<changelist>-SNAPSHOT</changelist>
<!-- *.html files are in UTF-8, and *.properties are in iso-8859-1, so this configuration is actually incorrect,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册