Skip to content
This repository has been archived by the owner. It is now read-only.

Exception when acessing node details page with german locale #1062

Closed
bernd opened this issue Jan 22, 2015 · 0 comments
Closed

Exception when acessing node details page with german locale #1062

bernd opened this issue Jan 22, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@bernd
Copy link
Contributor

@bernd bernd commented Jan 22, 2015

I started the web interface with activator -Duser.country=DE -Duser.language=de run and got the following exception when accessing the node details page.

[NumberFormatException: For input string: "0,5"]
In graylog2-web-interface/app/views/system/nodes/show.scala.html:154
151                    <h3>Utilization</h3>
152                    @defining(NumberHelper.asPercent(node.getJournalInfo.journalSize, node.getJournalInfo.journalSizeLimit, 1, false)) { utilizationPercent =>
153                        <div class="progress node-journal-usage">
154                            @if(utilizationPercent.toDouble <= 100.0) {
155                                <div class="bar bar-warning" data-percentage="@utilizationPercent" style="width : @utilizationPercent%;">
156                            } else {
157                                <div class="bar bar-warning" data-percentage="100" style="width : 100%;">
158                            }
159                                @utilizationPercent%

This is due to the String.format() call in the NumberHelper.asPercent() method. The %f format string will be formatted with the default locale in this case. With a german locale this will be 0,5 in this case. It looks like "0,5".toDouble fails...

@bernd bernd added the bug label Jan 22, 2015
@bernd bernd added this to the 1.0.0 milestone Jan 22, 2015
@edmundoa edmundoa self-assigned this Jan 23, 2015
@edmundoa edmundoa closed this in 3af3a4a Jan 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants