Skip to content

Commit

Permalink
Change Wazuh logo and titles (#3)
Browse files Browse the repository at this point in the history
* Change Wazuh logo and titles

* Don't force custom logo to have 100% width

* Add comment

* Fix lint

* Fix prettier

* Update snapshots

---------

Signed-off-by: Ian Yenien Serrano <[email protected]>
Co-authored-by: yenienserrano <[email protected]>
Co-authored-by: Ian Yenien Serrano <[email protected]>
  • Loading branch information
3 people committed Jun 12, 2023
1 parent fd31852 commit 253e700
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 36 deletions.
14 changes: 5 additions & 9 deletions public/apps/login/login-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
} from '@elastic/eui';
import { CoreStart } from '../../../../../src/core/public';
import { ClientConfigType } from '../../types';
import defaultBrandImage from '../../assets/opensearch_logo_h.svg';
import defaultBrandImage from '../../assets/ui/wazuh_logo.svg';
import { validateCurrentPassword } from '../../utils/login-utils';
import {
ANONYMOUS_AUTH_LOGIN,
Expand Down Expand Up @@ -240,23 +240,19 @@ export function LoginPage(props: LoginPageDeps) {
};

// TODO: Get brand image from server config
// Don't force custom logo to have 100% width. It should be handled in the svg properties if needed. (Removed fullWidth in the image)
return (
<EuiListGroup className="login-wrapper">
{props.config.ui.basicauth.login.showbrandimage && (
<EuiImage
size="fullWidth"
alt=""
url={props.config.ui.basicauth.login.brandimage || defaultBrandImage}
/>
<EuiImage alt="" url={props.config.ui.basicauth.login.brandimage || defaultBrandImage} />
)}
<EuiSpacer size="s" />
<EuiText size="m" textAlign="center">
{props.config.ui.basicauth.login.title || 'Log in to OpenSearch Dashboards'}
{props.config.ui.basicauth.login.title || ''}
</EuiText>
<EuiSpacer size="s" />
<EuiText size="s" textAlign="center">
{props.config.ui.basicauth.login.subtitle ||
'If you have forgotten your username or password, contact your system administrator.'}
{props.config.ui.basicauth.login.subtitle || ''}
</EuiText>
<EuiSpacer size="s" />
<EuiForm component="form">
Expand Down
21 changes: 4 additions & 17 deletions public/apps/login/test/__snapshots__/login-page.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exports[`Login page renders renders with config value for multiauth 1`] = `
>
<EuiImage
alt=""
size="fullWidth"
url="http://localhost:5601/images/test.png"
/>
<EuiSpacer
Expand Down Expand Up @@ -159,7 +158,6 @@ exports[`Login page renders renders with config value: string 1`] = `
>
<EuiImage
alt=""
size="fullWidth"
url="http://localhost:5601/images/test.png"
/>
<EuiSpacer
Expand Down Expand Up @@ -262,7 +260,6 @@ exports[`Login page renders renders with config value: string array 1`] = `
>
<EuiImage
alt=""
size="fullWidth"
url="http://localhost:5601/images/test.png"
/>
<EuiSpacer
Expand Down Expand Up @@ -365,7 +362,6 @@ exports[`Login page renders renders with default value: string 1`] = `
>
<EuiImage
alt=""
size="fullWidth"
url="test-file-stub"
/>
<EuiSpacer
Expand All @@ -374,18 +370,14 @@ exports[`Login page renders renders with default value: string 1`] = `
<EuiText
size="m"
textAlign="center"
>
Log in to OpenSearch Dashboards
</EuiText>
/>
<EuiSpacer
size="s"
/>
<EuiText
size="s"
textAlign="center"
>
If you have forgotten your username or password, contact your system administrator.
</EuiText>
/>
<EuiSpacer
size="s"
/>
Expand Down Expand Up @@ -468,7 +460,6 @@ exports[`Login page renders renders with default value: string array 1`] = `
>
<EuiImage
alt=""
size="fullWidth"
url="test-file-stub"
/>
<EuiSpacer
Expand All @@ -477,18 +468,14 @@ exports[`Login page renders renders with default value: string array 1`] = `
<EuiText
size="m"
textAlign="center"
>
Log in to OpenSearch Dashboards
</EuiText>
/>
<EuiSpacer
size="s"
/>
<EuiText
size="s"
textAlign="center"
>
If you have forgotten your username or password, contact your system administrator.
</EuiText>
/>
<EuiSpacer
size="s"
/>
Expand Down
Loading

0 comments on commit 253e700

Please sign in to comment.