Skip to content

Commit a97a4cd

Browse files
committed
tslint, fix apm jest test, update time filter icon when disabling applyGlobalTime
1 parent 526d120 commit a97a4cd

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

x-pack/plugins/apm/public/components/app/RumDashboard/VisitorBreakdownMap/__tests__/__mocks__/regions_layer.mock.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export const mockLayerList = [
2121
{
2222
leftField: 'iso2',
2323
right: {
24+
applyGlobalQuery: true,
25+
applyGlobalTime: true,
2426
type: 'ES_TERM_SOURCE',
2527
id: '3657625d-17b0-41ef-99ba-3a2b2938655c',
2628
indexPatternTitle: 'apm-*',
@@ -38,15 +40,13 @@ export const mockLayerList = [
3840
},
3941
],
4042
indexPatternId: 'apm_static_index_pattern_id',
41-
applyGlobalQuery: true,
4243
},
4344
},
4445
],
4546
sourceDescriptor: {
4647
type: 'EMS_FILE',
4748
id: 'world_countries',
4849
tooltipProperties: ['name'],
49-
applyGlobalQuery: true,
5050
},
5151
style: {
5252
type: 'VECTOR',
@@ -96,6 +96,8 @@ export const mockLayerList = [
9696
{
9797
leftField: 'region_iso_code',
9898
right: {
99+
applyGlobalQuery: true,
100+
applyGlobalTime: true,
99101
type: 'ES_TERM_SOURCE',
100102
id: 'e62a1b9c-d7ff-4fd4-a0f6-0fdc44bb9e41',
101103
indexPatternTitle: 'apm-*',

x-pack/plugins/maps/public/classes/sources/es_term_source/es_term_source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class ESTermSource extends AbstractESAggSource {
5656
}
5757
return {
5858
...normalizedDescriptor,
59-
term: descriptor!.term,
59+
term: descriptor.term!,
6060
type: SOURCE_TYPES.ES_TERM_SOURCE,
6161
};
6262
}

x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_button/toc_entry_button.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,17 @@ export class TOCEntryButton extends Component<Props, State> {
5151
this._loadIsFilteredByGlobalTime();
5252
}
5353

54+
componentDidUpdate() {
55+
this._loadIsFilteredByGlobalTime();
56+
}
57+
5458
componentWillUnmount() {
5559
this._isMounted = false;
5660
}
5761

5862
async _loadIsFilteredByGlobalTime() {
5963
const isFilteredByGlobalTime = await this.props.layer.isFilteredByGlobalTime();
60-
if (this._isMounted) {
64+
if (this._isMounted && isFilteredByGlobalTime !== this.state.isFilteredByGlobalTime) {
6165
this.setState({ isFilteredByGlobalTime });
6266
}
6367
}

0 commit comments

Comments
 (0)