Open-EO / openeo-vue-components

Common Vue components for openEO.
Apache License 2.0
7 stars 1 forks source link

Display only 2 decimales in the cost estimate results #85

Closed dthiex closed 2 years ago

dthiex commented 2 years ago

In order to avoid confusion with the displayed cost estimate I think it would make sense to only display 2 decimals (FF takes the separator from the system settings for the costs). 2 decimals is still more then precise enough.

cost_estimate_batch_job

Additional I think the same separator should be used for costs and file size.

m-mohr commented 2 years ago

Actually, this is not a Web Editor issue but a Vue Component issue. Moving it...

m-mohr commented 2 years ago

I can't change the cost representation in a good way as this originates from JavaScripts toLocaleString implementation, which uses three fraction digits when no valid currency is set (and processing units are obviously not considered a valid currency ;-) ). I could turn off the thousand separator, but not sure whether that's helpful. Nevertheless, the file size is now aligned and shows "15,2 MB" instead.

dthiex commented 2 years ago

I could turn off the thousand separator, but not sure whether that's helpful...

I think for a bit bigger jobs that use >1000 PUs it would be helpful. Can't you set something maximumFractionDigits = 2?

m-mohr commented 2 years ago

I can, but then I'm forcefully overriding the currency defaults, which I still want to be considered.

Nevertheless, the file size is now aligned and shows "15,2 MB" instead. That should help a bit...

m-mohr commented 2 years ago

Okay, I just checked ISO-4217 and the codes are all 3 chars. So I can set the maximumFractionDigits to 2 for all currencies that are not 3 chars long :-)

m-mohr commented 2 years ago

Fixed, will need some time until it's landing in the Web Editor though...