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

✨ Add pihole integration #860

Merged
merged 4 commits into from May 6, 2023
Merged

✨ Add pihole integration #860

merged 4 commits into from May 6, 2023

Conversation

manuel-rw
Copy link
Collaborator

@manuel-rw manuel-rw commented Apr 25, 2023

πŸ€– Generated by Copilot at 2b8c4e6

Summary

πŸš«πŸ“ŠπŸ”Œ

This pull request adds support for the PiHole integration type in the app, which allows the user to monitor and control the network-level ad blocking service. It adds two new widgets for displaying and controlling the PiHole integrations, two new API endpoints for fetching and updating the PiHole data, and several helper functions and types for working with the PiHole library and the app properties. It also updates the existing types, components, and files to include the pihole option and its required password.

We are the masters of the network
We block the ads with pihole
We control the status with a click
We see the stats on the dashboard

Walkthrough

  • Add support for PiHole integration, which is a network-level ad blocker, for the apps on the dashboard (link, link, link, link)
  • Add two new widget components for displaying and controlling the PiHole integration data on the dashboard: adHoleSummary and adHoleControls (link, link, link, link)
  • Add two new API endpoints for fetching the summary data and performing the control action for the PiHole integrations using the PiHole library (link, link)
  • Add two custom hooks for interacting with the PiHole API endpoints using @tanstack/react-query (link)
  • Add two types for the PiHole integration data: AdStatistics and PiholeApiSummaryType (link)
  • Add a helper function for formatting a number with a suffix based on its magnitude (link)
  • Import the Alert component from @mantine/core and use it to display a message to the user when there is an error or a success in the WrapperContent component (link)

@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
homarr βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback May 6, 2023 5:48pm

Copy link
Contributor

@LarveyOfficial LarveyOfficial left a comment

Choose a reason for hiding this comment

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

I love this feature, would be super cool to have.
If possible, is there a way to have it so you can specify which instances of piHole to monitor in the summary widget, as well as the ability to disable specific piHole instances in the control widget?

src/types/app.ts Show resolved Hide resolved
src/widgets/adhole/AdHoleControls.tsx Outdated Show resolved Hide resolved
src/widgets/adhole/AdHoleSummary.tsx Outdated Show resolved Hide resolved
@manuel-rw manuel-rw linked an issue Apr 27, 2023 that may be closed by this pull request
@manuel-rw manuel-rw force-pushed the feat/ad-holes-widget branch 2 times, most recently from c23bf02 to 8483ca1 Compare April 28, 2023 21:45
@manuel-rw manuel-rw marked this pull request as ready for review April 30, 2023 16:12
Co-authored-by: Larvey <39219859+LarveyOfficial@users.noreply.github.com>
@manuel-rw
Copy link
Collaborator Author

@Meierschlumpf

src/pages/api/modules/dns-hole/control.ts Outdated Show resolved Hide resolved
src/pages/api/modules/dns-hole/summary.ts Show resolved Hide resolved
src/tools/client/math.ts Outdated Show resolved Hide resolved
src/widgets/dnshole/DnsHoleControls.tsx Outdated Show resolved Hide resolved
src/widgets/dnshole/DnsHoleControls.tsx Outdated Show resolved Hide resolved
src/widgets/dnshole/DnsHoleControls.tsx Outdated Show resolved Hide resolved
src/widgets/dnshole/DnsHoleSummary.tsx Outdated Show resolved Hide resolved
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
src/widgets/dnshole/DnsHoleSummary.tsx Outdated Show resolved Hide resolved
public/locales/en/modules/dns-hole-summary.json Outdated Show resolved Hide resolved
@ajnart
Copy link
Owner

ajnart commented May 6, 2023

@manuel-rw is your default push on git a force push ? It seems you force push every commit lol

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
@manuel-rw
Copy link
Collaborator Author

No, default is not force push. Just my preference.

@manuel-rw manuel-rw merged commit 92e8d79 into dev May 6, 2023
5 checks passed
@manuel-rw manuel-rw deleted the feat/ad-holes-widget branch May 6, 2023 17:51
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.

Add PiHole Integration
4 participants