)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"2c786324294fad4a70b8ea876e9eb9edfdeffddd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rajat Vig \u003crajatv@thoughtworks.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-13 11:38:48 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Directive to check if Service is enabled"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This also patches behavior of the hz-promise-toggle"},{"line_number":10,"context_line":"directive to pass the params to the resolver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_3c2ffb3f","line":7,"updated":"2015-08-14 00:08:39.000000000","message":"Please say to check if a service in the service catalog is enabled.","commit_id":"e289b488ff3fd2a178e5cb2e7f6e3c22a7a5f67b"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"34efd3ca1e4f503fa3ff23d957e7b015e133a437","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rajat Vig \u003crajatv@thoughtworks.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-13 11:38:48 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Directive to check if Service is enabled"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This also patches behavior of the hz-promise-toggle"},{"line_number":10,"context_line":"directive to pass the params to the resolver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_35c6fb16","line":7,"in_reply_to":"1a4dcd0f_3c2ffb3f","updated":"2015-08-15 00:31:59.000000000","message":"Done","commit_id":"e289b488ff3fd2a178e5cb2e7f6e3c22a7a5f67b"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"2c786324294fad4a70b8ea876e9eb9edfdeffddd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Directive to check if Service is enabled"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This also patches behavior of the hz-promise-toggle"},{"line_number":10,"context_line":"directive to pass the params to the resolver."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Iaffb9d738e94ef25bca4938405ac9f2f4aa7b368"},{"line_number":13,"context_line":"Partial-Bug: #1450150"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_fc28b335","line":10,"updated":"2015-08-14 00:08:39.000000000","message":"Remove.","commit_id":"e289b488ff3fd2a178e5cb2e7f6e3c22a7a5f67b"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"34efd3ca1e4f503fa3ff23d957e7b015e133a437","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Directive to check if Service is enabled"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This also patches behavior of the hz-promise-toggle"},{"line_number":10,"context_line":"directive to pass the params to the resolver."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Iaffb9d738e94ef25bca4938405ac9f2f4aa7b368"},{"line_number":13,"context_line":"Partial-Bug: #1450150"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_55c94724","line":10,"in_reply_to":"1a4dcd0f_fc28b335","updated":"2015-08-15 00:31:59.000000000","message":"Done","commit_id":"e289b488ff3fd2a178e5cb2e7f6e3c22a7a5f67b"}],"horizon/static/framework/util/promise-toggle/hz-promise-toggle.directive.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"ae0045d05716c062f80bcb7187f00f17368a2058","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        }"},{"line_number":104,"context_line":"      };"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"      function parseParam(param) {"},{"line_number":107,"context_line":"        if (param.indexOf(\u0027[\u0027) \u003d\u003d\u003d 0) {"},{"line_number":108,"context_line":"          var params \u003d param.substring(1, param.length - 1).split(\u0027,\u0027);"},{"line_number":109,"context_line":"          return params.reduce(parseToArray, []);"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_362e6a43","line":106,"updated":"2015-08-13 07:22:05.000000000","message":"I\u0027m not sure why all of this is needed.  It actually makes it not work as intended.\n\nFor example, in\n\n  openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/configuration/configuration.html\n\nif you change hz-nova-extension input from an array to a single string, it resolves correctly in the parent patch and does not resolve correctly in this patch.  Step through the debugger with both patches.\n\nTry both of the bloew\n\n\u003cdiv hz-nova-extensions\u003d\u0027[\"DiskConfig\"]\u0027\u003e\n\n\u003cdiv hz-nova-extensions\u003d\u0027\"DiskConfig\"\u0027\u003e","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"a212fe655b595b3217ddd21ca5568510493b7398","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        }"},{"line_number":104,"context_line":"      };"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"      function parseParam(param) {"},{"line_number":107,"context_line":"        if (param.indexOf(\u0027[\u0027) \u003d\u003d\u003d 0) {"},{"line_number":108,"context_line":"          var params \u003d param.substring(1, param.length - 1).split(\u0027,\u0027);"},{"line_number":109,"context_line":"          return params.reduce(parseToArray, []);"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_618d0e30","line":106,"in_reply_to":"1a4dcd0f_362e6a43","updated":"2015-08-13 18:40:10.000000000","message":"It was my mistake. \n\nI coded the directive params with a single quote and the angular.fromJson didn\u0027t work with it and I instead wrote the parser.\n\nI\u0027ve reverted it to the original.","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"}],"horizon/static/framework/util/promise-toggle/hz-promise-toggle.directive.spec.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"ae0045d05716c062f80bcb7187f00f17368a2058","unresolved":false,"context_lines":[{"line_number":105,"context_line":"          deferred.resolve();"},{"line_number":106,"context_line":"        } else {"},{"line_number":107,"context_line":"          deferred.reject();"},{"line_number":108,"context_line":"        }"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        $scope.$apply();"},{"line_number":111,"context_line":""}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_3b917347","line":108,"updated":"2015-08-13 07:22:05.000000000","message":"I like that you are checking mock input (toHaveBeenCalledWith).  I don\u0027t like so much that this no longer testes the multiple promise resolve in the way intended. The previous code was actually ensuring that however the implementation worked that it would allow for different promises to resolve with different results based on inputs. I think this is a little weaker form of testing to completely mock that out.  Was there some other reason you did this?\n\nI think once we resolve this, we should just merge all the hz-promise-toggle-directive.js and related spec up into the parent patch.  Just add yourself as co-author on it.  If you could go ahead and fill in the missing tests for the hz-nova-extensions and hz-settings-toggle, that would be great.  If not, I\u0027ll try to get to it.\n\nAlso, the Policy Service is something that we need to create a directive for.  We should look at what needs to be done to enable it: https://github.com/openstack/horizon/blob/master/openstack_dashboard/static/app/core/openstack-service-api/policy.service.js","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"a212fe655b595b3217ddd21ca5568510493b7398","unresolved":false,"context_lines":[{"line_number":105,"context_line":"          deferred.resolve();"},{"line_number":106,"context_line":"        } else {"},{"line_number":107,"context_line":"          deferred.reject();"},{"line_number":108,"context_line":"        }"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        $scope.$apply();"},{"line_number":111,"context_line":""}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_e1da7e77","line":108,"in_reply_to":"1a4dcd0f_3b917347","updated":"2015-08-13 18:40:10.000000000","message":"I noticed the flawed logic of checking multiple promises as well. It was next on my to-do list :)\n\nI\u0027ll get another set of changes in with some testing and a quick review before merging it in with the parent patch.\n\nI\u0027ll think about the policy service directive.","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"59882c51aff67832477efa2a8e72e899f324f97a","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"      });"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"      it(\u0027should be compiled for one resolved promise\u0027, function () {"},{"line_number":66,"context_line":"        var params \u003d \u0027\\\"true\\\"\u0027;"},{"line_number":67,"context_line":"        var template \u003d baseHtml.replace($mockHtmlInput, params);"},{"line_number":68,"context_line":""}],"source_content_type":"text/javascript","patch_set":2,"id":"1a4dcd0f_30bac472","line":65,"updated":"2015-08-13 23:46:27.000000000","message":"I like these additional tests and moving the parameters of each test into each function. Makes it a little easier to follow. I\u0027ve merged this up into parent patch.","commit_id":"e289b488ff3fd2a178e5cb2e7f6e3c22a7a5f67b"}],"openstack_dashboard/static/app/core/cloud-services/hz-if-services.directive.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"86f3ace846e3549740361a9b0784a18b10ab7d7c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"   * This is evaluated once per page load. In current horizon,"},{"line_number":46,"context_line":"   * this means it will get re-evaluated with events like the"},{"line_number":47,"context_line":"   * user opening another panel, changing logins, or changing their region."},{"line_number":48,"context_line":"   *"},{"line_number":49,"context_line":"   * @example"},{"line_number":50,"context_line":"   *"},{"line_number":51,"context_line":"   ```html"}],"source_content_type":"text/javascript","patch_set":12,"id":"da20952f_84fde36f","line":48,"updated":"2015-08-31 16:39:09.000000000","message":"Let\u0027s add a little more usage information here and simplify the example.  How about:\n\n   * The hz-if-services attribute should be set to the required service\n   * type(s) from the service catalog (e.g. network, volume, search, etc).\n   * It may by set to a single service type or an array of service types.\n   * This may be done inline or may come from an object in scope.\n   * All of the following are examples:\n   *\n   * hz-if-services\u003d\u0027\"network\"\u0027\n   * hz-if-services\u003d\u0027[\"network\"]\u0027\n   * hz-if-services\u003d\u0027[\"network\", \"metering\"]\u0027\n   * \n   * For using a scope object, assume the following is in the controller:\n   * \n   * ctrl.requiredServices \u003d [\"network\", \"metering\"];\n   * \n   * Then in HTML:\n   * \n   * hz-if-services\u003d\u0027ctrl.requiredServices\u0027\n   *\n   * @example\n   *\n   * In the following example, if the network service is not enabled\n   * in the service catalog, then the div element with hz-if-services\n   * and all of the elements inside of it will be removed and never\n   * evaluated by the angular compiler.\n   *\n   ```html\n   \u003cdiv hz-if-services\u003d\u0027\"network\"\u0027\u003e\n     \u003c!-- ui code here --\u003e\n   \u003c/div","commit_id":"891eb56b2dc599493399e97ea7dd773a7bf37b0f"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"8068bd8d3646235b50785679d6883326fb7f5d8c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"   * This is evaluated once per page load. In current horizon,"},{"line_number":46,"context_line":"   * this means it will get re-evaluated with events like the"},{"line_number":47,"context_line":"   * user opening another panel, changing logins, or changing their region."},{"line_number":48,"context_line":"   *"},{"line_number":49,"context_line":"   * @example"},{"line_number":50,"context_line":"   *"},{"line_number":51,"context_line":"   ```html"}],"source_content_type":"text/javascript","patch_set":12,"id":"da20952f_738e522f","line":48,"in_reply_to":"da20952f_84fde36f","updated":"2015-08-31 18:42:28.000000000","message":"Done","commit_id":"891eb56b2dc599493399e97ea7dd773a7bf37b0f"}],"openstack_dashboard/static/app/core/cloud-services/hz-if-services.directive.spec.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"f4aafe2b39ba5b932161b58a06681e8acdaa248b","unresolved":false,"context_lines":[{"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:hzServiceEnabled\u0027, function () {"},{"line_number":23,"context_line":"      var $compile, $scope, deferred, serviceCatalogAPI;"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"      var template \u003d ["}],"source_content_type":"text/javascript","patch_set":11,"id":"da20952f_0810584d","line":22,"updated":"2015-08-28 15:29:33.000000000","message":"should be hzIfServiceEnabled","commit_id":"a98be17919ad48dfa1654bc40f7eca0229b508bd"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"fbccdb444ff6c6913cc2c2de4303442ae0947342","unresolved":false,"context_lines":[{"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:hzServiceEnabled\u0027, function () {"},{"line_number":23,"context_line":"      var $compile, $scope, deferred, serviceCatalogAPI;"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"      var template \u003d ["}],"source_content_type":"text/javascript","patch_set":11,"id":"da20952f_b9ee60b2","line":22,"in_reply_to":"da20952f_0810584d","updated":"2015-08-28 16:39:33.000000000","message":"Done","commit_id":"a98be17919ad48dfa1654bc40f7eca0229b508bd"}],"openstack_dashboard/static/app/core/cloud-services/hz-nova-extension.directive.spec.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"59882c51aff67832477efa2a8e72e899f324f97a","unresolved":false,"context_lines":[{"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:hzNovaExtension\u0027, function () {"},{"line_number":23,"context_line":"      var $compile, $scope, deferred, novaExtensionsAPI;"},{"line_number":24,"context_line":""}],"source_content_type":"text/javascript","patch_set":2,"id":"1a4dcd0f_d6ccb863","line":21,"updated":"2015-08-13 23:46:27.000000000","message":"This achieves 100% code coverage, but we can make the testing even deeper if we evaluate after applying.  See this paste for what could be done:\n\nhttp://paste.openstack.org/show/413118/\n\nNote the updated template with a wrapper div and note the change in the final test.  The same pattern could be done to the settings toggle spec.\n\nI\u0027ve gone ahead and put this code in the parent patch to replace that patch and added you as co-author.","commit_id":"e289b488ff3fd2a178e5cb2e7f6e3c22a7a5f67b"}],"openstack_dashboard/static/app/core/cloud-services/hz-service-enabled.directive.js":[{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"0c387ab492456a7434e3f9af7216a3c2024d6242","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *"},{"line_number":3,"context_line":" * Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":" * you may not use this file except in compliance with the License."}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_1e583789","line":1,"updated":"2015-08-12 21:52:35.000000000","message":"Is it intended that this file doesn\u0027t have the HP copyright but hz-service-enabled.directive.spec.js does?","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"a212fe655b595b3217ddd21ca5568510493b7398","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *"},{"line_number":3,"context_line":" * Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":" * you may not use this file except in compliance with the License."}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_e13efeb6","line":1,"in_reply_to":"1a4dcd0f_1e583789","updated":"2015-08-13 18:40:10.000000000","message":"Done","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"ae0045d05716c062f80bcb7187f00f17368a2058","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"  angular"},{"line_number":20,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":21,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":24,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_702ddaa6","line":21,"updated":"2015-08-13 07:22:05.000000000","message":"directive name doesn\u0027t match documentation example below\n\nWe need have some consistency in naming, so open to other suggestions.  Other patch has hz-nova-extensions and hz-settings-toggle.  Here are some other ideas:\n\n hz-services-enabled\n hz-catalog-services\n hz-catalog-services-toggle\n hz-services-toggle\n\nPlural, because remember it is intended that this can accept either a single entry or an array of service catalog entries required [\u0027image\u0027,\u0027volume\u0027]","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"a212fe655b595b3217ddd21ca5568510493b7398","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"  angular"},{"line_number":20,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":21,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":24,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a4dcd0f_e1659ee0","line":21,"in_reply_to":"1a4dcd0f_702ddaa6","updated":"2015-08-13 18:40:10.000000000","message":"Done. \nThanks for the suggestions. I used hz-services-toggle","commit_id":"b8bacf9121b76623398fa604538088988aeb16c0"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"605961ea038bd0479250bc4658de22bc7fb28695","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"  /**"},{"line_number":30,"context_line":"   * @ngdoc directive"},{"line_number":31,"context_line":"   * @name hz.api:directive:hzServiceEnabled"},{"line_number":32,"context_line":"   * @module hz.api"},{"line_number":33,"context_line":"   * @description"},{"line_number":34,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":6,"id":"fa1b9901_7119b787","line":31,"updated":"2015-08-25 16:00:04.000000000","message":"@name horizon.app.core.cloud-services:directive:hzServiceEnabled","commit_id":"30b16128762d178cbf8f9270f7f7ccf9b4baa873"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"3d6ef4549d132cbdc5dcda7997fb3c241fe6d32e","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"  /**"},{"line_number":30,"context_line":"   * @ngdoc directive"},{"line_number":31,"context_line":"   * @name hz.api:directive:hzServiceEnabled"},{"line_number":32,"context_line":"   * @module hz.api"},{"line_number":33,"context_line":"   * @description"},{"line_number":34,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":6,"id":"fa1b9901_943799fe","line":31,"in_reply_to":"fa1b9901_7119b787","updated":"2015-08-25 16:20:20.000000000","message":"Done","commit_id":"30b16128762d178cbf8f9270f7f7ccf9b4baa873"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"605961ea038bd0479250bc4658de22bc7fb28695","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  /**"},{"line_number":30,"context_line":"   * @ngdoc directive"},{"line_number":31,"context_line":"   * @name hz.api:directive:hzServiceEnabled"},{"line_number":32,"context_line":"   * @module hz.api"},{"line_number":33,"context_line":"   * @description"},{"line_number":34,"context_line":"   *"},{"line_number":35,"context_line":"   * This is to enable specifying conditional UI in a declarative way."}],"source_content_type":"text/javascript","patch_set":6,"id":"fa1b9901_513d93db","line":32,"updated":"2015-08-25 16:00:04.000000000","message":"@module horizon.app.core.cloud-services","commit_id":"30b16128762d178cbf8f9270f7f7ccf9b4baa873"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"3d6ef4549d132cbdc5dcda7997fb3c241fe6d32e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  /**"},{"line_number":30,"context_line":"   * @ngdoc directive"},{"line_number":31,"context_line":"   * @name hz.api:directive:hzServiceEnabled"},{"line_number":32,"context_line":"   * @module hz.api"},{"line_number":33,"context_line":"   * @description"},{"line_number":34,"context_line":"   *"},{"line_number":35,"context_line":"   * This is to enable specifying conditional UI in a declarative way."}],"source_content_type":"text/javascript","patch_set":6,"id":"fa1b9901_74320512","line":32,"in_reply_to":"fa1b9901_513d93db","updated":"2015-08-25 16:20:20.000000000","message":"Done","commit_id":"30b16128762d178cbf8f9270f7f7ccf9b4baa873"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b49e9479612ba2f26dc742e0997c6447eb44dd69","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":7,"id":"fa1b9901_cd69f78d","line":22,"updated":"2015-08-25 21:02:17.000000000","message":"This can take a list of services so hz-service-enabled isn\u0027t quite right.\n\nI don\u0027t think hz-services-enabled is quite right either...\n\nI actually think that to keep it inline with the below, it needs to be one of the following:\n\nhz-cloud-services\nhz-cloud-services-toggle\n\nI\u0027ll ping a few people to leave their feedback before you update this patch again.\n------------------------\n\nExisting:\n\nhz-nova-extensions\n\n https://github.com/openstack/horizon/blob/master/openstack_dashboard/static/app/core/cloud-services/hz-nova-extension.directive.js#L22)\n\nhz-settings-toggle\n\n https://github.com/openstack/horizon/blob/master/openstack_dashboard/static/app/core/cloud-services/hz-settings-toggle.directive.js#L22","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"39a56a993a9ed06e6bc71186fd1e02cbfa345673","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_fb620216","line":22,"in_reply_to":"da20952f_531d1cbc","updated":"2015-08-26 19:34:53.000000000","message":"I like the following:\n\nhz-if-services\u003d\n\nThen we would change:\n\nhz-if-settings\u003d\nhz-if-nova-extensions\u003d\nhz-if-policies\u003d","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"0147cb21d1576615605fab1c6830c48ae8e19d5a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_fe08702f","line":22,"in_reply_to":"da20952f_fb620216","updated":"2015-08-27 20:44:59.000000000","message":"Nice. The name for the directive is lot more meaningful. I\u0027ll change it along with the documentation.","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"582f172aad4d5bdcfddbc6f3b60e3893e5480c56","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_531d1cbc","line":22,"in_reply_to":"fa1b9901_afc6ed99","updated":"2015-08-26 17:32:18.000000000","message":"This is actually more like an ng-if than ng-show - which uses a class to toggle visibility of the element. As for naming, along similar line, I think *-if as oppose to toggle makes more sense, you\u0027d only want to show the content if the expression evaluates to True. So hz-services-if, hz-settings-if might be more appropriate.\n\nLet\u0027s not get too caught up in naming as this patch provides an important functionality we can use. I would prefer that we don\u0027t hold this patch hostage while we debate the merits of its name.","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"dc59e7a6dcd93ea17be5056e3f51c15f3a62dd86","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":7,"id":"fa1b9901_afc6ed99","line":22,"in_reply_to":"fa1b9901_c90b24d5","updated":"2015-08-26 04:01:41.000000000","message":"The -hide makes some sense to me. Although, there is a subtle but important semantic difference between showing and hiding.  With showing and hiding, the content is still compiled and linked in. With this, it is never even compiled.  Although, perhaps we should be hiding (adding the class) until the promise resolves.\n\nAlso, I added some better descriptions to the current ones in the following patch. Please take a look:\n\nhttps://review.openstack.org/#/c/216949/","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"9c014c48f2272ecb2f1f8ebed69115c37ff2c4eb","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServiceEnabled\u0027, hzServiceEnabled);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServiceEnabled.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":7,"id":"fa1b9901_c90b24d5","line":22,"in_reply_to":"fa1b9901_cd69f78d","updated":"2015-08-26 00:46:30.000000000","message":"angular already has directives to turn DOM elements on and off based on booleans, and the relevant verbs are \"show\" and \"hide\". I believe we should follow that example, rather than use \"toggle\" (does \"toggle\" mean it\u0027s displayed by default, or hidden by default?)\n\nSo the directive would be named hz-cloud-services-show and/or hz-cloud-services-hide (adding both at this point may be YAGNI).","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b49e9479612ba2f26dc742e0997c6447eb44dd69","unresolved":false,"context_lines":[{"line_number":34,"context_line":"   *"},{"line_number":35,"context_line":"   * This is to enable specifying conditional UI in a declarative way."},{"line_number":36,"context_line":"   * Some UI components should be showing only when some certain services"},{"line_number":37,"context_line":"   * are enabled."},{"line_number":38,"context_line":"   *"},{"line_number":39,"context_line":"   * @example"},{"line_number":40,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":7,"id":"fa1b9901_6d5a2bf4","line":37,"updated":"2015-08-25 21:02:17.000000000","message":"The grammar here needs improvement (existing directives have similarly poor grammar).\n\nI think it would be better with something like this:\n\nAdd this directive to any element containing content which should only be evaluated when the specified cloud services are enabled in the service catalog for the currently scoped region. If the cloud service is available for the current region, the content will be evaluated.  Otherwise, the content will not be compiled. In addition, the element and everything contained by it will be removed completely, leaving a simple HTML comment.\n\nThis is evaluated once per page load. In current horizon, this means it will get re-evaluated with events like the user opening another panel, changing logins, or changing their region.","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"929291a130475d58333207c1c52fc2737e026ebb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"   *"},{"line_number":35,"context_line":"   * This is to enable specifying conditional UI in a declarative way."},{"line_number":36,"context_line":"   * Some UI components should be showing only when some certain services"},{"line_number":37,"context_line":"   * are enabled."},{"line_number":38,"context_line":"   *"},{"line_number":39,"context_line":"   * @example"},{"line_number":40,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_efbc376e","line":37,"in_reply_to":"fa1b9901_6d5a2bf4","updated":"2015-08-27 21:39:29.000000000","message":"Done","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b49e9479612ba2f26dc742e0997c6447eb44dd69","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   * @example"},{"line_number":40,"context_line":"   *"},{"line_number":41,"context_line":"   ```html"},{"line_number":42,"context_line":"    \u003cdiv hz-services-toggle\u003d\u0027volume\u0027\u003e"},{"line_number":43,"context_line":"      \u003cdiv class\u003d\"checkbox customization-script-source\"\u003e"},{"line_number":44,"context_line":"        \u003clabel\u003e"},{"line_number":45,"context_line":"          \u003cinput type\u003d\"number\""}],"source_content_type":"text/javascript","patch_set":7,"id":"fa1b9901_f2eb7ada","line":42,"updated":"2015-08-25 21:02:17.000000000","message":"The example html doesn\u0027t match the name.","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"929291a130475d58333207c1c52fc2737e026ebb","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   * @example"},{"line_number":40,"context_line":"   *"},{"line_number":41,"context_line":"   ```html"},{"line_number":42,"context_line":"    \u003cdiv hz-services-toggle\u003d\u0027volume\u0027\u003e"},{"line_number":43,"context_line":"      \u003cdiv class\u003d\"checkbox customization-script-source\"\u003e"},{"line_number":44,"context_line":"        \u003clabel\u003e"},{"line_number":45,"context_line":"          \u003cinput type\u003d\"number\""}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_4f8f63cc","line":42,"in_reply_to":"fa1b9901_f2eb7ada","updated":"2015-08-27 21:39:29.000000000","message":"Done","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"}],"openstack_dashboard/static/app/core/cloud-services/hz-service-enabled.directive.spec.js":[{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"605961ea038bd0479250bc4658de22bc7fb28695","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \u0027\u003c/div\u003e\u0027,"},{"line_number":30,"context_line":"        \u0027\u003c/div\u003e\u0027,"},{"line_number":31,"context_line":"        \u0027\u003c/div\u003e\u0027"},{"line_number":32,"context_line":"      ].join(\u0027\u0027);"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"      beforeEach(function() {"},{"line_number":35,"context_line":"        serviceCatalogAPI \u003d {"}],"source_content_type":"text/javascript","patch_set":6,"id":"fa1b9901_7438c5a0","line":32,"updated":"2015-08-25 16:00:04.000000000","message":"consider using external html partial. Example can be found at:\nhttps://review.openstack.org/#/c/213383/","commit_id":"30b16128762d178cbf8f9270f7f7ccf9b4baa873"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"3d6ef4549d132cbdc5dcda7997fb3c241fe6d32e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \u0027\u003c/div\u003e\u0027,"},{"line_number":30,"context_line":"        \u0027\u003c/div\u003e\u0027,"},{"line_number":31,"context_line":"        \u0027\u003c/div\u003e\u0027"},{"line_number":32,"context_line":"      ].join(\u0027\u0027);"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"      beforeEach(function() {"},{"line_number":35,"context_line":"        serviceCatalogAPI \u003d {"}],"source_content_type":"text/javascript","patch_set":6,"id":"fa1b9901_47df113a","line":32,"in_reply_to":"fa1b9901_7438c5a0","updated":"2015-08-25 16:20:20.000000000","message":"I sort of like the inlined template to allow for more visibiliy in tests. \n\nI could use the external HTML template for testing but it\u0027ll imply adding setting basePath for the module which it doesn\u0027t need.","commit_id":"30b16128762d178cbf8f9270f7f7ccf9b4baa873"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"4efbd0719abda9fbf69f1edc6cefe3fb4e52b32e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"      it(\u0027should evaluate child elements when service is enabled\u0027, function () {"},{"line_number":61,"context_line":"        var element \u003d $compile(template)($scope);"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        deferred.resolve({"},{"line_number":64,"context_line":"          success: function(callback) {"},{"line_number":65,"context_line":"            callback();"},{"line_number":66,"context_line":"          }"}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_7e2a2080","line":63,"updated":"2015-08-27 19:52:21.000000000","message":"hm... testing this locally and i see that it does nothing. you can remove this entire block and it will still work. so my question is, what does this do? and shouldn\u0027t the param in success be a response object (not a callback)?","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"0d0c1d3baa2ef79d4558fed879bc8f2f68071da1","unresolved":false,"context_lines":[{"line_number":60,"context_line":"      it(\u0027should evaluate child elements when service is enabled\u0027, function () {"},{"line_number":61,"context_line":"        var element \u003d $compile(template)($scope);"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        deferred.resolve({"},{"line_number":64,"context_line":"          success: function(callback) {"},{"line_number":65,"context_line":"            callback();"},{"line_number":66,"context_line":"          }"}],"source_content_type":"text/javascript","patch_set":7,"id":"da20952f_cfd29400","line":63,"in_reply_to":"da20952f_7e2a2080","updated":"2015-08-27 21:04:18.000000000","message":"14:58 TravT: tqtran_: rajatvig:\n\n14:58 TravT: just reading back.\n\n14:58 TravT: you need to read this line of the comments in the test\n\n14:59 TravT: hmmm.\n\n14:59 TravT: rajatvig: you didn\u0027t include those comments from the other patches\n\n15:00 TravT: https://github.com/openstack/horizon/blob/master/openstack_dashboard/static/app/core/cloud-services/hz-nova-extension.directive.spec.js#L59-L62\n\n15:01 TravT: all the actual promise testing is done in the common spec\n\n15:01 TravT: https://github.com/openstack/horizon/blob/master/horizon/static/framework/util/promise-toggle/hz-promise-toggle.directive.spec.js\n\n15:01 TravT: for the directive\n\n15:01 rajatvig: TravT: I\u0027ll add the comments per the other patches.\n\n15:01 rajatvig: I was testing what tqtran_ asked me to\n\n15:02 TravT: and all the actual testing for the specific promise for service catalog is here: https://github.com/openstack/horizon/blob/master/openstack_dashboard/static/app/core/openstack-service-api/service-catalog.service.spec.js","commit_id":"182fcb42d185a9f31808a0141753d1958a46a233"}],"openstack_dashboard/static/app/core/cloud-services/hz-services-toggle.directive.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"978cf69882b27d936a7383976260e793ce4b6a80","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServicesToggle\u0027, hzServicesToggle);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServicesToggle.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa1b9901_11b470cf","line":22,"updated":"2015-08-22 00:11:01.000000000","message":"hz-services-toggle in HTML is a little vague.  I\u0027m thinking hz-required-services *might* be better.","commit_id":"9c6877b51156be821af666bacd4f4b60b9f9957f"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"85b43ececab13d473c3f91e4bf1b61b8d7d66d95","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServicesToggle\u0027, hzServicesToggle);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServicesToggle.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa1b9901_78a48f07","line":22,"in_reply_to":"fa1b9901_11b470cf","updated":"2015-08-24 06:48:09.000000000","message":"hz-services-toggle is not completely clear about what the directive does. How about hz-service-enabled?","commit_id":"9c6877b51156be821af666bacd4f4b60b9f9957f"},{"author":{"_account_id":6763,"name":"jingliuqing","email":"jing.liuqing@99cloud.net","username":"jing"},"change_message_id":"5b0a7f82162da7c059e8366b10310e65edbf28f9","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.app.core.cloud-services\u0027)"},{"line_number":22,"context_line":"    .directive(\u0027hzServicesToggle\u0027, hzServicesToggle);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  hzServicesToggle.$inject \u003d  ["},{"line_number":25,"context_line":"    \u0027hzPromiseToggleTemplateDirective\u0027,"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa1b9901_ab13a15b","line":22,"in_reply_to":"fa1b9901_78a48f07","updated":"2015-08-24 12:55:02.000000000","message":"yeah hz-service-enabled makes more sense","commit_id":"9c6877b51156be821af666bacd4f4b60b9f9957f"}]}
