-
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
[Exploratory View] Remove references to Index Pattern in user facing copy #120352
Comments
Pinging @elastic/uptime (Team:uptime) |
@dominiqueclarke could you provide a bit more detail on which permissions you'd expect to trigger this message? I went looking into the code to figure out exactly which permissions are needed and ended up seeing that we actually set the permissions error based on an // ...
const loadIndexPattern: IndexPatternContext['loadIndexPattern'] = useCallback(
async ({ dataType }) => {
if (typeof hasAppData[dataType] === 'undefined' && !loading[dataType]) {
setLoading((prevState) => ({ ...prevState, [dataType]: true }));
try {
let hasDataT = false;
let indices: string | undefined = '';
if (indexPatternsList[dataType]) {
indices = indexPatternsList[dataType];
hasDataT = true;
}
switch (dataType) {
case 'ux':
case 'synthetics':
const resultUx = await getDataHandler(dataType)?.hasData();
hasDataT = Boolean(resultUx?.hasData);
indices = resultUx?.indices;
break;
case 'apm':
case 'mobile':
const resultApm = await getDataHandler('apm')?.hasData();
hasDataT = Boolean(resultApm?.hasData);
indices = resultApm?.indices.transaction;
break;
}
setHasAppData((prevState) => ({ ...prevState, [dataType]: hasDataT }));
if (hasDataT && indices) {
const obsvIndexP = new ObservabilityIndexPatterns(data);
const indPattern = await obsvIndexP.getIndexPattern(dataType, indices);
setIndexPatterns((prevState) => ({ ...prevState, [dataType]: indPattern }));
}
setLoading((prevState) => ({ ...prevState, [dataType]: false }));
} catch (e) {
if ((e as HttpFetchError).body.error === 'Forbidden') {
setIndexPatternErrors((prevState) => ({ ...prevState, [dataType]: e }));
}
setLoading((prevState) => ({ ...prevState, [dataType]: false }));
}
}
},
[data, hasAppData, indexPatternsList, loading]
);
// ... Considering the above, which permission would you like me not to have for Apologies if I'm missing something here, but I was concerned with making sure I'd reproduce the message as you expected given I didn't want to just change the flag for the copy to appear. |
This is waiting on us to actually redo what we were testing. As @dominiqueclarke mentioned yesterday, it seems like we can't test this issue because of other changes upstream. @dominiqueclarke can you confirm that's accurate? If not, is there anything else we can do to push this forward? |
Exploratory View has 1 reference to "index pattern" in user facing copy. It should be removed in favor of "data view".
The reference can be found here: https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.tsx#L170
The new copy should be "Unable to create Data View. You don't have the required permission, please contact your admin."
The text was updated successfully, but these errors were encountered: