)]}'
{"horizon/static/framework/framework.module.js":[{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"1f0a900343d732a1c7b2fddb28f08c39f09cd68b","unresolved":false,"context_lines":[{"line_number":128,"context_line":"      responseError: function (error) {"},{"line_number":129,"context_line":"        if (error.status \u003d\u003d\u003d 401) {"},{"line_number":130,"context_line":"          var msg \u003d gettext("},{"line_number":131,"context_line":"            \u0027Unauthorized operation, session might be expired. \u0027 +"},{"line_number":132,"context_line":"            \u0027Will redirect to the login page shortly.\u0027"},{"line_number":133,"context_line":"          );"},{"line_number":134,"context_line":"          handleRedirectMessage(msg, $rootScope, $window, frameworkEvents, toastService);"},{"line_number":135,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_ab6c7d36","line":132,"range":{"start_line":131,"start_character":12,"end_line":132,"end_character":54},"updated":"2017-05-18 10:41:33.000000000","message":"Slightly better wording would be \"Unauthorized. Redirecting to login\" or similar. A guess at the session isn\u0027t ideal, as it might be wrong, and the future tense action (\"will redirect\") sounds like Horizon is pruposefully stalling.","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"aee2374b22003867f679cb942215e8c4f5c3ec1f","unresolved":false,"context_lines":[{"line_number":128,"context_line":"      responseError: function (error) {"},{"line_number":129,"context_line":"        if (error.status \u003d\u003d\u003d 401) {"},{"line_number":130,"context_line":"          var msg \u003d gettext("},{"line_number":131,"context_line":"            \u0027Unauthorized operation, session might be expired. \u0027 +"},{"line_number":132,"context_line":"            \u0027Will redirect to the login page shortly.\u0027"},{"line_number":133,"context_line":"          );"},{"line_number":134,"context_line":"          handleRedirectMessage(msg, $rootScope, $window, frameworkEvents, toastService);"},{"line_number":135,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_3ebd3fb7","line":132,"range":{"start_line":131,"start_character":12,"end_line":132,"end_character":54},"in_reply_to":"ff0f0b1f_ab6c7d36","updated":"2017-05-18 18:07:23.000000000","message":"Ok, will fix","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"1f0a900343d732a1c7b2fddb28f08c39f09cd68b","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        }"},{"line_number":136,"context_line":"        if (error.status \u003d\u003d\u003d 403) {"},{"line_number":137,"context_line":"          var msg2 \u003d gettext("},{"line_number":138,"context_line":"            \u0027Forbidden operation. Will redirect to the \u0027 +"},{"line_number":139,"context_line":"            \u0027login page shortly.\u0027"},{"line_number":140,"context_line":"          );"},{"line_number":141,"context_line":"          handleRedirectMessage(msg2, $rootScope, $window, frameworkEvents, toastService);"},{"line_number":142,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_8b69b926","line":139,"range":{"start_line":138,"start_character":12,"end_line":139,"end_character":33},"updated":"2017-05-18 10:41:33.000000000","message":"Similar to above, I\u0027d avoid the future tense usage.","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"aee2374b22003867f679cb942215e8c4f5c3ec1f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        }"},{"line_number":136,"context_line":"        if (error.status \u003d\u003d\u003d 403) {"},{"line_number":137,"context_line":"          var msg2 \u003d gettext("},{"line_number":138,"context_line":"            \u0027Forbidden operation. Will redirect to the \u0027 +"},{"line_number":139,"context_line":"            \u0027login page shortly.\u0027"},{"line_number":140,"context_line":"          );"},{"line_number":141,"context_line":"          handleRedirectMessage(msg2, $rootScope, $window, frameworkEvents, toastService);"},{"line_number":142,"context_line":"        }"}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_feb6a7d9","line":139,"range":{"start_line":138,"start_character":12,"end_line":139,"end_character":33},"in_reply_to":"ff0f0b1f_8b69b926","updated":"2017-05-18 18:07:23.000000000","message":"Ok, will fix","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"1f0a900343d732a1c7b2fddb28f08c39f09cd68b","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"  function handleRedirectMessage(msg, $rootScope, $window, frameworkEvents, toastService) {"},{"line_number":149,"context_line":"    var toast \u003d toastService.find(\u0027error\u0027, msg);"},{"line_number":150,"context_line":"    //Suppress the multiple duplicate redirect toast messages."},{"line_number":151,"context_line":"    if (!toast) {"},{"line_number":152,"context_line":"      toastService.add(\u0027error\u0027, msg);"},{"line_number":153,"context_line":"      $rootScope.$broadcast(frameworkEvents.FORCE_LOGOUT, msg);"}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_4b4cc1c6","line":150,"updated":"2017-05-18 10:41:33.000000000","message":"What is it that specifically causes the multiple redirects? This feels like a workaround.","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"aee2374b22003867f679cb942215e8c4f5c3ec1f","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"  function handleRedirectMessage(msg, $rootScope, $window, frameworkEvents, toastService) {"},{"line_number":149,"context_line":"    var toast \u003d toastService.find(\u0027error\u0027, msg);"},{"line_number":150,"context_line":"    //Suppress the multiple duplicate redirect toast messages."},{"line_number":151,"context_line":"    if (!toast) {"},{"line_number":152,"context_line":"      toastService.add(\u0027error\u0027, msg);"},{"line_number":153,"context_line":"      $rootScope.$broadcast(frameworkEvents.FORCE_LOGOUT, msg);"}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_1e0efb8c","line":150,"in_reply_to":"ff0f0b1f_4b4cc1c6","updated":"2017-05-18 18:07:23.000000000","message":"In the test case where click the button on image page...it issues various API calls to the backend to get various data that I can not do anything about it...the intercept method will intercept each http call before redirect, without suppressing the redirect toast message...it will show multiple toast messages...","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"}],"horizon/static/framework/widgets/toast/toast.service.js":[{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"1f0a900343d732a1c7b2fddb28f08c39f09cd68b","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        var toastType \u003d (type \u003d\u003d\u003d \u0027error\u0027 ? \u0027danger\u0027 : type);"},{"line_number":132,"context_line":"        return (toast.type \u003d\u003d\u003d toastType \u0026\u0026 toast.msg.localeCompare(msg) \u003d\u003d\u003d 0);"},{"line_number":133,"context_line":"      });"},{"line_number":134,"context_line":"    }"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    /**"},{"line_number":137,"context_line":"     * Remove all toasts."}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_cbd571bb","line":134,"updated":"2017-05-18 10:41:33.000000000","message":"It\u0027d be good to find out why multiple toasts are being spawned in the first place, rather than just finding existing ones and preventing more.","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"aee2374b22003867f679cb942215e8c4f5c3ec1f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        var toastType \u003d (type \u003d\u003d\u003d \u0027error\u0027 ? \u0027danger\u0027 : type);"},{"line_number":132,"context_line":"        return (toast.type \u003d\u003d\u003d toastType \u0026\u0026 toast.msg.localeCompare(msg) \u003d\u003d\u003d 0);"},{"line_number":133,"context_line":"      });"},{"line_number":134,"context_line":"    }"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    /**"},{"line_number":137,"context_line":"     * Remove all toasts."}],"source_content_type":"text/javascript","patch_set":7,"id":"ff0f0b1f_de276312","line":134,"in_reply_to":"ff0f0b1f_cbd571bb","updated":"2017-05-18 18:07:23.000000000","message":"please see the answer in framework_module.js","commit_id":"1ff4fc4ce11872ad49efcb6bd3ec4f9b76c55d95"}]}
