GithubHelp home page GithubHelp logo

bunn / pistats Goto Github PK

View Code? Open in Web Editor NEW
362.0 12.0 8.0 4.29 MB

macOS app to visualize Pi-hole information

License: BSD 2-Clause "Simplified" License

Swift 94.01% Objective-C 5.99%
pi-hole macos swiftui swift

pistats's Introduction

Pi Stats

Follow up and manage the status of your Pi-hole(s) with this simple macOS app that lives in your menu bar.

Authentication Token

In order to use the "enable/disable" button you need to add your Authentication Token in the Settings screen.

There are two different ways to get your authentication token:

  • /etc/pihole/setupVars.conf under WEBPASSWORD
  • WebUI -> Settings -> API -> Show API Token

Screenshots

Requirement

This project uses SwiftUI which requires macOS Catalina.

Tested with Pi-hole 4.4 and 5.0

Mobile

If you want to run Pi Stats on your iPhone or iPad you can download Pi Stats for iOS which is 100% open source as well :)

Download

Pi Stats (and SwiftHole) is a free and open source hobby project of mine. If you want to support its development you can either pay whatever you want on Gumroad or buy it on the App Store for those nice automatic updates :)

pistats's People

Contributors

bunn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pistats's Issues

Preferences item gets cut off

The last checkbox item in the preferences panel gets cut off by the end of the window. Weirdly enough, I've seen it wrapped in a new line, but more often the not, the text is simply truncated with an elipsis:
image

Pi Stats cannot connect to Pi-hole

Hi,
I have the latest 2.2.0 Pi-Stats on MacOs. On the server side I have: Pi-hole v5.1.2 Web Interface v5.1.1 FTL v5.2.

I get the API Token. Took in the necessary field in the Pi-Stats and I just got red icon.
On the server side I have checked the nginx log and I can see:

      • [18/Aug/2020:14:19:44 +0200] "GET /admin/api.php?auth=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&enable= HTTP/1.1" 400 264 "-" "Pi%20Stats/12 CFNetwork/1128.0.1 Darwin/19.6.0 (x86_64)"
      • [18/Aug/2020:14:19:46 +0200] "GET /admin/api.php? HTTP/1.1" 400 264 "-" "Pi%20Stats/12 CFNetwork/1128.0.1 Darwin/19.6.0 (x86_64)"

I can see just HTTP code 400. Can you help me with this?
Thanks!

Enable/Disable button does not work

I'm able to see accurate stats from my pihole instance but am unable to affect it.

I've attached a screenshot showing my active pihole page and the display from Hole Stats.
When I click the button, it flips and then reverts back to it's original state.

Screenshot 2020-10-02 at 16 00 39

Deploy through Homebrew Cask?

This might require writing a GitHub action to automatically compile and create the HoleStats and then release it through GitHub releases?

Would allow people to run brew cask install holestats, however if you'd rather go through GumRoad.

Invalid API token when disabling

When disabling, invalid API token message is displayed. I can remove the pi hole config, create a new one, paste API token and all the stats are displayed correctly, but disabling results in error message.

pi hole 5.12

Issue with second pihole not updating correctly

Hello, I have two piholes running on separate Raspberry Pi 4 units. They are running on IP x.x.x.21 and x.x.x.22 with the same admin password and therefore the same API token.

For whatever reason on both the mobile and MacOS clients, the .21 service disables and enables as requested. The second (.22) also acts as originally requested but the status is not updated. The result is that I have "Partially active" reflected in the stats app while in fact both piholes are active in the admin dashboard.

Any ideas on what the issue could be? I've uninstalled pihole and reinstalled and am getting the same issue.

Thanks!

Suggestion : add a link to Pi-hole web interface

Hello

Great app, I really like it ! ๐Ÿ‘

One suggestion though : it would be great if I could open the Pi-hole web interface from PiStats. Maybe a link in the menu, or through a secondary click on the icon ?

Thanks for your work !

Consider support for multiple instances of Pi-hole

I love the app youโ€™ve built and it would be super useful if you could consider support for more than one pi-hole in your app.

Myself along with many others run 2+ instances of pi-hole for redundancy purposes and it would be great to be able to use your app to monitor maybe at a minimum 2 instances. This way I could view the stats for all of my pi-hole devices instead of just choosing one.

Thanks for the great work!

Use PiHole's Group Management feature so users only control their filtering.

I am just wondering if it is possible to add an optional feature so that in preferences you can set a user (client).
So when you enable and disable under pistats it only works on that particular user.
This will also allow , for example, a household member to bypass when required without affecting the filtering of other users or appliances.

It would have to work by saving the groups for the client, setting a clients group to none and then restore them when re-enabled. Alternatively, rather than saving a list of groups each time, let the user set their own groups via a list and checkbox component under preferences.

There is more info here in PiHole's Docs.
https://docs.pi-hole.net/database/gravity/example/

i18n support

Would be good to setup the project to accept new languages

Save API Token on keychain

Currently the app is saving the API Token on UserDefault ๐Ÿ˜ฑ๐Ÿ˜ฑ

(don't judge me, the app is not live yet)

Close the window when the user clicks outside

All apps on the menu bar (including native ones, like the wifi or bluetooth icon) close whenever you click outside of their area. This should be the case as well, instead of needing to click the icon again to close. The first time I used it I was a little confused as to why the windows wasn't closing whenever I clicked away.

Add requirement on error message

If the app can't parse the JSON, add a message "You must be running Pi-hole 5.0 or later" since that's mostly the main source of issue since 4.x and 5.x have different data types for some properties

Allow non secure (no SSL certificate) connections

Can you please allow connections to the piHole instances that don't use SSL certificates. Right now I'm getting an "Session Error: The certificate for this server is invalid." I can only press "OK" and then after a second it gets back to this message.

Bugs with Preferences UI in Ventura on Apple Silicon

  1. You can open unlimited preferences windows (instead of only one).
  2. "Pi-holes": Web-Interface and QR-Code icons are missing.
  3. If you click on "Preferences" or "About" the other options hide behind an arrow.

Here are all bugs in one Screenshot:
CleanShot 2022-12-01 at 01 59 45

Unnecessary check if API key exists to display the disable button

The app has logic (below) to only display the enable button if an API key is set. I use PiHole without a password (and thus without an API key), in this mode you don't require sending an API key to the interface to disable PiHole.

var canDisplayEnableDisableButton: Bool { return !piholes.allSatisfy { return $0.apiToken.isEmpty == true } }

I have removed this check and tested it locally and it behaves properly.

Change icon in case Pi-hole is offline

Would be nice to change the status bar icon in case Pi-hole is offline.

Currently the "service" is part of the viewModel on the ViewController by design since we only wanted to make requests after the user opened the ViewController.

The service would need to be moved to an independent entity not coupled with the ViewController.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.