mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 20:32:11 +00:00
feat(ui): add quota overview (#6602)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Add UI to the quota feature to see what quotas applies to you and if you're exceeding any quota, it's designed to be a general size overview although it's exclusively filled with quota features for now. There's also no UI to see what item is actually taking in the most size. Purely an quota overview. Screenshots:   With inspiration from concept by 0ko:  Co-authored-by: Otto Richter <git@otto.splvs.net> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6602 Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
6dad457552
commit
77a1af5ab8
24 changed files with 348 additions and 33 deletions
|
@ -37,6 +37,7 @@ func TestMain(m *testing.M) {
|
|||
defer cancel()
|
||||
|
||||
tests.InitTest(true)
|
||||
setting.Quota.Enabled = true
|
||||
initChangedFiles()
|
||||
testE2eWebRoutes = routers.NormalRoutes()
|
||||
|
||||
|
|
12
tests/e2e/fixtures/attachment.yml
Normal file
12
tests/e2e/fixtures/attachment.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
-
|
||||
id: 1001
|
||||
uuid: 5792c349-8a26-46b8-b4cd-2c290f118285
|
||||
repo_id: 1
|
||||
issue_id: 1
|
||||
release_id: 0
|
||||
uploader_id: 3
|
||||
comment_id: 1
|
||||
name: forgejo-secrets.txt
|
||||
download_count: 0
|
||||
size: 536870911
|
||||
created_unix: 1730000000
|
1
tests/e2e/fixtures/quota_group.yml
Normal file
1
tests/e2e/fixtures/quota_group.yml
Normal file
|
@ -0,0 +1 @@
|
|||
- name: trusted-user
|
5
tests/e2e/fixtures/quota_group_mapping.yml
Normal file
5
tests/e2e/fixtures/quota_group_mapping.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
-
|
||||
id: 1001
|
||||
kind: 0
|
||||
mapped_id: 2
|
||||
group_name: trusted-user
|
14
tests/e2e/fixtures/quota_group_rule_mapping.yml
Normal file
14
tests/e2e/fixtures/quota_group_rule_mapping.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
-
|
||||
id: 1001
|
||||
group_name: trusted-user
|
||||
rule_name: git-lfs
|
||||
|
||||
-
|
||||
id: 1002
|
||||
group_name: trusted-user
|
||||
rule_name: "all:assets"
|
||||
|
||||
-
|
||||
id: 1003
|
||||
group_name: trusted-user
|
||||
rule_name: "Multi subjects"
|
13
tests/e2e/fixtures/quota_rule.yml
Normal file
13
tests/e2e/fixtures/quota_rule.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
-
|
||||
name: git-lfs
|
||||
limit: 512
|
||||
subjects: [6]
|
||||
|
||||
-
|
||||
name: "all:assets"
|
||||
limit: -1
|
||||
subjects: [7]
|
||||
|
||||
- name: "Multi subjects"
|
||||
limit: 5000000000
|
||||
subjects: [8,6]
|
12
tests/e2e/fixtures/repository.yml
Normal file
12
tests/e2e/fixtures/repository.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
-
|
||||
id: 1001
|
||||
owner_id: 2
|
||||
owner_name: user2
|
||||
lower_name: large-lfs
|
||||
name: large-lfs
|
||||
default_branch: main
|
||||
is_empty: false
|
||||
is_archived: false
|
||||
is_private: true
|
||||
status: 0
|
||||
lfs_size: 8192
|
|
@ -63,3 +63,12 @@ test('User: Profile settings', async ({browser}, workerInfo) => {
|
|||
await page.goto('/user2?tab=activity');
|
||||
await expect(page.getByText('Your activity is visible to everyone')).toBeVisible();
|
||||
});
|
||||
|
||||
test('User: Storage overview', async ({browser}, workerInfo) => {
|
||||
const page = await login({browser}, workerInfo);
|
||||
await page.goto('/user/settings/storage_overview');
|
||||
await page.waitForLoadState();
|
||||
await page.getByLabel('Git LFS – 8 KiB').nth(1).hover({position: {x: 250, y: 2}});
|
||||
await expect(page.getByText('Git LFS')).toBeVisible();
|
||||
await save_visual(page);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue