This PR implements the K7 Login screen, as described in #20015 @ryankeairns @snide @kobelb ## Login form <img width="1310" alt="login" src="https://user-images.githubusercontent.com/3493255/46048123-d9e53d80-c0f5-11e8-9e56-acbe3a8f2b5a.png"> ## Invalid credentials ![image](https://user-images.githubusercontent.com/3493255/46147388-621d2d00-c233-11e8-8a75-beba7bb5a2b2.png) ## Session expired ![image](https://user-images.githubusercontent.com/3493255/46147408-6fd2b280-c233-11e8-97c1-8acb7b2e0c06.png) ## No connection to Elasticsearch ![image](https://user-images.githubusercontent.com/3493255/46147515-adcfd680-c233-11e8-8ad4-3a21d2c06b2c.png) ## Insecure connection ![image](https://user-images.githubusercontent.com/3493255/46147433-8416af80-c233-11e8-82dc-6f32a5ec1bd0.png) Closes #20015
33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
/*
|
|
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
* license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright
|
|
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
* the Apache License, Version 2.0 (the "License"); you may
|
|
* not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
export function ShieldPageProvider({ getService }) {
|
|
const testSubjects = getService('testSubjects');
|
|
|
|
class ShieldPage {
|
|
async login(user, pwd) {
|
|
await testSubjects.setValue('loginUsername', user);
|
|
await testSubjects.setValue('loginPassword', pwd);
|
|
await testSubjects.click('loginSubmit');
|
|
}
|
|
}
|
|
|
|
return new ShieldPage();
|
|
}
|