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

PD-43 - Remove billing docs #52

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docs/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Prism implements fine grained access control for users having different access t

Workspaces are organizational units within the platform. They have the following user roles:

| Role | Permissions |
|---------------|------------------------------------------|
| Administrator | Admin, Member, Delete |
| Member | Member |
| Role | Permissions |
| ------------- | --------------------- |
| Administrator | Admin, Member, Delete |
| Member | Member |

### Workspaces Permissions Explained

Expand All @@ -21,15 +21,15 @@ Workspaces are organizational units within the platform. They have the following

Computations have more complex access control with various user roles:

| Role | Permissions |
|------------------|------------------------------------------------|
| Administrator | Owner, View, Edit, Run |
| Viewer | View |
| Editor | View, Edit |
| Runner | View, Run |
| Dataset Provider | View, Edit, Provide Data |
| Algo Provider | View, Edit, Provide Algo |
| Result Consumer | View, Edit, Consume Result |
| Role | Permissions |
| ---------------- | -------------------------- |
| Administrator | Owner, View, Edit, Run |
| Viewer | View |
| Editor | View, Edit |
| Runner | View, Run |
| Dataset Provider | View, Edit, Provide Data |
| Algo Provider | View, Edit, Provide Algo |
| Result Consumer | View, Edit, Consume Result |

### Computation Permissions Explained

Expand All @@ -45,21 +45,21 @@ Computations have more complex access control with various user roles:
graph TD
U[User] --> D[Workspace]
U --> C[Computation]

D --> DA[Administrator]
D --> DM[Member]

C --> CA[Administrator]
C --> CV[Viewer]
C --> CE[Editor]
C --> CR[Runner]
C --> CDP[Dataset Provider]
C --> CAP[Algo Provider]
C --> CRC[Result Consumer]

DA --> |Admin, Member, Delete| DP[Workspace Permissions]
DM --> |Member| DP

CA --> |Owner, View, Edit, Run| CP[Computation Permissions]
CV --> |View| CP
CE --> |View, Edit| CP
Expand Down
67 changes: 0 additions & 67 deletions docs/billing.md

This file was deleted.

10 changes: 6 additions & 4 deletions docs/computation-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ These sections allow you to switch between detailed computation events and logs.
To view these logs and events:

1. Timeline Tab:

- This tab outlines the sequence of events for the computation, from the initial setup (such as VM provisioning) to completion, including downloading the computation results.
- The timeline view provides an organized, event-by-event account of the computation’s progression.
![Computation Events](img/events.png)
![Computation Events](img/events.png)

2. Logs Tab:
- This tab contains the detailed logs generated during the computation run.
Expand All @@ -49,14 +50,15 @@ Using the Filter Feature:
1. Click on the filter (funnel) icon located in the logs/events section to open the filter modal.

2. In the modal, you’ll find options to refine your view:

- Date Filter: Specify a date range to focus on logs and events from a specific period.
- Log Level Filter: Filter by log level (e.g., error, warning, info) to see logs of a specific severity.
- Run: Filter by run id to see logs and events of a specific computation run.
- No. of Entries: Filter number of entries to specify number of logs and events displayed per page.
- Each filter selection refines the logs/events displayed to only show relevant data based on the chosen criteria.
![Filter Modal - All Options](img/log_filters_all.png)
![Filter Modal - Date](img/log_filters_date.png)
![Filter Modal - Log Level](img/logs_filters_log_level.png)
![Filter Modal - All Options](img/log_filters_all.png)
![Filter Modal - Date](img/log_filters_date.png)
![Filter Modal - Log Level](img/logs_filters_log_level.png)

3. Click Apply to apply your selected filters to the logs/events view. To reset the filters back to their default state and show all logs/events, click the Reset button.

Expand Down
52 changes: 52 additions & 0 deletions docs/computations.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,58 @@ content-length: 0
The update computation page appears as below:
![Update computation](./img/ui/update%20computation.png)

## Computation export and import

Prism allows users to export and import computations in both JSON and CSV formats. When exporting as JSON, all details of a computation are bundled into a single file, which can later be imported to recreate the computation with the provided data. Alternatively, multiple computations can be uploaded using a CSV file, which contains the relevant details for each computation. You can find a sample CSV file in the Prism repository [here](https://github.com/ultravioletrs/prism/blob/main/sample_computations.csv). When importing computations, ensure that all user IDs included in the file are valid and correspond to registered users in the workspace, including both backend and user IDs.

A sample computation that can be uploaded as json is shown:

```json
{
"id": "185e61f4-2fd1-47c3-b8e7-1bf6a8466b79",
"name": "sample_computation",
"description": "sample",
"owner": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"start_time": "0001-01-01T00:00:00Z",
"datasets": [
{
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "171ae99ff0449d52cd37f824eec20f56d4efbe322e022e1df02a89eabc16209c"
},
{
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "3b8aea5a74d179a445e86ce23d2fc24c8cd65d34f19798cb8852a7bcf945b2ae"
},
{
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "64a6eb1ed400d9b8139d64ef21641e0a930cda8008e21d2b055f1ae91a2c710a"
}
],
"algorithm": {
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "9567a45920974a3261f9e897b3da7e49a391728f607f36f0ad6e8f5ec8a2041b"
},
"result_consumers": ["f07b7716-2737-4228-9d80-d9df4ab5ee53"],
"agent_config": {
"log_level": "debug",
"cert_file": "",
"server_key": "",
"server_ca_file": "",
"client_ca_file": "",
"attested_tls": false
},
"backend_id": "9a8d67b6-9298-4393-81c6-8b7958a8cebf"
}
```

Upload of computations can be done on the computations page, the files accepted are json and csv.

![computation_import](img/ui/import_computation.png)

Any computation can be downloaded by clicking the download button when you view the desired computation.

![computation_download](img/ui/download_computation.png)

## Run Computation

In order to get one pspecific computation, by ID:
Expand Down
19 changes: 19 additions & 0 deletions docs/dashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Dashboard

The dashboard offers a summarized view of workspace elements, including users, backends, computations, and assets. It is designed to streamline data visualization and analysis and provides actionable insights through various charts and graphs.
The dashboard can be found at [https://prism.ultraviolet.rs](https://prism.ultraviolet.rs) and can be accessed from any modern web browser.

## Key Features and Insights

1. User Activity and Invitation Status
The dashboard provides detailed insights into user-related metrics. A dedicated chart visualizes the invitations that were accepted, pending and those that were rejected, allowing workspaces administrators to monitor engagement levels and assess the effectiveness of user onboarding strategies.

2. Computation Summary and Status Tracking
An important feature of the dashboard is the computation summary graph, which tracks the lifecycle of computations executed within the workspace. This graph provides both a historical overview of computations and highlights their final statuses, such as completed, failed, or in progress. This summary enables users to quickly gauge the overall performance and success rates of the system's computational tasks.

3. Backend Operational Trends
The dashboard includes a detailed time-series chart that analyzes backend performance. This chart displays the operational periods of the backends, showing when they were active and when they were shut down. By highlighting these trends, users can identify patterns, such as peak operational times or recurring downtime, and take proactive measures to optimize backend availability.

With these metrics, the dashboard enables workspace health monitoring, identifying trends, and making informed decisions efficiently.

![dashboard](img/ui/dashboard.png)
14 changes: 10 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Getting Started

The Prism UI gives is the easiest way to use the CoCoS system, giving the ability to use the entire prism system without interacting with the command line.
It provides a convenient way to log in to the CoCoS system, creation of users, workspaces, computations, computation policies, computation invitations, certs, backends, workspace billing and updating of all this information.
The UI can be found at [https://prism.ultraviolet.rs](https://prism.ultraviolet.rs). The UI is a web application and can be accessed from any modern web browser. Currently, the source code is not available for the UI, but it is planned to be open sourced in the future.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exclude future plans


## Sign Up

Create a user on the ui as shown below:
Expand Down Expand Up @@ -56,10 +60,10 @@ Content-Length: 647
{"access_token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiIiLCJleHAiOjE3MTQ0ODQ4OTgsImlhdCI6MTcxNDQ4MTI5OCwiaXNzIjoibWFnaXN0cmFsYS5hdXRoIiwic3ViIjoiIiwidHlwZSI6MCwidXNlciI6IjBkY2UyMmM2LTFhOTQtNGE4ZS1hNzAxLTE4NWE0YzM3ZGY1OCJ9.osXITQXqGHV_aewrnz0bmFzfwIjxMuPZnsSkcYxmJJrNlO9JYEVXrZHLZuS8wejGNUzHur33desq_X3REISBaA","refresh_token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiIiLCJleHAiOjE3MTQ1Njc2OTgsImlhdCI6MTcxNDQ4MTI5OCwiaXNzIjoibWFnaXN0cmFsYS5hdXRoIiwic3ViIjoiIiwidHlwZSI6MSwidXNlciI6IjBkY2UyMmM2LTFhOTQtNGE4ZS1hNzAxLTE4NWE0YzM3ZGY1OCJ9.KRWH0TTfrORMrjCsfxKw4P6TO4z0Pr3DXilLttwQCiMF6kKy-8sbNz5n2VNjkAIonm-LgIN-qz64l6--a78NjQ"}
```

This can also be done using UI as below:
A user can also register/create an account using the UI by clicking the Register button which prompts the user for a username, email, and password. After which, the user is free to create workspaces and manage their created system.
![UI login](img/ui/login.png)

### Create a project
### Create a workspace

```bash
curl -sSiX POST https://prism.ultraviolet.rs/auth/domains/ -H "Content-Type: application/json" -H "Authorization: Bearer <user_token>" -d @- << EOF
Expand All @@ -77,13 +81,15 @@ Content-Length: 235
{"id":"fda88db8-97e1-4560-8db1-29e8a40b5d0c","name":"project 1","alias":"org1","status":"enabled","created_by":"0dce22c6-1a94-4a8e-a701-185a4c37df58","created_at":"2024-04-30T13:17:32.884558Z","updated_at":"0001-01-01T00:00:00Z"}
```

The workspaces page gives the user the ability to either create an entirely new workspace or join an existing workspace. The user can also view the workspace they are a part of and the workspace they have created.

On the ui the steps are as follows:
![Project page](img/ui/newproj.png)
![Project Creation](img/ui/projcreate.png)

### Project Login

To log in to a Project:
To log in to a Workspace:

```bash
curl -sSiX POST https://prism.ultraviolet.rs/users/tokens/refresh -H "Content-Type: application/json" -H "Authorization: Bearer <user_refresh_token>" -d @- << EOF
Expand Down Expand Up @@ -120,7 +126,7 @@ X-Xss-Protection: 1; mode=block
}
```

For the UI click enter to login to Project with will bring you to the dashboard.
For the UI click enter to log in to workspace with will bring you to the dashboard.
![Project login](img/ui/projlogin.png)

## Backends
Expand Down
Binary file removed docs/img/billing-customer.png
Binary file not shown.
Binary file removed docs/img/checkout_page.png
Binary file not shown.
Binary file removed docs/img/create_customer.png
Binary file not shown.
Binary file removed docs/img/create_customer_modal.png
Binary file not shown.
Binary file removed docs/img/login.png
Binary file not shown.
Binary file added docs/img/ui/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/img/ui/plans_page.png
Binary file not shown.
Binary file removed docs/img/ui/update_billing_customer.png
Binary file not shown.
Binary file removed docs/img/ui/update_payment_details.png
Binary file not shown.
5 changes: 5 additions & 0 deletions docs/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Computations Policies

The computation policies page on the ui gives the user the ability to create new computation policies.
The user can also view the computation policies they have created and the computation policies that are a part of the workspace they are in.
The user can also update the information of the computation policies they have created.
A computation policy is used to determine the roles that are assigned to the different users that are a part of the computation, such as editor, viewer, or admin.

### Add Computation Policies

_Only_ admin or the owner of the computation can use `/policies` endpoint.
Expand Down
Loading