Skip to content

Commit 1b4fbac

Browse files
committed
Merge branch 'master' of github.com:yctercero/kibana into builder_nested
2 parents 456b590 + 8b27b1e commit 1b4fbac

File tree

11 files changed

+109
-99
lines changed

11 files changed

+109
-99
lines changed

test/functional/page_objects/login_page.ts

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,76 @@
77
* not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
*    http://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an
1414
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
15+
* KIND, either express or implied.  See the License for the
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
1919

20+
import { delay } from 'bluebird';
2021
import { FtrProviderContext } from '../ftr_provider_context';
2122

2223
export function LoginPageProvider({ getService }: FtrProviderContext) {
2324
const testSubjects = getService('testSubjects');
25+
const log = getService('log');
26+
const find = getService('find');
27+
28+
const regularLogin = async (user: string, pwd: string) => {
29+
await testSubjects.setValue('loginUsername', user);
30+
await testSubjects.setValue('loginPassword', pwd);
31+
await testSubjects.click('loginSubmit');
32+
await find.waitForDeletedByCssSelector('.kibanaWelcomeLogo');
33+
await find.byCssSelector('[data-test-subj="kibanaChrome"]', 60000); // 60 sec waiting
34+
};
35+
36+
const samlLogin = async (user: string, pwd: string) => {
37+
try {
38+
await find.clickByButtonText('Login using SAML');
39+
await find.setValue('input[name="email"]', user);
40+
await find.setValue('input[type="password"]', pwd);
41+
await find.clickByCssSelector('.auth0-label-submit');
42+
await find.byCssSelector('[data-test-subj="kibanaChrome"]', 60000); // 60 sec waiting
43+
} catch (err) {
44+
log.debug(`${err} \nFailed to find Auth0 login page, trying the Auth0 last login page`);
45+
await find.clickByCssSelector('.auth0-lock-social-button');
46+
}
47+
};
2448

2549
class LoginPage {
2650
async login(user: string, pwd: string) {
27-
await testSubjects.setValue('loginUsername', user);
28-
await testSubjects.setValue('loginPassword', pwd);
29-
await testSubjects.click('loginSubmit');
51+
if (
52+
process.env.VM === 'ubuntu18_deb_oidc' ||
53+
process.env.VM === 'ubuntu16_deb_desktop_saml'
54+
) {
55+
await samlLogin(user, pwd);
56+
return;
57+
}
58+
59+
await regularLogin(user, pwd);
60+
}
61+
62+
async logoutLogin(user: string, pwd: string) {
63+
await this.logout();
64+
await this.sleep(3002);
65+
await this.login(user, pwd);
66+
}
67+
68+
async logout() {
69+
await testSubjects.click('userMenuButton');
70+
await this.sleep(500);
71+
await testSubjects.click('logoutLink');
72+
log.debug('### found and clicked log out--------------------------');
73+
await this.sleep(8002);
74+
}
75+
76+
async sleep(sleepMilliseconds: number) {
77+
log.debug(`... sleep(${sleepMilliseconds}) start`);
78+
await delay(sleepMilliseconds);
79+
log.debug(`... sleep(${sleepMilliseconds}) end`);
3080
}
3181
}
3282

x-pack/plugins/lists/common/constants.mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const OPERATOR = 'included';
4141
export const ENTRY_VALUE = 'some host name';
4242
export const MATCH = 'match';
4343
export const MATCH_ANY = 'match_any';
44-
export const MAX_IMPORT_PAYLOAD_BYTES = 40000000;
44+
export const MAX_IMPORT_PAYLOAD_BYTES = 9000000;
4545
export const IMPORT_BUFFER_SIZE = 1000;
4646
export const LIST = 'list';
4747
export const EXISTS = 'exists';

x-pack/plugins/lists/server/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const ConfigSchema = schema.object({
1111
importBufferSize: schema.number({ defaultValue: 1000, min: 1 }),
1212
listIndex: schema.string({ defaultValue: '.lists' }),
1313
listItemIndex: schema.string({ defaultValue: '.items' }),
14-
maxImportPayloadBytes: schema.number({ defaultValue: 40000000, min: 1 }),
14+
maxImportPayloadBytes: schema.number({ defaultValue: 9000000, min: 1 }),
1515
});
1616

1717
export type ConfigType = TypeOf<typeof ConfigSchema>;

x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function getClusterSource(documentSource: IESSource, documentStyle: IVectorStyle
5555
geoField: documentSource.getGeoFieldName(),
5656
requestType: RENDER_AS.POINT,
5757
});
58+
clusterSourceDescriptor.applyGlobalQuery = documentSource.getApplyGlobalQuery();
5859
clusterSourceDescriptor.metrics = [
5960
{
6061
type: AGG_TYPE.COUNT,

x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ export class ESGeoGridSource extends AbstractESAggSource {
161161
bounds: makeESBbox(bufferedExtent),
162162
field: this._descriptor.geoField,
163163
precision,
164-
size: DEFAULT_MAX_BUCKETS_LIMIT,
165164
},
166165
},
167166
},

x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export const useDeleteAction = () => {
5454
);
5555
if (ip !== undefined) {
5656
setIndexPatternExists(true);
57+
} else {
58+
setIndexPatternExists(false);
5759
}
5860
} catch (e) {
5961
const { toasts } = notifications;
@@ -101,7 +103,7 @@ export const useDeleteAction = () => {
101103

102104
// Check if an user has permission to delete the index & index pattern
103105
checkUserIndexPermission();
104-
}, []);
106+
}, [isModalVisible]);
105107

106108
const closeModal = () => setModalVisible(false);
107109
const deleteAndCloseModal = () => {

x-pack/plugins/security_solution/cypress/tasks/es_archiver.ts

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

77
export const esArchiverLoadEmptyKibana = () => {
88
cy.exec(
9-
`node ../../../scripts/es_archiver empty_kibana load empty--dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env(
9+
`node ../../../scripts/es_archiver load empty_kibana --dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env(
1010
'ELASTICSEARCH_URL'
1111
)} --kibana-url ${Cypress.config().baseUrl}`
1212
);
@@ -30,7 +30,7 @@ export const esArchiverUnload = (folder: string) => {
3030

3131
export const esArchiverUnloadEmptyKibana = () => {
3232
cy.exec(
33-
`node ../../../scripts/es_archiver unload empty_kibana empty--dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env(
33+
`node ../../../scripts/es_archiver unload empty_kibana --dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env(
3434
'ELASTICSEARCH_URL'
3535
)} --kibana-url ${Cypress.config().baseUrl}`
3636
);

x-pack/plugins/uptime/public/state/actions/__tests__/__snapshots__/overview_filters.test.ts.snap

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/uptime/public/state/actions/overview_filters.ts

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7+
import { createAction } from 'redux-actions';
78
import { OverviewFilters } from '../../../common/runtime_types';
89

9-
export const FETCH_OVERVIEW_FILTERS = 'FETCH_OVERVIEW_FILTERS';
10-
export const FETCH_OVERVIEW_FILTERS_FAIL = 'FETCH_OVERVIEW_FILTERS_FAIL';
11-
export const FETCH_OVERVIEW_FILTERS_SUCCESS = 'FETCH_OVERVIEW_FILTERS_SUCCESS';
12-
export const SET_OVERVIEW_FILTERS = 'SET_OVERVIEW_FILTERS';
13-
1410
export interface GetOverviewFiltersPayload {
1511
dateRangeStart: string;
1612
dateRangeEnd: string;
@@ -22,52 +18,16 @@ export interface GetOverviewFiltersPayload {
2218
tags: string[];
2319
}
2420

25-
interface GetOverviewFiltersFetchAction {
26-
type: typeof FETCH_OVERVIEW_FILTERS;
27-
payload: GetOverviewFiltersPayload;
28-
}
29-
30-
interface GetOverviewFiltersSuccessAction {
31-
type: typeof FETCH_OVERVIEW_FILTERS_SUCCESS;
32-
payload: OverviewFilters;
33-
}
34-
35-
interface GetOverviewFiltersFailAction {
36-
type: typeof FETCH_OVERVIEW_FILTERS_FAIL;
37-
payload: Error;
38-
}
39-
40-
interface SetOverviewFiltersAction {
41-
type: typeof SET_OVERVIEW_FILTERS;
42-
payload: OverviewFilters;
43-
}
44-
45-
export type OverviewFiltersAction =
46-
| GetOverviewFiltersFetchAction
47-
| GetOverviewFiltersSuccessAction
48-
| GetOverviewFiltersFailAction
49-
| SetOverviewFiltersAction;
21+
export type OverviewFiltersPayload = GetOverviewFiltersPayload & Error & OverviewFilters;
5022

51-
export const fetchOverviewFilters = (
52-
payload: GetOverviewFiltersPayload
53-
): GetOverviewFiltersFetchAction => ({
54-
type: FETCH_OVERVIEW_FILTERS,
55-
payload,
56-
});
23+
export const fetchOverviewFilters = createAction<GetOverviewFiltersPayload>(
24+
'FETCH_OVERVIEW_FILTERS'
25+
);
5726

58-
export const fetchOverviewFiltersFail = (error: Error): GetOverviewFiltersFailAction => ({
59-
type: FETCH_OVERVIEW_FILTERS_FAIL,
60-
payload: error,
61-
});
27+
export const fetchOverviewFiltersFail = createAction<Error>('FETCH_OVERVIEW_FILTERS_FAIL');
6228

63-
export const fetchOverviewFiltersSuccess = (
64-
filters: OverviewFilters
65-
): GetOverviewFiltersSuccessAction => ({
66-
type: FETCH_OVERVIEW_FILTERS_SUCCESS,
67-
payload: filters,
68-
});
29+
export const fetchOverviewFiltersSuccess = createAction<OverviewFilters>(
30+
'FETCH_OVERVIEW_FILTERS_SUCCESS'
31+
);
6932

70-
export const setOverviewFilters = (filters: OverviewFilters): SetOverviewFiltersAction => ({
71-
type: SET_OVERVIEW_FILTERS,
72-
payload: filters,
73-
});
33+
export const setOverviewFilters = createAction<OverviewFilters>('SET_OVERVIEW_FILTERS');

x-pack/plugins/uptime/public/state/effects/overview_filters.ts

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

77
import { takeLatest } from 'redux-saga/effects';
88
import {
9-
FETCH_OVERVIEW_FILTERS,
9+
fetchOverviewFilters as fetchAction,
1010
fetchOverviewFiltersFail,
1111
fetchOverviewFiltersSuccess,
1212
} from '../actions';
@@ -15,7 +15,7 @@ import { fetchEffectFactory } from './fetch_effect';
1515

1616
export function* fetchOverviewFiltersEffect() {
1717
yield takeLatest(
18-
FETCH_OVERVIEW_FILTERS,
18+
String(fetchAction),
1919
fetchEffectFactory(fetchOverviewFilters, fetchOverviewFiltersSuccess, fetchOverviewFiltersFail)
2020
);
2121
}

0 commit comments

Comments
 (0)