New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when acessing node details page with german locale #1062

bernd opened this Issue Jan 22, 2015 · 0 comments


None yet
2 participants

bernd commented Jan 22, 2015

I started the web interface with activator -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 join this conversation on GitHub. Already have an account? Sign in to comment