)]}'
{"openstack_dashboard/static/app/core/images/actions/create.action.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"638380c444d755b8b7f1034f082cf76c0ef0812d","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        delete finalModel.image_url;"},{"line_number":119,"context_line":"      }"},{"line_number":120,"context_line":"      function onProgress(progress) {"},{"line_number":121,"context_line":"        $rootScope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":122,"context_line":"      }"},{"line_number":123,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":124,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":22,"id":"bacf61ea_adc0c97d","line":121,"updated":"2016-08-02 22:56:16.000000000","message":"well, there is talk of removing initscope and scope, so this comment is not in alignment with that... but why are you injecting rootscope?  you can directly use the scope var closure.  I removed the injection of root scope and used scope.$broadcast and it still worked.","commit_id":"29d2fea0c22f91ebb44c7aa8fc0b9c35ba24a842"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"602428b3a58d40df7f69edc6e900b0a85472dbe6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        delete finalModel.image_url;"},{"line_number":119,"context_line":"      }"},{"line_number":120,"context_line":"      function onProgress(progress) {"},{"line_number":121,"context_line":"        $rootScope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":122,"context_line":"      }"},{"line_number":123,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":124,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":22,"id":"bacf61ea_85178a53","line":121,"in_reply_to":"bacf61ea_adc0c97d","updated":"2016-08-03 09:12:43.000000000","message":"I guess at first I wasn\u0027t sure about the relation between that service and the modal controller, so used $rootScope as a guaranteed way to broadcast the message everywhere. So I\u0027ve changed it to used \u0027scope\u0027 from closure and it works indeed!\n\nI guess we\u0027ll need Richard\u0027s opinion on if we\u0027re heading in right direction by broadcasting these messages here (in the light of his work on removing initScope).","commit_id":"29d2fea0c22f91ebb44c7aa8fc0b9c35ba24a842"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"7551bf404a0fe5e546b404e4645b778dbc05aa90","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        delete finalModel.image_url;"},{"line_number":117,"context_line":"      }"},{"line_number":118,"context_line":"      function onProgress(progress) {"},{"line_number":119,"context_line":"        scope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":120,"context_line":"      }"},{"line_number":121,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":122,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":23,"id":"bacf61ea_3df32ea1","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":13},"updated":"2016-08-03 21:26:36.000000000","message":"-1: I really don\u0027t think you want to do this.This action can be launched by anyone in Horizon, not just the create image step in a workflow. This use of scope prevents the user from invoking this same action to upload another image while the first image is in-progress.  The 2nd will re-init the scope and start getting progress messages for the 1st upload\n\nIn general, scope is something that views have. Action services are not views and are not on any kind of scope hierarchy. We want to find a way to notify the caller of this long-running action that progress is occurring, without forcing them to init a singleton with their scope.\n\nInstead, I think you can chain a notify handler onto line 121 which returns current progress. The caller of this action is then free to add their own notify handler (if they care) which will get the current progress and can update a progress bar.\n\nBecause this promise is a return value from a service call, instead of a global on the service, multiple callers can use this action simultaneously.","commit_id":"0e86116cc91b63c657b38b91fa95ee9dffca6845"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"4e24534a117106b71e528fc9633b4122bd9433b4","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        delete finalModel.image_url;"},{"line_number":117,"context_line":"      }"},{"line_number":118,"context_line":"      function onProgress(progress) {"},{"line_number":119,"context_line":"        scope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":120,"context_line":"      }"},{"line_number":121,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":122,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":23,"id":"bacf61ea_45054fc0","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":13},"in_reply_to":"bacf61ea_3df32ea1","updated":"2016-08-04 10:16:10.000000000","message":"Tyr, if create.action service is going to be invoked from may places, then it\u0027s certainly has to be rewritten - for example, all modals based on it will share not only `scope`, but `model` as well. So it seems to me that existing dialog was not meant to be launched by anyone / from anywhere in Horizon.\n\nI would prefer to solve one problem at a time - first make NG Create Image dialog reach feature-parity with its Django counterpart, which opens the way to switch to Glance.V2 completely - and then solve the issues with NG Create Image from many places.","commit_id":"0e86116cc91b63c657b38b91fa95ee9dffca6845"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"f3c69fd812c46bc1e329fe004085dd4ca8b05d11","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        delete finalModel.image_url;"},{"line_number":117,"context_line":"      }"},{"line_number":118,"context_line":"      function onProgress(progress) {"},{"line_number":119,"context_line":"        scope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":120,"context_line":"      }"},{"line_number":121,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":122,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":23,"id":"bacf61ea_126a6c81","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":13},"in_reply_to":"bacf61ea_45054fc0","updated":"2016-08-04 14:25:22.000000000","message":"Chaining promises is better when possible. That said, This is a blocking modal form, so I am not seeing the use case for multiple simultaneous callers of this action right now. They\u0027d have to open a separate tab which would be isolated.","commit_id":"0e86116cc91b63c657b38b91fa95ee9dffca6845"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"f35906aff3fc2a20bb1295b28c26ea76ca442745","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        delete finalModel.image_url;"},{"line_number":117,"context_line":"      }"},{"line_number":118,"context_line":"      function onProgress(progress) {"},{"line_number":119,"context_line":"        scope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":120,"context_line":"      }"},{"line_number":121,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":122,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":23,"id":"bacf61ea_ca3e558a","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":13},"in_reply_to":"bacf61ea_45054fc0","updated":"2016-08-04 17:05:20.000000000","message":"prefer to use notifications for this new functionality, but won\u0027t block","commit_id":"0e86116cc91b63c657b38b91fa95ee9dffca6845"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"7e57f339efd255eba2229fdbc6924940f1869081","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        delete finalModel.image_url;"},{"line_number":117,"context_line":"      }"},{"line_number":118,"context_line":"      function onProgress(progress) {"},{"line_number":119,"context_line":"        scope.$broadcast(events.IMAGE_UPLOAD_PROGRESS, progress);"},{"line_number":120,"context_line":"      }"},{"line_number":121,"context_line":"      return glance.createImage(finalModel, onProgress).then(onCreateImage);"},{"line_number":122,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":23,"id":"bacf61ea_4dfa7f44","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":13},"in_reply_to":"bacf61ea_ca3e558a","updated":"2016-08-04 17:36:24.000000000","message":"I still don\u0027t understand how it could be implemented by chaining promises, because the place where the upload progress is actually updated is within a modal controller, which doesn\u0027t know anything about create.action.service, they talk to each other using event system.\n\nCreate action opens a modal which logic is handled with that controller, so it hardly makes sense to use create action inside controller (would be a silly recursion).","commit_id":"0e86116cc91b63c657b38b91fa95ee9dffca6845"}],"openstack_dashboard/static/app/core/images/steps/create-image/create-image.html":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6f529b3927123d70e982a11ae8cda6c14a61a704","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            \u003c/span\u003e"},{"line_number":84,"context_line":"              \u003cinput type\u003d\"text\" class\u003d\"form-control\" readonly ng-model\u003d\"image_file.name\"\u003e"},{"line_number":85,"context_line":"            \u003c/div\u003e"},{"line_number":86,"context_line":"            \u003cprogressbar value\u003d\"ctrl.uploadProgress\"\u003e"},{"line_number":87,"context_line":"              \u003cspan ng-hide\u003d\"ctrl.uploadProgress \u003c 7\"\u003e"},{"line_number":88,"context_line":"                {$ ctrl.uploadProgress $}%"},{"line_number":89,"context_line":"              \u003c/span\u003e"}],"source_content_type":"text/html","patch_set":11,"id":"3aaa91ec_09434514","line":86,"updated":"2016-06-29 23:33:33.000000000","message":"Very cool, but it looks weird that it shows up prior to starting the upload. What do you think about putting an ng-if or show based on whether a variable is set and not setting the variable until after clicking submit? I thought at first that it was a styling bug.  Then I thought maybe it was intended to be a drop shadow, then I figured it out after I clicked submit.\n\nhttp://imgur.com/cvwKmRn\n\nLooks quite odd in material before upload:\n\nhttp://imgur.com/zlBxjBS\n\nEither that or (possibly) dismiss the create modal once the image upload response gets back from glance and pop up an image upload modal with a progress bar and handle error messaging in it instead of using a toast.\n\nhttp://imgur.com/qOTbytD\n\nSee above: When I kill glance API while this is running, the error messaging doesn\u0027t work quite right.  A toast in the background pops up, an odd error message shows up in the bottom left of the wizard (I think that\u0027s a known bug), an error shows up in the console (Error message below), and the progress bar remains stuck.\n\nBut on the plus side, I was able to restart the glance service and just click submit again for it work.\n\nIf you dismiss the modal, that would have the negative effect of losing your selections should it fail without the ability to try again. So, perhaps don\u0027t dismiss the modal.\n\nI\u0027m not sure of the total best UX here and would prefer to get something in than bikeshed forever, but would like to put this up for your consideration.\n\nError message:\n\nPUT http://192.168.200.200:9292/v1/images/b214d550-21e3-4c27-a87a-b047434489d3 net::ERR_CONNECTION_RESET\nangular.js:11707 TypeError: Cannot read property \u0027data\u0027 of undefined\n    at onCreateImage (create.action.service.js:127)\n    at processQueue (angular.js:13300)\n    at angular.js:13316\n    at Scope.$eval (angular.js:14552)\n    at Scope.$digest (angular.js:14368)\n    at Scope.$apply (angular.js:14657)\n    at done (angular.js:9734)\n    at completeRequest (angular.js:9924)\n    at XMLHttpRequest.requestError (angular.js:9875)","commit_id":"d0a98044249ea9874f82275f5d8d86adb8a92595"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"638380c444d755b8b7f1034f082cf76c0ef0812d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            \u003c/div\u003e"},{"line_number":86,"context_line":"            \u003cdiv ng-hide\u003d\"ctrl.uploadProgress \u003c 0\" class\u003d\"progress-text\"\u003e"},{"line_number":87,"context_line":"              \u003cprogressbar value\u003d\"ctrl.uploadProgress\"\u003e\u003c/progressbar\u003e"},{"line_number":88,"context_line":"              \u003cspan class\u003d\"progress-bar-text\"\u003e{$ ctrl.uploadProgress $}%\u003c/span\u003e"},{"line_number":89,"context_line":"            \u003c/div\u003e"},{"line_number":90,"context_line":"            \u003cp class\u003d\"help-block alert alert-danger\""},{"line_number":91,"context_line":"               ng-show\u003d\"imageForm.image_file.$invalid \u0026\u0026 imageForm.image_file.$dirty\"\u003e"}],"source_content_type":"text/html","patch_set":22,"id":"bacf61ea_aaac2f36","line":88,"range":{"start_line":88,"start_character":71,"end_line":88,"end_character":72},"updated":"2016-08-02 22:56:16.000000000","message":"Should % be in a \u003ctranslate\u003e\u003c/translate\u003e?","commit_id":"29d2fea0c22f91ebb44c7aa8fc0b9c35ba24a842"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"602428b3a58d40df7f69edc6e900b0a85472dbe6","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            \u003c/div\u003e"},{"line_number":86,"context_line":"            \u003cdiv ng-hide\u003d\"ctrl.uploadProgress \u003c 0\" class\u003d\"progress-text\"\u003e"},{"line_number":87,"context_line":"              \u003cprogressbar value\u003d\"ctrl.uploadProgress\"\u003e\u003c/progressbar\u003e"},{"line_number":88,"context_line":"              \u003cspan class\u003d\"progress-bar-text\"\u003e{$ ctrl.uploadProgress $}%\u003c/span\u003e"},{"line_number":89,"context_line":"            \u003c/div\u003e"},{"line_number":90,"context_line":"            \u003cp class\u003d\"help-block alert alert-danger\""},{"line_number":91,"context_line":"               ng-show\u003d\"imageForm.image_file.$invalid \u0026\u0026 imageForm.image_file.$dirty\"\u003e"}],"source_content_type":"text/html","patch_set":22,"id":"bacf61ea_7051720e","line":88,"range":{"start_line":88,"start_character":71,"end_line":88,"end_character":72},"in_reply_to":"bacf61ea_aaac2f36","updated":"2016-08-03 09:12:43.000000000","message":"The same question Diana asked me in the [Django] patch for Create Image. My opinion is that we don\u0027t need \u003ctranslate\u003e wrapper for a percent sign, because AFAIK it looks the same in different languages.","commit_id":"29d2fea0c22f91ebb44c7aa8fc0b9c35ba24a842"}]}
