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

[FEATURE] Communicate to users when detector is initializing #227

Closed
kamingleung opened this issue Dec 15, 2022 · 11 comments · Fixed by #487
Closed

[FEATURE] Communicate to users when detector is initializing #227

kamingleung opened this issue Dec 15, 2022 · 11 comments · Fixed by #487
Labels
enhancement New feature or request

Comments

@kamingleung
Copy link

kamingleung commented Dec 15, 2022

Is your feature request related to a problem?
When a detector is being created, it may take up to 20+ seconds to complete the creation. Users currently have to wait in the Create flow to complete in order to proceed.

What solution would you like?
When a user submits the detector creation, we should redirect the user back to the detector details page. In the details page, we should communicate to users that the detector is being initializing in the status as well as a banner to inform users.
Anomaly detection has a similar experience today when users create anomaly detectors:
image

What alternatives have you considered?
Open to ideas, feel free to comment here!

Do you have any mockups?
To be added.

@paladin-tech
Copy link
Contributor

@kamingleung I can see at least one major UX issue here. Since Detector is being created in the background as an asynchronous process, currently a user has to wait for that process to be over before being brought back to Detector details page.
Your solution would not have issues if we knew that process will be a success (which we don't by default), so if anything goes wrong we are losing a moment to bring up a UX warning that the Detector creation failed.
If we still want to let a user go to details page before the creation flow is over, we need to add some UI elements to notify a user that the creation failed, as well as controls to have him back to create flow, so that error can be fixed.

@kamingleung
Copy link
Author

@paladin-tech @sbcd90

  1. I am wondering what tasks are taking up the extra time for the detector creation to complete? Can we shorten the creation time?
  2. What are the common creation failures?
  3. Are the failures fixable by configuring the detector? If so, can we have inline validations, so users can make corrections before they even click "Create".

@jovancacvetkovic
Copy link

@kamingleung let me check what delays we have now when a user creates the detectors and I will write these here so that we can figure out the best way to communicate with users.

@jovancacvetkovic
Copy link

@kamingleung Current state:

  • for me creation is instant, with no delays, what can cause the delay: network or server is too busy
  • fields that are not mandatory and the user can continue without those: Run every (can be empty), Rule names (can be empty), Rule severity (can be empty)
    Throws an error
Failed to create detector:

[json_parse_exception] Current token (VALUE_NULL) not numeric, can not use numeric value accessors at [Source: (org.opensearch.common.io.stream.InputStreamStreamInput); line: 1, column: 132]

We should consider adding some UI validation.

@kamingleung
Copy link
Author

@jovancacvetkovic Rule names and Rule severities can be empty as discussed here.
Let's check if Run every is required by the API. I would recommend creating a new issue on this validation discussion. Thanks.

@jovancacvetkovic
Copy link

Created ticket per comment #378

@jovancacvetkovic
Copy link

@kamingleung I'll start working on this soon, can you drop the banner text here or any mocks that would be useful?

jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 9, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 10, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 10, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 10, 2023
@jovancacvetkovic
Copy link

jovancacvetkovic commented Mar 13, 2023

@kamingleung, @amsiglan I have a few questions/suggestions:

  1. Is this banner text ok while in the process: Attempting to create the detector.?
  2. View detector configuration button should be visible only if the request fails?
  3. While in the process the status should be: Detector name • Initializing?
  4. If there is an error, the status should be: Detector name • Failed and the button View detector configuration should be visible?

jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 13, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 14, 2023
AWSHurneyt pushed a commit that referenced this issue Mar 14, 2023
* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473
Fix cypress create rules flaky tests #426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473
Fix cypress create rules flaky tests #426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Mar 14, 2023
* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473
Fix cypress create rules flaky tests #426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473
Fix cypress create rules flaky tests #426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 7fcfb5a)
AWSHurneyt pushed a commit that referenced this issue Mar 14, 2023
* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473
Fix cypress create rules flaky tests #426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473
Fix cypress create rules flaky tests #426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules #473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 7fcfb5a)

Co-authored-by: Jovan Cvetkovic <[email protected]>
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 15, 2023
@jovancacvetkovic
Copy link

@kamingleung @amsiglan Hey, check the new screenshots.
detector initializing
detector failed
detector created

jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 16, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 16, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 16, 2023
jovancacvetkovic pushed a commit to jovancacvetkovic/security-analytics-dashboards-plugin that referenced this issue Mar 16, 2023
@kamingleung
Copy link
Author

Hi @jovancacvetkovic

A few follow-up questions:

  1. What are the different errors that will cause the detector creation to fail? Can you list them out?
  2. What happens when a detector is in the failed state? Does the detector remained in the list of detectors with a failed status?
  3. Can users delete the failed detector?
  4. Can users update configuration of a failed detector to make it active?

@jovancacvetkovic
Copy link

@kamingleung
1. All errors that can come or be validated on UI are controlled on the Create detector page (eg validating mandatory fields), there are errors that can't be controlled/validated on UI and are triggered by the backend - they should be checked with backend devs.
2. 4. When the detector creation fails, the detector configuration is saved on UI only and the user can try and fix the configuration and try to create the detector again.
3. Failed detectors are not saved, and if a user leaves the page all progress is lost.

amsiglan pushed a commit that referenced this issue Mar 23, 2023
* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Communicate to users when the detector is initializing #487

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Mar 23, 2023
* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Communicate to users when the detector is initializing #487

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 068d03e)
AWSHurneyt pushed a commit that referenced this issue Mar 31, 2023
* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules #474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing #227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Communicate to users when the detector is initializing #487

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 068d03e)

Co-authored-by: Jovan Cvetkovic <[email protected]>
AWSHurneyt pushed a commit to AWSHurneyt/security-analytics-dashboards-plugin that referenced this issue Oct 12, 2023
…project#486)

* [FEATURE] Common data store for the rules opensearch-project#473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules opensearch-project#473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules opensearch-project#473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules opensearch-project#473
Fix cypress create rules flaky tests opensearch-project#426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules opensearch-project#473
Fix cypress create rules flaky tests opensearch-project#426

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules opensearch-project#473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Common data store for the rules opensearch-project#473

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 7fcfb5a)

Co-authored-by: Jovan Cvetkovic <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
AWSHurneyt pushed a commit to AWSHurneyt/security-analytics-dashboards-plugin that referenced this issue Oct 12, 2023
…oject#487) (opensearch-project#492)

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Common data store for the rules opensearch-project#474

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Communicate to users when detector is initializing opensearch-project#227

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Communicate to users when the detector is initializing opensearch-project#487

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 068d03e)

Co-authored-by: Jovan Cvetkovic <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
3 participants