)]}'
{"horizon/static/horizon/js/horizon.access_security.js":[{"author":{"_account_id":8512,"name":"Matt Farina","email":"matt@mattfarina.com","username":"mattfarina"},"change_message_id":"264430b9165b7432d5c5869a55069f8ab765775d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"horizon.addInitFunction(function () {"},{"line_number":2,"context_line":"  function update_port_displayed_fields (field) {"},{"line_number":3,"context_line":"    var $this \u003d $(field),"},{"line_number":4,"context_line":"      selected_rule_type \u003d $this.val(),"},{"line_number":5,"context_line":"      id_port \u003d $(\u0027#id_port\u0027),"},{"line_number":6,"context_line":"      id_from_port \u003d $(\u0027#id_from_port\u0027),"},{"line_number":7,"context_line":"      id_from_to_port \u003d $(\u0027#id_from_port, #id_to_port\u0027),"}],"source_content_type":"text/javascript","patch_set":6,"id":"ba7be1f8_07ca17a1","line":4,"updated":"2015-02-27 21:41:26.000000000","message":"Since $(field) is only used for the $this.val() with selected_rule_type, can $this be dropped and selected_rule_type \u003d $(field).val()?\n\nWhy create a variable if the thing will only be used once?","commit_id":"5fb1ca087c0e30959afb16de4fa31838ce67785b"},{"author":{"_account_id":13546,"name":"Swati Sharma","email":"sharma.swati6@tcs.com","username":"swati"},"change_message_id":"0e278157de72c36ef2c7e236a91b37e516350acf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"horizon.addInitFunction(function () {"},{"line_number":2,"context_line":"  function update_port_displayed_fields (field) {"},{"line_number":3,"context_line":"    var $this \u003d $(field),"},{"line_number":4,"context_line":"      selected_rule_type \u003d $this.val(),"},{"line_number":5,"context_line":"      id_port \u003d $(\u0027#id_port\u0027),"},{"line_number":6,"context_line":"      id_from_port \u003d $(\u0027#id_from_port\u0027),"},{"line_number":7,"context_line":"      id_from_to_port \u003d $(\u0027#id_from_port, #id_to_port\u0027),"}],"source_content_type":"text/javascript","patch_set":6,"id":"ba7be1f8_3eb98f79","line":4,"in_reply_to":"ba7be1f8_07ca17a1","updated":"2015-03-03 06:42:33.000000000","message":"Done","commit_id":"5fb1ca087c0e30959afb16de4fa31838ce67785b"},{"author":{"_account_id":8512,"name":"Matt Farina","email":"matt@mattfarina.com","username":"mattfarina"},"change_message_id":"264430b9165b7432d5c5869a55069f8ab765775d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    var $this \u003d $(field),"},{"line_number":4,"context_line":"      selected_rule_type \u003d $this.val(),"},{"line_number":5,"context_line":"      id_port \u003d $(\u0027#id_port\u0027),"},{"line_number":6,"context_line":"      id_from_port \u003d $(\u0027#id_from_port\u0027),"},{"line_number":7,"context_line":"      id_from_to_port \u003d $(\u0027#id_from_port, #id_to_port\u0027),"},{"line_number":8,"context_line":"      id_port_all \u003d $(\u0027#id_port, #id_from_port, #id_to_port\u0027);"},{"line_number":9,"context_line":""}],"source_content_type":"text/javascript","patch_set":6,"id":"ba7be1f8_6747531e","line":6,"updated":"2015-02-27 21:41:26.000000000","message":"id_from_port is only used once in the following code. Can the variable be replaced with the jQuery call? Then it would only happen if the code gets into the else if portion.","commit_id":"5fb1ca087c0e30959afb16de4fa31838ce67785b"},{"author":{"_account_id":13546,"name":"Swati Sharma","email":"sharma.swati6@tcs.com","username":"swati"},"change_message_id":"0e278157de72c36ef2c7e236a91b37e516350acf","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    var $this \u003d $(field),"},{"line_number":4,"context_line":"      selected_rule_type \u003d $this.val(),"},{"line_number":5,"context_line":"      id_port \u003d $(\u0027#id_port\u0027),"},{"line_number":6,"context_line":"      id_from_port \u003d $(\u0027#id_from_port\u0027),"},{"line_number":7,"context_line":"      id_from_to_port \u003d $(\u0027#id_from_port, #id_to_port\u0027),"},{"line_number":8,"context_line":"      id_port_all \u003d $(\u0027#id_port, #id_from_port, #id_to_port\u0027);"},{"line_number":9,"context_line":""}],"source_content_type":"text/javascript","patch_set":6,"id":"ba7be1f8_1eb4cb80","line":6,"in_reply_to":"ba7be1f8_6747531e","updated":"2015-03-03 06:42:33.000000000","message":"Done","commit_id":"5fb1ca087c0e30959afb16de4fa31838ce67785b"},{"author":{"_account_id":8512,"name":"Matt Farina","email":"matt@mattfarina.com","username":"mattfarina"},"change_message_id":"264430b9165b7432d5c5869a55069f8ab765775d","unresolved":false,"context_lines":[{"line_number":5,"context_line":"      id_port \u003d $(\u0027#id_port\u0027),"},{"line_number":6,"context_line":"      id_from_port \u003d $(\u0027#id_from_port\u0027),"},{"line_number":7,"context_line":"      id_from_to_port \u003d $(\u0027#id_from_port, #id_to_port\u0027),"},{"line_number":8,"context_line":"      id_port_all \u003d $(\u0027#id_port, #id_from_port, #id_to_port\u0027);"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    // Fields are marked required if the rule is TCP/UDP, else not"},{"line_number":11,"context_line":"    if (selected_rule_type \u003d\u003d\u003d \u0027tcp\u0027 || selected_rule_type \u003d\u003d\u003d \u0027udp\u0027) {"}],"source_content_type":"text/javascript","patch_set":6,"id":"ba7be1f8_876b6784","line":8,"updated":"2015-02-27 21:41:26.000000000","message":"id_port_all is only called once in the else below. Since this is only used once, can it be replaced with the jQuery call? Then the jQuery call will only happen if the code executes the else.","commit_id":"5fb1ca087c0e30959afb16de4fa31838ce67785b"},{"author":{"_account_id":13546,"name":"Swati Sharma","email":"sharma.swati6@tcs.com","username":"swati"},"change_message_id":"0e278157de72c36ef2c7e236a91b37e516350acf","unresolved":false,"context_lines":[{"line_number":5,"context_line":"      id_port \u003d $(\u0027#id_port\u0027),"},{"line_number":6,"context_line":"      id_from_port \u003d $(\u0027#id_from_port\u0027),"},{"line_number":7,"context_line":"      id_from_to_port \u003d $(\u0027#id_from_port, #id_to_port\u0027),"},{"line_number":8,"context_line":"      id_port_all \u003d $(\u0027#id_port, #id_from_port, #id_to_port\u0027);"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    // Fields are marked required if the rule is TCP/UDP, else not"},{"line_number":11,"context_line":"    if (selected_rule_type \u003d\u003d\u003d \u0027tcp\u0027 || selected_rule_type \u003d\u003d\u003d \u0027udp\u0027) {"}],"source_content_type":"text/javascript","patch_set":6,"id":"ba7be1f8_5e8ac3bf","line":8,"in_reply_to":"ba7be1f8_876b6784","updated":"2015-03-03 06:42:33.000000000","message":"Done","commit_id":"5fb1ca087c0e30959afb16de4fa31838ce67785b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"dfc89ab90204b728cb9b59287e859c783f6e18ac","unresolved":false,"context_lines":[{"line_number":12,"context_line":"        id_from_to_port.closest(\u0027.form-group\u0027).addClass(\"required\");"},{"line_number":13,"context_line":"      }"},{"line_number":14,"context_line":"      // Add/Remove \u0027required\u0027 class to fields depending on the \u0027Open Port\u0027 selected"},{"line_number":15,"context_line":"      $( \"#id_port_or_range\" ).change(function() {"},{"line_number":16,"context_line":"        var $selected_value \u003d $(\u0027#id_port_or_range :selected\u0027).val();"},{"line_number":17,"context_line":"        if ($selected_value \u003d\u003d\u003d \u0027port\u0027) {"},{"line_number":18,"context_line":"          id_from_to_port.closest(\u0027.form-group\u0027).removeClass(\"required\");"}],"source_content_type":"text/javascript","patch_set":7,"id":"1a6ced46_29e4773a","line":15,"updated":"2015-03-23 09:07:40.000000000","message":"can\u0027t the event handler be installed multiple times?","commit_id":"dea88da2f59ebbb7ec705faf71d94d4d61daa1a7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"423e73ec50f735b82bd8a74a21b49c840e098d06","unresolved":false,"context_lines":[{"line_number":12,"context_line":"        id_from_to_port.closest(\u0027.form-group\u0027).addClass(\"required\");"},{"line_number":13,"context_line":"      }"},{"line_number":14,"context_line":"      // Add/Remove \u0027required\u0027 class to fields depending on the \u0027Open Port\u0027 selected"},{"line_number":15,"context_line":"      $( \"#id_port_or_range\" ).change(function() {"},{"line_number":16,"context_line":"        var $selected_value \u003d $(\u0027#id_port_or_range :selected\u0027).val();"},{"line_number":17,"context_line":"        if ($selected_value \u003d\u003d\u003d \u0027port\u0027) {"},{"line_number":18,"context_line":"          id_from_to_port.closest(\u0027.form-group\u0027).removeClass(\"required\");"}],"source_content_type":"text/javascript","patch_set":7,"id":"1a6ced46_644e7fc3","line":15,"in_reply_to":"1a6ced46_0ae7a941","updated":"2015-03-23 17:22:49.000000000","message":"sorry....\"can\u0027t\" in my first comment looks my mistake.\n\nWhat I would like to mention is as follows.\n\nupdate_port_displayed_fields is an event handler associated with #id_rule_menu. It means update_port_displayed_fields is potentially called multiple times. L.15 registers an event handler on #id_port_or_range. If update_port_displayed_fields is called multiple times, isn\u0027t the event handler at L.15 registered multiple times?\n\nI am not so familiar with jquery, so I might be wrong.","commit_id":"dea88da2f59ebbb7ec705faf71d94d4d61daa1a7"},{"author":{"_account_id":13546,"name":"Swati Sharma","email":"sharma.swati6@tcs.com","username":"swati"},"change_message_id":"255fc196fabceef5f85e72a23a3c11d21bbfeee0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"        id_from_to_port.closest(\u0027.form-group\u0027).addClass(\"required\");"},{"line_number":13,"context_line":"      }"},{"line_number":14,"context_line":"      // Add/Remove \u0027required\u0027 class to fields depending on the \u0027Open Port\u0027 selected"},{"line_number":15,"context_line":"      $( \"#id_port_or_range\" ).change(function() {"},{"line_number":16,"context_line":"        var $selected_value \u003d $(\u0027#id_port_or_range :selected\u0027).val();"},{"line_number":17,"context_line":"        if ($selected_value \u003d\u003d\u003d \u0027port\u0027) {"},{"line_number":18,"context_line":"          id_from_to_port.closest(\u0027.form-group\u0027).removeClass(\"required\");"}],"source_content_type":"text/javascript","patch_set":7,"id":"1a6ced46_0ae7a941","line":15,"in_reply_to":"1a6ced46_29e4773a","updated":"2015-03-23 10:15:14.000000000","message":"I didn\u0027t somewhat get your question..can you please elaborate or explain with an example?","commit_id":"dea88da2f59ebbb7ec705faf71d94d4d61daa1a7"}],"horizon/static/horizon/js/horizon.forms.js":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"dd387ad13803dc38ecd755494fb9e58758071981","unresolved":false,"context_lines":[{"line_number":238,"context_line":"  });"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"  // Fire off the change event to trigger the proper initial values."},{"line_number":241,"context_line":"  $(\u0027select.switchable\u0027).trigger(\u0027change\u0027);"},{"line_number":242,"context_line":"  // Queue up the for new modals, too."},{"line_number":243,"context_line":"  horizon.modals.addModalInitFunction(function (modal) {"},{"line_number":244,"context_line":"    $(\u0027#id_port\u0027).closest(\u0027.form-group\u0027).addClass(\"required\");"}],"source_content_type":"text/javascript","patch_set":2,"id":"3a961159_90ce4db6","line":241,"updated":"2014-12-29 15:13:31.000000000","message":"First of all, this function is not specific to Security Group form, so I believe form-specific logic should not be placed here.","commit_id":"c7c0f49643b644c79c5bc874f9123b6f1115fa94"},{"author":{"_account_id":13546,"name":"Swati Sharma","email":"sharma.swati6@tcs.com","username":"swati"},"change_message_id":"2abe9f706180a77af854525ea64f5ad740e60bdd","unresolved":false,"context_lines":[{"line_number":238,"context_line":"  });"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"  // Fire off the change event to trigger the proper initial values."},{"line_number":241,"context_line":"  $(\u0027select.switchable\u0027).trigger(\u0027change\u0027);"},{"line_number":242,"context_line":"  // Queue up the for new modals, too."},{"line_number":243,"context_line":"  horizon.modals.addModalInitFunction(function (modal) {"},{"line_number":244,"context_line":"    $(\u0027#id_port\u0027).closest(\u0027.form-group\u0027).addClass(\"required\");"}],"source_content_type":"text/javascript","patch_set":2,"id":"3a961159_20df9667","line":241,"in_reply_to":"3a961159_90ce4db6","updated":"2015-01-15 06:49:50.000000000","message":"Thanks Akihiro for your feedback.\n\nI will add a new form-specific function here.","commit_id":"c7c0f49643b644c79c5bc874f9123b6f1115fa94"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"dd387ad13803dc38ecd755494fb9e58758071981","unresolved":false,"context_lines":[{"line_number":241,"context_line":"  $(\u0027select.switchable\u0027).trigger(\u0027change\u0027);"},{"line_number":242,"context_line":"  // Queue up the for new modals, too."},{"line_number":243,"context_line":"  horizon.modals.addModalInitFunction(function (modal) {"},{"line_number":244,"context_line":"    $(\u0027#id_port\u0027).closest(\u0027.form-group\u0027).addClass(\"required\");"},{"line_number":245,"context_line":"    $(modal).find(\u0027select.switchable\u0027).trigger(\u0027change\u0027);"},{"line_number":246,"context_line":"    $( \"#id_port_or_range\" ).change(function() {"},{"line_number":247,"context_line":"      var $selected_value \u003d $(\u0027#id_port_or_range :selected\u0027).text();"}],"source_content_type":"text/javascript","patch_set":2,"id":"3a961159_306d999a","line":244,"updated":"2014-12-29 15:13:31.000000000","message":"port/port_range is required only for TCP/UDP. Who removes \n\"required\" class for ICMP or custom rules? Don\u0027t we need to take care of it as the corresponding fields are invisible for such case?","commit_id":"c7c0f49643b644c79c5bc874f9123b6f1115fa94"},{"author":{"_account_id":13546,"name":"Swati Sharma","email":"sharma.swati6@tcs.com","username":"swati"},"change_message_id":"2abe9f706180a77af854525ea64f5ad740e60bdd","unresolved":false,"context_lines":[{"line_number":241,"context_line":"  $(\u0027select.switchable\u0027).trigger(\u0027change\u0027);"},{"line_number":242,"context_line":"  // Queue up the for new modals, too."},{"line_number":243,"context_line":"  horizon.modals.addModalInitFunction(function (modal) {"},{"line_number":244,"context_line":"    $(\u0027#id_port\u0027).closest(\u0027.form-group\u0027).addClass(\"required\");"},{"line_number":245,"context_line":"    $(modal).find(\u0027select.switchable\u0027).trigger(\u0027change\u0027);"},{"line_number":246,"context_line":"    $( \"#id_port_or_range\" ).change(function() {"},{"line_number":247,"context_line":"      var $selected_value \u003d $(\u0027#id_port_or_range :selected\u0027).text();"}],"source_content_type":"text/javascript","patch_set":2,"id":"3a961159_403662b5","line":244,"in_reply_to":"3a961159_306d999a","updated":"2015-01-15 06:49:50.000000000","message":"Yes, you are right here. I will make the fields required only if TCP/UDP is selected.","commit_id":"c7c0f49643b644c79c5bc874f9123b6f1115fa94"},{"author":{"_account_id":14223,"name":"Brian Fischer","email":"brian.fischer@hp.com","username":"bfischer"},"change_message_id":"91127715e17d1b52d17f4bf9ac8e42599bc060da","unresolved":false,"context_lines":[{"line_number":359,"context_line":"  $(document).on(\u0027change\u0027, \u0027#id_rule_menu\u0027, function (evt) {"},{"line_number":360,"context_line":"    update_port_displayed_fields(this);"},{"line_number":361,"context_line":"  });"},{"line_number":362,"context_line":"  "},{"line_number":363,"context_line":"  /* Help tooltips */"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"  // Apply standard handler for everything but checkboxes."}],"source_content_type":"text/javascript","patch_set":3,"id":"3a961159_cdfef069","line":362,"updated":"2015-01-15 19:37:30.000000000","message":"Trailing whitespace L358 \u0026 L362.","commit_id":"e5510fbed116a701096aa0c4b1b1c92ed079dcfb"}]}
