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

Get rid of ajax/getstoragestats.php #26070

Closed
wants to merge 1 commit into from

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Sep 8, 2016

Description

See #26067.
Retrieve the necessary information from the file list's current directory element which is fetched from Webdav.

Related Issue

#26067

Motivation and Context

Less code path and get the info from where it's already available.
Kill ajax endpoints.

How Has This Been Tested?

Open folder, check FileList.dirInfo in the console.
Try uploading a file when there is not enough space left, no Webdav call made, warning appears.
Check that every 5 minutes a PROPFIND is made on the current folder and FileList.dirInfo contains the updated info.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Tech debt

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PVince81 PVince81 added this to the 9.2 milestone Sep 8, 2016
@mention-bot
Copy link

@PVince81, thanks for your PR! By analyzing the annotation information on this pull request, we identified @MorrisJobke, @DeepDiver1975 and @LukasReschke to be potential reviewers

@PVince81
Copy link
Contributor Author

PVince81 commented Sep 8, 2016

TODOS:

  • adjust storage warnings
  • debounce refresh function

@PVince81
Copy link
Contributor Author

PVince81 commented Sep 9, 2016

Hmmm, getting the storage quota from PROPFIND is trickier than I thought.

For the current user "quota-used-bytes" only contains the wanted value when doing a PROPFIND on the "/" path. But for received shares, one would need to do a PROPFIND on the share root instead to get the quota value from there. But even then, that value is actually the same (apparently?) like the "oc:size" which is mostly "how much bytes used by the contents of this share". But what we want is the actual used bytes of the sharing user's whole storage.

All this is only to be able to detect whether more than 98% storage is used to display a warnings. This was achieved by "usedSpacePercent".

@PVince81
Copy link
Contributor Author

PVince81 commented Sep 9, 2016

I'd be tempted to get rid of this notification and implement it differently as a notification, which is basically a quota notification that the user would receive not only in the web UI but also on other clients.
See https://github.com/owncloud/core/issues/6878

@PVince81
Copy link
Contributor Author

PVince81 commented Sep 13, 2016

  • try and get rid of storage stats polling altogether
    • make the free space check be only on the server side at upload time, no need for pre-check

@PVince81 PVince81 force-pushed the propfind-insteadof-getstoragestats branch from 8a206f2 to 5be778a Compare September 21, 2016 07:30
@PVince81
Copy link
Contributor Author

I have now removed the polling of the storage stats.
Now it will only be called in moments where it makes sense: after an upload.
Of course also after switching folders the dirInfo is updated as well, which is the new base for the storage stats.

I'd like to get rid of the message about "your storage is almost full" and replace it with a notification in the future.

Retrieve the necessary information from the file list's current
directory element which is fetched from Webdav.
@PVince81
Copy link
Contributor Author

PVince81 commented Apr 6, 2017

moving to backlog, no time for this and there are blockers

@PVince81 PVince81 modified the milestones: backlog, 10.0 Apr 6, 2017
@PVince81
Copy link
Contributor Author

PVince81 commented Feb 7, 2018

still waiting for the notification when close to quota

@PVince81
Copy link
Contributor Author

PVince81 commented Feb 5, 2019

files app will eventually be replaced by Phoenix

not much point cleaning up the old code

@PVince81 PVince81 deleted the propfind-insteadof-getstoragestats branch February 5, 2019 15:57
@lock lock bot locked as resolved and limited conversation to collaborators Feb 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants