Comment 6 for bug 1482705

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/215196
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5398de264d6b40120b20eb123faff68a13f9de30
Submitter: Jenkins
Branch: master

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.

    Rewrite pie-chart directive rendering according to
    https://invis.io/A4445BDSF

    Change-Id: If498d9ccd5f0144c9e78ae58583ede2c1cf83f0b
    Closes-Bug: #1482705