)]}'
{"horizon/static/horizon/js/horizon.quota.js":[{"author":{"_account_id":1816,"name":"Gabriel Hurley","email":"gabriel.hurley@nebula.com","username":"gabriel-hurley"},"change_message_id":"a3aa7c6b16f9dc7bf110bc557926faa3a6501a8b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"          limit our flavors, so we return true in this case."},{"line_number":87,"context_line":"        */"},{"line_number":88,"context_line":"        return true;"},{"line_number":89,"context_line":"    } else if (parseInt(image.min_disk) \u003e parseInt(flavor.disk)) {"},{"line_number":90,"context_line":"        return false;"},{"line_number":91,"context_line":"    } else if (parseInt(image.min_ram) \u003e parseInt(flavor.ram)) {"},{"line_number":92,"context_line":"        return false;"}],"source_content_type":"text/javascript","patch_set":5,"id":"AAAARn%2F%2F4Gc%3D","line":89,"updated":"2013-08-20 20:17:21.000000000","message":"I may be missing something, but it looks like for images that don\u0027t define min_disk, et. al. you\u0027re going to end up calling parseInt on a None/null which will lead to a NaN. I think it\u0027d be safer to either default the min values to 0, or check the the value exists prior to trying to compare it.\n\nAlso, parseInt should always be called with the radix parameter defined, e.g. \"parseInt(image.min_disk, 10)\" that way you don\u0027t accidentally end up with octal interpretations, etc. based on questionable inputs.","commit_id":"140810eea006237658ec2d939a22bcba0858c826"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"a3e0d2268f190d3ab6eb0af3d4fdf2ef394f361c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    flavors.each(function(){"},{"line_number":105,"context_line":"        if ($(this).text() \u003d\u003d flavor.name) {"},{"line_number":106,"context_line":"            if ($(this).is(\u0027:selected\u0027) \u0026\u0026 $(this).next()) {"},{"line_number":107,"context_line":"                $(\u0027#id_flavor\u0027).val($(this).next().val());"},{"line_number":108,"context_line":"                $(\u0027#id_flavor\u0027).change(); // need to force the callback"},{"line_number":109,"context_line":"            }"},{"line_number":110,"context_line":"            $(this).attr(\u0027disabled\u0027, \u0027disabled\u0027);"}],"source_content_type":"text/javascript","patch_set":7,"id":"AAAASn%2F%2FUuM%3D","line":107,"updated":"2013-09-06 11:29:27.000000000","message":"There is a bug with this: disableFlavor() is called in the order flavours are defined in the Horizon.quota.flavors list, which may be different that the order in the \u003cselect\u003e. In my case, this can cause m1.tiny to end up selected even though it was disabled:\n\nm1.tiny (not selected originally, do nothing but disable) -\u003e m1.small (ok) -\u003e m1.micro (too small, was selected, next value is m1.tiny so m1.tiny gets selected)","commit_id":"7bc58aecb48a5cc82423063a16d03382117edc43"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"a3e0d2268f190d3ab6eb0af3d4fdf2ef394f361c","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            allDisabled \u003d false;"},{"line_number":178,"context_line":"        }"},{"line_number":179,"context_line":"    });"},{"line_number":180,"context_line":"    if (anyDisabled) {"},{"line_number":181,"context_line":"        horizon.Quota.noteDisabledFlavors(allDisabled);"},{"line_number":182,"context_line":"    } else {"},{"line_number":183,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":7,"id":"AAAASn%2F%2FUss%3D","line":180,"updated":"2013-09-06 11:29:27.000000000","message":"I would suggest doing the selection work at the end here instead, and let disableFlavor() only care about disabling.\n\nIf the already selected flavour is disabled, selecting the first usable flavour instead using the order in the \u003cselect\u003e. if ($(\u0027#id_flavor option\u0027).filter(\":selected\").attr(\u0027disabled\u0027) \u003d\u003d \u0027disabled\u0027)...","commit_id":"7bc58aecb48a5cc82423063a16d03382117edc43"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"bea73d249c453217bd7e911340301ff17d58ca59","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return true;"},{"line_number":89,"context_line":"    } else if (parseInt(image.min_disk, 10) \u003e parseInt(flavor.disk, 10)) {"},{"line_number":90,"context_line":"        return false;"},{"line_number":91,"context_line":"    } else if (parseInt(image.min_ram, 10) \u003e parseInt(flavor.ram, 10)) {"},{"line_number":92,"context_line":"        return false;"},{"line_number":93,"context_line":"    } else {"},{"line_number":94,"context_line":"        return true;"}],"source_content_type":"text/javascript","patch_set":8,"id":"AAAATH%2F%2FNr0%3D","line":91,"updated":"2013-10-21 11:47:09.000000000","message":"Why not combining these two conditions with \u0027 || \u0027 ?","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"},{"author":{"_account_id":8429,"name":"Jordan OMara","email":"jomara@redhat.com","username":"jomara"},"change_message_id":"5c21a048b0a7b5b450243669f97093ec807dc5e2","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return true;"},{"line_number":89,"context_line":"    } else if (parseInt(image.min_disk, 10) \u003e parseInt(flavor.disk, 10)) {"},{"line_number":90,"context_line":"        return false;"},{"line_number":91,"context_line":"    } else if (parseInt(image.min_ram, 10) \u003e parseInt(flavor.ram, 10)) {"},{"line_number":92,"context_line":"        return false;"},{"line_number":93,"context_line":"    } else {"},{"line_number":94,"context_line":"        return true;"}],"source_content_type":"text/javascript","patch_set":8,"id":"AAAATn%2F%2BlJo%3D","line":91,"in_reply_to":"AAAATH%2F%2FNr0%3D","updated":"2013-11-22 20:55:09.000000000","message":"I would prefer that you refactor into a function for readability","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"bea73d249c453217bd7e911340301ff17d58ca59","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    horizon.Quota.resetFlavors(); // clear any previous messages"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    horizon.Quota.flavors.forEach(function(flavor){"},{"line_number":169,"context_line":"        if (!horizon.Quota.imageFitsFlavor(image, flavor)) {"},{"line_number":170,"context_line":"            anyDisabled \u003d true;"},{"line_number":171,"context_line":"            horizon.Quota.disableFlavor(flavor);"}],"source_content_type":"text/javascript","patch_set":8,"id":"AAAATH%2F%2FNqU%3D","line":168,"updated":"2013-10-21 11:47:09.000000000","message":"Hmm, I\u0027m not a JS expert, but AFAIK forEach is not supported by some browsers(IE8)...","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"ddcf951e674ef65e45d5b0cc3942adc9a0afa8f0","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    horizon.Quota.resetFlavors(); // clear any previous messages"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    horizon.Quota.flavors.forEach(function(flavor){"},{"line_number":169,"context_line":"        if (!horizon.Quota.imageFitsFlavor(image, flavor)) {"},{"line_number":170,"context_line":"            anyDisabled \u003d true;"},{"line_number":171,"context_line":"            horizon.Quota.disableFlavor(flavor);"}],"source_content_type":"text/javascript","patch_set":8,"id":"AAAATn%2F%2FJDE%3D","line":168,"in_reply_to":"AAAATH%2F%2FNqU%3D","updated":"2013-11-13 21:56:11.000000000","message":"I believe this is an accurate statement for Array in IE8.  A supported browser option.","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"bea73d249c453217bd7e911340301ff17d58ca59","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    horizon.Quota.flavors.forEach(function(flavor){"},{"line_number":169,"context_line":"        if (!horizon.Quota.imageFitsFlavor(image, flavor)) {"},{"line_number":170,"context_line":"            anyDisabled \u003d true;"},{"line_number":171,"context_line":"            horizon.Quota.disableFlavor(flavor);"},{"line_number":172,"context_line":"        } else {"},{"line_number":173,"context_line":"            allDisabled \u003d false;"},{"line_number":174,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":8,"id":"AAAATH%2F%2FNfs%3D","line":171,"updated":"2013-10-21 11:47:09.000000000","message":"I am thinking of a small performance improvement here. In case of several quotas that need to be disabled, the function disableFlavor() will be called multiple times, and will scroll over all \u0027#id_flavor option\u0027 again and again. \n\nIf however the quotas that need to be disabled are pushed into an array(array.push(flavor.name)), and then call \u0027disableFlavors(array). This will iterate only once, setting the disabled attr on each flavor($.inArray(element.text(), array)). Also, having the disabled flavors in array, we already know anyDisabled(array.length\u003e 0), and allDisabled (array.length \u003d\u003d flavors.length).","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"},{"author":{"_account_id":8429,"name":"Jordan OMara","email":"jomara@redhat.com","username":"jomara"},"change_message_id":"6ebf8806f704f64464fcd0bb694c10ac48e78432","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return !(overDisk || overRAM);"},{"line_number":101,"context_line":"    }"},{"line_number":102,"context_line":"  },"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"  /*"},{"line_number":105,"context_line":"    Note to the user that some flavors have been disabled."},{"line_number":106,"context_line":"  */"}],"source_content_type":"text/javascript","patch_set":9,"id":"AAAATn%2F%2BZWg%3D","line":103,"updated":"2013-11-26 15:05:43.000000000","message":"nice fix","commit_id":"e07e93a1d7bc7b4b42569518701bfe30be8f3b03"}],"openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bc96c3d3ff86189ddedb7825ac5956266d9a1f2e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"      horizon.Quota.initWithFlavors({{ flavors|safe|default:\"{}\" }});"},{"line_number":51,"context_line":"      horizon.Quota.initWithImages({{ images|safe|default:\"{}\"}},"},{"line_number":52,"context_line":"                                   \"{{_(\"Some flavors not meeting minimum image requirements have been disabled.\")}}\","},{"line_number":53,"context_line":"                                   \"{{_(\"No flavors meet minimum criteria for selected image.\")}}\");"},{"line_number":54,"context_line":"    });"},{"line_number":55,"context_line":"  }"},{"line_number":56,"context_line":"\u003c/script\u003e"}],"source_content_type":"text/html","patch_set":8,"id":"AAAATH%2F%2FTOc%3D","line":53,"updated":"2013-10-18 05:22:06.000000000","message":"Can\u0027t we define a function? These two sentences are exactly same. Defining two exactly same contents in multiple places is not a good idea.","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"}],"openstack_dashboard/dashboards/project/instances/templates/instances/_launch_details_help.html":[{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"ec5176228e83b6c2ed9f288876cc897bb6df2297","unresolved":false,"context_lines":[{"line_number":42,"context_line":"\u003cscript type\u003d\"text/javascript\" charset\u003d\"utf-8\"\u003e"},{"line_number":43,"context_line":"  if(typeof horizon.Quota !\u003d\u003d \u0027undefined\u0027) {"},{"line_number":44,"context_line":"    horizon.Quota.initWithFlavors({{ flavors|safe|default:\"{}\" }});"},{"line_number":45,"context_line":"    horizon.Quota.initWithImages({{ images|safe|default:\"{}\"}},"},{"line_number":46,"context_line":"                                 \"{{_(\"Some flavors not meeting image minimums have been disabled.\")}}\","},{"line_number":47,"context_line":"                                 \"{{_(\"No flavors meet minimum criteria for selected image.\")}}\");"},{"line_number":48,"context_line":"  } else {"}],"source_content_type":"text/html","patch_set":3,"id":"AAAAPX%2F%2FsrA%3D","line":45,"updated":"2013-06-12 15:45:46.000000000","message":"There\u0027s a number of attributes in the json \"images\" dictionary that are not safe, particularly the image title. Ideally we would only include in the json the attributes that we actually need. Otherwise we need to at least remove the user-editable ones that could cause trouble.","commit_id":"dbdb338d3e10157a98359ad3b60856ac774c2cc4"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"ec5176228e83b6c2ed9f288876cc897bb6df2297","unresolved":false,"context_lines":[{"line_number":43,"context_line":"  if(typeof horizon.Quota !\u003d\u003d \u0027undefined\u0027) {"},{"line_number":44,"context_line":"    horizon.Quota.initWithFlavors({{ flavors|safe|default:\"{}\" }});"},{"line_number":45,"context_line":"    horizon.Quota.initWithImages({{ images|safe|default:\"{}\"}},"},{"line_number":46,"context_line":"                                 \"{{_(\"Some flavors not meeting image minimums have been disabled.\")}}\","},{"line_number":47,"context_line":"                                 \"{{_(\"No flavors meet minimum criteria for selected image.\")}}\");"},{"line_number":48,"context_line":"  } else {"},{"line_number":49,"context_line":"    addHorizonLoadEvent(function() {"}],"source_content_type":"text/html","patch_set":3,"id":"AAAAPX%2F%2Fsv8%3D","line":46,"updated":"2013-06-12 15:45:46.000000000","message":"This is nitpicking, personally I think spelling out \"minimum requirements\" would be clearer.","commit_id":"dbdb338d3e10157a98359ad3b60856ac774c2cc4"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"ec5176228e83b6c2ed9f288876cc897bb6df2297","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    addHorizonLoadEvent(function() {"},{"line_number":50,"context_line":"      horizon.Quota.initWithFlavors({{ flavors|safe|default:\"{}\" }});"},{"line_number":51,"context_line":"      horizon.Quota.initWithImages({{ images|safe|default:\"{}\"}},"},{"line_number":52,"context_line":"\t                                 \"{{_(\"Some flavors not meeting image minimums have been disabled.\")}}\","},{"line_number":53,"context_line":"\t                                 \"{{_(\"No flavors meet minimum criteria for selected image.\")}}\");"},{"line_number":54,"context_line":"    });"},{"line_number":55,"context_line":"  }"}],"source_content_type":"text/html","patch_set":3,"id":"AAAAPX%2F%2FswI%3D","line":52,"updated":"2013-06-12 15:45:46.000000000","message":"The red thingie indicates a tab, please use spaces only.","commit_id":"dbdb338d3e10157a98359ad3b60856ac774c2cc4"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"ec5176228e83b6c2ed9f288876cc897bb6df2297","unresolved":false,"context_lines":[{"line_number":50,"context_line":"      horizon.Quota.initWithFlavors({{ flavors|safe|default:\"{}\" }});"},{"line_number":51,"context_line":"      horizon.Quota.initWithImages({{ images|safe|default:\"{}\"}},"},{"line_number":52,"context_line":"\t                                 \"{{_(\"Some flavors not meeting image minimums have been disabled.\")}}\","},{"line_number":53,"context_line":"\t                                 \"{{_(\"No flavors meet minimum criteria for selected image.\")}}\");"},{"line_number":54,"context_line":"    });"},{"line_number":55,"context_line":"  }"},{"line_number":56,"context_line":"\u003c/script\u003e"}],"source_content_type":"text/html","patch_set":3,"id":"AAAAPX%2F%2FswE%3D","line":53,"updated":"2013-06-12 15:45:46.000000000","message":"Another lost tab","commit_id":"dbdb338d3e10157a98359ad3b60856ac774c2cc4"}],"openstack_dashboard/dashboards/project/instances/workflows/create_instance.py":[{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"3896eaef32458cf48f1caca8189599fec589e225","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        images \u003d get_available_images(request, context.get(\u0027project_id\u0027),"},{"line_number":244,"context_line":"                                      self._images_cache)"},{"line_number":245,"context_line":"        # cache this for use below, in get_help_text"},{"line_number":246,"context_line":"        self._images \u003d images"},{"line_number":247,"context_line":"        choices \u003d [(image.id, image.name)"},{"line_number":248,"context_line":"                   for image in images"},{"line_number":249,"context_line":"                   if image.properties.get(\"image_type\", \u0027\u0027) !\u003d \"snapshot\"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAARH%2F%2F9Jk%3D","line":246,"updated":"2013-08-14 16:58:51.000000000","message":"It looks strange to define a new cache, when there\u0027s already one defined a few lines before. Are there issues with reusing self._images_cache?","commit_id":"140810eea006237658ec2d939a22bcba0858c826"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"3896eaef32458cf48f1caca8189599fec589e225","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            flavors \u003d json.dumps([f._info for f in"},{"line_number":311,"context_line":"                                       api.nova.flavor_list(self.request)])"},{"line_number":312,"context_line":"            extra[\u0027flavors\u0027] \u003d flavors"},{"line_number":313,"context_line":"            if(self._images is not None):"},{"line_number":314,"context_line":"                extra[\u0027images\u0027] \u003d json.dumps([{\u0027id\u0027: i.id, \u0027min_disk\u0027:"},{"line_number":315,"context_line":"                                               getattr(i, \u0027min_disk\u0027, None),"},{"line_number":316,"context_line":"                                               \u0027min_ram\u0027: getattr(i,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAARH%2F%2F9Ic%3D","line":313,"updated":"2013-08-14 16:58:51.000000000","message":"Nit: It would be more pythonic to not have the parenthesis","commit_id":"140810eea006237658ec2d939a22bcba0858c826"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"3896eaef32458cf48f1caca8189599fec589e225","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                               getattr(i, \u0027min_disk\u0027, None),"},{"line_number":316,"context_line":"                                               \u0027min_ram\u0027: getattr(i,"},{"line_number":317,"context_line":"                                                                  \u0027min_ram\u0027,"},{"line_number":318,"context_line":"                                                                  None)}"},{"line_number":319,"context_line":"                                               for i in self._images])"},{"line_number":320,"context_line":"        except:"},{"line_number":321,"context_line":"            exceptions.handle(self.request,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAARH%2F%2F9IE%3D","line":318,"updated":"2013-08-14 16:58:51.000000000","message":"Nit: The indentation for the dictionary is a bit weird and inconsistent, and could be made more readable.","commit_id":"140810eea006237658ec2d939a22bcba0858c826"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bc96c3d3ff86189ddedb7825ac5956266d9a1f2e","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        except Exception:"},{"line_number":266,"context_line":"            exceptions.handle(self.request,"},{"line_number":267,"context_line":"                              _(\"Unable to retrieve quota information.\"))"},{"line_number":268,"context_line":"        return super(SetInstanceDetailsAction, self).get_help_text(extra)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def _init_images_cache(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATH%2F%2FTPA%3D","line":267,"updated":"2013-10-18 05:22:06.000000000","message":"flavor_list is also called, so this message is confusing.... (though it is not a part of this patch)","commit_id":"f08ba01e832b8b9734663349e9093872976b8a22"}]}
