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

fix: handle None system metrics in user admin panel #1029

Merged

Conversation

imprvhub
Copy link
Contributor

  • Add default values for system metrics when None
  • Add conditional system metrics display in template
  • Show informative message when metrics unavailable

Closes #1028

imprvhub and others added 2 commits December 19, 2024 11:14
- Add default values for system metrics when None
- Add conditional system metrics display in template
- Show informative message when metrics unavailable

Closes conda-incubator#1028
Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for conda-store canceled.

Name Link
🔨 Latest commit 2f825e2
🔍 Latest deploy log https://app.netlify.com/sites/conda-store/deploys/67642abe246c1e0008d25ecb

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for conda-store canceled.

Name Link
🔨 Latest commit 571b436
🔍 Latest deploy log https://app.netlify.com/sites/conda-store/deploys/67646348168e3f000850610a

Copy link
Contributor

@soapy1 soapy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thanks for this contribution!

Just a little suggestion about setting the default value of system_metrics.

There currently are not tests for views/ui.py and we plan on deprecating the admin app soon, so I think it's ok to not be adding tests for this.

- Return raw system_metrics from API without default values
- Update user.html template to check for None metrics
- Display info message when metrics not available

Closes conda-incubator#1028
@imprvhub
Copy link
Contributor Author

Sweet, thanks for this contribution!

Just a little suggestion about setting the default value of system_metrics.

There currently are not tests for views/ui.py and we plan on deprecating the admin app soon, so I think it's ok to not be adding tests for this.

Done!

Copy link
Contributor

@soapy1 soapy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looks great 🦩

Thanks for the contribution. Will merge once the tests are passing!

@soapy1 soapy1 merged commit 121fb2f into conda-incubator:main Dec 19, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

[BUG] - Internal server error (conda store server) when system metrics are not available
2 participants