)]}'
{"zun_ui/content/container/containers/views.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"69c191931d1bc1f19b4266e375f2770b4fcd8daa","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        context \u003d super(SerialConsoleView, self).get_context_data(**kwargs)"},{"line_number":22,"context_line":"        context[\u0027container_id\u0027] \u003d self.kwargs[\u0027container_id\u0027]"},{"line_number":23,"context_line":"        try:"},{"line_number":24,"context_line":"            console_url \u003d client.container_attach(self.request,"},{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_df30a9eb","line":24,"range":{"start_line":24,"start_character":33,"end_line":24,"end_character":49},"updated":"2017-03-30 16:00:43.000000000","message":"I think it is better to ensure the prerequisites before doing this call. In my POV, the prerequisites are:\n\n* The container is Running\n* The interactive mode is enabled","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"29e16455992b54bf0663e8c0947265b6132d0517","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        context \u003d super(SerialConsoleView, self).get_context_data(**kwargs)"},{"line_number":22,"context_line":"        context[\u0027container_id\u0027] \u003d self.kwargs[\u0027container_id\u0027]"},{"line_number":23,"context_line":"        try:"},{"line_number":24,"context_line":"            console_url \u003d client.container_attach(self.request,"},{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_027c43b3","line":24,"range":{"start_line":24,"start_character":33,"end_line":24,"end_character":49},"in_reply_to":"dfeb2761_7184165f","updated":"2017-04-03 02:37:20.000000000","message":"Hongbin, I agree with your alternative and love it. I\u0027m changing for that in console.controller.js.","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"0f83b62edd07293b712ae8dfcf4e7af843e569f8","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        context \u003d super(SerialConsoleView, self).get_context_data(**kwargs)"},{"line_number":22,"context_line":"        context[\u0027container_id\u0027] \u003d self.kwargs[\u0027container_id\u0027]"},{"line_number":23,"context_line":"        try:"},{"line_number":24,"context_line":"            console_url \u003d client.container_attach(self.request,"},{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_7184165f","line":24,"range":{"start_line":24,"start_character":33,"end_line":24,"end_character":49},"in_reply_to":"dfeb2761_ae6d9999","updated":"2017-03-31 22:17:02.000000000","message":"An alternative is to hide the console tag if interactive mode was not enabled. If container is not running, display a proper message to users. Either approach is equally fine with me.","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"38f560db5e1421132f4685eebce0a37c160a5ac5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        context \u003d super(SerialConsoleView, self).get_context_data(**kwargs)"},{"line_number":22,"context_line":"        context[\u0027container_id\u0027] \u003d self.kwargs[\u0027container_id\u0027]"},{"line_number":23,"context_line":"        try:"},{"line_number":24,"context_line":"            console_url \u003d client.container_attach(self.request,"},{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_ae6d9999","line":24,"range":{"start_line":24,"start_character":33,"end_line":24,"end_character":49},"in_reply_to":"dfeb2761_b59f4ab3","updated":"2017-03-31 22:12:09.000000000","message":"Shu,\n\nI see. I might have a harder requirement for you. If the container is not running or its interactive mode was disabled, simply hide the console tag from the UI (it seems to me that the console tag was always displayed regardless of the state of the container). What do you think about this proposal?","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"774ea94f190a81126fd92ed4e83d8ecf1168cf3e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        context \u003d super(SerialConsoleView, self).get_context_data(**kwargs)"},{"line_number":22,"context_line":"        context[\u0027container_id\u0027] \u003d self.kwargs[\u0027container_id\u0027]"},{"line_number":23,"context_line":"        try:"},{"line_number":24,"context_line":"            console_url \u003d client.container_attach(self.request,"},{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_b59f4ab3","line":24,"range":{"start_line":24,"start_character":33,"end_line":24,"end_character":49},"in_reply_to":"ffe62b97_df30a9eb","updated":"2017-03-31 04:15:08.000000000","message":"At this point, context has only container_id. So if we want to check these params, we need one more HTTP request.\nIf attach failed due to status or interactive_mode, API seems to return 409 error. To detect whether console is enable, it\u0027s enough. IMO.","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"38f560db5e1421132f4685eebce0a37c160a5ac5","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"},{"line_number":28,"context_line":"            context[\"error_message\"] \u003d \"Cannot get console for container %s.\" \\"},{"line_number":29,"context_line":"                % self.kwargs[\u0027container_id\u0027]"},{"line_number":30,"context_line":"        return context"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_ae2119fe","line":28,"range":{"start_line":28,"start_character":40,"end_line":28,"end_character":75},"updated":"2017-03-31 22:12:09.000000000","message":"I think it would be better to display more details about the failure so that users understand the root cause of the problem. For example, if server return a 4xx response, display the error message returned from server would be more helpful.","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"},{"author":{"_account_id":16352,"name":"Shu Muto","email":"shu.mutow@gmail.com","username":"shu.mutow"},"change_message_id":"29e16455992b54bf0663e8c0947265b6132d0517","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                                                  self.kwargs[\u0027container_id\u0027])"},{"line_number":26,"context_line":"            context[\"console_url\"] \u003d console_url"},{"line_number":27,"context_line":"        except Exception:"},{"line_number":28,"context_line":"            context[\"error_message\"] \u003d \"Cannot get console for container %s.\" \\"},{"line_number":29,"context_line":"                % self.kwargs[\u0027container_id\u0027]"},{"line_number":30,"context_line":"        return context"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_6260af02","line":28,"range":{"start_line":28,"start_character":40,"end_line":28,"end_character":75},"in_reply_to":"dfeb2761_ae2119fe","updated":"2017-04-03 02:37:20.000000000","message":"I\u0027ll do that in the future.","commit_id":"ee6817b79b61f98631d9a38cc4caf3dfcf970504"}]}
