)]}'
{"openstack_dashboard/static/dashboard/launch-instance/source/source.js":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"a333c28a5aaaf08ef0857e84ecdb638f31969c9e","unresolved":false,"context_lines":[{"line_number":377,"context_line":"      var instance_count \u003d $scope.model.newInstanceSpec.instance_count || 1;"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"      var data \u003d $scope.instanceStats.data;"},{"line_number":380,"context_line":"      var added \u003d selection.length * instance_count;"},{"line_number":381,"context_line":"      var remaining \u003d Math.max(0, maxTotalInstances - totalInstancesUsed - added);"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"      $scope.instanceStats.maxLimit \u003d maxTotalInstances;"}],"source_content_type":"text/javascript","patch_set":5,"id":"dac4157f_bd4f9591","side":"PARENT","line":380,"updated":"2015-04-20 23:39:39.000000000","message":"what does \"selection\" bind to?  It would be nice if this had a more descriptive name.","commit_id":"106a262c718aaeeea2dcacafe2000ec9b1f99b0f"},{"author":{"_account_id":11098,"name":"Brian Tully","email":"brian.tully@hpe.com","username":"btully"},"change_message_id":"f45d4511a47020a7f6bb2b8ceae15951d7c8018a","unresolved":false,"context_lines":[{"line_number":377,"context_line":"      var instance_count \u003d $scope.model.newInstanceSpec.instance_count || 1;"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"      var data \u003d $scope.instanceStats.data;"},{"line_number":380,"context_line":"      var added \u003d selection.length * instance_count;"},{"line_number":381,"context_line":"      var remaining \u003d Math.max(0, maxTotalInstances - totalInstancesUsed - added);"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"      $scope.instanceStats.maxLimit \u003d maxTotalInstances;"}],"source_content_type":"text/javascript","patch_set":5,"id":"dac4157f_18d42e45","side":"PARENT","line":380,"in_reply_to":"dac4157f_bd4f9591","updated":"2015-04-21 16:25:57.000000000","message":"Good question. Selection is defined up above and has to do with which boot source has been selected/allocated from within the transfer table. In other words, the previous iteration would watch which source had been manually selected before updating the quota chart. Some found this to be confusing (\u0027why is it that when I increase the instance count, the chart does not update?\u0027), so we now bind the chart data directly to instance count, regardless of whether a boot source has been selected/allocated. Hope that clarifies things :)","commit_id":"106a262c718aaeeea2dcacafe2000ec9b1f99b0f"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"569a0b49bd6b49c231d2c8dae56fe8a94f0a9e2a","unresolved":false,"context_lines":[{"line_number":377,"context_line":"      var instance_count \u003d $scope.model.newInstanceSpec.instance_count || 1;"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"      var data \u003d $scope.instanceStats.data;"},{"line_number":380,"context_line":"      var added \u003d selection.length * instance_count;"},{"line_number":381,"context_line":"      var remaining \u003d Math.max(0, maxTotalInstances - totalInstancesUsed - added);"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"      $scope.instanceStats.maxLimit \u003d maxTotalInstances;"}],"source_content_type":"text/javascript","patch_set":5,"id":"dac4157f_f88d1b7c","side":"PARENT","line":380,"in_reply_to":"dac4157f_bd4f9591","updated":"2015-04-20 23:49:32.000000000","message":"maybe sourceSelection?","commit_id":"106a262c718aaeeea2dcacafe2000ec9b1f99b0f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5c2dea8aada85bbf949332c01c8fc8c6f18be230","unresolved":false,"context_lines":[{"line_number":382,"context_line":"      data[0].value \u003d totalInstancesUsed;"},{"line_number":383,"context_line":"      data[1].value \u003d added;"},{"line_number":384,"context_line":"      data[2].value \u003d remaining;"},{"line_number":385,"context_line":"      var quotaCalc \u003d Math.ceil((totalInstancesUsed + added) / maxTotalInstances * 100);"},{"line_number":386,"context_line":"      $scope.instanceStats.overMax \u003d quotaCalc \u003e 100 ? true : false;"},{"line_number":387,"context_line":"      $scope.instanceStats.label \u003d quotaCalc + \u0027%\u0027;"},{"line_number":388,"context_line":"      $scope.instanceStats \u003d angular.extend({}, $scope.instanceStats);"}],"source_content_type":"text/javascript","patch_set":10,"id":"3acd31a7_60048649","line":385,"updated":"2015-05-03 01:37:53.000000000","message":"Why doesn\u0027t this use Math.round instead of Math.ceil or Math.floor.  It does funny things like make 11 used out of 10 allowed to be 111%.\n\nMath.ceil((0+11) / 10 *100);\n111\n\nSwitching that to Math.floor works here:\n\nMath.floor((0+11) / 10 *100);\n\n110\n\nBut then Math.floor is wrong in other cases (9 out of 11 used is 81.81%:\n\nMath.floor((1+8) / 11 *100);\n\n81\n\nMath.ceil looks right here:\n\nMath.ceil((1+8) / 11 *100);\n\n82\n\nBut Math.round seems to work in both cases:\n\nMath.round((1+8) / 11 * 100);","commit_id":"baffbd25a8825e53585375816fb9c25367e5ec57"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"0a9e69bb7a8aee0baf04844b8679a505920c8a56","unresolved":false,"context_lines":[{"line_number":382,"context_line":"      data[0].value \u003d totalInstancesUsed;"},{"line_number":383,"context_line":"      data[1].value \u003d added;"},{"line_number":384,"context_line":"      data[2].value \u003d remaining;"},{"line_number":385,"context_line":"      var quotaCalc \u003d Math.ceil((totalInstancesUsed + added) / maxTotalInstances * 100);"},{"line_number":386,"context_line":"      $scope.instanceStats.overMax \u003d quotaCalc \u003e 100 ? true : false;"},{"line_number":387,"context_line":"      $scope.instanceStats.label \u003d quotaCalc + \u0027%\u0027;"},{"line_number":388,"context_line":"      $scope.instanceStats \u003d angular.extend({}, $scope.instanceStats);"}],"source_content_type":"text/javascript","patch_set":10,"id":"3acd31a7_20956edd","line":385,"in_reply_to":"3acd31a7_60048649","updated":"2015-05-03 01:45:09.000000000","message":"Got cut of at the end:\n\nMath.round((1+8) / 11 * 100);\n\n82\n\nMath.round((0+11) / 10 * 100);\n\n110","commit_id":"baffbd25a8825e53585375816fb9c25367e5ec57"}],"openstack_dashboard/static/dashboard/launch-instance/source/source.spec.js":[{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"ae98e2dc064c5b28666d04daf67e9d6871e2d25a","unresolved":false,"context_lines":[{"line_number":215,"context_line":"          });"},{"line_number":216,"context_line":"        });"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        describe(\u0027instanceCount watcher\u0027, function() {"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"          it(\u0027should reset instance count to 1 if instance count set to 0\u0027, function() {"},{"line_number":221,"context_line":"            scope.model.newInstanceSpec.instance_count \u003d 0;"}],"source_content_type":"text/javascript","patch_set":6,"id":"bab921fb_38a73e51","line":218,"updated":"2015-04-22 22:10:11.000000000","message":"as mentioned in the other patch, i don\u0027t think we need instanceCount watcher, since this functionality will be covered in source allocation.","commit_id":"bc719d65befde3871f53869da974a356521fd3f7"},{"author":{"_account_id":11098,"name":"Brian Tully","email":"brian.tully@hpe.com","username":"btully"},"change_message_id":"cc8e681e03ceb50e245edb5571f1dee505631587","unresolved":false,"context_lines":[{"line_number":215,"context_line":"          });"},{"line_number":216,"context_line":"        });"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        describe(\u0027instanceCount watcher\u0027, function() {"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"          it(\u0027should reset instance count to 1 if instance count set to 0\u0027, function() {"},{"line_number":221,"context_line":"            scope.model.newInstanceSpec.instance_count \u003d 0;"}],"source_content_type":"text/javascript","patch_set":6,"id":"bab921fb_a4d8c0f0","line":218,"in_reply_to":"bab921fb_38a73e51","updated":"2015-04-23 06:19:24.000000000","message":"I actually removed the chart data watcher for allocated and deallocated since that no longer applies. The instanceCount watcher is needed because we want to check that the count is getting reset to 1 if the user manually enters 0 or a negative number like -1 in the instance count field, i.e., the count should always get set to 1 as a minimum. This is a separate feature that we need to test that differs from source allocation :)","commit_id":"bc719d65befde3871f53869da974a356521fd3f7"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5c2dea8aada85bbf949332c01c8fc8c6f18be230","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            scope.$digest();"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"            // check chart data and labels"},{"line_number":207,"context_line":"            expect(scope.instanceStats.label).toBe(\u0027111%\u0027);"},{"line_number":208,"context_line":"            expect(scope.instanceStats.data[0].value).toEqual(0);"},{"line_number":209,"context_line":"            expect(scope.instanceStats.data[1].value).toEqual(11);"},{"line_number":210,"context_line":"            expect(scope.instanceStats.data[2].value).toEqual(0);"}],"source_content_type":"text/javascript","patch_set":10,"id":"3acd31a7_c0cb5a1d","line":207,"updated":"2015-05-03 01:37:53.000000000","message":"I think this test is just getting around a bug over in source.js.  See line 385. I put a comment there.\n\nHow does 11 equal 111% and not 110%?\n\nSee the same thing with 22.  It shows 221% and not 220%.","commit_id":"baffbd25a8825e53585375816fb9c25367e5ec57"}]}
