)]}'
{"horizon/static/framework/util/customization/customization.module.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" * Copyright 2015 IBM Corp."},{"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":3,"id":"ba15a1d1_6aae2a2f","line":1,"updated":"2015-09-21 18:38:17.000000000","message":"nit /* --\u003e /** for all js files in this patch","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" * Copyright 2015 IBM Corp."},{"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":3,"id":"ba15a1d1_86b30fe9","line":1,"in_reply_to":"ba15a1d1_6aae2a2f","updated":"2015-09-22 16:50:48.000000000","message":"It seems most (all?) the other js files use this format for the copyright / apache license comment. Just being consistent here.","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   *"},{"line_number":30,"context_line":"   * | Factories                                                                                        |"},{"line_number":31,"context_line":"   * |--------------------------------------------------------------------------------------------------|"},{"line_number":32,"context_line":"   * | {@link horizon.framework.util.customization.service:customizationService `customizationService`} |"},{"line_number":33,"context_line":"   */"},{"line_number":34,"context_line":"  /* eslint-ensable max-len */"},{"line_number":35,"context_line":"  angular"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_eac1dae4","line":32,"updated":"2015-09-21 18:38:17.000000000","message":"this hurts my eyes, can we not include it since we\u0027re not generating links for them atm? can also get rid of the eslint-disable.","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   *"},{"line_number":30,"context_line":"   * | Factories                                                                                        |"},{"line_number":31,"context_line":"   * |--------------------------------------------------------------------------------------------------|"},{"line_number":32,"context_line":"   * | {@link horizon.framework.util.customization.service:customizationService `customizationService`} |"},{"line_number":33,"context_line":"   */"},{"line_number":34,"context_line":"  /* eslint-ensable max-len */"},{"line_number":35,"context_line":"  angular"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_66991b6e","line":32,"in_reply_to":"ba15a1d1_eac1dae4","updated":"2015-09-22 16:50:48.000000000","message":"Done","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"}],"horizon/static/framework/util/customization/customization.service.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"  angular"},{"line_number":20,"context_line":"    .module(\u0027horizon.framework.util.customization\u0027)"},{"line_number":21,"context_line":"    .factory(\u0027horizon.framework.util.customization.service\u0027, customizationService);"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  /**"},{"line_number":24,"context_line":"   * @ngdoc service"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_2677d1d5","line":21,"updated":"2015-09-21 18:38:17.000000000","message":"The term customization is ok for the module, I can see us adding more services to this module down the line. I think the customizationService needs to be less generic. This kind of service reminds me a bit of java interfaces. Maybe we should name them according to the behavior that they give. Something like \"ExtensibleService\" or \"PluggableService\" might be more appropriate?","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"  angular"},{"line_number":20,"context_line":"    .module(\u0027horizon.framework.util.customization\u0027)"},{"line_number":21,"context_line":"    .factory(\u0027horizon.framework.util.customization.service\u0027, customizationService);"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  /**"},{"line_number":24,"context_line":"   * @ngdoc service"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_46f41786","line":21,"in_reply_to":"ba15a1d1_2677d1d5","updated":"2015-09-22 16:50:48.000000000","message":"Done","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  /**"},{"line_number":40,"context_line":"   * A decorator function that makes the given container object customizable by allowing items to"},{"line_number":41,"context_line":"   * be added or removed. This can be used on any object that contains multiple items where a user"},{"line_number":42,"context_line":"   * might want to insert or remove their own items. Examples include workflows (steps), tables"},{"line_number":43,"context_line":"   * (actions), forms (fields). Each item must have a unique ID within the container. It adds the"},{"line_number":44,"context_line":"   * following functions to the container:"},{"line_number":45,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_181ca569","line":42,"updated":"2015-09-21 18:38:17.000000000","message":"not sure the (...) is needed, why not just workflow steps, tables actions, etc....","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  /**"},{"line_number":40,"context_line":"   * A decorator function that makes the given container object customizable by allowing items to"},{"line_number":41,"context_line":"   * be added or removed. This can be used on any object that contains multiple items where a user"},{"line_number":42,"context_line":"   * might want to insert or remove their own items. Examples include workflows (steps), tables"},{"line_number":43,"context_line":"   * (actions), forms (fields). Each item must have a unique ID within the container. It adds the"},{"line_number":44,"context_line":"   * following functions to the container:"},{"line_number":45,"context_line":"   *"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_b915149c","line":42,"in_reply_to":"ba15a1d1_181ca569","updated":"2015-09-22 16:50:48.000000000","message":"Done","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   * position. Higher numbers mean lower priority. If not provided the item will have the lowest"},{"line_number":54,"context_line":"   * priority (infinity)."},{"line_number":55,"context_line":"   *"},{"line_number":56,"context_line":"   * @param {Object} container The container object to make customizable."},{"line_number":57,"context_line":"   * @param {Object} context A customization context object with properties that define how to"},{"line_number":58,"context_line":"   *   customize the container. It must contain the following properties:"},{"line_number":59,"context_line":"   *     items: A function that returns an array of all items in the container (in display order)."}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_385e4913","line":56,"updated":"2015-09-21 18:38:17.000000000","message":"maybe a - between the param name and description will help readability. example: container - The container object....","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   * position. Higher numbers mean lower priority. If not provided the item will have the lowest"},{"line_number":54,"context_line":"   * priority (infinity)."},{"line_number":55,"context_line":"   *"},{"line_number":56,"context_line":"   * @param {Object} container The container object to make customizable."},{"line_number":57,"context_line":"   * @param {Object} context A customization context object with properties that define how to"},{"line_number":58,"context_line":"   *   customize the container. It must contain the following properties:"},{"line_number":59,"context_line":"   *     items: A function that returns an array of all items in the container (in display order)."}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_7c70cadc","line":56,"in_reply_to":"ba15a1d1_385e4913","updated":"2015-09-22 16:50:48.000000000","message":"Done","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   *"},{"line_number":67,"context_line":"   * For example, to make a workflow customizable:"},{"line_number":68,"context_line":"   *"},{"line_number":69,"context_line":"   *   customizationService(workflow, {"},{"line_number":70,"context_line":"   *     items: function() {"},{"line_number":71,"context_line":"   *       return workflow.steps;"},{"line_number":72,"context_line":"   *     },"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_78d92183","line":69,"updated":"2015-09-21 18:38:17.000000000","message":"hm... im not convinced that insert and remove should be handled by the workflow, not why hand that responsibility to the customizationService? havent read rest of code yet, so i\u0027ll keep reading first.","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   *"},{"line_number":67,"context_line":"   * For example, to make a workflow customizable:"},{"line_number":68,"context_line":"   *"},{"line_number":69,"context_line":"   *   customizationService(workflow, {"},{"line_number":70,"context_line":"   *     items: function() {"},{"line_number":71,"context_line":"   *       return workflow.steps;"},{"line_number":72,"context_line":"   *     },"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_dc81d690","line":69,"in_reply_to":"ba15a1d1_78d92183","updated":"2015-09-22 16:50:48.000000000","message":"Done. Moving these into the extensible service so we\u0027ll just have to ensure that manipulating the array of items directly will work for each extensible container.","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    container.extensions \u003d [];"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    /**"},{"line_number":106,"context_line":"     * Append a new item at the end of the container."},{"line_number":107,"context_line":"     *"},{"line_number":108,"context_line":"     * @param {Object} item The item to append."},{"line_number":109,"context_line":"     * @param {Number} priority The optional priority for placement at the end of the container."}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_b8b7b9f4","line":106,"updated":"2015-09-21 18:38:17.000000000","message":"end of container\u0027s items?","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    container.extensions \u003d [];"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    /**"},{"line_number":106,"context_line":"     * Append a new item at the end of the container."},{"line_number":107,"context_line":"     *"},{"line_number":108,"context_line":"     * @param {Object} item The item to append."},{"line_number":109,"context_line":"     * @param {Number} priority The optional priority for placement at the end of the container."}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_17e3a734","line":106,"in_reply_to":"ba15a1d1_b8b7b9f4","updated":"2015-09-22 16:50:48.000000000","message":"Done","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":111,"context_line":"     * (lower number) items."},{"line_number":112,"context_line":"     */"},{"line_number":113,"context_line":"    container.append \u003d function(item, priority) {"},{"line_number":114,"context_line":"      if (!angular.isNumber(priority)) {"},{"line_number":115,"context_line":"        priority \u003d Infinity;"},{"line_number":116,"context_line":"      }"},{"line_number":117,"context_line":"      var extensions \u003d getExtensionsByPosition(container.extensions, \u0027last\u0027).reverse();"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_d8862d16","line":114,"updated":"2015-09-21 18:38:17.000000000","message":"what if priority is negative?","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":111,"context_line":"     * (lower number) items."},{"line_number":112,"context_line":"     */"},{"line_number":113,"context_line":"    container.append \u003d function(item, priority) {"},{"line_number":114,"context_line":"      if (!angular.isNumber(priority)) {"},{"line_number":115,"context_line":"        priority \u003d Infinity;"},{"line_number":116,"context_line":"      }"},{"line_number":117,"context_line":"      var extensions \u003d getExtensionsByPosition(container.extensions, \u0027last\u0027).reverse();"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_d708cfdb","line":114,"in_reply_to":"ba15a1d1_d8862d16","updated":"2015-09-22 16:50:48.000000000","message":"A negative priority should work, if someone really wants to do that.  Not sure if we really need to restrict that or not.","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"}],"horizon/static/framework/util/customization/extensible.service.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"7b273bf982672433c767015bb7f74e8417500dfb","unresolved":false,"context_lines":[{"line_number":93,"context_line":"     *"},{"line_number":94,"context_line":"     * Items added without a priority are given priority Infinity, meaning the lowest priority."},{"line_number":95,"context_line":"     */"},{"line_number":96,"context_line":"    container.extensions \u003d [];"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    /**"},{"line_number":99,"context_line":"     * Append a new item at the end of the container\u0027s items."}],"source_content_type":"text/javascript","patch_set":5,"id":"7a2fa921_9c4a70c4","line":96,"updated":"2015-10-07 22:44:04.000000000","message":"It\u0027s not entirely clear to me how this works. Let me take a stab at it and you can correct me if I am wrong.\n\nIf I understand this correctly, you are keeping the list of extensions separately from the list of items. Why are we doing this? Seems to me like we are modifying the items list each step of the way anyway, so why not just use items directly?\n\nFor those who might find this difficult to follow, let me draw on the workflow as an example of a \"container\". A workflow consist of steps which is refer to as \"items\" here. A user can add additional steps which is refer to as \"extensions\" here.","commit_id":"10509b65f74096be68e18a347825565391c3a051"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c056469588cd7233f54f591c5d0298bf101e21ad","unresolved":false,"context_lines":[{"line_number":93,"context_line":"     *"},{"line_number":94,"context_line":"     * Items added without a priority are given priority Infinity, meaning the lowest priority."},{"line_number":95,"context_line":"     */"},{"line_number":96,"context_line":"    container.extensions \u003d [];"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    /**"},{"line_number":99,"context_line":"     * Append a new item at the end of the container\u0027s items."}],"source_content_type":"text/javascript","patch_set":5,"id":"7a2fa921_35ea4aad","line":96,"in_reply_to":"7a2fa921_9c4a70c4","updated":"2015-10-08 03:10:07.000000000","message":"extension !\u003d item (or step in this case)\n\nThe item is the actual object that represents the item in the container, e.g. a step in a workflow.  The extension is just an internal object being used to keep track of previously added items and their priority so that we can compare any new items being added against them.  This is needed because the item itself does not keep track of its position or priority, so we can\u0027t compare items to one another to determine position.  We could if we decorated the item itself with the position and priority, or maybe gave it some private looking attribute to hold these properties to be safer.","commit_id":"10509b65f74096be68e18a347825565391c3a051"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"7b273bf982672433c767015bb7f74e8417500dfb","unresolved":false,"context_lines":[{"line_number":236,"context_line":"   */"},{"line_number":237,"context_line":"  function getExtensionsByPosition(extensions, position) {"},{"line_number":238,"context_line":"    var result \u003d [];"},{"line_number":239,"context_line":"    angular.forEach(extensions, function(ext) {"},{"line_number":240,"context_line":"      if (ext.position \u003d\u003d\u003d position) {"},{"line_number":241,"context_line":"        result.push(ext);"},{"line_number":242,"context_line":"      }"}],"source_content_type":"text/javascript","patch_set":5,"id":"7a2fa921_e18adbbe","line":239,"updated":"2015-10-07 22:44:04.000000000","message":"extensions.filter can be use here as well. it results a filtered array that you can then chain into sort. See example below.\n\n  function positionEqual(item){ return item.position \u003d\u003d\u003d position; }\n  function positionSort(a, b){ ... }\n  return extensions\n    .filter(positionEqual)\n    .sort(positionSort);","commit_id":"10509b65f74096be68e18a347825565391c3a051"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c056469588cd7233f54f591c5d0298bf101e21ad","unresolved":false,"context_lines":[{"line_number":236,"context_line":"   */"},{"line_number":237,"context_line":"  function getExtensionsByPosition(extensions, position) {"},{"line_number":238,"context_line":"    var result \u003d [];"},{"line_number":239,"context_line":"    angular.forEach(extensions, function(ext) {"},{"line_number":240,"context_line":"      if (ext.position \u003d\u003d\u003d position) {"},{"line_number":241,"context_line":"        result.push(ext);"},{"line_number":242,"context_line":"      }"}],"source_content_type":"text/javascript","patch_set":5,"id":"7a2fa921_b5d65aef","line":239,"in_reply_to":"7a2fa921_e18adbbe","updated":"2015-10-08 03:10:07.000000000","message":"I will look at doing this.","commit_id":"10509b65f74096be68e18a347825565391c3a051"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"7b273bf982672433c767015bb7f74e8417500dfb","unresolved":false,"context_lines":[{"line_number":254,"context_line":"   *"},{"line_number":255,"context_line":"   * @returns {Number} The index of the item with the given id."},{"line_number":256,"context_line":"   */"},{"line_number":257,"context_line":"  function getItemIndex(items, id) {"},{"line_number":258,"context_line":"    for (var i \u003d 0; i \u003c items.length; i++) {"},{"line_number":259,"context_line":"      if (items[i].id \u003d\u003d\u003d id) {"},{"line_number":260,"context_line":"        return i;"}],"source_content_type":"text/javascript","patch_set":5,"id":"7a2fa921_a1e86311","line":257,"updated":"2015-10-07 22:44:04.000000000","message":"optional, but can provide marginal benefit since they are natively supported by browsers.\n\n  function idEqual(item){ return item.id \u003d\u003d\u003d id; }\n  return items.filter(idEqual)[0];\n\nwhere the returned index is undefined if no id matched.","commit_id":"10509b65f74096be68e18a347825565391c3a051"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c056469588cd7233f54f591c5d0298bf101e21ad","unresolved":false,"context_lines":[{"line_number":254,"context_line":"   *"},{"line_number":255,"context_line":"   * @returns {Number} The index of the item with the given id."},{"line_number":256,"context_line":"   */"},{"line_number":257,"context_line":"  function getItemIndex(items, id) {"},{"line_number":258,"context_line":"    for (var i \u003d 0; i \u003c items.length; i++) {"},{"line_number":259,"context_line":"      if (items[i].id \u003d\u003d\u003d id) {"},{"line_number":260,"context_line":"        return i;"}],"source_content_type":"text/javascript","patch_set":5,"id":"7a2fa921_150aae79","line":257,"in_reply_to":"7a2fa921_a1e86311","updated":"2015-10-08 03:10:07.000000000","message":"It\u0027s a bit more streamlined, but it does require iterating over all items every time.  Not that performance is a huge concern in this case.","commit_id":"10509b65f74096be68e18a347825565391c3a051"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"33a53cfb14dc6ddc5d7e4c3de8de549b2e2a120f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"   *   after(id, item, priority)"},{"line_number":57,"context_line":"   *   remove(id)"},{"line_number":58,"context_line":"   *   replace(id, item)"},{"line_number":59,"context_line":"   *   addController(controller)"},{"line_number":60,"context_line":"   *"},{"line_number":61,"context_line":"   * Priorities are optional and determine the priority for multiple items placed at the same"},{"line_number":62,"context_line":"   * position. Higher numbers mean lower priority. If not provided the item will have the lowest"}],"source_content_type":"text/javascript","patch_set":8,"id":"5a2ca52d_e1f056cb","line":59,"updated":"2015-10-16 22:18:39.000000000","message":"isn\u0027t initControllers also a newly added method?","commit_id":"7d608a62b9d1b5b970e7c768d5dd4fbc1e216657"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"039ae9c93da458d2f369e80b9b2b92c726bbedf0","unresolved":false,"context_lines":[{"line_number":56,"context_line":"   *   after(id, item, priority)"},{"line_number":57,"context_line":"   *   remove(id)"},{"line_number":58,"context_line":"   *   replace(id, item)"},{"line_number":59,"context_line":"   *   addController(controller)"},{"line_number":60,"context_line":"   *"},{"line_number":61,"context_line":"   * Priorities are optional and determine the priority for multiple items placed at the same"},{"line_number":62,"context_line":"   * position. Higher numbers mean lower priority. If not provided the item will have the lowest"}],"source_content_type":"text/javascript","patch_set":8,"id":"3a29b11f_00c63567","line":59,"in_reply_to":"5a2ca52d_e1f056cb","updated":"2015-10-19 18:38:06.000000000","message":"Yes, will add that here","commit_id":"7d608a62b9d1b5b970e7c768d5dd4fbc1e216657"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"33a53cfb14dc6ddc5d7e4c3de8de549b2e2a120f","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        return i;"},{"line_number":234,"context_line":"      }"},{"line_number":235,"context_line":"    }"},{"line_number":236,"context_line":"    throw new Error(interpolate(\u0027Item with id %(id)s not found.\u0027, {id: id}, true));"},{"line_number":237,"context_line":"  }"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":8,"id":"5a2ca52d_e16b7683","line":236,"updated":"2015-10-16 22:18:39.000000000","message":"This is a little bit too general to tell where the error come from. Can we provide a more helpful information for debugging?\n\nAre user going to see the error in console?","commit_id":"7d608a62b9d1b5b970e7c768d5dd4fbc1e216657"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"039ae9c93da458d2f369e80b9b2b92c726bbedf0","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        return i;"},{"line_number":234,"context_line":"      }"},{"line_number":235,"context_line":"    }"},{"line_number":236,"context_line":"    throw new Error(interpolate(\u0027Item with id %(id)s not found.\u0027, {id: id}, true));"},{"line_number":237,"context_line":"  }"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"})();"}],"source_content_type":"text/javascript","patch_set":8,"id":"3a29b11f_a012e1b2","line":236,"in_reply_to":"5a2ca52d_e16b7683","updated":"2015-10-19 18:38:06.000000000","message":"There\u0027s no telling what the context is when this function is called.  It gets used whenever a plugin is going to update a container.  My hope is that the ID being included here is enough for the plugin developer to know what the problem is.  This error would be printed to the browser console, which I expect any plugin developer to be using while they are developing / testing their plugin.","commit_id":"7d608a62b9d1b5b970e7c768d5dd4fbc1e216657"}],"horizon/static/framework/util/extensible/extensible.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9fb0e49b0ed4f249e0e3967a1bab01d30cc6f0f9","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    /**"},{"line_number":152,"context_line":"     * Remove an item from the container and return its index."},{"line_number":153,"context_line":"     *"},{"line_number":154,"context_line":"     * @param {String} id The id of the item to remove."},{"line_number":155,"context_line":"     *"},{"line_number":156,"context_line":"     * @returns {Number} The index of the item being removed."}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_4a436913","line":153,"updated":"2015-11-12 05:17:20.000000000","message":"There is a use case here that is not clear on how it will be accomplished from Thai\u0027s tutorial patch or from the inline documentation here... If I remove an item (e.g. a step from a workflow) how do I ensure its data is set for me.  For example, if I remove the networks step in Launch Instance for a particular project, how do I set the default data behind the scenes? I remember IBM specifically talking about that use case.\n\nIs this why the add and init controllers are added below?","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6c70e5118cf4f22b17cd38233730a8a3a91f5cfe","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    /**"},{"line_number":152,"context_line":"     * Remove an item from the container and return its index."},{"line_number":153,"context_line":"     *"},{"line_number":154,"context_line":"     * @param {String} id The id of the item to remove."},{"line_number":155,"context_line":"     *"},{"line_number":156,"context_line":"     * @returns {Number} The index of the item being removed."}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_783dc3c2","line":153,"in_reply_to":"da85f559_0cbf9d61","updated":"2015-11-12 16:34:31.000000000","message":"Great, that will be helpful.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c6caef2e37a9d9a2dee6a7876eaea076453f0573","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    /**"},{"line_number":152,"context_line":"     * Remove an item from the container and return its index."},{"line_number":153,"context_line":"     *"},{"line_number":154,"context_line":"     * @param {String} id The id of the item to remove."},{"line_number":155,"context_line":"     *"},{"line_number":156,"context_line":"     * @returns {Number} The index of the item being removed."}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_0cbf9d61","line":153,"in_reply_to":"da85f559_4a436913","updated":"2015-11-12 16:25:37.000000000","message":"Yes, if an exploiter removes a step they will need to account for setting the model values that the step would have done.  They can use the addController method to add a custom controller to accomplish this.  I will add something here to spell that out.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9fb0e49b0ed4f249e0e3967a1bab01d30cc6f0f9","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    /**"},{"line_number":183,"context_line":"     * When an extensible container is instantiated, it should call this function to initialize"},{"line_number":184,"context_line":"     * any additional controllers added by plugins."},{"line_number":185,"context_line":"     */"},{"line_number":186,"context_line":"    container.initControllers \u003d function($scope) {"},{"line_number":187,"context_line":"      angular.forEach(container.controllers, function(ctrl) {"},{"line_number":188,"context_line":"        $controller(ctrl, {$scope: $scope});"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_4a5a89f3","line":185,"updated":"2015-11-12 05:17:20.000000000","message":"I\u0027d really like a couple quick sentences here with examples on why I\u0027d call this.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c6caef2e37a9d9a2dee6a7876eaea076453f0573","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    /**"},{"line_number":183,"context_line":"     * When an extensible container is instantiated, it should call this function to initialize"},{"line_number":184,"context_line":"     * any additional controllers added by plugins."},{"line_number":185,"context_line":"     */"},{"line_number":186,"context_line":"    container.initControllers \u003d function($scope) {"},{"line_number":187,"context_line":"      angular.forEach(container.controllers, function(ctrl) {"},{"line_number":188,"context_line":"        $controller(ctrl, {$scope: $scope});"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_d2a6100e","line":185,"in_reply_to":"da85f559_4a5a89f3","updated":"2015-11-12 16:25:37.000000000","message":"This patch includes code that makes all workflows extensible and updates the wizard to call this function to make sure custom controllers are created.  I expect the same to happen for any tables and forms in horizon.  So I don\u0027t expect a typical plugin is ever going to use this.  The only case would be if they add some special container of their own that they want to make extensible.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6c70e5118cf4f22b17cd38233730a8a3a91f5cfe","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    /**"},{"line_number":183,"context_line":"     * When an extensible container is instantiated, it should call this function to initialize"},{"line_number":184,"context_line":"     * any additional controllers added by plugins."},{"line_number":185,"context_line":"     */"},{"line_number":186,"context_line":"    container.initControllers \u003d function($scope) {"},{"line_number":187,"context_line":"      angular.forEach(container.controllers, function(ctrl) {"},{"line_number":188,"context_line":"        $controller(ctrl, {$scope: $scope});"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_b86c8bd0","line":185,"in_reply_to":"da85f559_d2a6100e","updated":"2015-11-12 16:34:31.000000000","message":"Okay, if this can be noted inline, would be helpful.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9fb0e49b0ed4f249e0e3967a1bab01d30cc6f0f9","unresolved":false,"context_lines":[{"line_number":194,"context_line":"     * instance is created."},{"line_number":195,"context_line":"     *"},{"line_number":196,"context_line":"     * @param {String} ctrl The controller to add, e.g. \u0027MyFeatureController\u0027."},{"line_number":197,"context_line":"     */"},{"line_number":198,"context_line":"    container.addController \u003d function(ctrl) {"},{"line_number":199,"context_line":"      container.controllers.push(ctrl);"},{"line_number":200,"context_line":"    };"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_4ab609fa","line":197,"updated":"2015-11-12 05:17:20.000000000","message":"Ditto with above.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c6caef2e37a9d9a2dee6a7876eaea076453f0573","unresolved":false,"context_lines":[{"line_number":194,"context_line":"     * instance is created."},{"line_number":195,"context_line":"     *"},{"line_number":196,"context_line":"     * @param {String} ctrl The controller to add, e.g. \u0027MyFeatureController\u0027."},{"line_number":197,"context_line":"     */"},{"line_number":198,"context_line":"    container.addController \u003d function(ctrl) {"},{"line_number":199,"context_line":"      container.controllers.push(ctrl);"},{"line_number":200,"context_line":"    };"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_d7e92280","line":197,"in_reply_to":"da85f559_4ab609fa","updated":"2015-11-12 16:25:37.000000000","message":"Let\u0027s say I just want to make some changes to an existing step.  I don\u0027t have a template because I\u0027m not adding a step.  I could replace the entire step but that might be overkill.  I need a way to add a controller with the scope of the workflow.  This function let\u0027s me do that.  Basically it\u0027s useful for any case where I want to make changes but I don\u0027t want to add or replace a step.\n\nIn order to make sure the controller gets instantiated correctly with the proper scope the workflow needs to call the initControllers function when it gets created.  Any customizable container will need to call initControllers in order to make sure the custom controllers get created.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"d944d0ab148bd9536e3b0802c8f8c29702dc3186","unresolved":false,"context_lines":[{"line_number":194,"context_line":"     * instance is created."},{"line_number":195,"context_line":"     *"},{"line_number":196,"context_line":"     * @param {String} ctrl The controller to add, e.g. \u0027MyFeatureController\u0027."},{"line_number":197,"context_line":"     */"},{"line_number":198,"context_line":"    container.addController \u003d function(ctrl) {"},{"line_number":199,"context_line":"      container.controllers.push(ctrl);"},{"line_number":200,"context_line":"    };"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_cc275061","line":197,"in_reply_to":"da85f559_b8248b5f","updated":"2015-11-12 16:48:14.000000000","message":"Yes, exactly.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6c70e5118cf4f22b17cd38233730a8a3a91f5cfe","unresolved":false,"context_lines":[{"line_number":194,"context_line":"     * instance is created."},{"line_number":195,"context_line":"     *"},{"line_number":196,"context_line":"     * @param {String} ctrl The controller to add, e.g. \u0027MyFeatureController\u0027."},{"line_number":197,"context_line":"     */"},{"line_number":198,"context_line":"    container.addController \u003d function(ctrl) {"},{"line_number":199,"context_line":"      container.controllers.push(ctrl);"},{"line_number":200,"context_line":"    };"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_b8248b5f","line":197,"in_reply_to":"da85f559_d7e92280","updated":"2015-11-12 16:34:31.000000000","message":"Let me try to restate the last part to see if I understand:\n\nIf you need to do something extra that works on the data or reacts to events from an existing container (such as a workflow), add it here. For example, if you have extra validation you want to perform (maybe a company standard password complexity requirement), you could do it here without changing the master code.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"}],"horizon/static/framework/util/workflow/workflow.service.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"fee96a27c124e1af82a4f34b6c2a2151cfaab321","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *    Copyright 2015 IBM Corp."},{"line_number":3,"context_line":" *    (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":" *    (c) Copyright 2015 ThoughtWorks, Inc."},{"line_number":5,"context_line":" *"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_a68e8125","line":2,"updated":"2015-09-21 18:38:17.000000000","message":"Should move copy right last and not first?","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"97169aa19308a1a801f9af0c5f695b9786fc9657","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *    Copyright 2015 IBM Corp."},{"line_number":3,"context_line":" *    (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":" *    (c) Copyright 2015 ThoughtWorks, Inc."},{"line_number":5,"context_line":" *"}],"source_content_type":"text/javascript","patch_set":3,"id":"ba15a1d1_376eeb2f","line":2,"in_reply_to":"ba15a1d1_a68e8125","updated":"2015-09-22 16:50:48.000000000","message":"Our internal doc on adding copyrights says to add to the top, though I\u0027m really not sure what others in the community actually do here. I wish we could just forget this altogether.\n\n\"if any other copyright notices are in a community file, the IBM copyright notice should be put directly above them\"","commit_id":"cf2fbeac77eea61130ab6fc0033bae38ed130ba4"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9fb0e49b0ed4f249e0e3967a1bab01d30cc6f0f9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *    Copyright 2015 IBM Corp."},{"line_number":3,"context_line":" *    (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":" *    (c) Copyright 2015 ThoughtWorks, Inc."},{"line_number":5,"context_line":" *"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_6aa42db9","line":2,"updated":"2015-11-12 05:17:20.000000000","message":"I think additional copyrights are supposed to be added at the bottom of the list.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6c70e5118cf4f22b17cd38233730a8a3a91f5cfe","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *    Copyright 2015 IBM Corp."},{"line_number":3,"context_line":" *    (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":" *    (c) Copyright 2015 ThoughtWorks, Inc."},{"line_number":5,"context_line":" *"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_b807ab16","line":2,"in_reply_to":"da85f559_3d488dcb","updated":"2015-11-12 16:34:31.000000000","message":"I don\u0027t really care and wouldn\u0027t block on this... I just have always added to the bottom thinking that was what was normal.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"c6caef2e37a9d9a2dee6a7876eaea076453f0573","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":" *    Copyright 2015 IBM Corp."},{"line_number":3,"context_line":" *    (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":" *    (c) Copyright 2015 ThoughtWorks, Inc."},{"line_number":5,"context_line":" *"}],"source_content_type":"text/javascript","patch_set":13,"id":"da85f559_3d488dcb","line":2,"in_reply_to":"da85f559_6aa42db9","updated":"2015-11-12 16:25:37.000000000","message":"For whatever reason our (IBM) internal doc states we should add this at the top, but I will try to remember to add at the bottom from now on.","commit_id":"b170d7dec8420a4ac6ecfd0731b77cc1a917952a"}],"horizon/static/framework/util/workflow/workflow.spec.js":[{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"68595c383d94c32db1cbc81df03a5827896f901f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"      }"},{"line_number":20,"context_line":"    ];"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    beforeEach(module(\u0027horizon.framework\u0027));"},{"line_number":23,"context_line":"    beforeEach(module(\u0027horizon.framework.util.extensible\u0027));"},{"line_number":24,"context_line":"    beforeEach(module(\u0027horizon.framework.util.workflow\u0027));"},{"line_number":25,"context_line":""}],"source_content_type":"text/javascript","patch_set":11,"id":"da85f559_01135a5c","line":22,"updated":"2015-11-10 17:42:35.000000000","message":"you can remove the two lines bellow this line.","commit_id":"70ff793d74b190e9a776b566307881dd42789d4e"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"23a14be835b285b0975a50b49f9e4666ca477faa","unresolved":false,"context_lines":[{"line_number":19,"context_line":"      }"},{"line_number":20,"context_line":"    ];"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    beforeEach(module(\u0027horizon.framework\u0027));"},{"line_number":23,"context_line":"    beforeEach(module(\u0027horizon.framework.util.extensible\u0027));"},{"line_number":24,"context_line":"    beforeEach(module(\u0027horizon.framework.util.workflow\u0027));"},{"line_number":25,"context_line":""}],"source_content_type":"text/javascript","patch_set":11,"id":"da85f559_a447fcba","line":22,"in_reply_to":"da85f559_01135a5c","updated":"2015-11-10 18:21:02.000000000","message":"Done","commit_id":"70ff793d74b190e9a776b566307881dd42789d4e"}]}
