Skip to content

Commit 57ffda5

Browse files
committed
Merge branch 'master' into alerting/consumer-based-rbac
* master: fix flaky test on tsvb switch index patterns (elastic#70811) skip flaky suite (elastic#70757) Fix Data Streams and Rollups Jobs deep-link bugs (elastic#70903)
2 parents 12f2049 + f304176 commit 57ffda5

File tree

30 files changed

+97
-87
lines changed

30 files changed

+97
-87
lines changed

src/plugins/es_ui_shared/public/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ export {
6868

6969
export { Monaco, Forms };
7070

71+
export { extractQueryParams } from './url';
72+
7173
/** dummy plugin, we just want esUiShared to have its own bundle */
7274
export function plugin() {
7375
return new (class EsUiSharedPlugin {
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { parse, ParsedQuery } from 'query-string';
21+
22+
export function extractQueryParams(queryString: string = ''): ParsedQuery<string> {
23+
const hrefSplit = queryString.split('?');
24+
if (!hrefSplit.length) {
25+
return {};
26+
}
27+
28+
return parse(hrefSplit[1], { sort: false });
29+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export { extractQueryParams } from './extract_query_params';

test/functional/apps/visualize/_tsvb_chart.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3131
describe('visual builder', function describeIndexTests() {
3232
this.tags('includeFirefox');
3333
beforeEach(async () => {
34-
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']);
34+
await security.testUser.setRoles([
35+
'kibana_admin',
36+
'test_logstash_reader',
37+
'kibana_sample_admin',
38+
]);
3539
await PageObjects.visualize.navigateToNewVisualization();
3640
await PageObjects.visualize.clickVisualBuilder();
3741
await PageObjects.visualBuilder.checkVisualBuilderIsPresent();
@@ -105,15 +109,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
105109
});
106110
});
107111

108-
// FLAKY: https://github.com/elastic/kibana/issues/43150
109-
describe.skip('switch index patterns', () => {
112+
describe('switch index patterns', () => {
110113
beforeEach(async () => {
111114
log.debug('Load kibana_sample_data_flights data');
112115
await esArchiver.loadIfNeeded('kibana_sample_data_flights');
113116
await PageObjects.visualBuilder.resetPage();
114117
await PageObjects.visualBuilder.clickMetric();
115118
await PageObjects.visualBuilder.checkMetricTabIsPresent();
116-
await security.testUser.setRoles(['kibana_admin', 'kibana_sample_admin']);
117119
});
118120
after(async () => {
119121
await security.testUser.restoreDefaults();

x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ import {
2929
EuiTitle,
3030
} from '@elastic/eui';
3131

32-
import { indices } from '../../../../../../src/plugins/es_ui_shared/public';
3332
import { indexPatterns } from '../../../../../../src/plugins/data/public';
3433

34+
import { extractQueryParams, indices } from '../../shared_imports';
3535
import { routing } from '../services/routing';
36-
import { extractQueryParams } from '../services/query_params';
3736
import { getRemoteClusterName } from '../services/get_remote_cluster_name';
3837
import { API_STATUS } from '../constants';
3938
import { SectionError } from './section_error';

x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,21 @@ import {
2828
EuiTitle,
2929
} from '@elastic/eui';
3030

31-
import { indices } from '../../../../../../../src/plugins/es_ui_shared/public';
31+
import { extractQueryParams, indices } from '../../../shared_imports';
3232
import { indexNameValidator, leaderIndexValidator } from '../../services/input_validation';
3333
import { routing } from '../../services/routing';
3434
import { getFatalErrors } from '../../services/notifications';
3535
import { loadIndices } from '../../services/api';
3636
import { API_STATUS } from '../../constants';
37+
import { getRemoteClusterName } from '../../services/get_remote_cluster_name';
38+
import { RemoteClustersFormField } from '../remote_clusters_form_field';
3739
import { SectionError } from '../section_error';
3840
import { FormEntryRow } from '../form_entry_row';
3941
import {
4042
advancedSettingsFields,
4143
emptyAdvancedSettings,
4244
areAdvancedSettingsEdited,
4345
} from './advanced_settings_fields';
44-
import { extractQueryParams } from '../../services/query_params';
45-
import { getRemoteClusterName } from '../../services/get_remote_cluster_name';
46-
import { RemoteClustersFormField } from '../remote_clusters_form_field';
4746

4847
import { FollowerIndexRequestFlyout } from './follower_index_request_flyout';
4948

x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from '@elastic/eui';
1919

2020
import { reactRouterNavigate } from '../../../../../../../../src/plugins/kibana_react/public';
21-
import { extractQueryParams } from '../../../services/query_params';
21+
import { extractQueryParams } from '../../../../shared_imports';
2222
import { trackUiMetric, METRIC_TYPE } from '../../../services/track_ui_metric';
2323
import { API_STATUS, UIM_AUTO_FOLLOW_PATTERN_LIST_LOAD } from '../../../constants';
2424
import { SectionLoading, SectionError, SectionUnauthorized } from '../../../components';

x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from '@elastic/eui';
1919

2020
import { reactRouterNavigate } from '../../../../../../../../src/plugins/kibana_react/public';
21-
import { extractQueryParams } from '../../../services/query_params';
21+
import { extractQueryParams } from '../../../../shared_imports';
2222
import { trackUiMetric, METRIC_TYPE } from '../../../services/track_ui_metric';
2323
import { API_STATUS, UIM_FOLLOWER_INDEX_LIST_LOAD } from '../../../constants';
2424
import { SectionLoading, SectionError, SectionUnauthorized } from '../../../components';

x-pack/plugins/cross_cluster_replication/public/app/services/auto_follow_pattern_validators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import React from 'react';
88
import { i18n } from '@kbn/i18n';
99
import { FormattedMessage } from '@kbn/i18n/react';
1010

11-
import { indices } from '../../../../../../src/plugins/es_ui_shared/public';
1211
import { indexPatterns } from '../../../../../../src/plugins/data/public';
12+
import { indices } from '../../shared_imports';
1313

1414
const {
1515
indexNameBeginsWithPeriod,

x-pack/plugins/cross_cluster_replication/public/app/services/input_validation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
import React from 'react';
88
import { FormattedMessage } from '@kbn/i18n/react';
9-
import { indices } from '../../../../../../src/plugins/es_ui_shared/public';
9+
10+
import { indices } from '../../shared_imports';
1011

1112
const isEmpty = (value) => {
1213
return !value || !value.trim().length;

0 commit comments

Comments
 (0)