)]}'
{"horizon/static/framework/util/http/http-batch.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5aa30bb94c66d8a5a7cbcfc36e7beb9fb923f8e8","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.util.http\u0027)"},{"line_number":22,"context_line":"    .factory(\u0027horizon.framework.util.http.httpBatch\u0027, httpBatch);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc service"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_fa2d5ea8","line":22,"updated":"2015-07-29 05:06:39.000000000","message":"Although a factory, the naming pattern for the file is http-batch.service.js\n\nWe have followed that for other factories and you see it in the comments section of the style guide.  We don\u0027t use .factory because choosing between factory or service is arbitrary and we don\u0027t want to change the file name just for that.\n\nhttps://github.com/johnpapa/angular-styleguide#style-y121","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e7e674e38795b019a0eaf0ef79249077d36772e9","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.util.http\u0027)"},{"line_number":22,"context_line":"    .factory(\u0027horizon.framework.util.http.httpBatch\u0027, httpBatch);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc service"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_3528b799","line":22,"in_reply_to":"3a50d1a3_fa2d5ea8","updated":"2015-07-29 05:23:05.000000000","message":"++ looks like Travis memorized the style guide.","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5aa30bb94c66d8a5a7cbcfc36e7beb9fb923f8e8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   *  users: keystoneAPI.getUsers(),"},{"line_number":32,"context_line":"   *  settings: settingAPI.getSetting(\u0027SETTING\u0027, \u0027default\u0027)"},{"line_number":33,"context_line":"   * };"},{"line_number":34,"context_line":"   * httpBatch.batch(async).then(function(response) {"},{"line_number":35,"context_line":"   *  console.log(response.roles);"},{"line_number":36,"context_line":"   *  console.log(response.users);"},{"line_number":37,"context_line":"   *  console.log(response.settings);"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_1ad5aae3","line":34,"updated":"2015-07-29 05:06:39.000000000","message":"just to align with style guide, the doc here should not use anonymous function as example.\n\nhttps://github.com/johnpapa/angular-styleguide#style-y024\n\nThe simple example is good, but I also think it would be good to show the three functions being passed into the batch API for response handling in the then(), indicating that they are optional (just like you have below.\n\nhttpBatch.bath(async).then(onSuccess, onFailure, onUpdate);\n\nWhere:\n\nonSuccess is the function called if all the calls resolve\nonFailure is the function called if any of the calls have an error or are rejected for another reason.\nonUpdate provides updates on the status of the promise\u0027s execution. This may be called multiple times before the promise is either resolved or rejected\n\nPlease note I don\u0027t want the second argument to be documented as strictly an error case.  Our helper services use that in other examples such as checking if a certain service is enabled in the service catalog.\n\nhttps://github.com/openstack/horizon/blob/master/openstack_dashboard/static/openstack-service-api/keystone.service.js#L386","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"2e91ee3c6987ffa272166e92c0ed125f6ec5690b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"   *  console.log(response.settings);"},{"line_number":38,"context_line":"   * });"},{"line_number":39,"context_line":"   */"},{"line_number":40,"context_line":"  function httpBatch($http, $q) {"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    var service \u003d { batch: batch };"},{"line_number":43,"context_line":"    return service;"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_552303bd","line":40,"updated":"2015-07-29 05:27:37.000000000","message":"$http is not used.  This actually doesn\u0027t seem to have anything specific to http in it and I\u0027m now a little confused about the value this patch provides?\n\nCouldn\u0027t all of the above be done with:\n\n$q.defer().all(async).then(function(d){\n  console.log(d.roles);\n  console.log(d.users);\netc...\n\nSee: expanded form of above here in usage:\n\nhttps://github.com/openstack/horizon/blob/master/openstack_dashboard/static/openstack-service-api/keystone.service.js#L391","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"}],"horizon/static/framework/util/http/http-batch.spec.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5aa30bb94c66d8a5a7cbcfc36e7beb9fb923f8e8","unresolved":false,"context_lines":[{"line_number":13,"context_line":" * See the License for the specific language governing permissions and"},{"line_number":14,"context_line":" * limitations under the License."},{"line_number":15,"context_line":" */"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"(function () {"},{"line_number":18,"context_line":"  \u0027use strict\u0027;"},{"line_number":19,"context_line":""}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_d52b9380","line":16,"updated":"2015-07-29 05:06:39.000000000","message":"File name should be http-batch.service.spec.js","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5aa30bb94c66d8a5a7cbcfc36e7beb9fb923f8e8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    var mocked_q \u003d {"},{"line_number":36,"context_line":"      defer: function() { return mocked_defer; },"},{"line_number":37,"context_line":"      all: function() { return mocked_promise; }"},{"line_number":38,"context_line":"    };"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    beforeEach(module(\u0027horizon.framework.util.http\u0027));"},{"line_number":41,"context_line":"    beforeEach(module(function($provide) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_152edb8b","line":38,"updated":"2015-07-29 05:06:39.000000000","message":"Should mocks be in http-back.service.mocks.js?  We discussed at meetup, but not sure we decided on clear cut rule here.  In this case, probably not.","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5aa30bb94c66d8a5a7cbcfc36e7beb9fb923f8e8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"      expect(batchService.batch).toBeDefined();"},{"line_number":55,"context_line":"    });"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    it(\u0027should invoke success, error, and update function on complete\u0027, function() {"},{"line_number":58,"context_line":"      batchService.batch();"},{"line_number":59,"context_line":"      expect(mocked_defer.resolve).toHaveBeenCalled();"},{"line_number":60,"context_line":"      expect(mocked_defer.reject).toHaveBeenCalled();"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_d5e2b3d4","line":57,"updated":"2015-07-29 05:06:39.000000000","message":"This took a minute to read, but it makes sense.\n\nWould be good to make sure that batch itself returns a object (better if a promise).","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"}],"horizon/static/framework/util/http/http.module.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5aa30bb94c66d8a5a7cbcfc36e7beb9fb923f8e8","unresolved":false,"context_lines":[{"line_number":11,"context_line":" * See the License for the specific language governing permissions and"},{"line_number":12,"context_line":" * limitations under the License."},{"line_number":13,"context_line":" */"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"(function() {"},{"line_number":16,"context_line":"  \u0027use strict\u0027;"},{"line_number":17,"context_line":""}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_b5060784","line":14,"updated":"2015-07-29 05:06:39.000000000","message":"Would have been better in own patch, but I think this whole thing will go through quickly.","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"}],"horizon/static/framework/util/http/http.spec.js":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e7e674e38795b019a0eaf0ef79249077d36772e9","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    it(\u0027should call error on a bad PUT response\u0027, function () {"},{"line_number":80,"context_line":"      testBadCall(api.put, \u0027PUT\u0027);"},{"line_number":81,"context_line":"    });"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    it(\u0027should call success on a good DELETE response\u0027, function () {"},{"line_number":84,"context_line":"      testGoodCall(api.delete, \u0027DELETE\u0027);"}],"source_content_type":"text/javascript","patch_set":5,"id":"3a50d1a3_10b3494e","line":81,"updated":"2015-07-29 05:23:05.000000000","message":"seems like a spill-over from: https://review.openstack.org/#/c/206639/","commit_id":"ca6479664fcad938a135d0bed8bbac56fedb3b68"}]}
