)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"14758122b4d696326305c66ec9da24710e39f30d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"event. However, promises have additional benefits and avoid"},{"line_number":19,"context_line":"some of the problems of events."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"One advantage is that romises make it easy to \"chain\" multiple"},{"line_number":22,"context_line":"handlers to a single success or failure. For example, once ALL"},{"line_number":23,"context_line":"of these actions have completed successfully, then update a status"},{"line_number":24,"context_line":"iPcon."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afc51ec_18878862","line":21,"range":{"start_line":21,"start_character":22,"end_line":21,"end_character":23},"updated":"2016-03-11 18:27:38.000000000","message":"\"promises\"","commit_id":"a21f18565eac63cdf64ef47425e1aeae168a0b0f"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"14758122b4d696326305c66ec9da24710e39f30d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"One advantage is that romises make it easy to \"chain\" multiple"},{"line_number":22,"context_line":"handlers to a single success or failure. For example, once ALL"},{"line_number":23,"context_line":"of these actions have completed successfully, then update a status"},{"line_number":24,"context_line":"iPcon."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Also, promises don\u0027t require that the caller have a parent scope."},{"line_number":27,"context_line":"In angular, events \"bubble\" from child scope to the parent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afc51ec_78f32c0b","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":2},"updated":"2016-03-11 18:27:38.000000000","message":"\"icon\"","commit_id":"a21f18565eac63cdf64ef47425e1aeae168a0b0f"}],"horizon/static/framework/util/actions/action-result.service.js":[{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":41,"context_line":"   * stack multiple result items."},{"line_number":42,"context_line":"   * @example"},{"line_number":43,"context_line":"   ```"},{"line_number":44,"context_line":"   return getActionResult().updated(\u0027OS::Glance::Image\u0027, id).result;"},{"line_number":45,"context_line":"   ```"},{"line_number":46,"context_line":"   */"},{"line_number":47,"context_line":"  function factory() {"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_87440d4a","line":44,"updated":"2016-04-21 04:20:33.000000000","message":"I feel that at the end of the above documentation I don\u0027t actually know what the above code has done, or what the .result value is, or how it\u0027s intended to be used...","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"9f8a389382e6cd46fd4e36c85f7ddc0e75a6071a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"   * stack multiple result items."},{"line_number":42,"context_line":"   * @example"},{"line_number":43,"context_line":"   ```"},{"line_number":44,"context_line":"   return getActionResult().updated(\u0027OS::Glance::Image\u0027, id).result;"},{"line_number":45,"context_line":"   ```"},{"line_number":46,"context_line":"   */"},{"line_number":47,"context_line":"  function factory() {"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_47164756","line":44,"in_reply_to":"1a122d0e_7f479a4b","updated":"2016-04-21 20:42:47.000000000","message":"Done","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"   * stack multiple result items."},{"line_number":42,"context_line":"   * @example"},{"line_number":43,"context_line":"   ```"},{"line_number":44,"context_line":"   return getActionResult().updated(\u0027OS::Glance::Image\u0027, id).result;"},{"line_number":45,"context_line":"   ```"},{"line_number":46,"context_line":"   */"},{"line_number":47,"context_line":"  function factory() {"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_7f479a4b","line":44,"in_reply_to":"1a122d0e_87440d4a","updated":"2016-04-21 14:29:49.000000000","message":"yeah, maybe some tangible examples would be good. :)","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"740be7bab599bce2fc551e3bad6c40f8b846e104","unresolved":false,"context_lines":[{"line_number":42,"context_line":"     .deleted(\u0027OS::Glance::Image\u0027, id1)"},{"line_number":43,"context_line":"     .deleted(\u0027OS::Glance::Image\u0027, id2)"},{"line_number":44,"context_line":"     .deleted(\u0027OS::Glance::Image\u0027, id3)"},{"line_number":45,"context_line":"     .result;"},{"line_number":46,"context_line":"   ```"},{"line_number":47,"context_line":"   */"},{"line_number":48,"context_line":"  function factory() {"}],"source_content_type":"text/javascript","patch_set":16,"id":"1a122d0e_d3d14231","line":45,"updated":"2016-05-03 22:53:12.000000000","message":"... \"this will result in ... \" something something happening in the something something that can be used somewhere else maybe? This example shows one side of the use of this API (production of \"events\"), but not the other (consumption of them).","commit_id":"b5259dd67c1336efa19b21a002a2975c48b48600"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0c4ea16872666e4d29a24be59e692881294c173b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"     .deleted(\u0027OS::Glance::Image\u0027, id1)"},{"line_number":43,"context_line":"     .deleted(\u0027OS::Glance::Image\u0027, id2)"},{"line_number":44,"context_line":"     .deleted(\u0027OS::Glance::Image\u0027, id3)"},{"line_number":45,"context_line":"     .result;"},{"line_number":46,"context_line":"   ```"},{"line_number":47,"context_line":"   */"},{"line_number":48,"context_line":"  function factory() {"}],"source_content_type":"text/javascript","patch_set":16,"id":"1a122d0e_4b060421","line":45,"in_reply_to":"1a122d0e_d3d14231","updated":"2016-05-04 12:58:46.000000000","message":"Yeah, I can demonstrate that a little more...thanks!","commit_id":"b5259dd67c1336efa19b21a002a2975c48b48600"}],"horizon/static/framework/util/actions/action-result.service.spec.js":[{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"a01d54c549e75a554708ba2125af302cded8b1f5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"          .toEqual([{type: \u0027OS::Nova::Server\u0027, id: \u0027the-id-value\u0027}]);"},{"line_number":46,"context_line":"      });"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"      it(\u0027.created() adds updated items\u0027, function() {"},{"line_number":49,"context_line":"        actionResult.created(type, id);"},{"line_number":50,"context_line":"        expect(actionResult.result.created)"},{"line_number":51,"context_line":"          .toEqual([{type: \u0027OS::Nova::Server\u0027, id: \u0027the-id-value\u0027}]);"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a122d0e_fe95de86","line":48,"range":{"start_line":48,"start_character":26,"end_line":48,"end_character":33},"updated":"2016-04-19 18:12:06.000000000","message":"created","commit_id":"927cfb7d5aa6c8cf23d17e646deaa56de9235fff"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"a01d54c549e75a554708ba2125af302cded8b1f5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"          .toEqual([{type: \u0027OS::Nova::Server\u0027, id: \u0027the-id-value\u0027}]);"},{"line_number":52,"context_line":"      });"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      it(\u0027.deleted() adds updated items\u0027, function() {"},{"line_number":55,"context_line":"        actionResult.deleted(type, id);"},{"line_number":56,"context_line":"        expect(actionResult.result.deleted)"},{"line_number":57,"context_line":"          .toEqual([{type: \u0027OS::Nova::Server\u0027, id: \u0027the-id-value\u0027}]);"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a122d0e_5e8fb274","line":54,"range":{"start_line":54,"start_character":26,"end_line":54,"end_character":33},"updated":"2016-04-19 18:12:06.000000000","message":"deleted","commit_id":"927cfb7d5aa6c8cf23d17e646deaa56de9235fff"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"a01d54c549e75a554708ba2125af302cded8b1f5","unresolved":false,"context_lines":[{"line_number":57,"context_line":"          .toEqual([{type: \u0027OS::Nova::Server\u0027, id: \u0027the-id-value\u0027}]);"},{"line_number":58,"context_line":"      });"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"      it(\u0027.failed() adds updated items\u0027, function() {"},{"line_number":61,"context_line":"        actionResult.failed(type, id);"},{"line_number":62,"context_line":"        expect(actionResult.result.failed)"},{"line_number":63,"context_line":"          .toEqual([{type: \u0027OS::Nova::Server\u0027, id: \u0027the-id-value\u0027}]);"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a122d0e_9eeb0a13","line":60,"range":{"start_line":60,"start_character":24,"end_line":60,"end_character":32},"updated":"2016-04-19 18:12:06.000000000","message":"failed","commit_id":"927cfb7d5aa6c8cf23d17e646deaa56de9235fff"}],"openstack_dashboard/static/app/core/core.module.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"17a0c8339de1cb62096742aae959bbbf6c78b333","unresolved":false,"context_lines":[{"line_number":41,"context_line":"      \u0027horizon.framework.widgets\u0027,"},{"line_number":42,"context_line":"      \u0027horizon.dashboard.project.workflow\u0027"},{"line_number":43,"context_line":"    ], config)"},{"line_number":44,"context_line":"    .constant(\u0027horizon.app.core.volumeResourceType\u0027, VOLUME_RESOURCE_TYPE)"},{"line_number":45,"context_line":"    .run(["},{"line_number":46,"context_line":"      \u0027horizon.framework.conf.resource-type-registry.service\u0027,"},{"line_number":47,"context_line":"      performRegistrations"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_b5b26e94","line":44,"updated":"2016-05-05 05:02:20.000000000","message":"This constant doesn\u0027t align in the naming convention used with images:\n\nhttps://review.openstack.org/#/c/291846/18/openstack_dashboard/static/app/core/images/actions/delete-image.service.js\n\n\u0027horizon.app.core.images.resourceType\u0027\n\nNeed to decide on one way and be consistent.","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"5b57f9dc98feadc51433082a5ca4e9a05f930652","unresolved":false,"context_lines":[{"line_number":41,"context_line":"      \u0027horizon.framework.widgets\u0027,"},{"line_number":42,"context_line":"      \u0027horizon.dashboard.project.workflow\u0027"},{"line_number":43,"context_line":"    ], config)"},{"line_number":44,"context_line":"    .constant(\u0027horizon.app.core.volumeResourceType\u0027, VOLUME_RESOURCE_TYPE)"},{"line_number":45,"context_line":"    .run(["},{"line_number":46,"context_line":"      \u0027horizon.framework.conf.resource-type-registry.service\u0027,"},{"line_number":47,"context_line":"      performRegistrations"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_b016eaa4","line":44,"in_reply_to":"1a122d0e_b5b26e94","updated":"2016-05-05 14:16:51.000000000","message":"I actually don\u0027t really like this addition (the var up above and the constant here); I\u0027ll take it out.  It can be added in properly when we build out the volume functionality.","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"}],"openstack_dashboard/static/app/core/images/actions/delete-image.service.js":[{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"3fbafa05230de6af50a042f7a4b85fa40e78fa54","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        failed: []"},{"line_number":121,"context_line":"      };"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"      result.failed \u003d deleteModalResult.fail.map( mapModalResult );"},{"line_number":124,"context_line":"      result.deleted \u003d deleteModalResult.pass.map( mapModalResult );"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"      return result;"}],"source_content_type":"text/javascript","patch_set":3,"id":"3afc51ec_202166fc","line":123,"range":{"start_line":123,"start_character":6,"end_line":123,"end_character":19},"updated":"2016-03-11 21:28:52.000000000","message":"could just assign in the result declaration","commit_id":"f9b33150c276c810bc04a2891c315f1845342b46"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"3fbafa05230de6af50a042f7a4b85fa40e78fa54","unresolved":false,"context_lines":[{"line_number":121,"context_line":"      };"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"      result.failed \u003d deleteModalResult.fail.map( mapModalResult );"},{"line_number":124,"context_line":"      result.deleted \u003d deleteModalResult.pass.map( mapModalResult );"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"      return result;"},{"line_number":127,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":3,"id":"3afc51ec_a083b6cb","line":124,"range":{"start_line":124,"start_character":6,"end_line":124,"end_character":20},"updated":"2016-03-11 21:28:52.000000000","message":"ditto","commit_id":"f9b33150c276c810bc04a2891c315f1845342b46"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"4533e0e0e308fb6593bdf192e8f1a1a996a3889e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      return outcome;"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    function createResult(deleteModalResult) {"},{"line_number":114,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":115,"context_line":"      // from the deleteModal into a standard form"},{"line_number":116,"context_line":"      return {"}],"source_content_type":"text/javascript","patch_set":9,"id":"5a18252c_bec65d14","line":113,"updated":"2016-04-12 00:19:19.000000000","message":"Naming nit: A blurring of terminology here... \"createResult\" takes \"deleteModalResult\" which returns various items.","commit_id":"bcf59a4586920e580360de9df7a5b35737db50a4"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"109c23ddd925788216618f209b9de27b974a80f7","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      return outcome;"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    function createResult(deleteModalResult) {"},{"line_number":114,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":115,"context_line":"      // from the deleteModal into a standard form"},{"line_number":116,"context_line":"      return {"}],"source_content_type":"text/javascript","patch_set":9,"id":"5a18252c_6effcf01","line":113,"in_reply_to":"5a18252c_bec65d14","updated":"2016-04-12 14:59:50.000000000","message":"This is intentional. This function is passed the result of the call to deleteModal.open, and is creating a result to return from the delete image service.","commit_id":"bcf59a4586920e580360de9df7a5b35737db50a4"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(markDeleted);"},{"line_number":120,"context_line":"      deleteModalResult.fail.forEach(markFailed);"},{"line_number":121,"context_line":"      return actionResult.result;"},{"line_number":122,"context_line":""}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_87e08d2a","line":119,"updated":"2016-04-21 04:20:33.000000000","message":"This code was quite confusing at first glance. I think it\u0027d make a lot more sense when reading through if the function here and on the next line were inline.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"9f8a389382e6cd46fd4e36c85f7ddc0e75a6071a","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(markDeleted);"},{"line_number":120,"context_line":"      deleteModalResult.fail.forEach(markFailed);"},{"line_number":121,"context_line":"      return actionResult.result;"},{"line_number":122,"context_line":""}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_22fe9905","line":119,"in_reply_to":"1a122d0e_7c02080d","updated":"2016-04-21 20:42:47.000000000","message":"Done","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(markDeleted);"},{"line_number":120,"context_line":"      deleteModalResult.fail.forEach(markFailed);"},{"line_number":121,"context_line":"      return actionResult.result;"},{"line_number":122,"context_line":""}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_7c02080d","line":119,"in_reply_to":"1a122d0e_87e08d2a","updated":"2016-04-21 14:29:49.000000000","message":"seems reasonable...sure!","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"17a0c8339de1cb62096742aae959bbbf6c78b333","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    function createResult(deleteModalResult) {"},{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(function markDeleted(item) {"},{"line_number":120,"context_line":"        actionResult.deleted(imagesResourceType, getEntity(item).id);"},{"line_number":121,"context_line":"      });"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_b540ae60","line":118,"updated":"2016-05-05 05:02:20.000000000","message":"We are going to end up doing this everywhere. Is there a place this could be made common?  Or maybe delete modal should return both formats?  (boo).\n\nI\u0027m not -1\u0027ing on this patch over this issue, but it does seem there is room for improvement. Thoughts?","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"daa32af07eae2bde39989684c2e8de239c317cd4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    function createResult(deleteModalResult) {"},{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(function markDeleted(item) {"},{"line_number":120,"context_line":"        actionResult.deleted(imagesResourceType, getEntity(item).id);"},{"line_number":121,"context_line":"      });"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_b0dc2519","line":118,"in_reply_to":"1a122d0e_50131101","updated":"2016-05-05 14:45:09.000000000","message":"Yeah, that\u0027s true, but I think adding layers of abstraction with only one implementation is usually a bad thing...I agree entirely that we need a more abstracted service, but let\u0027s do that as part of the instance buildout, otherwise we\u0027ll be arguing patterns that haven\u0027t been established yet.","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"5b57f9dc98feadc51433082a5ca4e9a05f930652","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    function createResult(deleteModalResult) {"},{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(function markDeleted(item) {"},{"line_number":120,"context_line":"        actionResult.deleted(imagesResourceType, getEntity(item).id);"},{"line_number":121,"context_line":"      });"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_e1b9b6ed","line":118,"in_reply_to":"1a122d0e_b540ae60","updated":"2016-05-05 14:16:51.000000000","message":"Sorry, which \u0027this\u0027 do you mean?  I just don\u0027t understand the comment.","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5328aaa404530b339781e7e9143d72df2ad0c052","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    function createResult(deleteModalResult) {"},{"line_number":116,"context_line":"      // To make the result of this action generically useful, reformat the return"},{"line_number":117,"context_line":"      // from the deleteModal into a standard form"},{"line_number":118,"context_line":"      var actionResult \u003d actionResultService.getActionResult();"},{"line_number":119,"context_line":"      deleteModalResult.pass.forEach(function markDeleted(item) {"},{"line_number":120,"context_line":"        actionResult.deleted(imagesResourceType, getEntity(item).id);"},{"line_number":121,"context_line":"      });"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_50131101","line":118,"in_reply_to":"1a122d0e_e1b9b6ed","updated":"2016-05-05 14:41:20.000000000","message":"I mean we\u0027ll have to take the delete modal result and reMap it everywhere.  I mean this chunk of code will exist in every delete action.  \n\nMaybe delete modal result should have a helper function asActionResult(resourceType) where you can just pass in the resourceType and it would do the both of the loops below for you?\n\ndeleteModalResult.pass.forEach(function markDeleted(item) {\n        actionResult.deleted(imagesResourceType, getEntity(item).id);\n      });","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"}],"openstack_dashboard/static/app/core/images/actions/delete-image.service.spec.js":[{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        var context \u003d deleteModalService.open.calls.argsFor(0)[2];"},{"line_number":170,"context_line":"        expect(deleteModalService.open).toHaveBeenCalled();"},{"line_number":171,"context_line":"        expect(context.successEvent).toEqual(undefined);"},{"line_number":172,"context_line":"      }"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"      function testValids() {"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_47403507","line":171,"updated":"2016-04-21 04:20:33.000000000","message":"I\u0027m not sure what the point of this assertion is.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"9f8a389382e6cd46fd4e36c85f7ddc0e75a6071a","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        var context \u003d deleteModalService.open.calls.argsFor(0)[2];"},{"line_number":170,"context_line":"        expect(deleteModalService.open).toHaveBeenCalled();"},{"line_number":171,"context_line":"        expect(context.successEvent).toEqual(undefined);"},{"line_number":172,"context_line":"      }"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"      function testValids() {"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_0251dd0e","line":171,"in_reply_to":"1a122d0e_1fa4a606","updated":"2016-04-21 20:42:47.000000000","message":"This entire test is bunk.  We\u0027re not using events.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        var context \u003d deleteModalService.open.calls.argsFor(0)[2];"},{"line_number":170,"context_line":"        expect(deleteModalService.open).toHaveBeenCalled();"},{"line_number":171,"context_line":"        expect(context.successEvent).toEqual(undefined);"},{"line_number":172,"context_line":"      }"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"      function testValids() {"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_1fa4a606","line":171,"in_reply_to":"1a122d0e_47403507","updated":"2016-04-21 14:29:49.000000000","message":"I\u0027ll review this","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"}],"openstack_dashboard/static/app/core/images/actions/edit.action.service.js":[{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2abef2f52f9112bf01ed752f9568683ee47c0143","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  editService.$inject \u003d ["},{"line_number":23,"context_line":"    \u0027$q\u0027,"},{"line_number":24,"context_line":"    \u0027horizon.app.core.images.events\u0027,"},{"line_number":25,"context_line":"    \u0027horizon.app.core.images.actions.editWorkflow\u0027,"},{"line_number":26,"context_line":"    \u0027horizon.app.core.metadata.service\u0027,"},{"line_number":27,"context_line":"    \u0027horizon.app.core.openstack-service-api.glance\u0027,"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_26818490","side":"PARENT","line":24,"updated":"2016-04-22 03:41:44.000000000","message":"This is no longer needed.","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"21e9b21f3db0c54879b3896154908c68211423c6","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  editService.$inject \u003d ["},{"line_number":23,"context_line":"    \u0027$q\u0027,"},{"line_number":24,"context_line":"    \u0027horizon.app.core.images.events\u0027,"},{"line_number":25,"context_line":"    \u0027horizon.app.core.images.actions.editWorkflow\u0027,"},{"line_number":26,"context_line":"    \u0027horizon.app.core.metadata.service\u0027,"},{"line_number":27,"context_line":"    \u0027horizon.app.core.openstack-service-api.glance\u0027,"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_b5800548","side":"PARENT","line":24,"in_reply_to":"1a122d0e_26818490","updated":"2016-04-22 13:08:37.000000000","message":"Yep, will remove next update.","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2abef2f52f9112bf01ed752f9568683ee47c0143","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   */"},{"line_number":40,"context_line":"  function editService("},{"line_number":41,"context_line":"    $q,"},{"line_number":42,"context_line":"    events,"},{"line_number":43,"context_line":"    editWorkflow,"},{"line_number":44,"context_line":"    metadataService,"},{"line_number":45,"context_line":"    glance,"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_c67370e6","side":"PARENT","line":42,"updated":"2016-04-22 03:41:44.000000000","message":"This is no longer needed.","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"21e9b21f3db0c54879b3896154908c68211423c6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   */"},{"line_number":40,"context_line":"  function editService("},{"line_number":41,"context_line":"    $q,"},{"line_number":42,"context_line":"    events,"},{"line_number":43,"context_line":"    editWorkflow,"},{"line_number":44,"context_line":"    metadataService,"},{"line_number":45,"context_line":"    glance,"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_f5927d9e","side":"PARENT","line":42,"in_reply_to":"1a122d0e_c67370e6","updated":"2016-04-22 13:08:37.000000000","message":"Yep, will remove next update.","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    //////////////"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    // include this function in your service"},{"line_number":74,"context_line":"    // if you plan to emit events to the parent controller"},{"line_number":75,"context_line":"    function initScope($scope) {"},{"line_number":76,"context_line":"      var watchImageChange \u003d $scope.$on(events.IMAGE_CHANGED, onImageChange);"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_87236d55","side":"PARENT","line":73,"updated":"2016-04-21 04:20:33.000000000","message":"... because? :-)","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"9f8a389382e6cd46fd4e36c85f7ddc0e75a6071a","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    //////////////"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    // include this function in your service"},{"line_number":74,"context_line":"    // if you plan to emit events to the parent controller"},{"line_number":75,"context_line":"    function initScope($scope) {"},{"line_number":76,"context_line":"      var watchImageChange \u003d $scope.$on(events.IMAGE_CHANGED, onImageChange);"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_a240e936","side":"PARENT","line":73,"in_reply_to":"1a122d0e_3f9242a0","updated":"2016-04-21 20:42:47.000000000","message":"Done","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    //////////////"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    // include this function in your service"},{"line_number":74,"context_line":"    // if you plan to emit events to the parent controller"},{"line_number":75,"context_line":"    function initScope($scope) {"},{"line_number":76,"context_line":"      var watchImageChange \u003d $scope.$on(events.IMAGE_CHANGED, onImageChange);"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_3f9242a0","side":"PARENT","line":73,"in_reply_to":"1a122d0e_87236d55","updated":"2016-04-21 14:29:49.000000000","message":"I can remove that comment if you\u0027d like.  I didn\u0027t write it...","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    function perform(image) {"},{"line_number":109,"context_line":"      var deferred \u003d glance.getImage(image.id);"},{"line_number":110,"context_line":"      deferred.then(onLoad);"},{"line_number":111,"context_line":"      scope.imagePromise \u003d deferred;"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"      function onLoad(response) {"},{"line_number":114,"context_line":"        var localImage \u003d response.data;"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_47dcb545","side":"PARENT","line":111,"updated":"2016-04-21 04:20:33.000000000","message":"Doesn\u0027t the reliance on the encapsulating scope break the basic separation we\u0027re trying to achieve with these resource type things?","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    function perform(image) {"},{"line_number":109,"context_line":"      var deferred \u003d glance.getImage(image.id);"},{"line_number":110,"context_line":"      deferred.then(onLoad);"},{"line_number":111,"context_line":"      scope.imagePromise \u003d deferred;"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"      function onLoad(response) {"},{"line_number":114,"context_line":"        var localImage \u003d response.data;"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_9fc71664","side":"PARENT","line":111,"in_reply_to":"1a122d0e_47dcb545","updated":"2016-04-21 14:29:49.000000000","message":"Help me understand what you mean...we want to detach the action so that no matter how we called it, we just use an ID to load the object more fully...not only to get the latest version, but also because if we just use the object itself it will modify a model in another context (e.g. a row item)...which we don\u0027t want in editing.  We need to separate the edited item from the model of the original model, otherwise the original model gets changed and on, say, a cancel now the original model is still modified.","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2abef2f52f9112bf01ed752f9568683ee47c0143","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    function perform(image) {"},{"line_number":109,"context_line":"      var deferred \u003d glance.getImage(image.id);"},{"line_number":110,"context_line":"      deferred.then(onLoad);"},{"line_number":111,"context_line":"      scope.imagePromise \u003d deferred;"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"      function onLoad(response) {"},{"line_number":114,"context_line":"        var localImage \u003d response.data;"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_717334b5","side":"PARENT","line":111,"in_reply_to":"1a122d0e_9fc71664","updated":"2016-04-22 03:41:44.000000000","message":"I think I understand why you\u0027re loading the image from glance, that\u0027s not the issue (the image passed into perform is most likely not even a complete representation of the image, probably having come from a summary listing). \n\nHowever, the scope attachment here isn\u0027t about that duplication though, it\u0027s setting up a promise on the scope to notify the scope of us loading a new copy of the image from glance ... which is in turn listened to by a couple of controllers (edit-image and update-metadata). I don\u0027t like this at all, it\u0027s very spaghetti!\n\nISTM that the two controllers have a shared need for some data (a model) and that the actions service is kinda taking on a dependency resolution and notification role, which seems out of its core responsibilities. It just happened to be a convenient place to put stuff.\n\nI believe that instances of \"$scope.imagePromise.then(init);\" should use angular\u0027s $modal dependency resolution (\"resolve\") instead of us creating these complex interdependencies. Then instead of tying things together manually with imagePromise, the controllers just depend on a name \"image\" which is resolved during $modal.open().\n\nDoes that make sense? (have a look in the Swift UI objects-row-actions.service.js at the viewService modal open if you need an example)","commit_id":"018df171fb46b8a85e0c072c3c70bd8456b49641"}],"openstack_dashboard/static/app/core/images/actions/launch-instance.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"17a0c8339de1cb62096742aae959bbbf6c78b333","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    //////////////"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    function perform(image) {"},{"line_number":55,"context_line":"      // Don\u0027t redirect to instances page on launch instance"},{"line_number":56,"context_line":"      return launchInstanceModal.open({"},{"line_number":57,"context_line":"        \u0027imageId\u0027: image.id"},{"line_number":58,"context_line":"      });"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_7518d684","line":55,"updated":"2016-05-05 05:02:20.000000000","message":"Might add additional comment in here that it is up to the result handler to decide if they want to do that.","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"5b57f9dc98feadc51433082a5ca4e9a05f930652","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    //////////////"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    function perform(image) {"},{"line_number":55,"context_line":"      // Don\u0027t redirect to instances page on launch instance"},{"line_number":56,"context_line":"      return launchInstanceModal.open({"},{"line_number":57,"context_line":"        \u0027imageId\u0027: image.id"},{"line_number":58,"context_line":"      });"}],"source_content_type":"text/javascript","patch_set":18,"id":"1a122d0e_a1721e48","line":55,"in_reply_to":"1a122d0e_7518d684","updated":"2016-05-05 14:16:51.000000000","message":"Good idea.","commit_id":"82abc94201bd96fa550c4802992bf96bb4567241"}],"openstack_dashboard/static/app/core/images/actions/update-metadata.action.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"4533e0e0e308fb6593bdf192e8f1a1a996a3889e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        scope.$emit(events.UPDATE_METADATA_SUCCESS, [image.id]);"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        // To make the result of this action generically useful, reformat the return"},{"line_number":74,"context_line":"        // from the deleteModal into a standard form"},{"line_number":75,"context_line":"        return {"},{"line_number":76,"context_line":"          created: [],"},{"line_number":77,"context_line":"          updated: [{type: imageResourceType, id: image.id}],"}],"source_content_type":"text/javascript","patch_set":9,"id":"5a18252c_e9d5bdb9","line":74,"updated":"2016-04-12 00:19:19.000000000","message":"I like the standard form, but right now this standard form is just an object structure that is recreated everywhere and not documented anywhere. Also, usually only one of the arrays is really needed when it is used and it isn\u0027t clear if something will break if I don\u0027t give all of them.\n\nPerhaps ActionResult should be a factory that is injected, where you can inject ActionResult and put helper factory functions on it:\n\nActionResult.new(); // Just a blank object with all the arrays initialized\n\nor\n\nreturn ActionResult.updated({type: foo, id: bar}); // A new with arrays initialized, but adds these to the updated arrays.\n\nExample in classic javascript form (just for exemplary purposes):\n\nvar ActionResult \u003d function (results) {\n  this.created \u003d results.created || [];\n  this.updated \u003d results.updated || [];\n  this.deleted \u003d results.deleted || [];\n  this.failed \u003d results.failed || [];\n};\n\nActionResult.prototype.addUpdated \u003d function(item){\n  this.updated.push(item);\n}\n\nAnd then\n\nreturn new ActionResult({type: imageResourceType, id: image.id}};\n\nor\n\nresult \u003d new ActionResult();\nresult.addUpdated(type, id);\nreturn result;","commit_id":"bcf59a4586920e580360de9df7a5b35737db50a4"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"109c23ddd925788216618f209b9de27b974a80f7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        scope.$emit(events.UPDATE_METADATA_SUCCESS, [image.id]);"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        // To make the result of this action generically useful, reformat the return"},{"line_number":74,"context_line":"        // from the deleteModal into a standard form"},{"line_number":75,"context_line":"        return {"},{"line_number":76,"context_line":"          created: [],"},{"line_number":77,"context_line":"          updated: [{type: imageResourceType, id: image.id}],"}],"source_content_type":"text/javascript","patch_set":9,"id":"5a18252c_0e18db1c","line":74,"in_reply_to":"5a18252c_e9d5bdb9","updated":"2016-04-12 14:59:50.000000000","message":"Thanks Travis. Good suggestion, but for now, I\u0027d prefer to simply document the standard form.","commit_id":"bcf59a4586920e580360de9df7a5b35737db50a4"}],"openstack_dashboard/static/app/core/images/table/images-table.html":[{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":56,"context_line":"      Include action-col if you want to perform actions."},{"line_number":57,"context_line":"      rsp-p1 rsp-p2 are responsive priority as user resizes window."},{"line_number":58,"context_line":"    --\u003e"},{"line_number":59,"context_line":"    \u003ctr ng-repeat-start\u003d\"image in table.images\"\u003e"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"      \u003ctd class\u003d\"multi_select_column\"\u003e"},{"line_number":62,"context_line":"        \u003cdiv class\u003d\"themable-checkbox\"\u003e"}],"source_content_type":"text/html","patch_set":13,"id":"1a122d0e_e7e221d4","line":59,"updated":"2016-04-21 04:20:33.000000000","message":"It\u0027s not clear to me why the \"track by\" clause was removed.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"      Include action-col if you want to perform actions."},{"line_number":57,"context_line":"      rsp-p1 rsp-p2 are responsive priority as user resizes window."},{"line_number":58,"context_line":"    --\u003e"},{"line_number":59,"context_line":"    \u003ctr ng-repeat-start\u003d\"image in table.images\"\u003e"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"      \u003ctd class\u003d\"multi_select_column\"\u003e"},{"line_number":62,"context_line":"        \u003cdiv class\u003d\"themable-checkbox\"\u003e"}],"source_content_type":"text/html","patch_set":13,"id":"1a122d0e_1f82e6c8","line":59,"in_reply_to":"1a122d0e_e7e221d4","updated":"2016-04-21 14:29:49.000000000","message":"Basically, track-by sets the watcher for \"things that inform the row it has changed.\"  That means if the model updates any part of the image other than the ID, there is no auto-refreshing of the contents (for example, the actions).  The ID frankly is not going to change, hopefully, so using it to watch for such changes becomes less meaningful than just watching for the object itself (the default).  So there\u0027s just not much value in it.  In Searchlight we track-by the ID commingled with the updated_at, which works well...we could do that here.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"}],"openstack_dashboard/static/app/core/images/table/images.controller.js":[{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"3fbafa05230de6af50a042f7a4b85fa40e78fa54","unresolved":false,"context_lines":[{"line_number":128,"context_line":"      if (result) {"},{"line_number":129,"context_line":"        // Handle deleted items"},{"line_number":130,"context_line":"        if (result.deleted \u0026\u0026 result.deleted.length \u003e 0) {"},{"line_number":131,"context_line":"          var deletedIds \u003d result.deleted.map(function (elem) {"},{"line_number":132,"context_line":"            return elem.id;"},{"line_number":133,"context_line":"          });"},{"line_number":134,"context_line":"          ctrl.imagesSrc \u003d difference(ctrl.imagesSrc, deletedIds, \u0027id\u0027);"}],"source_content_type":"text/javascript","patch_set":3,"id":"3afc51ec_80ecbac8","line":131,"range":{"start_line":131,"start_character":46,"end_line":131,"end_character":54},"updated":"2016-03-11 21:28:52.000000000","message":"name the function\n\nwish we had underscore library...\".pluck(\u0027id\u0027)\" :)","commit_id":"f9b33150c276c810bc04a2891c315f1845342b46"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"2cd3b9fee463589197471bf0a39c1c4514165dff","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    function actionResultHandler(returnValue) {"},{"line_number":113,"context_line":"      return $q.when(returnValue, actionSuccessHandler, actionErrorHandler);"},{"line_number":114,"context_line":"    }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    function actionSuccessHandler(result) { // eslint-disable-line no-unused-vars"}],"source_content_type":"text/javascript","patch_set":4,"id":"3afc51ec_073ebcb7","line":113,"range":{"start_line":113,"start_character":13,"end_line":113,"end_character":76},"updated":"2016-03-14 16:13:47.000000000","message":"I\u0027d suggest just:\n\nreturn returnValue.then(actionsSuccessHandler, actionErrorHandler);\n\nI also suggest \u0027actionPromise\u0027 rather than \u0027returnValue\u0027 since that indicates something a little less specific.","commit_id":"63b91f1c35eaf3c0939fbdd6a45d8e6689a28730"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"d3ac8ced13cc9567c35b3763b287338eec62deac","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    function actionResultHandler(returnValue) {"},{"line_number":113,"context_line":"      return $q.when(returnValue, actionSuccessHandler, actionErrorHandler);"},{"line_number":114,"context_line":"    }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    function actionSuccessHandler(result) { // eslint-disable-line no-unused-vars"}],"source_content_type":"text/javascript","patch_set":4,"id":"3afc51ec_9f24d0af","line":113,"range":{"start_line":113,"start_character":13,"end_line":113,"end_character":76},"in_reply_to":"3afc51ec_073ebcb7","updated":"2016-03-14 16:59:21.000000000","message":"Or, is the issue that we aren\u0027t sure we\u0027re handed a promise?","commit_id":"63b91f1c35eaf3c0939fbdd6a45d8e6689a28730"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"5bea5057000fbb48ba7db9a8ef340da77f2f1fb0","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    function actionResultHandler(returnValue) {"},{"line_number":113,"context_line":"      return $q.when(returnValue, actionSuccessHandler, actionErrorHandler);"},{"line_number":114,"context_line":"    }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    function actionSuccessHandler(result) { // eslint-disable-line no-unused-vars"}],"source_content_type":"text/javascript","patch_set":4,"id":"1af94dfe_cb5ea175","line":113,"range":{"start_line":113,"start_character":13,"end_line":113,"end_character":76},"in_reply_to":"3afc51ec_9f24d0af","updated":"2016-03-16 20:27:09.000000000","message":"That\u0027s correct. This design doesn\u0027t *require* actions to return promises.\n\nIdeally, action returns a promise that resolves to standardized data...but just plain data objects can be returned to allow basic handling of actions that are \"less conformant\".","commit_id":"63b91f1c35eaf3c0939fbdd6a45d8e6689a28730"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        if ( updatedIds.length || createdIds.length ) {"},{"line_number":144,"context_line":"          // Ideally, get each created image individually, but"},{"line_number":145,"context_line":"          // this is simple and robust for the common use case."},{"line_number":146,"context_line":"          loadImages();"},{"line_number":147,"context_line":"        }"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        // Handle failed images"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_47fdd56c","line":146,"updated":"2016-04-21 04:20:33.000000000","message":"I think this needs a TODO to make it work better with the information supplied.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        if ( updatedIds.length || createdIds.length ) {"},{"line_number":144,"context_line":"          // Ideally, get each created image individually, but"},{"line_number":145,"context_line":"          // this is simple and robust for the common use case."},{"line_number":146,"context_line":"          loadImages();"},{"line_number":147,"context_line":"        }"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        // Handle failed images"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_dfc50e0b","line":146,"in_reply_to":"1a122d0e_47fdd56c","updated":"2016-04-21 14:29:49.000000000","message":"Fair enough, makes sense.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"9f8a389382e6cd46fd4e36c85f7ddc0e75a6071a","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        if ( updatedIds.length || createdIds.length ) {"},{"line_number":144,"context_line":"          // Ideally, get each created image individually, but"},{"line_number":145,"context_line":"          // this is simple and robust for the common use case."},{"line_number":146,"context_line":"          loadImages();"},{"line_number":147,"context_line":"        }"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        // Handle failed images"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_e26141d5","line":146,"in_reply_to":"1a122d0e_dfc50e0b","updated":"2016-04-21 20:42:47.000000000","message":"Done","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"59b35d57b9463da8f05da1d4bc451b41108f78eb","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        return accumulator;"},{"line_number":172,"context_line":"      }"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"      if ( items ) {"},{"line_number":175,"context_line":"        result \u003d items.reduce(typeIdReduce, []);"},{"line_number":176,"context_line":"      } else {"},{"line_number":177,"context_line":"        result \u003d [];"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_c7f1e596","line":174,"updated":"2016-04-21 04:20:33.000000000","message":"Unnecessary whitespace :-)","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"9f8a389382e6cd46fd4e36c85f7ddc0e75a6071a","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        return accumulator;"},{"line_number":172,"context_line":"      }"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"      if ( items ) {"},{"line_number":175,"context_line":"        result \u003d items.reduce(typeIdReduce, []);"},{"line_number":176,"context_line":"      } else {"},{"line_number":177,"context_line":"        result \u003d [];"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_4280f546","line":174,"in_reply_to":"1a122d0e_bf98121d","updated":"2016-04-21 20:42:47.000000000","message":"Done","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"0032bb575dedd5c185e89c7cdbc5e56d833330f9","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        return accumulator;"},{"line_number":172,"context_line":"      }"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"      if ( items ) {"},{"line_number":175,"context_line":"        result \u003d items.reduce(typeIdReduce, []);"},{"line_number":176,"context_line":"      } else {"},{"line_number":177,"context_line":"        result \u003d [];"}],"source_content_type":"text/javascript","patch_set":13,"id":"1a122d0e_bf98121d","line":174,"in_reply_to":"1a122d0e_c7f1e596","updated":"2016-04-21 14:29:49.000000000","message":"you may now consider the whitespace thoroughly disinterred from its codebase.","commit_id":"261591e1611bfca57432351c9f689c72ffa208f0"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"075fda7538f37a8885e16db0cb9f3cefa87e7d3e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    function actionResultHandler(returnValue) {"},{"line_number":113,"context_line":"      return $q.when(returnValue, actionSuccessHandler, actionErrorHandler);"},{"line_number":114,"context_line":"    }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    function actionSuccessHandler(result) { // eslint-disable-line no-unused-vars"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_e427bab3","line":113,"updated":"2016-04-29 14:42:35.000000000","message":"can remove actionErrorHandler. Its an optional arg and is current just a blank function.","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"28ded41fe7615ee24977a94593a69770abc68081","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    function actionResultHandler(returnValue) {"},{"line_number":113,"context_line":"      return $q.when(returnValue, actionSuccessHandler, actionErrorHandler);"},{"line_number":114,"context_line":"    }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    function actionSuccessHandler(result) { // eslint-disable-line no-unused-vars"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_6ad79f4f","line":113,"in_reply_to":"1a122d0e_e427bab3","updated":"2016-05-03 16:27:15.000000000","message":"Agreed, will remove.","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"075fda7538f37a8885e16db0cb9f3cefa87e7d3e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"      if ( result ) {"},{"line_number":130,"context_line":"        // Reduce the results to just image ids ignoring other types the action"},{"line_number":131,"context_line":"        // may have produced"},{"line_number":132,"context_line":"        deletedIds \u003d getIdsOfType(result.deleted, imageResourceType);"},{"line_number":133,"context_line":"        updatedIds \u003d getIdsOfType(result.updated, imageResourceType);"},{"line_number":134,"context_line":"        createdIds \u003d getIdsOfType(result.created, imageResourceType);"},{"line_number":135,"context_line":"        failedIds \u003d getIdsOfType(result.failed, imageResourceType);"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_24aed280","line":132,"updated":"2016-04-29 14:42:35.000000000","message":"Almost seems as if getIdsOfType should be a utility function that typeRegistry offers. Do you think it would be useful to be able to reuse this function elsewhere?","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"28ded41fe7615ee24977a94593a69770abc68081","unresolved":false,"context_lines":[{"line_number":129,"context_line":"      if ( result ) {"},{"line_number":130,"context_line":"        // Reduce the results to just image ids ignoring other types the action"},{"line_number":131,"context_line":"        // may have produced"},{"line_number":132,"context_line":"        deletedIds \u003d getIdsOfType(result.deleted, imageResourceType);"},{"line_number":133,"context_line":"        updatedIds \u003d getIdsOfType(result.updated, imageResourceType);"},{"line_number":134,"context_line":"        createdIds \u003d getIdsOfType(result.created, imageResourceType);"},{"line_number":135,"context_line":"        failedIds \u003d getIdsOfType(result.failed, imageResourceType);"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_ea38cfa1","line":132,"in_reply_to":"1a122d0e_24aed280","updated":"2016-05-03 16:27:15.000000000","message":"Yeah, maybe a convenience method on the action result service.  Good idea!","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"075fda7538f37a8885e16db0cb9f3cefa87e7d3e","unresolved":false,"context_lines":[{"line_number":159,"context_line":"      }"},{"line_number":160,"context_line":"    }"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    function actionErrorHandler(reason) { // eslint-disable-line no-unused-vars"},{"line_number":163,"context_line":"      // Action has failed. Do nothing."},{"line_number":164,"context_line":"    }"},{"line_number":165,"context_line":""}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_a4b78238","line":162,"updated":"2016-04-29 14:42:35.000000000","message":"remove this function","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"28ded41fe7615ee24977a94593a69770abc68081","unresolved":false,"context_lines":[{"line_number":159,"context_line":"      }"},{"line_number":160,"context_line":"    }"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    function actionErrorHandler(reason) { // eslint-disable-line no-unused-vars"},{"line_number":163,"context_line":"      // Action has failed. Do nothing."},{"line_number":164,"context_line":"    }"},{"line_number":165,"context_line":""}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_4a40e307","line":162,"in_reply_to":"1a122d0e_a4b78238","updated":"2016-05-03 16:27:15.000000000","message":"Will do.","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"075fda7538f37a8885e16db0cb9f3cefa87e7d3e","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    function getIdsOfType(items, type) {"},{"line_number":167,"context_line":"      var result;"},{"line_number":168,"context_line":"      function typeIdReduce(accumulator, item) {"},{"line_number":169,"context_line":"        if (item.type \u003d\u003d\u003d type) {"},{"line_number":170,"context_line":"          accumulator.push(item.id);"},{"line_number":171,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_c4befed2","line":168,"updated":"2016-04-29 14:42:35.000000000","message":"moving this inner function out looks cleaner to me but optional since its a styling suggestion.","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"28ded41fe7615ee24977a94593a69770abc68081","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    function getIdsOfType(items, type) {"},{"line_number":167,"context_line":"      var result;"},{"line_number":168,"context_line":"      function typeIdReduce(accumulator, item) {"},{"line_number":169,"context_line":"        if (item.type \u003d\u003d\u003d type) {"},{"line_number":170,"context_line":"          accumulator.push(item.id);"},{"line_number":171,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_ca54f3cb","line":168,"in_reply_to":"1a122d0e_c4befed2","updated":"2016-05-03 16:27:15.000000000","message":"I\u0027ll move it out.","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"075fda7538f37a8885e16db0cb9f3cefa87e7d3e","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        result \u003d [];"},{"line_number":179,"context_line":"      }"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"      return result;"},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  }"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_64fbaac1","line":181,"updated":"2016-04-29 14:42:35.000000000","message":"this looks cleaner to me but optional since its a styling suggestion:\nreturn items? items.reduce(typeIdReduce, []): [];","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"},{"author":{"_account_id":14124,"name":"Matt Borland","email":"matt.borland@hpe.com","username":"mborland"},"change_message_id":"28ded41fe7615ee24977a94593a69770abc68081","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        result \u003d [];"},{"line_number":179,"context_line":"      }"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"      return result;"},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  }"}],"source_content_type":"text/javascript","patch_set":15,"id":"1a122d0e_6a6cbf9d","line":181,"in_reply_to":"1a122d0e_64fbaac1","updated":"2016-05-03 16:27:15.000000000","message":"Yeah, that might actually be easier to read.","commit_id":"2e8b1719cdffc88cbb209adfb195620c188ccd90"}]}
