提交 9a853b9d 编写于 作者: O Oliver Gondža

Merge pull request #1763 from olivergondza/JENKINS-29286

[FIXED JENKINS-29286] Use byte size to sort disk space monitor columns
...@@ -37,6 +37,8 @@ import java.math.BigDecimal; ...@@ -37,6 +37,8 @@ import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.util.Locale; import java.util.Locale;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.stapler.export.ExportedBean; import org.kohsuke.stapler.export.ExportedBean;
import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.Exported;
...@@ -81,6 +83,14 @@ public abstract class DiskSpaceMonitorDescriptor extends AbstractAsyncNodeMonito ...@@ -81,6 +83,14 @@ public abstract class DiskSpaceMonitorDescriptor extends AbstractAsyncNodeMonito
return path; return path;
} }
// Needed for jelly that does not seem to be able to access properties
// named 'size' as it confuses it with built-in size method and fails
// to parse the expression expecting '()'.
@Restricted(DoNotUse.class)
public long getFreeSize() {
return size;
}
/** /**
* Gets GB left. * Gets GB left.
*/ */
......
...@@ -29,7 +29,7 @@ THE SOFTWARE. ...@@ -29,7 +29,7 @@ THE SOFTWARE.
<td align="right" data="-1">N/A</td> <td align="right" data="-1">N/A</td>
</j:when> </j:when>
<j:otherwise> <j:otherwise>
<td align="right" data="${data}"><j:out value="${data.toHtml()}"/></td> <td align="right" data="${data.freeSize}"><j:out value="${data.toHtml()}"/></td>
</j:otherwise> </j:otherwise>
</j:choose> </j:choose>
</j:jelly> </j:jelly>
\ No newline at end of file
...@@ -32,4 +32,4 @@ THE SOFTWARE. ...@@ -32,4 +32,4 @@ THE SOFTWARE.
<td align="right" data="${from.toMB(data)}"><j:out value="${from.toHtml(data)}"/></td> <td align="right" data="${from.toMB(data)}"><j:out value="${from.toHtml(data)}"/></td>
</j:otherwise> </j:otherwise>
</j:choose> </j:choose>
</j:jelly> </j:jelly>
\ No newline at end of file
...@@ -29,7 +29,7 @@ THE SOFTWARE. ...@@ -29,7 +29,7 @@ THE SOFTWARE.
<td align="right" data="-1">N/A</td> <td align="right" data="-1">N/A</td>
</j:when> </j:when>
<j:otherwise> <j:otherwise>
<td align="right" data="${data}"><j:out value="${data.toHtml()}"/></td> <td align="right" data="${data.freeSize}"><j:out value="${data.toHtml()}"/></td>
</j:otherwise> </j:otherwise>
</j:choose> </j:choose>
</j:jelly> </j:jelly>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册