Skip to content

User quota dashboard frontend - #2194

Merged
shengquan-ni merged 13 commits into
masterfrom
user_quota_frontend
Oct 29, 2023
Merged

shengquan-ni merged 13 commits into
masterfrom
user_quota_frontend

Conversation

@mengw15

@mengw15 mengw15 commented Oct 22, 2023 •

Copy link
Copy Markdown
Contributor

This PR contains the frontend code for Quota Dashboard. For detailed description, see #2193

@zhey16 zhey16 mentioned this pull request Oct 23, 2023
@mengw15
mengw15 requested a review from shengquan-ni October 23, 2023 06:48
shengquan-ni pushed a commit that referenced this pull request Oct 29, 2023
### Introduction
---
This PR introduces Quota Dashboard for both users and administrators to
visualize storage usage in Texera. This dashboard allows the users to:

- View their quota (# of created workflows, # of uploaded files, ...)
- View the storage size of the operator cache in their workflows.
- View the Top Five Files that they have uploaded, sorted by the size of
each file.
- Delete Operator Cache.
- Delete and download the files.

The users can only see their own quota dasboard, whereas the
administrators are able to see the quota dashboards of all users.

### Solution
---
The main goal of this dashboard is to have the users to visualize their
storage usage, and organize their storage. There are three tabs in the
dashboard, which are Quota Table, Operator Cache, and Top 5 Files. Each
tab has different strucutre and shows different information.

- `Quota Table`: Displaying boxes with different information in each box
- `Files Uploaded`: Displaying the number of the files the user
uploaded.
- `Workflows Created`: Displaying the number of workflows the user
created.
- `Files with Access`: Displaying the number of files the user has
access to.
- `Workflows with Access`: Displaying the number of workflows the user
has access to.
- `Total Size of the Files`: Displaying the total size of the uploaded
files.
- `Total Operator Cache Size`: Displaying the total size of the operator
cache in MongoDB.
- `Operator Cache`: DIsplaying in a hierarchical structure: each
workflow has a table of executions
- `Collection Name`: Name of the collection (operator cache) in MongoDB.
  - `Execution ID`: Different ID for each executions of a workflow.
  - `Cache Size`: The corresponding size of each collection in MongoDB.
  - `Action`: Give the user option to delete collection from MongoDB.
- `Top 5 Files`: Displaying a table consisting 5 largest files.
  - `File Name`: Displaying the name of each file.
  - `Size`: Displaying the size of each file.
  - `Uploaded Time`: The date and time the file uploaded by the user.
- `File Description`: Displaying the description of the files.
Displaying message "No Available Description" when no descriptions
provided.
- `Action`: Provide the user options to either delete or download the
file.

When user clicks the deletion or download button, there will be a pop up
confirmation window.

In addition to the Quota Dashboard Intergace, this PR also modified the
backend clean up code. After starting new execution, the older
executions' results would not be deleted. The clean up of the old
results in mongodb are left to the periodic clean up.

Current PR contains the backend codes, and the frontend codes are in
this PR #2194

### Demo
---



https://github.com/Texera/texera/assets/86388854/eb61acf8-16ad-4a29-880f-2b6575ca17c8

---------

Co-authored-by: MiuMiuMiue <[email protected]>
@shengquan-ni
shengquan-ni merged commit 22114fa into master Oct 29, 2023
@shengquan-ni
shengquan-ni deleted the user_quota_frontend branch October 29, 2023 19:33
@Yicong-Huang Yicong-Huang added frontend Changes related to the frontend GUI feature labels Nov 3, 2023
Xiao-zhen-Liu pushed a commit that referenced this pull request Jan 16, 2024
### Introduction
---
This PR introduces Quota Dashboard for both users and administrators to
visualize storage usage in Texera. This dashboard allows the users to:

- View their quota (# of created workflows, # of uploaded files, ...)
- View the storage size of the operator cache in their workflows.
- View the Top Five Files that they have uploaded, sorted by the size of
each file.
- Delete Operator Cache.
- Delete and download the files.

The users can only see their own quota dasboard, whereas the
administrators are able to see the quota dashboards of all users.

### Solution
---
The main goal of this dashboard is to have the users to visualize their
storage usage, and organize their storage. There are three tabs in the
dashboard, which are Quota Table, Operator Cache, and Top 5 Files. Each
tab has different strucutre and shows different information.

- `Quota Table`: Displaying boxes with different information in each box
- `Files Uploaded`: Displaying the number of the files the user
uploaded.
- `Workflows Created`: Displaying the number of workflows the user
created.
- `Files with Access`: Displaying the number of files the user has
access to.
- `Workflows with Access`: Displaying the number of workflows the user
has access to.
- `Total Size of the Files`: Displaying the total size of the uploaded
files.
- `Total Operator Cache Size`: Displaying the total size of the operator
cache in MongoDB.
- `Operator Cache`: DIsplaying in a hierarchical structure: each
workflow has a table of executions
- `Collection Name`: Name of the collection (operator cache) in MongoDB.
  - `Execution ID`: Different ID for each executions of a workflow.
  - `Cache Size`: The corresponding size of each collection in MongoDB.
  - `Action`: Give the user option to delete collection from MongoDB.
- `Top 5 Files`: Displaying a table consisting 5 largest files.
  - `File Name`: Displaying the name of each file.
  - `Size`: Displaying the size of each file.
  - `Uploaded Time`: The date and time the file uploaded by the user.
- `File Description`: Displaying the description of the files.
Displaying message "No Available Description" when no descriptions
provided.
- `Action`: Provide the user options to either delete or download the
file.

When user clicks the deletion or download button, there will be a pop up
confirmation window.

In addition to the Quota Dashboard Intergace, this PR also modified the
backend clean up code. After starting new execution, the older
executions' results would not be deleted. The clean up of the old
results in mongodb are left to the periodic clean up.

Current PR contains the backend codes, and the frontend codes are in
this PR #2194

### Demo
---



https://github.com/Texera/texera/assets/86388854/eb61acf8-16ad-4a29-880f-2b6575ca17c8

---------

Co-authored-by: MiuMiuMiue <[email protected]>
Xiao-zhen-Liu pushed a commit that referenced this pull request Jan 16, 2024
This PR contains the frontend code for Quota Dashboard. For detailed
description, see #2193

---------

Co-authored-by: MiuMiuMiue <[email protected]>
Co-authored-by: Zhe Yuan <[email protected]>
Co-authored-by: Shengquan Ni <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
### Introduction
---
This PR introduces Quota Dashboard for both users and administrators to
visualize storage usage in Texera. This dashboard allows the users to:

- View their quota (# of created workflows, # of uploaded files, ...)
- View the storage size of the operator cache in their workflows.
- View the Top Five Files that they have uploaded, sorted by the size of
each file.
- Delete Operator Cache.
- Delete and download the files.

The users can only see their own quota dasboard, whereas the
administrators are able to see the quota dashboards of all users.

### Solution
---
The main goal of this dashboard is to have the users to visualize their
storage usage, and organize their storage. There are three tabs in the
dashboard, which are Quota Table, Operator Cache, and Top 5 Files. Each
tab has different strucutre and shows different information.

- `Quota Table`: Displaying boxes with different information in each box
- `Files Uploaded`: Displaying the number of the files the user
uploaded.
- `Workflows Created`: Displaying the number of workflows the user
created.
- `Files with Access`: Displaying the number of files the user has
access to.
- `Workflows with Access`: Displaying the number of workflows the user
has access to.
- `Total Size of the Files`: Displaying the total size of the uploaded
files.
- `Total Operator Cache Size`: Displaying the total size of the operator
cache in MongoDB.
- `Operator Cache`: DIsplaying in a hierarchical structure: each
workflow has a table of executions
- `Collection Name`: Name of the collection (operator cache) in MongoDB.
  - `Execution ID`: Different ID for each executions of a workflow.
  - `Cache Size`: The corresponding size of each collection in MongoDB.
  - `Action`: Give the user option to delete collection from MongoDB.
- `Top 5 Files`: Displaying a table consisting 5 largest files.
  - `File Name`: Displaying the name of each file.
  - `Size`: Displaying the size of each file.
  - `Uploaded Time`: The date and time the file uploaded by the user.
- `File Description`: Displaying the description of the files.
Displaying message "No Available Description" when no descriptions
provided.
- `Action`: Provide the user options to either delete or download the
file.

When user clicks the deletion or download button, there will be a pop up
confirmation window.

In addition to the Quota Dashboard Intergace, this PR also modified the
backend clean up code. After starting new execution, the older
executions' results would not be deleted. The clean up of the old
results in mongodb are left to the periodic clean up.

Current PR contains the backend codes, and the frontend codes are in
this PR apache#2194

### Demo
---



https://github.com/Texera/texera/assets/86388854/eb61acf8-16ad-4a29-880f-2b6575ca17c8

---------

Co-authored-by: MiuMiuMiue <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
This PR contains the frontend code for Quota Dashboard. For detailed
description, see apache#2193

---------

Co-authored-by: MiuMiuMiue <[email protected]>
Co-authored-by: Zhe Yuan <[email protected]>
Co-authored-by: Shengquan Ni <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Oct 24, 2026
)

### What changes were proposed in this PR?

Removes `AdminUserService` clients for admin endpoints that no longer
exist, or never did. **+1/−35 lines.** There is no behaviour change.

- **`getUploadedFiles` / `USER_CREATED_FILES`**
(`/admin/user/uploaded_files`) and **`getAccessFiles` /
`USER_ACCESS_FILES`** (`/admin/user/access_files`): no production
caller, and the backend endpoints are gone, so any call would 404.
- **`USER_UPLOADED_DATASE_SIZE`** (`/admin/user/dataset_size`) and
**`USER_UPLOADED_DATASET_COUNT`** (`/admin/user/uploaded_dataset`): no
references at all. Neither path was ever served under `/admin/user`; the
dataset-size endpoint lived under `/quota`.
- The `File` type import, which only the removed methods used. `File`
itself stays; `UserQuotaComponent` still imports it.

The spec drops the two cases and two error-propagation rows that only
exercised the removed methods.

### History

| | |
| --- | --- |
| **Introduced by** | apache#2194 (2023-10-29), "User quota dashboard
frontend": the two file clients. apache#2615 (2024-05-08), "Add
Dataset-related statistics to Quota Dashboard": the two dataset
constants |
| **Usage removed by** | apache#2781 (2024-08-20), "Remove File-Related
Components", which removed the file clients' callers and their backend
endpoints. apache#2680 (2024-07-23), "Adding quota statisitc visualization",
which removed the dataset constants' readers |

They have been unused for over two years.

### Any related issues, documentation, discussions?

Closes apache#9083

### How was this PR tested?

No new tests.

From `frontend/`:

- `npx ng test --watch=false --include='**/admin-user.service.spec.ts'
--include='**/admin-user.component.spec.ts'
--include='**/user-quota.component.spec.ts'`: 3 files, 97 tests, all
pass. The last two specs cover the service's consumers.
- `npx tsc --noEmit -p src/tsconfig.app.json` and `-p
src/tsconfig.spec.json`: clean.
- `yarn format:ci`: clean.
- `npx ng build`: success.

To re-check:

```
git grep -n -w -E 'getUploadedFiles|getAccessFiles|uploaded_files|access_files|dataset_size|uploaded_dataset'   # no hits
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants