diff --git a/docs/access-control.md b/docs/access-control.md index c2405f0..3cc0ead 100644 --- a/docs/access-control.md +++ b/docs/access-control.md @@ -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 @@ -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 @@ -45,10 +45,10 @@ 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] @@ -56,10 +56,10 @@ graph TD 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 diff --git a/docs/billing.md b/docs/billing.md deleted file mode 100644 index fe338ca..0000000 --- a/docs/billing.md +++ /dev/null @@ -1,67 +0,0 @@ -# Billing service - -The billing service allows the project to pay for the services used in the CoCoS system such as total number of computations, total users, and the use rate. Once a billing customer is created, the billing service allows the user to select a plan out of the ones created by the admin and make payments for these plans based on the selected plan. - -## Billing Metrics - -Billing plans are designed for flexibility to accommodate different projects needs such as number of computations, workspace members and computation runs. This allows choice for a plan that best fits current projects needs and can easily scale up as needed. - -## Customer Functions - -### List Plans - -In order to list plans, the following steps need to be followed: -On the UI the steps are as follows: - -1. Click on 'Billing' on the side navigation to view the plans. - ![Plans Page](img/ui/plans_page.png) - -### Create Customer - -This function allows for the creation of a new customer account with the billing service. A billing customer is required to perform all billing operations and is created from the billing page as shown below. - -Once you click the create billing customer, the customer details are required in order to successfully create the plan. -On the UI the steps are as follows: - -1. Click on 'Billing' on the side navigation, then click 'Create' - ![Create Billing Customer](img/create_customer.png) -2. On the dialog that pops up, fill in the required details. - ![Create Customer Modal](img/create_customer_modal.png) - -### Update Billing Customer - -This function updates the details of an existing customer account. - -On the UI the steps are as follows: - -1. Click on 'Billing' on the side navigation, then click 'Update Customer Details' - ![Billing Page](img/ui/plans_page.png) -2. On the dialog that pops up, fill in the required details and click 'Update'. - ![Update Customer Modal](img/ui/update_billing_customer.png) - -## Subscription Functions - -### Create Subscription - -Once a billing customer has been created, the plans created will be visible. On the billing page, the plan cards will be visible as shown below: - -![Plans Page](img/ui/plans_page.png) - -To subscribe to a plan, click the select subscription button which will create a subscription to the selected plan. - -### Checkout - -When the select subscription button is clicked, you will be redirected to the checkout page where your payment details will be required for the payment to be made. - -On the UI the steps are as follows: - -1. Click on 'Billing' on the side navigation, then click 'Select Subscription' on any of plans - ![Plans Page](img/ui/plans_page.png) -2. On the checkout page, fill in your information and submit to check out. - ![Checkout Page](img/checkout_page.png) - -### Update Payment Details - -The payment details of the current session are stored, and these can be changed by clicking the update payment details button as shown below: - -![Update Payment Details](img/ui/update_payment_details.png) diff --git a/docs/computation-logs.md b/docs/computation-logs.md index f3715a1..0a4ad07 100644 --- a/docs/computation-logs.md +++ b/docs/computation-logs.md @@ -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. @@ -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. diff --git a/docs/computations.md b/docs/computations.md index 1676c37..441f834 100644 --- a/docs/computations.md +++ b/docs/computations.md @@ -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: diff --git a/docs/dashboard.md b/docs/dashboard.md new file mode 100644 index 0000000..12324ef --- /dev/null +++ b/docs/dashboard.md @@ -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) diff --git a/docs/getting-started.md b/docs/getting-started.md index 743df07..7f0f30b 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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. + ## Sign Up Create a user on the ui as shown below: @@ -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 " -d @- << EOF @@ -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 " -d @- << EOF @@ -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 diff --git a/docs/img/billing-customer.png b/docs/img/billing-customer.png deleted file mode 100644 index 39d12b8..0000000 Binary files a/docs/img/billing-customer.png and /dev/null differ diff --git a/docs/img/checkout_page.png b/docs/img/checkout_page.png deleted file mode 100644 index 05751dc..0000000 Binary files a/docs/img/checkout_page.png and /dev/null differ diff --git a/docs/img/create_customer.png b/docs/img/create_customer.png deleted file mode 100644 index 39d12b8..0000000 Binary files a/docs/img/create_customer.png and /dev/null differ diff --git a/docs/img/create_customer_modal.png b/docs/img/create_customer_modal.png deleted file mode 100644 index 094d370..0000000 Binary files a/docs/img/create_customer_modal.png and /dev/null differ diff --git a/docs/img/login.png b/docs/img/login.png deleted file mode 100644 index a80d59b..0000000 Binary files a/docs/img/login.png and /dev/null differ diff --git a/docs/img/ui/dashboard.png b/docs/img/ui/dashboard.png new file mode 100644 index 0000000..ea8cf17 Binary files /dev/null and b/docs/img/ui/dashboard.png differ diff --git a/docs/img/ui/plans_page.png b/docs/img/ui/plans_page.png deleted file mode 100644 index 00ab8b9..0000000 Binary files a/docs/img/ui/plans_page.png and /dev/null differ diff --git a/docs/img/ui/update_billing_customer.png b/docs/img/ui/update_billing_customer.png deleted file mode 100644 index 5c88714..0000000 Binary files a/docs/img/ui/update_billing_customer.png and /dev/null differ diff --git a/docs/img/ui/update_payment_details.png b/docs/img/ui/update_payment_details.png deleted file mode 100644 index 77e484e..0000000 Binary files a/docs/img/ui/update_payment_details.png and /dev/null differ diff --git a/docs/policies.md b/docs/policies.md index d95e639..02df8e4 100644 --- a/docs/policies.md +++ b/docs/policies.md @@ -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. diff --git a/docs/ui.md b/docs/ui.md deleted file mode 100644 index 6bc10a6..0000000 --- a/docs/ui.md +++ /dev/null @@ -1,109 +0,0 @@ -# UI - -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, projects, computations, computation policies, computation invitations, certs, backends, project billing and updating of all this information. - -## Getting Started - -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. - -## Login and Registration - -A default user is created when the CoCoS system is installed. The default user is `admin`, with email `admin@example.com` and the password is `12345678`. This user can be used to log in to the UI. Once logged in, the user can change their password and create new users. The next layer of security is the project, which is a collection of users. The user can create a new project and invite other users to join the project. Prior to accessing the CoCoS system, the user must be a part of an project. - -A user can also register an account by clicking the Register button which prompts the user for a username, email, and password. After which, the user is free to create projects and manage their created sysem. - -The projects page gives the user the ability to either create an entirely new project or join an existing project. The user can also view the projects they are a part of and the projects they have created. - -![Login Page](img/login.png) - -## Projects - -The projects page gives the user the ability to create new projects. The user can also view the projects they are a part of and the projects they have created. The user can also update the information of the projects they have created. The project page also includes a members tab, which shows the users that are a part of the project. On this tab, the project owner can also invite new users to join the project and assign different roles to the different users that have been assigned to the project. - -![Project Login](img/proj-login.png) - -## Users - -The users page gives the user the ability to create new users. The user can also view the users they have created and the users that are a part of the project they are in. The user can also update the information of the users they have created. - -![Users Page](img/users-page.png) - -## Computations - -The computations page gives the user the ability to create new computations. The user can also view the computations they have created and the computations that are a part of the project they are in. The user can also update the information of the computations they have created. On the computations page, the computation admin has the ability to invite other users into the computation. Once a user is invited to the computation, they are required to provide their public certificate for them to be able to run the computation. - -![Computations Page](img/ui/computation.png) - -On the computations page, the user has the ability to view invitations that have been sent to them and either accept or reject the invitation. The computation admin also has the ability to view the users that are a part of the computation and the roles that have been assigned to the different users. - -## 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 computation desired. - -![computation_download](img/ui/download_computation.png) - -## Computation Policies - -The computation policies page 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 project 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. - -![Computation Policy](img/computation-policies.png) - -## Billing - -Billing service allows the project and users to pay for the services they use. The first step in billing is to create a billing customer, which you create as the first step when you access the project settings page. - -![Billing Customer](img/billing-customer.png) - -Once the customer is created, the user can select one of the plans created by the admin and subscribe to it. This leads the user to the payment page, where the user can enter their credit card details and subscribe to the plan. - -![Subscription Select](img/subscriptions.png) - -Once selected, the user will be prompted to make the payment. Once the payment is successful, the user will be subscribed to the plan and the billing will be active. - -![Payment Page](img/payment.png) diff --git a/mkdocs.yml b/mkdocs.yml index 7940e70..f17a2a8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -21,14 +21,13 @@ nav: - Architecture: architecture.md - Getting Started: getting-started.md - Access Control: access-control.md - - Billing: billing.md - Computations: computations.md - Computation Policies: policies.md - Assets: assets.md - Computation Logs: computation-logs.md - Users: users.md - Projects: projects.md - - UI: ui.md - Certs: certs.md - Backends: backends.md - Algorithms: algorithms.md + - Dashboard: dashboard.md