Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Make the steps diagram honor the theme #1550

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions public/apps/configuration/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,45 @@
.limit-width-input {
max-width: 400px;
}

.security-steps-diagram {
height: 114px;
position: relative;

&::before,
&::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
}

&::before {
mask: url("../../assets/get_started_layer_1.svg") center / contain no-repeat;
background: $euiColorDarkestShade;
}

&::after {
mask: url("../../assets/get_started_layer_2.svg") center / contain no-repeat;
background: $euiColorPrimary;
}

@supports not (mask: center / contain no-repeat) {
/* stylelint-disable property-no-vendor-prefix */
&::before,
&::after {
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: contain;
-webkit-mask-position: center;
}

&::before {
-webkit-mask-image: url("../../assets/get_started_layer_1.svg");
}

&::after {
-webkit-mask-image: url("../../assets/get_started_layer_2.svg");
}
/* stylelint-enable property-no-vendor-prefix */
}
}
13 changes: 1 addition & 12 deletions public/apps/configuration/panels/get-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
EuiCode,
EuiFlexGroup,
EuiFlexItem,
EuiImage,
EuiPageHeader,
EuiPanel,
EuiSpacer,
Expand All @@ -31,7 +30,6 @@ import { FormattedMessage } from '@osd/i18n/react';
import { flow } from 'lodash';
import { HashRouter as Router, Route } from 'react-router-dom';
import { AppDependencies } from '../../types';
import securityStepsDiagram from '../../../assets/get_started.svg';
import { buildHashUrl, buildUrl } from '../utils/url-builder';
import { Action, ResourceType, RouteItem } from '../types';
import { API_ENDPOINT_CACHE, DocLinks } from '../constants';
Expand Down Expand Up @@ -189,16 +187,7 @@ export function GetStarted(props: AppDependencies) {
</EuiText>

<EuiSpacer size="l" />
{props.config.ui.backend_configurable && (
<div className="text-center">
<EuiImage
size="xl"
alt="Three steps to set up your security"
url={securityStepsDiagram}
style={{ maxWidth: '100%', height: 'auto', width: 'auto' }}
/>
</div>
)}
{props.config.ui.backend_configurable && <div className={'security-steps-diagram'} />}

<EuiSpacer size="l" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,8 @@ exports[`Get started (landing page) renders when backend configuration is enable
size="l"
/>
<div
className="text-center"
>
<EuiImage
alt="Three steps to set up your security"
size="xl"
style={
Object {
"height": "auto",
"maxWidth": "100%",
"width": "auto",
}
}
url="test-file-stub"
/>
</div>
className="security-steps-diagram"
/>
<EuiSpacer
size="l"
/>
Expand Down
79 changes: 1 addition & 78 deletions public/assets/get_started.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/assets/get_started_layer_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/assets/get_started_layer_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions test/jest_integration/jwt_auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('start OpenSearch Dashboards server', () => {
.sign(key);
const driver = getDriver(browser, options).build();
await driver.get(`http://localhost:5601/app/opensearch_dashboards_overview?token=${token}`);
await driver.wait(until.elementsLocated(By.xpath(pageTitleXPath)), 10000);
await driver.wait(until.elementsLocated(By.xpath(pageTitleXPath)), 15000);

const cookie = await driver.manage().getCookies();
expect(cookie.length).toEqual(1);
Expand All @@ -259,7 +259,7 @@ describe('start OpenSearch Dashboards server', () => {

await driver.wait(
until.elementsLocated(By.xpath('//*[@data-test-subj="sendRequestButton"]')),
10000
15000
);

const cookie = await driver.manage().getCookies();
Expand Down
Loading