Skip to content

Commit

Permalink
[FIXED JENKINS-29286] Use byte size to sort disk space monitor columns
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergondza committed Jul 13, 2015
1 parent ae2163a commit fabec0e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
*/
Expand Down
Expand Up @@ -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>
Expand Up @@ -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>
Expand Up @@ -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.