Skip to content
Permalink
Browse files
[FIXED JENKINS-29286] Use byte size to sort disk space monitor columns
  • Loading branch information
olivergondza committed Jul 13, 2015
1 parent ae2163a commit fabec0eef00212109a1ad5c2bedcb8c55de4f38a
@@ -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 fabec0e

Please sign in to comment.