commit 5398de264d6b40120b20eb123faff68a13f9de30
Author: Timur Sufiev <email address hidden>
Date: Thu Aug 20 18:36:51 2015 +0300
Enable Launch Instance NG for the case when Nova quotas are disabled
Do this by representing every float('inf') python numeric as a 1e+999
JSON token - this way Javascript JSON.parse() correctly transforms it
to the Javascript Infinity object. The infinity value corresponds to
disabled limits.
The logic of representing infinity values as 1e+999 tokens is
implemented by means of custom `NaNJSONEncoder` which overrides
`iterencode` method of its `json.JSONEncoder` ancestor. Due to the
fact that the ancestor method could take an advantage of
`c_make_encoder` function (which is implemented in C) - and thus could
be much faster, I'm using the custom encoder only where it's really
needed, to not hamper Horizon performance.
Reviewed: https:/ /review. openstack. org/215196 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=5398de264d6 b40120b20eb123f aff68a13f9de30
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5398de264d6b401 20b20eb123faff6 8a13f9de30
Author: Timur Sufiev <email address hidden>
Date: Thu Aug 20 18:36:51 2015 +0300
Enable Launch Instance NG for the case when Nova quotas are disabled
Do this by representing every float('inf') python numeric as a 1e+999
JSON token - this way Javascript JSON.parse() correctly transforms it
to the Javascript Infinity object. The infinity value corresponds to
disabled limits.
The logic of representing infinity values as 1e+999 tokens is make_encoder` function (which is implemented in C) - and thus could
implemented by means of custom `NaNJSONEncoder` which overrides
`iterencode` method of its `json.JSONEncoder` ancestor. Due to the
fact that the ancestor method could take an advantage of
`c_
be much faster, I'm using the custom encoder only where it's really
needed, to not hamper Horizon performance.
Rewrite pie-chart directive rendering according to /invis. io/A4445BDSF
https:/
Change-Id: If498d9ccd5f014 4c9e78ae58583ed e2c1cf83f0b
Closes-Bug: #1482705