diff --git a/core/src/main/java/hudson/slaves/OfflineCause.java b/core/src/main/java/hudson/slaves/OfflineCause.java index 804767dc592107c15e3e27d20b9dce2b3604313a..27b31d78a1e157166b9c50bd5b85c5c7ba125fd9 100644 --- a/core/src/main/java/hudson/slaves/OfflineCause.java +++ b/core/src/main/java/hudson/slaves/OfflineCause.java @@ -24,6 +24,7 @@ package hudson.slaves; +import hudson.Functions; import hudson.model.Computer; import org.jvnet.localizer.Localizable; import org.kohsuke.stapler.export.ExportedBean; @@ -79,6 +80,10 @@ public abstract class OfflineCause { public String getShortDescription() { return cause.toString(); } + + @Override public String toString() { + return Messages.OfflineCause_connection_was_broken_(Functions.printThrowable(cause)); + } } /** diff --git a/core/src/main/resources/hudson/slaves/Messages.properties b/core/src/main/resources/hudson/slaves/Messages.properties index 4844ae54a8eccff964e310c5657f1d59a4b079f7..84bd43bafbf5746a74cba4bb61a7b4dd862c4a25 100644 --- a/core/src/main/resources/hudson/slaves/Messages.properties +++ b/core/src/main/resources/hudson/slaves/Messages.properties @@ -33,6 +33,7 @@ DumbSlave.displayName=Dumb Slave NodeProvisioner.EmptyString= OfflineCause.DisconnectedFromCLI=Disconnected from CLI OfflineCause.LaunchFailed=This node is offline because Jenkins failed to launch the slave agent on it. +OfflineCause.connection_was_broken_=Connection was broken: {0} SimpleScheduledRetentionStrategy.FinishedUpTime=Computer has finished its scheduled uptime SimpleScheduledRetentionStrategy.displayName=Take this slave on-line according to a schedule EnvironmentVariablesNodeProperty.displayName=Environment variables