Skip to content
Permalink
Browse files
[FIXED JENKINS-29286] Use byte size to sort disk space monitor columns
(cherry picked from commit fabec0e)
  • Loading branch information
olivergondza committed Jul 30, 2015
1 parent 8f5bdcb commit 132b915615bed822a14d751667c4a0842ed6ffa6
@@ -37,6 +37,8 @@
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 String getPath() {
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>
</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>
</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>
</j:jelly>

0 comments on commit 132b915

Please sign in to comment.