)]}'
{"horizon/static/framework/util/promise-toggle/hz-promise-toggle.directive.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e3da282ee0dbd7ac4ad283613b2642a6de1fc2f","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.util.promise-toggle\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzPromiseToggleTemplate\u0027, hzPromiseToggleTemplate);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc directive"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_9ccc0f8c","line":22,"updated":"2015-08-14 00:26:24.000000000","message":"I do not think this should be a directive? Seems like a service would make more sense the way you\u0027re using it. It\u0027s basically a factory for generating directives.","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5d992f5a5d50d8adc71554898f6f5dd9f9e8882c","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.util.promise-toggle\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzPromiseToggleTemplate\u0027, hzPromiseToggleTemplate);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc directive"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_cc7ae425","line":22,"in_reply_to":"1a4dcd0f_9ccc0f8c","updated":"2015-08-14 03:36:02.000000000","message":"Thai, no, I think it is much better as a directive.  It is a huge point of this refactoring.  The previous was a factory method hidden in a service that was hard to understand and simply created a barrier for customization.  This is much cleaner and easier to understand. \n\nWith extend, it is very simple for deployers to modify however they want without us worrying about creating a brittle interface for doing so. In fact, when I first started at this, I was playing with a factory interface and realized it was worse IMO.  \n\nI guess simply put, we don\u0027t need to create a factory to do this, that is what angular.extend already provides and you can see exactly what you are going to get.\n\nFrom the commit message.\n\n It also greatly improves the ability to customize\nthe directives, while improving readability, by using the\nangular.extend way of creating directives from a template.\nUltimately, this leads to much better decoupling of the\nfunctionality which makes it easier for future plugins\nand deployers to write their own directives with similar\nfunctionality.\n\nThis is the recommended way by angular docs.\nSee the bottom of this page for more on extending directives:\n  https://github.com/angular/angular.js/wiki/Understanding-Directives","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e3da282ee0dbd7ac4ad283613b2642a6de1fc2f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    .directive(\u0027hzPromiseToggleTemplate\u0027, hzPromiseToggleTemplate);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc directive"},{"line_number":26,"context_line":"   * @name horizon.framework.util.promise-toggle:directive:hzPromiseToggleTemplate"},{"line_number":27,"context_line":"   * @module horizon.framework.util.promise-toggle"},{"line_number":28,"context_line":"   * @kind directive"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_3ca4dbb7","line":25,"updated":"2015-08-14 00:26:24.000000000","message":"bump","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"294f8f0cca6ee4199e2d8f4030061b034d7527ac","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    .directive(\u0027hzPromiseToggleTemplate\u0027, hzPromiseToggleTemplate);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc directive"},{"line_number":26,"context_line":"   * @name horizon.framework.util.promise-toggle:directive:hzPromiseToggleTemplate"},{"line_number":27,"context_line":"   * @module horizon.framework.util.promise-toggle"},{"line_number":28,"context_line":"   * @kind directive"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_12b2f5e5","line":25,"in_reply_to":"1a4dcd0f_3ca4dbb7","updated":"2015-08-20 03:58:36.000000000","message":"You mean @kind?  I deleted that.","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e3da282ee0dbd7ac4ad283613b2642a6de1fc2f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"   * not a particular setting or required service is enabled."},{"line_number":39,"context_line":"   *"},{"line_number":40,"context_line":"   * To use this, simply perform an angular.extend:"},{"line_number":41,"context_line":"   *"},{"line_number":42,"context_line":"   *"},{"line_number":43,"context_line":"   * angular.extend({},"},{"line_number":44,"context_line":"   *   hzPromiseToggleDirectiveTemplate[0],"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_5c18c71e","line":41,"updated":"2015-08-14 00:26:24.000000000","message":"extra line","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"294f8f0cca6ee4199e2d8f4030061b034d7527ac","unresolved":false,"context_lines":[{"line_number":38,"context_line":"   * not a particular setting or required service is enabled."},{"line_number":39,"context_line":"   *"},{"line_number":40,"context_line":"   * To use this, simply perform an angular.extend:"},{"line_number":41,"context_line":"   *"},{"line_number":42,"context_line":"   *"},{"line_number":43,"context_line":"   * angular.extend({},"},{"line_number":44,"context_line":"   *   hzPromiseToggleDirectiveTemplate[0],"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_92be05ad","line":41,"in_reply_to":"1a4dcd0f_5c18c71e","updated":"2015-08-20 03:58:36.000000000","message":"Done","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e3da282ee0dbd7ac4ad283613b2642a6de1fc2f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"      // it will be removed. When the input is an array, each element of the"},{"line_number":71,"context_line":"      // array will be treated as a distinct input and be processed through"},{"line_number":72,"context_line":"      // the single promise resolver on its own. In that case, all promises"},{"line_number":73,"context_line":"      // must resolve in order for the content to be linked in."},{"line_number":74,"context_line":"      var input \u003d angular.fromJson(attrs[this.name]);"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_1c023f73","line":73,"updated":"2015-08-14 00:26:24.000000000","message":"comment better off on top of function with format /** */","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"294f8f0cca6ee4199e2d8f4030061b034d7527ac","unresolved":false,"context_lines":[{"line_number":70,"context_line":"      // it will be removed. When the input is an array, each element of the"},{"line_number":71,"context_line":"      // array will be treated as a distinct input and be processed through"},{"line_number":72,"context_line":"      // the single promise resolver on its own. In that case, all promises"},{"line_number":73,"context_line":"      // must resolve in order for the content to be linked in."},{"line_number":74,"context_line":"      var input \u003d angular.fromJson(attrs[this.name]);"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_f233c960","line":73,"in_reply_to":"1a4dcd0f_1c023f73","updated":"2015-08-20 03:58:36.000000000","message":"Done","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5d992f5a5d50d8adc71554898f6f5dd9f9e8882c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"      // it will be removed. When the input is an array, each element of the"},{"line_number":71,"context_line":"      // array will be treated as a distinct input and be processed through"},{"line_number":72,"context_line":"      // the single promise resolver on its own. In that case, all promises"},{"line_number":73,"context_line":"      // must resolve in order for the content to be linked in."},{"line_number":74,"context_line":"      var input \u003d angular.fromJson(attrs[this.name]);"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_ec77a039","line":73,"in_reply_to":"1a4dcd0f_1c023f73","updated":"2015-08-14 03:36:02.000000000","message":"agreed, will do.","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e3da282ee0dbd7ac4ad283613b2642a6de1fc2f","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"      return function(scope, iterStartElement) {"},{"line_number":79,"context_line":"        if (angular.isArray(input)) {"},{"line_number":80,"context_line":"          multiPromiseResolver(singlePromiseResolver, input).then(linkContent, removeContent);"},{"line_number":81,"context_line":"        } else {"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_9c3def2e","line":78,"updated":"2015-08-14 00:26:24.000000000","message":"is this better off as a separate named function?","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"5d992f5a5d50d8adc71554898f6f5dd9f9e8882c","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"      return function(scope, iterStartElement) {"},{"line_number":79,"context_line":"        if (angular.isArray(input)) {"},{"line_number":80,"context_line":"          multiPromiseResolver(singlePromiseResolver, input).then(linkContent, removeContent);"},{"line_number":81,"context_line":"        } else {"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_8c74dc36","line":78,"in_reply_to":"1a4dcd0f_9c3def2e","updated":"2015-08-14 03:36:02.000000000","message":"yes, agreed. will do.","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.util.promise-toggle\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzPromiseToggleTemplate\u0027, hzPromiseToggleTemplate);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc directive"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_07ace032","line":22,"updated":"2015-08-19 04:48:01.000000000","message":"Should this just be hzPromiseToggle? But I can understand why you\u0027d want to suffix it with Template.","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9b8ec0d83a0d8e42dcc22f01d0d526a91108eb90","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.util.promise-toggle\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzPromiseToggleTemplate\u0027, hzPromiseToggleTemplate);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  /**"},{"line_number":25,"context_line":"   * @ngdoc directive"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_789c335d","line":22,"in_reply_to":"fa1b9901_07ace032","updated":"2015-08-19 20:08:35.000000000","message":"I think I want to keep the Template in there.  By itself it doesn\u0027t do anything.","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":32,"context_line":"   * associated with the directive resolve."},{"line_number":33,"context_line":"   *"},{"line_number":34,"context_line":"   * This supports declarative directives that compile in their"},{"line_number":35,"context_line":"   * content only after the related promises resolve.  This is typically"},{"line_number":36,"context_line":"   * intended to be used for very fast checks (often cached) of whether or"},{"line_number":37,"context_line":"   * not a particular setting or required service is enabled. This should not"},{"line_number":38,"context_line":"   * be used for checks that have frequently changing content, because this"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_8736b050","line":35,"updated":"2015-08-19 04:48:01.000000000","message":"extra space between resolve and this.","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":34,"context_line":"   * This supports declarative directives that compile in their"},{"line_number":35,"context_line":"   * content only after the related promises resolve.  This is typically"},{"line_number":36,"context_line":"   * intended to be used for very fast checks (often cached) of whether or"},{"line_number":37,"context_line":"   * not a particular setting or required service is enabled. This should not"},{"line_number":38,"context_line":"   * be used for checks that have frequently changing content, because this"},{"line_number":39,"context_line":"   * is evaluated once per page load."},{"line_number":40,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_074b80ca","line":37,"updated":"2015-08-19 04:48:01.000000000","message":"as well as policy, which I plan on adding","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   * is evaluated once per page load."},{"line_number":40,"context_line":"   *"},{"line_number":41,"context_line":"   * The actual name of whatever directive this is after being extended"},{"line_number":42,"context_line":"   * (angular.extend) should be set to the input that will be passed"},{"line_number":43,"context_line":"   * into the promise resolver. The promise resolver will either resolve"},{"line_number":44,"context_line":"   * or reject the promise. If it resolves, the content inside of the"},{"line_number":45,"context_line":"   * element will be linked in. Otherwise, it will be removed completely."}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_67235c06","line":42,"updated":"2015-08-19 04:48:01.000000000","message":"probably don\u0027t need to mention angular.extend here","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":49,"context_line":"   * order for the content to be linked in. If any of them are rejected,"},{"line_number":50,"context_line":"   * the element will be removed."},{"line_number":51,"context_line":"   *"},{"line_number":52,"context_line":"   * When extending, the name and singlePromiseResolver must be specified."},{"line_number":53,"context_line":"   * Other properties may also be overridden for additional customization."},{"line_number":54,"context_line":"   *"},{"line_number":55,"context_line":"   * @example"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_e7644c4a","line":52,"updated":"2015-08-19 04:48:01.000000000","message":"maybe replace specified with REQUIRED with the bold weight for emphasis?","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   *    \u0027hzPromiseToggleTemplateDirective\u0027,"},{"line_number":65,"context_line":"   *    \u0027mockService\u0027"},{"line_number":66,"context_line":"   *  ];"},{"line_number":67,"context_line":"   *"},{"line_number":68,"context_line":"   *"},{"line_number":69,"context_line":"   *  function hzPromiseToggleMock(hzPromiseToggleTemplateDirective, mockService) {"},{"line_number":70,"context_line":"   *    return angular.extend("}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_a75e5474","line":67,"updated":"2015-08-19 04:48:01.000000000","message":"extra line","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   *  ];"},{"line_number":67,"context_line":"   *"},{"line_number":68,"context_line":"   *"},{"line_number":69,"context_line":"   *  function hzPromiseToggleMock(hzPromiseToggleTemplateDirective, mockService) {"},{"line_number":70,"context_line":"   *    return angular.extend("},{"line_number":71,"context_line":"   *        hzPromiseToggleTemplateDirective[0],"},{"line_number":72,"context_line":"   *        {"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_67d83cf0","line":69,"updated":"2015-08-19 04:48:01.000000000","message":"optional OCD nit, might read a bit cleaner.\n\n  var directive \u003d {\n    singlePromiseResolver: mockService.mockResolver,\n    name: \u0027hzPromiseToggleMock\u0027\n  };\n  return angular.extend(hzPromiseToggleTemplateDirective[0], directive);\n\nAlso, hzPromiseToggleTemplateDirective might be overkill, just hzPromiseToggle should be good enough? we already know it is a directive.","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9b8ec0d83a0d8e42dcc22f01d0d526a91108eb90","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   *  ];"},{"line_number":67,"context_line":"   *"},{"line_number":68,"context_line":"   *"},{"line_number":69,"context_line":"   *  function hzPromiseToggleMock(hzPromiseToggleTemplateDirective, mockService) {"},{"line_number":70,"context_line":"   *    return angular.extend("},{"line_number":71,"context_line":"   *        hzPromiseToggleTemplateDirective[0],"},{"line_number":72,"context_line":"   *        {"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_18cdf765","line":69,"in_reply_to":"fa1b9901_67d83cf0","updated":"2015-08-19 20:08:35.000000000","message":"I think you have to use \"Directive\" on the end because it doesn\u0027t have a provider.  Otherwise, it can\u0027t find it.","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":79,"context_line":"   * Then in the HMTL:"},{"line_number":80,"context_line":"   *"},{"line_number":81,"context_line":"   * For single input / single promise resolution:"},{"line_number":82,"context_line":"   *"},{"line_number":83,"context_line":"   *  \u003cdiv hz-promize-toggle-mock\u003d\u0027[\"Hello\"]\u0027\u003eYour content \u003c/div\u003e"},{"line_number":84,"context_line":"   *"},{"line_number":85,"context_line":"   * For multiple input / multiple promise resolution:"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_478bb8c3","line":82,"updated":"2015-08-19 04:48:01.000000000","message":"Another OCD nit: consider switching the ordering to show the HTML fragment first, then the comment and consider grouping them so its easier to distinguish.\n\n  \u003cdiv hz-promize-toggle-mock\u003d\u0027[\"Hello\"]\u0027\u003eYour content \u003c/div\u003e\n  For single input / single promise resolution\n\n  \u003cdiv hz-promize-toggle-mock\u003d\u0027[\"Hello\", \"World\"]\u0027\u003eYour content \u003c/div\u003e\n  For multiple input / multiple promise resolution","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"4d5ea32157ee7a89130de08582ad4b2ad3e0eaf0","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    ////////////////"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    function compile(element, attrs, linker) {"},{"line_number":106,"context_line":"      var input \u003d angular.fromJson(attrs[this.name]);"},{"line_number":107,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"      return resolvePromises;"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_8d42510f","line":106,"updated":"2015-08-19 05:46:20.000000000","message":"Actually, while I started to work on the policy toggle, I realized another use case and I\u0027m not sure that angular.fromJson would be able to support it. Some policy checks are quite verbose, so storing it in the controller is probably normal for people to do. What if I want to pass in a reference to that policy object instead of a json string?","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9b8ec0d83a0d8e42dcc22f01d0d526a91108eb90","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    ////////////////"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    function compile(element, attrs, linker) {"},{"line_number":106,"context_line":"      var input \u003d angular.fromJson(attrs[this.name]);"},{"line_number":107,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"      return resolvePromises;"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_b80bab8d","line":106,"in_reply_to":"fa1b9901_8d42510f","updated":"2015-08-19 20:08:35.000000000","message":"Policy is DEFINITELY a big reason I want to do this and I have been wondering what that might mean for the reasons you said.  So let\u0027s figure it out. Rajat had some ideas here, I think.\n\nI think that what we just need to do is to make it flexible enough that the type of input can be according to what the resolver expects.  Maybe just doing some type checking...","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"4d882061057ac6728d9dc756b8aefc8800ced68a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if (angular.isArray(resolvedInput)) {"},{"line_number":114,"context_line":"          multiPromiseResolver(singlePromiseResolver, resolvedInput).then(linkContent, element.remove);"},{"line_number":115,"context_line":"        } else {"},{"line_number":116,"context_line":"          singlePromiseResolver(resolvedInput).then(linkContent, element.remove);"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_12238e57","line":113,"updated":"2015-08-19 22:31:48.000000000","message":"consider using shorthand if notation if applicable.","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"b123a4547a07617084c7f080f594f82b86e5ac19","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if (angular.isArray(resolvedInput)) {"},{"line_number":114,"context_line":"          multiPromiseResolver(singlePromiseResolver, resolvedInput).then(linkContent, element.remove);"},{"line_number":115,"context_line":"        } else {"},{"line_number":116,"context_line":"          singlePromiseResolver(resolvedInput).then(linkContent, element.remove);"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_3fd45aea","line":113,"in_reply_to":"fa1b9901_12238e57","updated":"2015-08-19 23:51:58.000000000","message":"Done","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"4d882061057ac6728d9dc756b8aefc8800ced68a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if (angular.isArray(resolvedInput)) {"},{"line_number":114,"context_line":"          multiPromiseResolver(singlePromiseResolver, resolvedInput).then(linkContent, element.remove);"},{"line_number":115,"context_line":"        } else {"},{"line_number":116,"context_line":"          singlePromiseResolver(resolvedInput).then(linkContent, element.remove);"},{"line_number":117,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_72120a0b","line":114,"updated":"2015-08-19 22:31:48.000000000","message":"consider shortening the line here.","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"b123a4547a07617084c7f080f594f82b86e5ac19","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if (angular.isArray(resolvedInput)) {"},{"line_number":114,"context_line":"          multiPromiseResolver(singlePromiseResolver, resolvedInput).then(linkContent, element.remove);"},{"line_number":115,"context_line":"        } else {"},{"line_number":116,"context_line":"          singlePromiseResolver(resolvedInput).then(linkContent, element.remove);"},{"line_number":117,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_5fd10ef9","line":114,"in_reply_to":"fa1b9901_72120a0b","updated":"2015-08-19 23:51:58.000000000","message":"Done","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"9ff2255d877c0e9edac127b3d0a6c054a719ab6f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" * (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":3,"context_line":" *"},{"line_number":4,"context_line":" * Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_93aebd96","line":1,"updated":"2015-08-20 02:01:07.000000000","message":"should be /**","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c1d06b84411ec166b820a040a4165f1c10370c0f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" * (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":3,"context_line":" *"},{"line_number":4,"context_line":" * Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_c911e105","line":1,"in_reply_to":"fa1b9901_93aebd96","updated":"2015-08-20 05:22:58.000000000","message":"Done","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"9ff2255d877c0e9edac127b3d0a6c054a719ab6f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    ////////////////"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    function compile(element, attrs, linker) {"},{"line_number":104,"context_line":"      var input \u003d $parse(attrs[this.name]);"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"},{"line_number":107,"context_line":""}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_f3c29933","line":104,"updated":"2015-08-20 02:01:07.000000000","message":"grouping the 3 lines here could make it easier to see that resolvePromises was returned. or add ///// after the return.","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c1d06b84411ec166b820a040a4165f1c10370c0f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    ////////////////"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    function compile(element, attrs, linker) {"},{"line_number":104,"context_line":"      var input \u003d $parse(attrs[this.name]);"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"      var singlePromiseResolver \u003d this.singlePromiseResolver;"},{"line_number":107,"context_line":""}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_093359ac","line":104,"in_reply_to":"fa1b9901_f3c29933","updated":"2015-08-20 05:22:58.000000000","message":"Done","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"9ff2255d877c0e9edac127b3d0a6c054a719ab6f","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"      return resolvePromises;"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        var promiseResolver \u003d angular.isArray(resolvedInput) ?"}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_935d5d7b","line":110,"updated":"2015-08-20 02:01:07.000000000","message":"need to add: \"iAttrs, controller\" for reasons below","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"9ff2255d877c0e9edac127b3d0a6c054a719ab6f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"      return resolvePromises;"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        var promiseResolver \u003d angular.isArray(resolvedInput) ?"},{"line_number":114,"context_line":"              multiPromiseResolver(singlePromiseResolver, resolvedInput) :"}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_9386bdd9","line":111,"updated":"2015-08-20 02:01:07.000000000","message":"we should check for evaluation in controller first, then if it doesn\u0027t exist, check in scope.","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"69536b940da42b56f1b9d1d24c297732ad2e0235","unresolved":false,"context_lines":[{"line_number":108,"context_line":"      return resolvePromises;"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        var promiseResolver \u003d angular.isArray(resolvedInput) ?"},{"line_number":114,"context_line":"              multiPromiseResolver(singlePromiseResolver, resolvedInput) :"}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_27408f33","line":111,"in_reply_to":"fa1b9901_89da09e7","updated":"2015-08-21 01:33:23.000000000","message":"oh neat, didn\u0027t know that it could work this way. I assumed that scope was just scope and does not account for objects bound to the controller.","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c1d06b84411ec166b820a040a4165f1c10370c0f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"      return resolvePromises;"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        var promiseResolver \u003d angular.isArray(resolvedInput) ?"},{"line_number":114,"context_line":"              multiPromiseResolver(singlePromiseResolver, resolvedInput) :"}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_89da09e7","line":111,"in_reply_to":"fa1b9901_9386bdd9","updated":"2015-08-20 05:22:58.000000000","message":"I\u0027m not sure what you mean.  The change above with $parse seems to work for me.\n\nHere\u0027s how I tested it locally. In launch instance configuration step.\n\nIn configuration.controller.js\n\n ctrl.exampleConfig \u003d [\"DiskConfig\", \"ConfigDrive\"];\n\nIn configuration.html\n\nchanged \n\n   \u003cdiv hz-nova-extensions\u003d\u0027[\"DiskConfig\"]\u0027\u003e\n\nto\n  \n  \u003cdiv hz-nova-extensions\u003d\u0027config.exampleConfig\u0027\u003e\n\nSo, the input is based on the array in the controller, rather than inline definition. I think the child policy patch just needs to be updated with a concrete example to show the same for policy.\n\n\nI was able to change the controller definition from array to string.  Eg.\n\n ctrl.exampleConfig \u003d \"ConfigDrive\";\n\nAnd finally, able to successfully change inline HTML definition from array to string. Eg.\n\n    \u003cdiv hz-nova-extensions\u003d\u0027[\"DiskConfig\"]\u0027\u003e\n\nTo\n\n    \u003cdiv hz-nova-extensions\u003d\u0027\"DiskConfig\"\u0027\u003e","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"9ff2255d877c0e9edac127b3d0a6c054a719ab6f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        var promiseResolver \u003d angular.isArray(resolvedInput) ?"},{"line_number":114,"context_line":"              multiPromiseResolver(singlePromiseResolver, resolvedInput) :"},{"line_number":115,"context_line":"              singlePromiseResolver(resolvedInput);"},{"line_number":116,"context_line":""}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_b3b8a1c9","line":113,"updated":"2015-08-20 02:01:07.000000000","message":"one tab should be enough?","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c1d06b84411ec166b820a040a4165f1c10370c0f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      function resolvePromises(scope, iterStartElement) {"},{"line_number":111,"context_line":"        var resolvedInput \u003d input(scope);"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        var promiseResolver \u003d angular.isArray(resolvedInput) ?"},{"line_number":114,"context_line":"              multiPromiseResolver(singlePromiseResolver, resolvedInput) :"},{"line_number":115,"context_line":"              singlePromiseResolver(resolvedInput);"},{"line_number":116,"context_line":""}],"source_content_type":"text/javascript","patch_set":12,"id":"fa1b9901_49ecf1f2","line":113,"in_reply_to":"fa1b9901_b3b8a1c9","updated":"2015-08-20 05:22:58.000000000","message":"Tried one tab. I feel it was less readable. Two tabs seemed reasonable though, so switched to that.","commit_id":"be8c8c0c5073686129ff0f7b90423b25cbf0aeeb"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"5748e46bdee24c4cda6c7470a9723dbdbdecf76c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            multiPromiseResolver(singlePromiseResolver, resolvedInput) :"},{"line_number":116,"context_line":"            singlePromiseResolver(resolvedInput);"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        promiseResolver.then(linkContent, element.remove);"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        function linkContent() {"},{"line_number":121,"context_line":"          linker(scope, function (clone) {"}],"source_content_type":"text/javascript","patch_set":13,"id":"fa1b9901_ac1d9b63","line":118,"updated":"2015-08-20 05:33:21.000000000","message":"element.remove is a method, not a function. Inside the method there maybe a `this.somthing`, in that case, this might bound to different object rather that element. It would be saver to define a function wrapping element.remove() and then put the name of the function here.\n\nWon\u0027t -1 since this is a matter about good practice.","commit_id":"0c5f58b90370a4efebfd5b758b6566177b6eec30"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"deff37f318ca8094503d3d79a84f80f4e44b255d","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            multiPromiseResolver(singlePromiseResolver, resolvedInput) :"},{"line_number":116,"context_line":"            singlePromiseResolver(resolvedInput);"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        promiseResolver.then(linkContent, element.remove);"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        function linkContent() {"},{"line_number":121,"context_line":"          linker(scope, function (clone) {"}],"source_content_type":"text/javascript","patch_set":13,"id":"fa1b9901_efb28ce4","line":118,"in_reply_to":"fa1b9901_ac1d9b63","updated":"2015-08-20 17:40:39.000000000","message":"Thanks Sean!  That\u0027s actually what I originally did and then changed it to directly call element.remove.  I switched it back.","commit_id":"0c5f58b90370a4efebfd5b758b6566177b6eec30"}],"horizon/static/framework/util/promise-toggle/hz-promise-toggle.directive.spec.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"8173f66addb8a5d84fc21a19d7174834922d5242","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        expect(mockService.mockResolver).toHaveBeenCalledWith(\u0027true\u0027);"},{"line_number":74,"context_line":"      });"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"      it(\u0027should be compiled for multiple resolved promises\u0027, function () {"},{"line_number":77,"context_line":"        var params \u003d \u0027[\\\"true\\\", \\\"true\\\"]\u0027;"},{"line_number":78,"context_line":"        var template \u003d baseHtml.replace($mockHtmlInput, params);"},{"line_number":79,"context_line":""}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_675b5c55","line":76,"updated":"2015-08-19 04:48:01.000000000","message":"Consider breaking test functions out, see https://review.openstack.org/#/c/211345/8/horizon/static/framework/widgets/transfer-table/transfer-table.controller.spec.js L119 for example.","commit_id":"1a7442b1cf3cdbffde907516b807b4c5d5e5d809"}],"openstack_dashboard/static/app/core/cloud-services/cloud-services.service.js":[{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"c6d5270ed274cb97f78f2fc9aa4da039d723e391","unresolved":false,"context_lines":[{"line_number":72,"context_line":"      securityGroup:    securityGroup,"},{"line_number":73,"context_line":"      serviceCatalog:   serviceCatalog,"},{"line_number":74,"context_line":"      settingsService:  settingsService"},{"line_number":75,"context_line":"    };"},{"line_number":76,"context_line":"  }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_2c8999c9","side":"PARENT","line":75,"updated":"2015-08-19 21:51:50.000000000","message":"Can we keep this file? this can be used in places where we need many API services but do not want to inject them individually.","commit_id":"c4d7ecb0b61e689a4537c8886536a9a5b0d7924f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"799764f98b13f80ef50265ecfc38832d5dbedc18","unresolved":false,"context_lines":[{"line_number":72,"context_line":"      securityGroup:    securityGroup,"},{"line_number":73,"context_line":"      serviceCatalog:   serviceCatalog,"},{"line_number":74,"context_line":"      settingsService:  settingsService"},{"line_number":75,"context_line":"    };"},{"line_number":76,"context_line":"  }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_c438e9f1","side":"PARENT","line":75,"in_reply_to":"fa1b9901_2c8999c9","updated":"2015-08-20 03:58:56.000000000","message":"I do see your point, but is that actually good pattern?  It may make it hard to find actual dependency impact when we are evaluating API changes in the future.  Should you really inject in 8 services when you only use 3 or 4 of them?  I\u0027m really wondering here.","commit_id":"c4d7ecb0b61e689a4537c8886536a9a5b0d7924f"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"2a3d4cad25f33e25457e5a2a476818620c988c05","unresolved":false,"context_lines":[{"line_number":72,"context_line":"      securityGroup:    securityGroup,"},{"line_number":73,"context_line":"      serviceCatalog:   serviceCatalog,"},{"line_number":74,"context_line":"      settingsService:  settingsService"},{"line_number":75,"context_line":"    };"},{"line_number":76,"context_line":"  }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_e6d41221","side":"PARENT","line":75,"in_reply_to":"fa1b9901_c438e9f1","updated":"2015-08-20 04:29:40.000000000","message":"Dependency injecting is cheep which just return some references, it is not really `injecting` any think. Actually this pattern injects only one reference into the function where the services are required rather than injecting many references, although both are cheep. If we take a look at the launch instance model, the signature of the service is unnecessarily long and tedious, which can be improved be this pattern.\n\nAdditionally, this service enabled the horizon.app.core.cloud-services.ifFeaturesEnabled service, where we can just path in the service name and check the availability of the service in JS, otherwise, we need to create such a thing for each API services.","commit_id":"c4d7ecb0b61e689a4537c8886536a9a5b0d7924f"}],"openstack_dashboard/static/app/core/cloud-services/hz-nova-extension.directive.spec.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"4d882061057ac6728d9dc756b8aefc8800ced68a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"(function () {"},{"line_number":19,"context_line":"  \u0027use strict\u0027;"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"  describe(\u0027horizon.app.core.cloud-services\u0027, function () {"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    describe(\u0027directive:hzNovaExtension\u0027, function () {"},{"line_number":24,"context_line":"      var $compile, $scope, deferred, novaExtensionsAPI;"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_725beaf6","line":21,"updated":"2015-08-19 22:31:48.000000000","message":"is there a reason why we need to nest these two? is the first describe even needed?","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"b123a4547a07617084c7f080f594f82b86e5ac19","unresolved":false,"context_lines":[{"line_number":18,"context_line":"(function () {"},{"line_number":19,"context_line":"  \u0027use strict\u0027;"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"  describe(\u0027horizon.app.core.cloud-services\u0027, function () {"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    describe(\u0027directive:hzNovaExtension\u0027, function () {"},{"line_number":24,"context_line":"      var $compile, $scope, deferred, novaExtensionsAPI;"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_df32fe5e","line":21,"in_reply_to":"fa1b9901_725beaf6","updated":"2015-08-19 23:51:58.000000000","message":"Done","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"}],"openstack_dashboard/static/app/core/cloud-services/hz-settings-toggle.directive.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e3da282ee0dbd7ac4ad283613b2642a6de1fc2f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"   ```"},{"line_number":45,"context_line":"   */"},{"line_number":46,"context_line":"  function hzSettingsToggle(hzPromiseToggleTemplate, settingsService) {"},{"line_number":47,"context_line":"    return angular.extend({},"},{"line_number":48,"context_line":"        hzPromiseToggleTemplate[0],"},{"line_number":49,"context_line":"        {"},{"line_number":50,"context_line":"          singlePromiseResolver: settingsService.ifEnabled,"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_1cb47fd2","line":47,"updated":"2015-08-14 00:26:24.000000000","message":"extra {} not needed","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"294f8f0cca6ee4199e2d8f4030061b034d7527ac","unresolved":false,"context_lines":[{"line_number":44,"context_line":"   ```"},{"line_number":45,"context_line":"   */"},{"line_number":46,"context_line":"  function hzSettingsToggle(hzPromiseToggleTemplate, settingsService) {"},{"line_number":47,"context_line":"    return angular.extend({},"},{"line_number":48,"context_line":"        hzPromiseToggleTemplate[0],"},{"line_number":49,"context_line":"        {"},{"line_number":50,"context_line":"          singlePromiseResolver: settingsService.ifEnabled,"}],"source_content_type":"text/javascript","patch_set":9,"id":"1a4dcd0f_7257b926","line":47,"in_reply_to":"1a4dcd0f_1cb47fd2","updated":"2015-08-20 03:58:36.000000000","message":"Done","commit_id":"952def5087753836fc0c946098ef0282449ddf1e"}],"openstack_dashboard/static/app/core/cloud-services/hz-settings-toggle.directive.spec.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"4d882061057ac6728d9dc756b8aefc8800ced68a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"(function () {"},{"line_number":18,"context_line":"  \u0027use strict\u0027;"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  describe(\u0027horizon.app.core.cloud-services\u0027, function () {"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    describe(\u0027directive:hzSettingsToggle\u0027, function () {"},{"line_number":23,"context_line":"      var $compile, $scope, deferred, settingsServiceAPI;"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_1275ce62","line":20,"updated":"2015-08-19 22:31:48.000000000","message":"same question here.","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"b123a4547a07617084c7f080f594f82b86e5ac19","unresolved":false,"context_lines":[{"line_number":17,"context_line":"(function () {"},{"line_number":18,"context_line":"  \u0027use strict\u0027;"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  describe(\u0027horizon.app.core.cloud-services\u0027, function () {"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    describe(\u0027directive:hzSettingsToggle\u0027, function () {"},{"line_number":23,"context_line":"      var $compile, $scope, deferred, settingsServiceAPI;"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_5f3fce23","line":20,"in_reply_to":"fa1b9901_1275ce62","updated":"2015-08-19 23:51:58.000000000","message":"Done","commit_id":"976c00bd83c0578a8cfd655177da51c428e77376"}],"openstack_dashboard/static/app/core/cloud-services/if-features-enabled.service.js":[{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"c6d5270ed274cb97f78f2fc9aa4da039d723e391","unresolved":false,"context_lines":[{"line_number":52,"context_line":"      );//return"},{"line_number":53,"context_line":"    };//return"},{"line_number":54,"context_line":"  }"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_2c5e7944","side":"PARENT","line":55,"updated":"2015-08-19 21:51:50.000000000","message":"Also, this can be reused in places where we need to check if the service\u0027s availability in JS code rather than in HTML.","commit_id":"c4d7ecb0b61e689a4537c8886536a9a5b0d7924f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"799764f98b13f80ef50265ecfc38832d5dbedc18","unresolved":false,"context_lines":[{"line_number":52,"context_line":"      );//return"},{"line_number":53,"context_line":"    };//return"},{"line_number":54,"context_line":"  }"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":10,"id":"fa1b9901_04a6e152","side":"PARENT","line":55,"in_reply_to":"fa1b9901_2c5e7944","updated":"2015-08-20 03:58:56.000000000","message":"I don\u0027t actually understand why this is needed?  I saw this as just a wrapper around specific services (settingsService and novaExtensions) which already have the function.  Those specific services already have a function and in fact I want to get rid of the ifEnabled alias on novaExtensions.","commit_id":"c4d7ecb0b61e689a4537c8886536a9a5b0d7924f"}]}
