[Synthetics] Fixes exp view no data state (#155591)

This commit is contained in:
Shahzad 2023-04-25 15:13:54 +02:00 committed by GitHub
parent ab039e63f3
commit e495581618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -101,6 +101,7 @@ describe('ObservabilityDataViews', function () {
expect(indexP).toEqual({ id: dataViewList.ux });
expect(dataViews?.createAndSave).toHaveBeenCalledWith({
allowNoIndex: true,
fieldFormats,
id: 'rum_static_index_pattern_id_trace_apm_',
timeFieldName: '@timestamp',

View file

@ -140,11 +140,16 @@ export class ObservabilityDataViews {
timeFieldName: '@timestamp',
fieldFormats: this.getFieldFormats(app),
name: DataTypesLabels[app],
allowNoIndex: true,
},
false,
false
);
if (dataView.matchedIndices.length === 0) {
throw new DataViewMissingIndices('No indices match pattern');
}
if (runtimeFields !== null) {
runtimeFields.forEach(({ name, field }) => {
dataView.addRuntimeField(name, field);
@ -170,6 +175,7 @@ export class ObservabilityDataViews {
timeFieldName: '@timestamp',
fieldFormats: this.getFieldFormats(app),
name: DataTypesLabels[app],
allowNoIndex: true,
});
}
// we want to make sure field formats remain same