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 Anywhere] Support fine-grained error states from VisLayers #3267

Closed
Tracked by #3415
ohltyler opened this issue Jan 12, 2023 · 3 comments
Closed
Tracked by #3415

[Feature Anywhere] Support fine-grained error states from VisLayers #3267

ohltyler opened this issue Jan 12, 2023 · 3 comments
Assignees
Labels
feature-anywhere visualizations Issues and PRs related to visualizations

Comments

@ohltyler
Copy link
Member

ohltyler commented Jan 12, 2023

We need to support errors at a per-plugin-resource (or per VisLayer) granularity. This way, this can be propagated when rendering the vis to show some error states and/or within the plugin flyouts, such as showing an error state for a particular detector in a detector list, or error icons next to a detector in the View Events page.

@ohltyler
Copy link
Member Author

ohltyler commented Feb 15, 2023

A proposed solution is that we have 2 different error types:

  1. Security-related errors from fetching a plugin resource and/or results.
  2. General errors out of the user's control, such as request timeout, issues connecting to the cluster, etc.

For security errors, because any combination will prevent regular rendering on the view events flyout (need name from get-resource api call, and results from get-results api call), we will hide that VisLayer and it won't be one of the options in the View Events flyout.

For general errors, we can still show the plugin resource details, and have an error icon that can provide details on why plugin details and/or results couldn't be fetched. This can at least provide some transparency to the user. Since we have a 'refresh' button in the flyout, this gives the user the option to click that and potentially successfully load data that had errors during the initial render of the flyout.

@ohltyler
Copy link
Member Author

ohltyler commented Feb 15, 2023

Examples (message field may be omitted or not needed)

EDIT: we may also want to aggregate by plugin when showing some generic toast message indicating the failures. We can add an originPlugin field in the data model.

interface VisLayerError {
  type: ERROR_TYPE;
  originPlugin: string;
  pluginResourceId: string;
  message?: string;

examples:

{
   type: ERROR_TYPE.SECURITY,
   pluginResourceID: abc123
   message?: "User x has no permissions to read detector abc123"
}
{
   type: ERROR_TYPE.GENERAL,
   pluginResourceID: abc123
   message?: "Failed to fetch data for detector abc123"
}

@ohltyler
Copy link
Member Author

Closed via #3646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-anywhere visualizations Issues and PRs related to visualizations
Projects
None yet
Development

No branches or pull requests

2 participants