Skip to content

Add metric snapshots admin#830

Merged
JoaquinBN merged 1 commit into
devfrom
JoaquinBN/fix-network-metrics
Jun 23, 2026
Merged

Add metric snapshots admin#830
JoaquinBN merged 1 commit into
devfrom
JoaquinBN/fix-network-metrics

Conversation

@JoaquinBN

@JoaquinBN JoaquinBN commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Registers MetricSnapshot in Django admin as a read-only view. Adds list columns, filters, search, and date navigation so metric refresh snapshots can be inspected from production admin without changing snapshot data.

Summary by CodeRabbit

  • New Features

    • Added admin access for metric snapshots with a streamlined view for browsing records.
    • Enabled sorting, filtering, searching, and date-based navigation in the admin list.
  • Bug Fixes

    • Restricted metric snapshot management in the admin to view-only access, preventing unintended edits, additions, or deletions.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f198c24b-3669-411d-bc0a-3eb3a2ec088f

📥 Commits

Reviewing files that changed from the base of the PR and between e71352c and efd5b59.

📒 Files selected for processing (1)
  • backend/api/admin.py

📝 Walkthrough

Walkthrough

Adds a Django admin module that registers MetricSnapshot and configures it as a view-only admin listing with display, filtering, search, ordering, date hierarchy, read-only fields, disabled actions, and denied add/delete permissions.

Changes

MetricSnapshot admin

Layer / File(s) Summary
Read-only admin registration
backend/api/admin.py
Registers MetricSnapshot in Django admin and configures list display, filters, search, ordering, date hierarchy, read-only fields, disabled actions, and denied add/delete permissions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add metric snapshots admin' accurately and concisely describes the main change: registering MetricSnapshot in Django admin with appropriate configurations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch JoaquinBN/fix-network-metrics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JoaquinBN JoaquinBN merged commit fb89eaf into dev Jun 23, 2026
2 of 3 checks passed
@JoaquinBN JoaquinBN deleted the JoaquinBN/fix-network-metrics branch June 23, 2026 14:18
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.

1 participant