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

FEAT: Storage API & Frontend #3409

Merged
merged 18 commits into from
Nov 30, 2022

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Jul 1, 2022

I think it would be really cool to have a storage page in the frontend that displays the storage used by each camera so it is easier to visualize how that cameras retention settings contribute to overall storage use. Perhaps in a future PR management could be added but for now I think the information is helpful.

ToDo:

  • Add Storage API
  • Create storage route

Screen Shot 2022-11-29 at 16 23 52 PM

@NickM-27 NickM-27 marked this pull request as draft July 2, 2022 02:28
@felipecrs
Copy link
Contributor

Oh wow, this is amazing! One suggestion would be to also display the total space, consumed space, and available space in human readable bytes. Or even in percentage as well.

@NickM-27
Copy link
Sponsor Collaborator Author

The storage is slow to calculate I assume due to dockerized file system. du -h from the same location is almost instant on my host and takes ~10 seconds inside the container. Doesn't seem that there is much I can do about this

@felipecrs
Copy link
Contributor

Out of curiosity:

image

Inside of the Hass addon.

@NickM-27
Copy link
Sponsor Collaborator Author

One thing is I need the depth to be full so that I can accumulate the camera directories sizes

@NickM-27
Copy link
Sponsor Collaborator Author

This is what I see:

Host

Screen Shot 2022-07-19 at 6 45 23 AM

Container

Screen Shot 2022-07-19 at 6 47 59 AM

@NickM-27
Copy link
Sponsor Collaborator Author

It might be better to run this command on stats initialization, include it in stats, and then just use that for the page. Maybe have it refresh every few minutes or something 🤔

@felipecrs
Copy link
Contributor

Perhaps you can switch to ncdu or duc?

sudo apt install -y ncdu
sudo apt install -y duc

They have optimizations in speed over du which most likely is worth it.

@NickM-27
Copy link
Sponsor Collaborator Author

Perhaps you can switch to ncdu or duc?

sudo apt install -y ncdu
sudo apt install -y duc

They have optimizations in speed over du which most likely is worth it.

Thanks, ncdu appears to be faster and I think can work with the way I am using it

@NickM-27 NickM-27 changed the base branch from release-0.11.0 to dev September 25, 2022 02:39
@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Oct 9, 2022

With the new segment calculation in StorageMaintainer it makes this incredibly quick and simple so an external tool is no longer needed.

I am going to look in to a different frontend tool for displaying this info since it is clunky and I can't get good results

@netlify
Copy link

netlify bot commented Nov 2, 2022

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 687524b
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/6386955cbfebfd00088411ab

@NickM-27
Copy link
Sponsor Collaborator Author

I decided not to go with the graph / bar component. Seemed too random / difficult to work with and I think it is better that the styles match the new system page.

@NickM-27 NickM-27 marked this pull request as ready for review November 29, 2022 23:29
@blakeblackshear blakeblackshear merged commit 5ad3919 into blakeblackshear:dev Nov 30, 2022
@NickM-27 NickM-27 deleted the storage-api-frontend branch December 9, 2022 14:43
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.

None yet

3 participants