Univention Bugzilla – Bug 27778
Speicherangabe wird nicht validiert
Last modified: 2013-11-19 06:44:00 CET
Created attachment 4488 [details] ByteBox widget +++ This bug was initially created as a clone of Bug #27747 comment 2 +++ Langfristig sollte das Textfeld in UMC für die Eingabe der RAM- und Festplattengröße durch ein eigenes Widget ersetzt werden, was die komfortable Eingabe von KiB-TiB-Werten erlaubt, die entsprechenden Limits für RAM (>= 4 MiB, derzeit <x GiB, Schrittweite 1 MiB) und Festplatte (eher >= 1 GiB, <X TiB, Schrittweite 1 GiB). Zudem sollte zwischen UMC-Frontend und UMC-Backend kein String der Form "X.Y [KMGT]B" ausgetauscht werden, sondern wie zwischen UMC-Backend und UVMMd direkt die Größe in Bytes, was die Validierung (u.a. für Bug #26645) vereinfacht. branches/ucs-3.0/ucs/management/univention-management-console-frontend/umc/widgets/ByteBox.js <script type="text/javascript"> var dojoConfig = { parseOnLoad: true, isDebug: false, debugAtAllCosts: false, }; </script> <script type="text/javascript" src="js/dojo/dojo.js"></script> <script type="text/javascript"> dojo.require("umc.widgets.ByteBox"); dojo.addOnLoad(function() { bb = new umc.widgets.ByteBox({id: 'bb', value: '1234567'}); dojo.place(bb.domNode, dojo.body()); }); </script>
Replaced by MappedTextBox: <http://livedocs.dojotoolkit.org/dijit/form/MappedTextBox> <https://dojotoolkit.org/api/1.8/dijit/form/MappedTextBox> The value is now always converted to .2f, that is 2 decimals after the decimal separator. This might be a problem when the exact value of 1_234_567 is then converted to 1.23 MiB, which is 1_289_748 svn2783,42782 univention-virtual-machine-manager-daemon_3.0.6-1.458.201307252006 ChangeLog: The value for the meory size and storage volumes is now validated in the frontend
typo in Changelog s/meory/memory/
The value "20.00 GiBa" is not detected as invalid, a exception is raised then.
(In reply to Florian Best from comment #2) > typo in Changelog svn42810: fixed (In reply to Florian Best from comment #3) > The value "20.00 GiBa" is not detected as invalid, a exception is raised > then. fixed: prettyFormat() needs to pass on the original displayedValue unmodified, if the new value is invalid <http://livedocs.dojotoolkit.org/dijit/form/MappedTextBox#simple-programmatic-example> univention-virtual-machine-manager-daemon_3.0.6-2.459.201307261228
(In reply to Philipp Hahn from comment #4) > (In reply to Florian Best from comment #2) > > typo in Changelog > svn42810: fixed OK > (In reply to Florian Best from comment #3) > > The value "20.00 GiBa" is not detected as invalid, a exception is raised > > then. > fixed: prettyFormat() needs to pass on the original displayedValue > unmodified, if the new value is invalid > <http://livedocs.dojotoolkit.org/dijit/form/MappedTextBox#simple- > programmatic-example> > > univention-virtual-machine-manager-daemon_3.0.6-2.459.201307261228 OK
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".