)]}'
{"openstack_dashboard/static/js/angular/directives/serialConsole.js":[{"author":{"_account_id":11885,"name":"Ying Zuo","email":"yingzuo4@gmail.com","username":"yingzuo"},"change_message_id":"9ece6e05300fc33d5e5f1911498c111d5f308645","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        // default size of term.js"},{"line_number":77,"context_line":"        var cols \u003d 80;"},{"line_number":78,"context_line":"        var rows \u003d 24;"},{"line_number":79,"context_line":"        // event handler to resize console according to window resize."},{"line_number":80,"context_line":"        angular.element(window).bind(\u0027resize\u0027, resizeTerminal);"},{"line_number":81,"context_line":"        function resizeTerminal() {"}],"source_content_type":"text/javascript","patch_set":2,"id":"1f485f77_9aee9086","line":78,"updated":"2017-11-12 21:21:43.000000000","message":"Since you need these two variables in scope anyway, I think you should just set them to scope directly here and use them  in the code after.","commit_id":"3899a8b7ba4870f2409531b9b89819a6db275cd3"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"1daaf3a34340d4715108aa5cce044f4d2b030c1a","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        // default size of term.js"},{"line_number":77,"context_line":"        var cols \u003d 80;"},{"line_number":78,"context_line":"        var rows \u003d 24;"},{"line_number":79,"context_line":"        // event handler to resize console according to window resize."},{"line_number":80,"context_line":"        angular.element(window).bind(\u0027resize\u0027, resizeTerminal);"},{"line_number":81,"context_line":"        function resizeTerminal() {"}],"source_content_type":"text/javascript","patch_set":2,"id":"1f485f77_3403e3ba","line":78,"in_reply_to":"1f485f77_9aee9086","updated":"2017-11-15 11:08:33.000000000","message":"Done","commit_id":"3899a8b7ba4870f2409531b9b89819a6db275cd3"},{"author":{"_account_id":11885,"name":"Ying Zuo","email":"yingzuo4@gmail.com","username":"yingzuo"},"change_message_id":"b3682dd17c64d3a9f03583baa724b8314051670b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            $timeout(scope.termRows);"},{"line_number":96,"context_line":"          }"},{"line_number":97,"context_line":"        }"},{"line_number":98,"context_line":"        scope.termCols \u003d function () {"},{"line_number":99,"context_line":"          return scope.cols;"},{"line_number":100,"context_line":"        };"},{"line_number":101,"context_line":"        scope.termRows \u003d function () {"},{"line_number":102,"context_line":"          return scope.rows;"},{"line_number":103,"context_line":"        };"},{"line_number":104,"context_line":"        resizeTerminal();"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        term.on(\u0027data\u0027, function(data) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"df87a7cf_09c02850","line":103,"range":{"start_line":98,"start_character":0,"end_line":103,"end_character":10},"updated":"2017-12-14 02:58:48.000000000","message":"why do you need scope.termCols/scope.termRows to return scope.cols/scope.rows instead of using scope.cols/scope.rows directly?","commit_id":"25f10bcc4a768461ba1053e88c95a04ef7134ef7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d23d054ba13f0469b568f322e247351fb40e602b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            $timeout(scope.termRows);"},{"line_number":96,"context_line":"          }"},{"line_number":97,"context_line":"        }"},{"line_number":98,"context_line":"        scope.termCols \u003d function () {"},{"line_number":99,"context_line":"          return scope.cols;"},{"line_number":100,"context_line":"        };"},{"line_number":101,"context_line":"        scope.termRows \u003d function () {"},{"line_number":102,"context_line":"          return scope.rows;"},{"line_number":103,"context_line":"        };"},{"line_number":104,"context_line":"        resizeTerminal();"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        term.on(\u0027data\u0027, function(data) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"df87a7cf_899e7852","line":103,"range":{"start_line":98,"start_character":0,"end_line":103,"end_character":10},"in_reply_to":"df87a7cf_09c02850","updated":"2017-12-14 03:06:33.000000000","message":"I wonder this is related to the $timeout calls at L.94-95, but I am not sure why $timeout calls are needed. This confuses me too.\n\nSome comments would be nice.","commit_id":"25f10bcc4a768461ba1053e88c95a04ef7134ef7"},{"author":{"_account_id":11885,"name":"Ying Zuo","email":"yingzuo4@gmail.com","username":"yingzuo"},"change_message_id":"6fbd7720ff7220a35a8a7c63f1049bb56d3e06b2","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            $timeout(scope.termRows);"},{"line_number":96,"context_line":"          }"},{"line_number":97,"context_line":"        }"},{"line_number":98,"context_line":"        scope.termCols \u003d function () {"},{"line_number":99,"context_line":"          return scope.cols;"},{"line_number":100,"context_line":"        };"},{"line_number":101,"context_line":"        scope.termRows \u003d function () {"},{"line_number":102,"context_line":"          return scope.rows;"},{"line_number":103,"context_line":"        };"},{"line_number":104,"context_line":"        resizeTerminal();"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        term.on(\u0027data\u0027, function(data) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"df87a7cf_c2943beb","line":103,"range":{"start_line":98,"start_character":0,"end_line":103,"end_character":10},"in_reply_to":"df87a7cf_708755b8","updated":"2017-12-15 03:21:03.000000000","message":"scope.$apply() would be the right way to do it. Please use that instead of the code in L94 - L103.","commit_id":"25f10bcc4a768461ba1053e88c95a04ef7134ef7"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"8d7e2c6cb8637b5799d17f634037743575b7a982","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            $timeout(scope.termRows);"},{"line_number":96,"context_line":"          }"},{"line_number":97,"context_line":"        }"},{"line_number":98,"context_line":"        scope.termCols \u003d function () {"},{"line_number":99,"context_line":"          return scope.cols;"},{"line_number":100,"context_line":"        };"},{"line_number":101,"context_line":"        scope.termRows \u003d function () {"},{"line_number":102,"context_line":"          return scope.rows;"},{"line_number":103,"context_line":"        };"},{"line_number":104,"context_line":"        resizeTerminal();"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        term.on(\u0027data\u0027, function(data) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"df87a7cf_708755b8","line":103,"range":{"start_line":98,"start_character":0,"end_line":103,"end_character":10},"in_reply_to":"df87a7cf_899e7852","updated":"2017-12-14 08:48:58.000000000","message":"@Ying, scope variables seems not to be effective on template definition. So I prepared these functions.\n\n@Akihiro, $timeout on L94-95 seems to be needed to refresh DOM on template properly.\n\nTo refresh DOM defined in template, we seems to need this manner. These manner is same as scope.status (L60, L63, L68, L122-124).\n\nI added these notes as comment on the code.","commit_id":"25f10bcc4a768461ba1053e88c95a04ef7134ef7"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"67a78a120ce538718ff58dcd60ef239c9fb7f90a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            $timeout(scope.termRows);"},{"line_number":96,"context_line":"          }"},{"line_number":97,"context_line":"        }"},{"line_number":98,"context_line":"        scope.termCols \u003d function () {"},{"line_number":99,"context_line":"          return scope.cols;"},{"line_number":100,"context_line":"        };"},{"line_number":101,"context_line":"        scope.termRows \u003d function () {"},{"line_number":102,"context_line":"          return scope.rows;"},{"line_number":103,"context_line":"        };"},{"line_number":104,"context_line":"        resizeTerminal();"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        term.on(\u0027data\u0027, function(data) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"df87a7cf_054a2d54","line":103,"range":{"start_line":98,"start_character":0,"end_line":103,"end_character":10},"in_reply_to":"df87a7cf_c2943beb","updated":"2017-12-15 03:36:59.000000000","message":"Done","commit_id":"25f10bcc4a768461ba1053e88c95a04ef7134ef7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"368a9595c9b062bde9f5277f9cd6298f36b61037","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            term.resize(newCols, newRows);"},{"line_number":91,"context_line":"            scope.cols \u003d newCols;"},{"line_number":92,"context_line":"            scope.rows \u003d newRows;"},{"line_number":93,"context_line":"            // To set size into directive attributes for outside watcher, run termCols() and termRows()."},{"line_number":94,"context_line":"            // $timeout is needed to refresh template."},{"line_number":95,"context_line":"            scope.$apply(scope.termCols);"},{"line_number":96,"context_line":"            scope.$apply(scope.termRows);"},{"line_number":97,"context_line":"          }"}],"source_content_type":"text/javascript","patch_set":8,"id":"df87a7cf_11e4afab","line":94,"range":{"start_line":93,"start_character":11,"end_line":94,"end_character":54},"updated":"2017-12-15 09:58:22.000000000","message":"The comment looks out-of-date now.","commit_id":"82f7026923a6901a07c2f0059fc4c2bef640a5fa"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"368a9595c9b062bde9f5277f9cd6298f36b61037","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            // To set size into directive attributes for outside watcher, run termCols() and termRows()."},{"line_number":94,"context_line":"            // $timeout is needed to refresh template."},{"line_number":95,"context_line":"            scope.$apply(scope.termCols);"},{"line_number":96,"context_line":"            scope.$apply(scope.termRows);"},{"line_number":97,"context_line":"          }"},{"line_number":98,"context_line":"        }"},{"line_number":99,"context_line":"        // termCols and termRows provide console size into attribute of this directive."}],"source_content_type":"text/javascript","patch_set":8,"id":"df87a7cf_ec7b6ef1","line":96,"updated":"2017-12-15 09:58:22.000000000","message":"How about wrapping resizeTerminal with scope.$apply? You call resizeTerminal at L.107, so I think it works. Am I missing something?","commit_id":"82f7026923a6901a07c2f0059fc4c2bef640a5fa"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"684534f5ff6529dda240e4c711e05e3b5d9c83b7","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            scope.rows \u003d newRows;"},{"line_number":93,"context_line":"            // To set size into directive attributes for watched by outside,"},{"line_number":94,"context_line":"            // termCols() and termRows() are needed to be execute for refreshing template."},{"line_number":95,"context_line":"            // NOTE(shu-mutou): But scope.$apply is not useful here."},{"line_number":96,"context_line":"            //                  \"scope.$apply already in progress\" error occurs at here."},{"line_number":97,"context_line":"            //                  So we need to use $timeout."},{"line_number":98,"context_line":"            $timeout(scope.termCols);"},{"line_number":99,"context_line":"            $timeout(scope.termRows);"},{"line_number":100,"context_line":"          }"}],"source_content_type":"text/javascript","patch_set":9,"id":"bf8cb3f7_6479b72d","line":97,"range":{"start_line":95,"start_character":0,"end_line":97,"end_character":59},"updated":"2017-12-26 01:44:42.000000000","message":"@Akihiro, I wrote the reason for using $timeout at here.","commit_id":"273c85931eec1eaf68119b46081f71a2cdd490ef"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e009e9e9ff97e8270d676c631ffb476bd499b824","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            scope.rows \u003d newRows;"},{"line_number":93,"context_line":"            // To set size into directive attributes for watched by outside,"},{"line_number":94,"context_line":"            // termCols() and termRows() are needed to be execute for refreshing template."},{"line_number":95,"context_line":"            // NOTE(shu-mutou): But scope.$apply is not useful here."},{"line_number":96,"context_line":"            //                  \"scope.$apply already in progress\" error occurs at here."},{"line_number":97,"context_line":"            //                  So we need to use $timeout."},{"line_number":98,"context_line":"            $timeout(scope.termCols);"},{"line_number":99,"context_line":"            $timeout(scope.termRows);"},{"line_number":100,"context_line":"          }"}],"source_content_type":"text/javascript","patch_set":9,"id":"9f91af0f_e220a84c","line":97,"range":{"start_line":95,"start_character":0,"end_line":97,"end_character":59},"in_reply_to":"bf8cb3f7_6479b72d","updated":"2017-12-28 02:59:24.000000000","message":"Okay. I still wonder where scope.$apply is triggered and you get \"in progress\" though.. I would like to defer more review to angular experts.","commit_id":"273c85931eec1eaf68119b46081f71a2cdd490ef"}]}
