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

[FIXED JENKINS-29286] Use byte size to sort disk space monitor columns

上级 ae2163ac
......@@ -37,6 +37,8 @@ import java.math.BigDecimal;
import java.text.ParseException;
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.Exported;
......@@ -81,6 +83,14 @@ public abstract class DiskSpaceMonitorDescriptor extends AbstractAsyncNodeMonito
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.
*/
......
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<td align="right" data="-1">N/A</td>
</j:when>
<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:choose>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -32,4 +32,4 @@ THE SOFTWARE.
<td align="right" data="${from.toMB(data)}"><j:out value="${from.toHtml(data)}"/></td>
</j:otherwise>
</j:choose>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<td align="right" data="-1">N/A</td>
</j:when>
<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:choose>
</j:jelly>
\ No newline at end of file
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册