-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes for number of log messages and badge color #322
Conversation
…way. There is room for improvement.
…thing. Also fixed how coloring is done.
Could you please merge master into your branch (or rebase, as you wish) and re-push your changes? Thank you! |
So, I think I did it...let me know if not. |
Yep, looks good now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define get_highest_log_level
and nav_subtitle_bg_color
to always expect a value from log_level_summary
you can remove the guards from those 2 methods. Finally just fix log_level_summary
to always return a 2-tuple even if self.data['records']
is empty. Also you could just define self.data = {'records': []}
in __init__
so you can always expect something to be there for that value and your code will just deal with a list in all cases removing all of the guards.
@@ -68,6 +68,8 @@ class DebugPanel(object): | |||
#: when the user clicks on the panel's tab in the toolbar. | |||
url = '' | |||
|
|||
nav_subtitle_bg_color = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a documentation comment here using the #:
syntax.
My last comment is that we should define our own css classes to be used but it's ok if we don't do that right now. |
Made some changes. Let me know what you think. Thanks for the feedback! edit: Also, I agree on the CSS classes, but I wasn't sure if custom classes would be welcomed. I'm thinking this should do the trick, so let's see what the response is. |
LGTM. I'll probably rename |
This PR has integrated the comments made in issue #94. The only spot that I think might be questionable is my use of the progress-bar-XXX css class.
When no errors or warnings are present but info logs are the logging panel tab now looks like
When a warning is present it looks like
When an error is present it looks like
Note that the error count will not include the counts of any lesser levels. However, the error level is sum of criticals and errors.