Skip to content

Commit

Permalink
#26 show decimal point
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 10, 2016
1 parent 57e5832 commit 3fc6f1c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/xsl/index.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<xsl:text> AWS charges us </xsl:text>
<a href="https://aws.amazon.com/cloudfront/pricing/"><xsl:text>approximately</xsl:text></a>
<xsl:text> $</xsl:text>
<xsl:value-of select="format-number(sum(domains/domain/usage) div (1024 * 1024 * 1024) * 0.150 * 3, '###,###.00')"/>
<xsl:value-of select="format-number(sum(domains/domain/usage) div (1024 * 1024 * 1024) * 0.150, '###,###.00')"/>
<xsl:text> monthly.</xsl:text>
</p>
<p>
Expand Down Expand Up @@ -144,7 +144,15 @@
<xsl:value-of select="owner"/>
</a>
<xsl:text>: </xsl:text>
<xsl:value-of select="format-number(usage div 1048576, '###,###,###')"/>
<xsl:variable name="mb" select="usage div 1048576"/>
<xsl:choose>
<xsl:when test="$mb &lt; 1">
<xsl:value-of select="format-number($mb, '###.##')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number($mb, '###,###,###')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>Mb</xsl:text>
</li>
</xsl:template>
Expand Down

0 comments on commit 3fc6f1c

Please sign in to comment.