-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Serverless Elasticsearch] User is blocked from moving forward when opening Discover, Dashboard, or Visualize Library #164432
Comments
Pinging @elastic/appex-sharedux (Team:SharedUX) |
Here are some ideas on how to fix this from a technical perspective: Option 1. Fix inside the shared
|
const checkData = useCallback(async () => { | |
try { | |
if (savedSearchId) { | |
return true; // bypass NoData screen | |
} | |
const hasUserDataViewValue = await data.dataViews.hasData | |
.hasUserDataView() | |
.catch(() => false); | |
const hasESDataValue = isDev || (await data.dataViews.hasData.hasESData().catch(() => false)); | |
setHasUserDataView(hasUserDataViewValue); | |
setHasESData(hasESDataValue); | |
if (!hasUserDataViewValue) { | |
setShowNoDataPage(true); | |
return false; | |
} | |
let defaultDataView: DataView | null = null; | |
try { | |
defaultDataView = await data.dataViews.getDefaultDataView({ displayErrors: false }); | |
} catch (e) { | |
// | |
} | |
if (!defaultDataView) { | |
setShowNoDataPage(true); | |
return false; | |
} | |
return true; | |
} catch (e) { | |
setError(e); | |
return false; | |
} | |
}, [data.dataViews, isDev, savedSearchId]); | |
How could be implemented:
- Discover adds new
kibana.yml
optiondiscover.enableEmptyState: boolean
- Discover uses it to skip the empty state
- Serverless elasticsearch project sets it in
config/serverless.es.yml
Note: more changes will be needed from each app, because, for example, Discover fails if there is no data and no data views :
An alternative that won't require applications fixes for empty states could be if the apps sredirect to home. For the serverless search project this would be "getting started" page, so I think the simplest short term fix would be:
- Discover adds new kibana.yml option discover.redirectHomeIfEmpty: boolean
- Discover uses it to redirect to home page if it loads with empty state
- Serverless elasticsearch project sets this option in config/serverless.es.yml
(same for visualize and dashboard)
As mentioned in Slack, if we can allow a specific If that's too complex for a first iteration, I'd prefer a more specific "noData.." in the naming of the config. "Empty" is ambiguous, what is empty? 😊 So something like |
Here is an example how a simple redirect approach would look like. As described technically it is the simplest fix, however it still can be confusing for users Screen.Recording.2023-08-23.at.11.48.48.mov |
Moving ahead with the updated page and card: wip pr: #164709 |
Serverless Elasticsearch blocks users from moving forward when opening Discover, Dashboard, or Visualize Library.
In other serverless projects and regular Kibana this no-data page redirects to
/integrations
(fleet), but Serverless Elasticsearch project disabled fleet and no data component doesn't handle this case and fallbacks to no permissions screen.kibana/packages/shared-ux/card/no_data/impl/src/no_data_card.component.tsx
Lines 91 to 93 in 1a1283d
Locally this isn't reproduced because of
isDev
hackkibana/src/plugins/discover/public/application/main/discover_main_route.tsx
Line 112 in 933f2a5
The text was updated successfully, but these errors were encountered: