Skip to content
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

Merged
merged 6 commits into from
Jul 14, 2017

Conversation

danclark5
Copy link
Contributor

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
20170712_pdbt_info

When a warning is present it looks like
20170712_pdbt_warn

When an error is present it looks like
20170712_pdbt_error

Note that the error count will not include the counts of any lesser levels. However, the error level is sum of criticals and errors.

@digitalresistor
Copy link
Member

Could you please merge master into your branch (or rebase, as you wish) and re-push your changes?

Thank you!

@danclark5
Copy link
Contributor Author

So, I think I did it...let me know if not.

@digitalresistor
Copy link
Member

Yep, looks good now!

Copy link
Member

@mmerickel mmerickel left a 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 = ''
Copy link
Member

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.

@mmerickel
Copy link
Member

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.

@danclark5
Copy link
Contributor Author

danclark5 commented Jul 14, 2017

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.

@mmerickel
Copy link
Member

LGTM. I'll probably rename nav_subtitle_bg_color to nav_subtitle_style or something prior to releasing this but that's super minor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants