digma-ai / digma-ui

MIT License
3 stars 1 forks source link

Digma report header - Discovered items (Issues and Assets) #886

Open doppleware opened 1 month ago

doppleware commented 1 month ago

Motivation: We would like to provide the user with a way to showcase what Digma found in his application. This should focus on the issues found as well as the high-impact assets. We would like the user to access this report at the end of the POC and be able to export it to PDF as well.

This should replace the 'Dashboard' document we have today. However I should be able to open just one dashboard (not one per environment). As we roll out this feature we can already remove the previous dashboard.

https://www.figma.com/design/LWTvpodwOga7qiRmGwPCcj/Digma-Website?node-id=1112-4293&t=QRd9r011qP1bvyjI-4

  1. Filter components by environment/services. The user has to select a single environment or 'All' and can select multiple services. This selection will affect the rest of the components in the report. The services filter should be limited to the services that exist under the selected environment.

  2. Issues count component by issue lifecycle stage. This component is also meant to be a filter for some of the widgets. Selecting 'Critical issues' will limit the scope of other widgets to critical issues only. The other categories are: All Issues, Active, Regression, and Fixed. The 'Active' category also includes 'possibly fixed' (as we still consider them active). The four buttons behave as a 'radio button' (single select)- In this task, the buttons will be in a read-only mode (not clickable)

  3. Discovered assets, this list of items will be used to filter assets related reports (items below) the buttons behave as a radio button (single select) - In this task, the buttons will be in a read-only mode (not clickable) List of AssetTypes should (dynamic list of assettypes), Sorted Hide AssetTypes with zero count

  4. refresh button - will trigger reload of the data (no periodic refresh)

The definition of a 'critical issue' is a criticality of over 60%.

Acceptance Criteria:

As a user When I click on the dashboard icon I should see the "Digma Report" document opened, clicking again will do nothing(only single document of the report should be opened)

Given 2 environments env1 with spans from s1, s2 services env2 with spans from s2, s3 services Then I should see the following environment drop-down options: All Environments (selected) env1 env2 (env1, env2 sorted)

Given 2 environments env1 with spans from s1, s2 services env2 with spans from s2, s3 services When "All Environments" option selected Then I should see the following services drop-down options: All Services (selected) s1 s2 s3 (s1,s2,s3 sorted)

Given 2 environments env1 with spans from s1, s2 services env2 with spans from s2, s3 services When I Select s1 and s2 in the services drop-down list (multi-select) Then I should see the Discovered Issues are being filtered by s1 and s2

Given 2 environments env1 with spans from s1, s2 services env2 with spans from s2, s3 services When "env1" option selected Then I should see the following services drop-down options: All Services (selected) s1 s2

Discovered Issues data are affected by the environment/services filter

Given the following insights: insight1 (status=Active, criticality > 0.6) insight2(status=possibly fixed, criticality > 0.6) insight3(status=Regression, criticality < 0.6) insight4(status=Fixed, criticality < 0.6) insights(status=Fixed, criticality < 0.6) Then I should see the following 5 All Issues 2 Critical Issues 2 Active 1 Regression 2 Fixed

Given the following assets: span1 (Endpoint) span2 (DatabaseQueries) span3 (Cache) span4 (Cache) span5 (Other) Then I should see the following buttons: All Assets(5) Endpoints(1) Database queries(1) Cache(2) Other(1)

Given asset type with zero count Then I should not see it as button in the header

Technical details:

Filter - for environments list use /environments API for services filter by environment use - /services/getServices API

In the next issues, the selection will affect the data in other report items (used like a filter)

shaykeren commented 3 weeks ago

@doppleware should we support opening in an external browser? NO Discovered Assets - should be dynamically populated? is it a static list of classifications?YES All assets Count - Sum up all the values of the different classifications?