mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 18:20:00 -03:30
@@ -20,7 +20,7 @@ import { RootAPI } from './api';
|
||||
import AlertModal from './components/AlertModal';
|
||||
import About from './components/About';
|
||||
import NavExpandableGroup from './components/NavExpandableGroup';
|
||||
import TowerLogo from './components/TowerLogo';
|
||||
import BrandLogo from './components/BrandLogo';
|
||||
import PageHeaderToolbar from './components/PageHeaderToolbar';
|
||||
|
||||
const PageHeader = styled(PFPageHeader)`
|
||||
@@ -32,7 +32,7 @@ const PageHeader = styled(PFPageHeader)`
|
||||
}
|
||||
|
||||
& svg {
|
||||
width: 125px;
|
||||
height: 76px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -119,7 +119,7 @@ class App extends Component {
|
||||
<PageHeader
|
||||
showNavToggle
|
||||
onNavToggle={this.onNavToggle}
|
||||
logo={<TowerLogo />}
|
||||
logo={<BrandLogo />}
|
||||
logoProps={{ href: '/' }}
|
||||
toolbar={(
|
||||
<PageHeaderToolbar
|
||||
|
||||
@@ -9,12 +9,12 @@ import {
|
||||
TextListItem
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import brandImg from '../../images/tower-logo-white.svg';
|
||||
import logoImg from '../../images/tower-logo-login.svg';
|
||||
import { BrandName } from '../variables';
|
||||
import brandLogoImg from '../../images/brand-logo.svg';
|
||||
|
||||
class About extends React.Component {
|
||||
static createSpeechBubble (version) {
|
||||
let text = `Tower ${version}`;
|
||||
let text = `${BrandName} ${version}`;
|
||||
let top = '';
|
||||
let bottom = '';
|
||||
|
||||
@@ -51,12 +51,10 @@ class About extends React.Component {
|
||||
<AboutModal
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
productName="Ansible Tower"
|
||||
trademark={i18n._(t`Copyright 2018 Red Hat, Inc.`)}
|
||||
brandImageSrc={brandImg}
|
||||
productName={`Ansible ${BrandName}`}
|
||||
trademark={i18n._(t`Copyright 2019 Red Hat, Inc.`)}
|
||||
brandImageSrc={brandLogoImg}
|
||||
brandImageAlt={i18n._(t`Brand Image`)}
|
||||
logoImageSrc={logoImg}
|
||||
logoImageAlt={i18n._(t`AboutModal Logo`)}
|
||||
>
|
||||
<pre>
|
||||
{ speechBubble }
|
||||
|
||||
386
src/components/BrandLogo/BrandLogo.jsx
Normal file
386
src/components/BrandLogo/BrandLogo.jsx
Normal file
@@ -0,0 +1,386 @@
|
||||
import React, { Component } from 'react';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
|
||||
import styled from 'styled-components';
|
||||
|
||||
const ST0 = styled.g`
|
||||
display:none;
|
||||
`;
|
||||
|
||||
const ST1 = styled.path`
|
||||
display:inline;
|
||||
fill:#ED1C24;
|
||||
`;
|
||||
|
||||
const ST2 = styled.path`
|
||||
fill:#42210B;
|
||||
`;
|
||||
|
||||
const ST3 = styled.path`
|
||||
fill:#FFFFFF;
|
||||
`;
|
||||
|
||||
const ST4 = styled.path`
|
||||
fill:#C69C6D;
|
||||
stroke:#8C6239;
|
||||
stroke-width:5;
|
||||
stroke-miterlimit:10;
|
||||
`;
|
||||
|
||||
const ST5 = styled.path`
|
||||
fill:#FFFFFF;
|
||||
stroke:#42210B;
|
||||
stroke-width:3;
|
||||
stroke-miterlimit:10;
|
||||
`;
|
||||
|
||||
const ST6 = styled.ellipse`
|
||||
fill:#ED1C24;
|
||||
stroke:#8C6239;
|
||||
stroke-width:5;
|
||||
stroke-miterlimit:10;
|
||||
`;
|
||||
|
||||
const ST7 = styled.path`
|
||||
fill:#A67C52;
|
||||
`;
|
||||
|
||||
const ST8 = styled.path`
|
||||
fill: #ED1C24;
|
||||
`;
|
||||
|
||||
const ST9 = styled.ellipse`
|
||||
fill:#42210B;
|
||||
`;
|
||||
|
||||
class BrandLogo extends Component {
|
||||
render () {
|
||||
const { i18n } = this.props;
|
||||
return (
|
||||
<svg
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 500 500"
|
||||
xmlSpace="preserve"
|
||||
>
|
||||
<title>{i18n._(t`AWX Logo`)}</title>
|
||||
<ST0>
|
||||
<ST1
|
||||
d="M319.8,169.3c1.5-14.2,13.7-27.2,29.9-31.9c-13.1,1.5-27.3-1.7-36-10c-8.7-8.3-10-21.9-1.4-30.1
|
||||
c-12,6.7-28.1,8.1-41.4,3.4c-13.3-4.6-23.5-15.1-26.2-26.9c-2-8.8,0-17.9,2-26.7c-6.2,9.4-17.6,17.3-30.5,17.3
|
||||
c-12.9,0.1-25.7-10.2-22.9-20.7c-5.5,7.8-11.4,15.9-21,20.2c-9.5,4.3-23.7,2.7-28.2-5.5c-1.6,10.8-7.5,22-19.1,27
|
||||
c-9,3.9-21.5,2.2-28-3.8c5.7,11.4,4.3,25.3-4.1,35.6c-9.9,12.2-29.1,18.6-46.4,15.6c14.7,7.2,28.5,17.7,32.1,31.5
|
||||
c3.7,13.8-7.1,30.7-24.1,31.7c13.6,3.1,28,7.4,35.6,17.2c7.6,9.8,2.9,26.4-11.1,28c12.8-2.6,27.4,3.9,31.9,14.2
|
||||
c4.1,9.5-0.9,20.9-10.9,26.5c18.6-8.9,41-17.1,59.6-8.8c13.9,6.2,20.8,21.6,15.1,33.8c10.4-10.6,23-21.3,39.2-23.5
|
||||
c12.8-1.8,27.5,4.6,31.9,14.1c-0.3-12.7,6.1-25.5,17.5-34c13.8-10.3,34.4-14,52-9.2c-11.1-7.8-14.9-22-8.9-33
|
||||
c6-11,21.3-18,35.7-16.2C327.5,198.1,318.3,183.5,319.8,169.3z"
|
||||
/>
|
||||
</ST0>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<ST2
|
||||
d="M179.7,297.3c-10.1,3.2-20.3,6-30.6,8.4c-10.7,2.5-21.7,5-32.8,5.1C96,311.1,79.9,297.2,60,296.1
|
||||
c-5.8-0.3-5.8,8.7,0,9c9.9,0.5,18.9,5.1,27.9,8.8c9.8,4,19.6,6.3,30.2,5.9c21.5-0.8,43.5-7.4,64-13.8
|
||||
C187.6,304.3,185.2,295.6,179.7,297.3L179.7,297.3z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST2
|
||||
d="M322.2,194.8c17.9-8,36-18.5,44.3-37.2c4.2-9.3,6-19.2,7.2-29.3c1.5-11.7,2.5-23.4,3.7-35.2
|
||||
c0.6-5.8-8.4-5.7-9,0c-1.1,10.3-2.1,20.6-3.3,30.9c-1.1,9.7-2.5,19.7-6.4,28.7c-7.5,17.5-24.6,26.8-41.2,34.2
|
||||
C312.4,189.4,316.9,197.2,322.2,194.8L322.2,194.8z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<ST9
|
||||
transform="matrix(0.5541 -0.8324 0.8324 0.5541 -219.4917 376.0051)"
|
||||
cx="241.2"
|
||||
cy="392.9"
|
||||
rx="65.5"
|
||||
ry="33.7"
|
||||
/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST3
|
||||
d="M224.1,442.5c22-11.5,38.7-31,47.1-54.3c2-5.5-6.7-7.8-8.7-2.4c-7.6,21.1-23.1,38.5-43,48.9
|
||||
C214.4,437.4,218.9,445.1,224.1,442.5L224.1,442.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<ST9
|
||||
transform="matrix(0.9684 -0.2494 0.2494 0.9684 -66.4734 109.0276)"
|
||||
cx="397"
|
||||
cy="316.8"
|
||||
rx="63.9"
|
||||
ry="32.9"
|
||||
/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST3
|
||||
d="M363.8,341.5c28.3,7,58.7-0.8,80.2-20.5c4.3-3.9-2.1-10.3-6.4-6.4c-19.1,17.5-46.4,24.4-71.5,18.2
|
||||
C360.5,331.5,358.1,340.1,363.8,341.5L363.8,341.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<ST4
|
||||
d="M156.9,96c-25.4,4.5-32.9,20.2-45,46.9c-20.2,44.4,2,90.3,5.6,97.5c18.4,36.5,42.3,36.8,60,80.6
|
||||
c8.6,21.2,4.6,25.2,13.1,37.5c20.4,29.2,63.7,36.1,91.9,33.8c40.3-3.3,91.5-28.8,108.8-82.5c17.1-53.2-6-112.1-41.2-131.2
|
||||
c-25.3-13.7-44.9-0.5-71.2-20.6c-21.6-16.5-18.4-33.1-37.5-48.8C227.9,98.1,203.7,87.7,156.9,96z"
|
||||
/>
|
||||
<ST9
|
||||
transform="matrix(0.6622 -0.7494 0.7494 0.6622 65.2068 309.6339)"
|
||||
cx="376"
|
||||
cy="82.5"
|
||||
rx="21"
|
||||
ry="15.5"
|
||||
/>
|
||||
<g>
|
||||
<g>
|
||||
<ST3
|
||||
d="M379.8,75.3c0.8,0.2-0.6-0.4-0.1-0.1c0.2,0.1,0.3,0.2,0.5,0.3c0.4,0.2-0.6-0.7-0.1-0.1
|
||||
c0.1,0.1,0.7,0.8,0.2,0.2c-0.4-0.5,0,0,0.1,0.1c0.4,0.7,0,0.2,0-0.2c0,0.1,0.1,0.4,0.2,0.5c0.3,0.9-0.1-1,0-0.1
|
||||
c0.1,2.3,2,4.6,4.5,4.5c2.3-0.1,4.6-2,4.5-4.5c-0.3-4.4-3-8.1-7.3-9.4c-2.2-0.7-5,0.8-5.5,3.1C376.1,72.2,377.4,74.5,379.8,75.3
|
||||
L379.8,75.3z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<ST9
|
||||
transform="matrix(0.9999 -1.433736e-02 1.433736e-02 0.9999 -4.303 0.8051)"
|
||||
cx="54"
|
||||
cy="300.5"
|
||||
rx="21"
|
||||
ry="15.5"
|
||||
/>
|
||||
<g>
|
||||
<g>
|
||||
<ST3
|
||||
d="M52.2,297.5c1.1-0.3,1.4-0.4,2.5,0c0.8,0.3,1.3,0.7,2,1.7c1.5,1.9,4.8,1.6,6.4,0c1.9-1.9,1.5-4.4,0-6.4
|
||||
c-3.1-3.9-8.6-5.4-13.3-4C44.3,290.5,46.7,299.2,52.2,297.5L52.2,297.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST2
|
||||
d="M149.3,108.8c4.9-10.8-1.3-24.2-12.9-26.9c-1.9-0.4-2.7,2.4-0.8,2.9c9.6,2.3,15.3,13.5,11.2,22.5
|
||||
C145.9,109,148.5,110.5,149.3,108.8L149.3,108.8z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST2
|
||||
d="M141.2,112.3c2.4-9.4-5.4-19.3-15.2-19c-1.9,0.1-1.9,3.1,0,3c7.8-0.2,14.2,7.6,12.3,15.2
|
||||
C137.8,113.4,140.7,114.2,141.2,112.3L141.2,112.3z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST2
|
||||
d="M132.6,118c-1.1-8.3-10.9-13.4-18.2-9.1c-1.7,1-0.2,3.6,1.5,2.6c5.2-3,12.9,0.4,13.7,6.5
|
||||
C129.8,119.9,132.8,119.9,132.6,118L132.6,118z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<ST5
|
||||
d="M215.5,166.5l34-73c0,0,35,0,46,21c7.5,14.3,8,39,8,39L215.5,166.5z"
|
||||
/>
|
||||
<ST5
|
||||
d="M208.2,170.5l-79.5-12.7c0,0-19.6,29-8.4,49.9c7.6,14.2,27.8,28.5,27.8,28.5L208.2,170.5z"
|
||||
/>
|
||||
<ST2
|
||||
d="M210.5,164.5l33-74c0,0-2.5-5.5-8-7s-12,0-12,0L210.5,164.5z"
|
||||
/>
|
||||
<ST2
|
||||
d="M207.4,165.3l-73.1-35c0,0-5.6,2.4-7.2,7.8c-1.6,5.5-0.3,12-0.3,12L207.4,165.3z"
|
||||
/>
|
||||
<path
|
||||
d="M215.5,166.5L234,127c0,0,17-6,25.5,7.5c8.6,13.6-3.5,25.5-3.5,25.5L215.5,166.5z"
|
||||
/>
|
||||
<path
|
||||
d="M206.7,170.9l-29.6,32c0,0-18,0.5-22-14.9c-4-15.6,11.1-23.2,11.1-23.2L206.7,170.9z"
|
||||
/>
|
||||
<g>
|
||||
<g>
|
||||
<ST3
|
||||
d="M243.4,139.1c-0.6,0.2-0.7,0.3-0.4,0.2c0.3-0.1,0.2-0.1-0.5,0.1c0.7,0-0.3,0-0.4-0.1c0.1,0,0.3,0.1,0.4,0.1
|
||||
c0.3,0.1,0.2,0-0.4-0.2c0,0,0.6,0.3,0.6,0.3c0.5,0.2-0.9-0.6-0.1-0.1c0.6,0.4-0.3-0.5-0.1-0.1c0.3,0.5-0.3-1-0.1-0.2
|
||||
c0.2,0.8,0-1,0-0.1c0,2.4,2.1,4.6,4.5,4.5c2.5-0.1,4.5-2,4.5-4.5c0-3-1.6-5.7-4.1-7.3c-2.6-1.7-5.6-1.6-8.4-0.4
|
||||
c-2.2,0.9-2.8,4.3-1.6,6.2C238.7,139.7,241,140.1,243.4,139.1L243.4,139.1z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST3
|
||||
d="M173.5,176.4c-0.5-0.3-0.1,0,0.2,0.1c-0.7-0.6,0.3,0.5,0.1,0c-0.3-0.5,0.4,0.8,0.1,0.2
|
||||
c-0.4-0.8,0.2,0.2,0,0.1c0,0,0-0.6,0-0.6c-0.1,0.1-0.1,1,0,0.3c-0.1,0.2-0.1,0.3-0.2,0.5c0.2-0.3,0.2-0.4,0-0.1
|
||||
c-0.2,0.2-0.2,0.3-0.1,0.1c0.2-0.2,0.1-0.2-0.3,0.2c1.9-1.4,3-4,1.6-6.2c-1.2-1.9-4.1-3.1-6.2-1.6c-2.4,1.7-4,4.3-3.9,7.4
|
||||
c0.1,3,1.6,5.7,4.1,7.3c2,1.2,5,0.5,6.2-1.6C176.3,180.4,175.7,177.7,173.5,176.4L173.5,176.4z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<ST6
|
||||
transform="matrix(0.862 -0.5069 0.5069 0.862 -88.3186 186.5516)"
|
||||
cx="298.5"
|
||||
cy="255.5"
|
||||
rx="79.5"
|
||||
ry="68.5"
|
||||
/>
|
||||
<g>
|
||||
<g>
|
||||
<ST7
|
||||
d="M173.6,109.8c-2.1,2-3.9,4.6-3.6,7.6c0.3,3.5,2.8,6.6,6.6,6.7c6,0.2,11.5-7.7,8.2-13c-1-1.7-3.1-3.1-5.2-3
|
||||
c-1.7,0.1-3.1,0.8-4.4,1.9c-2,1.8-2.8,5.2-1.9,7.7c2.4,6.6,11.8,5.9,13.8-0.7c0.7-2.5-0.9-5.6-3.5-6.2c-2.7-0.6-5.4,0.8-6.2,3.5
|
||||
c0.6-2.1,3.1-2.6,4.6-1c0.8,0.9,1,1.8,0.8,2.8c0.2-0.5,0.1-0.4-0.1,0.3c-0.4,0.7-1,1.2-1.8,1.4c-0.9,0-1.8,0-2.7,0
|
||||
c-1.8-0.6-2.5-1.6-2.3-3.1c-0.1-0.4-0.1-0.7,0.1-1c0.2-0.3,0.1-0.3-0.1,0.1c0.1-0.1,0.2-0.2,0.3-0.4c-0.2,0.3-0.5,0.5-0.7,0.8
|
||||
c-0.1,0.1-0.2,0.2-0.3,0.3c-0.3,0.2-0.2,0.2,0.1-0.1c1.3,0.2,2.6,0.4,3.9,0.6c0.2,0.4,0.5,0.9,0.7,1.3c0.2,0.6-0.2,0.9-0.2,1.4
|
||||
c0,0.4,0.4-0.5-0.1,0.1c0.3-0.4,0.6-0.7,1-1c1.9-1.8,2-5.3,0-7.1C178.7,107.9,175.6,107.8,173.6,109.8L173.6,109.8z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST7
|
||||
d="M151.2,248.6c-5.7,7,1.7,16.9,10,13.3c3.4-1.5,6.3-5,6.3-8.9c0-4.2-2.7-7.6-7-7.8c-3.1-0.1-5.8,3.3-4.8,6.3
|
||||
c1.2,3.4,3.7,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c-0.1,0.1-0.2,0.1-0.3,0.2c-0.9,0-1.8,0-2.7,0
|
||||
c-2.1-0.4-1.4-4.8-0.3-4.3c0,0-1.3,0.3-1.3,0.3c-0.6,0-1.2,0-1.8-0.1c-0.5-0.1-1-0.2-1.5-0.4c-1.2-0.5-1-0.2,0.6,0.7
|
||||
c0.2,0.8,0.5,1.7,0.7,2.5c-3.4,1.1-4.4,1.9-2.8,2.7c0.4,0.2,0.7,0.4,1.1,0.7C336.9,349.6,341.9,340.9,336.5,337.4L336.5,337.4z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<ST3
|
||||
d="M224.3,256.5L252,273v-40l32,20v-38l28,17l4-28l23,12l-3-24c0,0-14-8-35.5-6.4c-11.6,0.9-24.3,6.8-33.5,11.4
|
||||
c-14,7-23.7,18.9-31.2,29.1C227,238,224.3,256.5,224.3,256.5z"
|
||||
/>
|
||||
<ST3
|
||||
d="M372.9,248.9l-28.8-14.5l2.9,39.9l-33.3-17.7l2.7,37.9l-29.1-15l-2,28.2l-23.8-10.3l4.7,23.7
|
||||
c0,0,14.5,7,35.9,3.8c11.5-1.7,23.7-8.5,32.6-13.8c13.5-8,22.3-20.5,29-31.2C371.5,267.5,372.9,248.9,372.9,248.9z"
|
||||
/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST8
|
||||
d="M235.2,121.6c8.5-3.1,23.2-0.1,27.8,8.4c2.3,4.4,4.5,9.9,4.5,14.9c0.1,5.5-2.7,10.5-5.3,15.3
|
||||
c-1.5,2.8,2.8,5.4,4.3,2.5c3.1-5.8,6.3-11.9,6-18.7c-0.3-6-2.8-12.8-5.9-17.9c-6-9.5-22.6-13.1-32.7-9.4
|
||||
C230.9,117.8,232.2,122.7,235.2,121.6L235.2,121.6z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST8
|
||||
d="M241.1,110.5c11.6-2.3,25.6,2.3,32.2,12.4c6.6,10.2,6.1,22.8,3.1,34.2c-1.3,5,6.4,7.1,7.7,2.1
|
||||
c3.8-14.3,3.8-30.3-5.5-42.6c-8.9-11.7-25.5-16.6-39.6-13.8C233.9,103.8,236.1,111.5,241.1,110.5L241.1,110.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST8
|
||||
d="M245.4,97.5c7.8-1.8,15.5,0,22.9,2.8c7.2,2.7,15,6.1,20.3,11.8c10.7,11.7,9.5,29.3,8.7,44
|
||||
c-0.3,6.4,9.7,6.4,10,0c1-17.9,1.2-38.5-12.7-52.1c-6.4-6.3-15.3-10.2-23.6-13.3c-9.1-3.4-18.6-4.9-28.2-2.8
|
||||
C236.5,89.2,239.1,98.9,245.4,97.5L245.4,97.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST8
|
||||
d="M155.8,158.5c-13.1,4.8-14.2,21.6-10.1,33.1c4.3,12,15.2,20.6,28.2,20.5c3.2,0,3.2-5,0-5
|
||||
c-9.9,0.1-18.6-5.9-22.6-14.9c-3.9-8.6-5.2-24.8,5.8-28.9C160.2,162.3,158.9,157.4,155.8,158.5L155.8,158.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST8
|
||||
d="M164.1,216.5c-11.4-2.2-18.8-11.4-22.7-21.9c-3.6-9.6-7.7-25.3,1.2-33.1c3.9-3.4-1.8-9-5.7-5.7
|
||||
c-11.3,9.9-7.9,28.5-3.3,40.9c4.8,13,14.1,24.7,28.3,27.5C167,225.2,169.1,217.5,164.1,216.5L164.1,216.5z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<ST8
|
||||
d="M152,231.7c-27.3-13.3-38.1-46.5-23.3-73.2c3.1-5.6-5.5-10.7-8.6-5c-17.3,31.2-5.3,71.1,26.9,86.9
|
||||
C152.7,243.1,157.8,234.5,152,231.7L152,231.7z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default withI18n()(BrandLogo);
|
||||
3
src/components/BrandLogo/index.js
Normal file
3
src/components/BrandLogo/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import BrandLogo from './BrandLogo';
|
||||
|
||||
export default BrandLogo;
|
||||
@@ -1,83 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
|
||||
class TowerLogo extends Component {
|
||||
render () {
|
||||
const { i18n } = this.props;
|
||||
return (
|
||||
<svg
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 823 230"
|
||||
xmlSpace="preserve"
|
||||
css="fill: currentColor;"
|
||||
>
|
||||
<title>{i18n._(t`Tower Brand Image`)}</title>
|
||||
<g>
|
||||
<path d="M213.6,151.8h12.8l29.8,72.8h-11.9l-8.4-21.3h-32.6l-8.5,21.3h-11.3L213.6,151.8z M232.3,194.3l-12.7-31.9
|
||||
L207,194.3H232.3z"
|
||||
/>
|
||||
<path d="M262.3,171.7h10.4v5.3c4.2-4.2,10-6.5,15.9-6.3c12.2,0,20.6,8.5,20.6,20.7v33.3h-10.3v-31.5
|
||||
c0-8.2-5-13.4-13.2-13.4c-5.2-0.2-10.2,2.4-13,6.9v38.1h-10.4V171.7z"
|
||||
/>
|
||||
<path d="M322,210.9c4.8,4.2,10.9,6.5,17.3,6.7c8.3,0,12.7-3.6,12.7-7.9c0-3.7-2.6-5.9-8.5-6.8l-9.6-1.4
|
||||
c-10.4-1.5-15.8-6.4-15.8-14.7c0-9.7,8.5-16,20.7-16c7.6,0,15.1,2.3,21.3,6.8l-5.3,6.9c-5.1-3.4-10.4-5.5-16.8-5.5
|
||||
c-6.1,0-10.6,2.7-10.6,7.2c0,4,2.5,5.7,8.7,6.6l9.6,1.4c10.7,1.6,16,6.6,16,14.8c0,9.6-9.6,16.6-22.2,16.6c-8.8,0-17.2-2.6-23.2-7.8
|
||||
L322,210.9z"
|
||||
/>
|
||||
<path d="M368.4,156.7c0-3.6,2.9-6.4,6.5-6.4c3.6,0.1,6.3,3.1,6.2,6.7c-0.1,3.4-2.8,6.1-6.2,6.2
|
||||
C371.2,163.2,368.4,160.3,368.4,156.7z M380,224.6h-10.4v-52.9H380V224.6z"
|
||||
/>
|
||||
<path d="M418.3,225.5c-5.7,0-11.3-1.8-15.9-5.3v4.5h-10.3v-72.8l10.4-2.3v27c4.5-3.8,10.2-5.8,16.1-5.7
|
||||
c15.1,0,26.7,12.1,26.7,27.2S433.7,225.5,418.3,225.5z M402.5,186.2v24.1c3.8,4,9.1,6.2,14.7,6.1c10.3,0,18-7.9,18-18.2
|
||||
c0-10.5-7.9-18.3-18-18.3C411,179.9,405.9,182.2,402.5,186.2z"
|
||||
/>
|
||||
<path d="M465.5,224.6h-10.4v-72.8l10.4-2.3V224.6z" />
|
||||
<path d="M501.8,170.9c14.6,0,25.6,12.1,25.6,27.7v3h-41.8c1.3,8.8,9,15.3,17.9,15.2c4.9,0.1,9.6-1.6,13.4-4.7l6.7,6.6
|
||||
c-5.8,4.7-13,7.2-20.5,7c-15.6,0-27.8-12-27.8-27.4S486.8,170.9,501.8,170.9z M485.7,193.8h31.4c-1.5-8.1-7.8-14.1-15.5-14.1
|
||||
C493.5,179.6,487.2,185.4,485.7,193.8z"
|
||||
/>
|
||||
<path d="M544.1,151.8h60.6v7.2h-26.3v65.6h-8V159h-26.3V151.8z" />
|
||||
<path d="M625,171.5c14.8,0,26.5,11.9,26.5,27s-11.7,27.2-26.5,27.2s-26.6-11.9-26.6-27.1S610.1,171.5,625,171.5z
|
||||
M625,178.4c-10.6,0-19,8.8-19,20.2s8.3,20.3,19,20.3s19-8.9,19-20.3S635.6,178.4,625,178.4z"
|
||||
/>
|
||||
<path d="M670.8,224.6l-14.7-52.1h7.6l11.2,41.6l13-41.6h6.9l12.9,41.6l11.3-41.6h7.3l-14.8,52.1h-7.4l-12.9-41.7
|
||||
l-13,41.7H670.8z"
|
||||
/>
|
||||
<path d="M756.6,171.7c13.8,0,24.6,12,24.6,26.8v2.4h-42.7c1.1,10.3,9.3,17.9,19.6,17.9c5.4,0,10.8-1.8,14.4-4.8l4.8,5.1
|
||||
c-5.6,4.3-12.4,6.6-19.5,6.4c-14.7,0.2-26.7-11.6-26.8-26.3c0-0.2,0-0.5,0-0.7C730.9,183.8,742,171.7,756.6,171.7z M738.7,194.8
|
||||
h34.8c-1.4-9.3-8.5-16.3-17.2-16.3C747.1,178.5,740.1,185.4,738.7,194.8z"
|
||||
/>
|
||||
<path d="M791.8,172.5h7.7v7.2c3-5.2,8.5-8.4,14.5-8.3c1.7,0,3.4,0.2,5,0.7v7.1c-1.7-0.6-3.6-0.9-5.4-0.9
|
||||
c-5.6,0-11,2.8-14,10.6v35.8h-7.7L791.8,172.5z"
|
||||
/>
|
||||
<path d="M543.3,99.4c0,11.9,7.2,17.7,20.2,17.7c4-0.1,8-0.7,11.9-1.7v-13.8c-2.5,0.8-5.1,1.2-7.7,1.2
|
||||
c-5.4,0-7.4-1.7-7.4-6.7V74.9h15.6V60.7h-15.6v-18l-17,3.7v14.3H532v14.2h11.2L543.3,99.4L543.3,99.4z M490.4,99.7
|
||||
c0-3.7,3.7-5.5,9.2-5.5c3.4,0,6.8,0.4,10.1,1.3v7.2c-3.3,1.8-6.9,2.7-10.6,2.6C493.6,105.3,490.4,103.2,490.4,99.7 M495.6,117.3
|
||||
c6,0,10.8-1.3,15.4-4.3v3.4h16.8V80.7c0-13.6-9.2-21-24.4-21c-8.5,0-16.9,2-26,6.1l6.1,12.5c6.5-2.7,12-4.4,16.8-4.4
|
||||
c7,0,10.6,2.7,10.6,8.3v2.7c-4.1-1.1-8.4-1.6-12.6-1.6c-14.3,0-22.9,6-22.9,16.7C475.4,109.9,483.1,117.3,495.6,117.3 M403.1,116.4
|
||||
h18.1V87.5h30.3v28.8h18.1V42.7h-18.1V71h-30.3V42.7h-18.1V116.4z M334.2,88.5c0-8,6.3-14.1,14.6-14.1c4.3-0.1,8.5,1.4,11.8,4.3
|
||||
v19.4c-3.2,3-7.4,4.6-11.8,4.4C340.6,102.6,334.2,96.5,334.2,88.5 M360.8,116.3h16.8V39l-17,3.7v21c-4.3-2.4-9.3-3.7-14.2-3.7
|
||||
c-16.2,0-28.9,12.5-28.9,28.5c-0.2,15.6,12.3,28.4,27.9,28.6c0.2,0,0.3,0,0.5,0c5.4,0,10.6-1.7,14.9-4.8L360.8,116.3L360.8,116.3z
|
||||
M283.6,73.6c5.4,0,9.9,3.5,11.7,8.8H272C273.7,76.9,277.9,73.6,283.6,73.6 M254.9,88.6c0,16.2,13.2,28.8,30.3,28.8
|
||||
c9.4,0,16.2-2.5,23.2-8.4l-11.3-10c-2.6,2.7-6.5,4.2-11.1,4.2c-5.9,0.2-11.4-3.3-13.7-8.8H312v-4.2c0-17.7-11.9-30.4-28.1-30.4
|
||||
c-15.8-0.2-28.8,12.4-29,28.1C254.9,88.1,254.9,88.3,254.9,88.6 M225.6,58.2c6,0,9.4,3.8,9.4,8.3s-3.4,8.3-9.4,8.3h-17.9V58.2H225.6
|
||||
z M189.6,116.3h18.1V89.5h13.8l13.9,26.8h20.2l-16.2-29.4c8.4-3.4,13.9-11.6,13.9-20.7c0-13.2-10.4-23.5-26-23.5h-37.6L189.6,116.3z
|
||||
"
|
||||
/>
|
||||
<circle css="fill: #ee0000" cx="78.4" cy="77.9" r="76.4" />
|
||||
<path d="M114.5,108.4l-30.3-73c-0.7-2-2.6-3.3-4.7-3.2c-2.1,0-4.1,1.2-4.8,3.2l-33.3,80.1h11.4l13.2-33l39.3,31.8
|
||||
c1.6,1.3,2.7,1.9,4.2,1.9c3,0.1,5.5-2.3,5.6-5.3v-0.1C115,109.9,114.8,109.2,114.5,108.4z M79.5,48.6l19.7,48.7L69.4,73.8L79.5,48.6
|
||||
z"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default withI18n()(TowerLogo);
|
||||
@@ -1,3 +0,0 @@
|
||||
import TowerLogo from './TowerLogo';
|
||||
|
||||
export default TowerLogo;
|
||||
@@ -15,6 +15,8 @@ import './app.scss';
|
||||
|
||||
import { Config } from './contexts/Config';
|
||||
|
||||
import { BrandName } from './variables';
|
||||
|
||||
import Background from './components/Background';
|
||||
import NotifyAndRedirect from './components/NotifyAndRedirect';
|
||||
|
||||
@@ -48,6 +50,7 @@ import Users from './pages/Users';
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function main (render) {
|
||||
const el = document.getElementById('app');
|
||||
document.title = `Ansible ${BrandName}`;
|
||||
|
||||
return render(
|
||||
<RootProvider>
|
||||
|
||||
@@ -2,16 +2,24 @@ import React, { Component } from 'react';
|
||||
import { Redirect, withRouter } from 'react-router-dom';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import styled from 'styled-components';
|
||||
import {
|
||||
LoginForm,
|
||||
LoginPage,
|
||||
LoginPage as PFLoginPage,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import { withRootDialog } from '../contexts/RootDialog';
|
||||
import { withNetwork } from '../contexts/Network';
|
||||
import { RootAPI } from '../api';
|
||||
import { BrandName } from '../variables';
|
||||
|
||||
import towerLogo from '../../images/tower-logo-header.svg';
|
||||
import logoImg from '../../images/brand-logo.svg';
|
||||
|
||||
const LoginPage = styled(PFLoginPage)`
|
||||
& .pf-c-brand {
|
||||
max-height: 285px;
|
||||
}
|
||||
`;
|
||||
|
||||
class AWXLogin extends Component {
|
||||
constructor (props) {
|
||||
@@ -64,7 +72,11 @@ class AWXLogin extends Component {
|
||||
render () {
|
||||
const { username, password, isInputValid, isAuthenticated } = this.state;
|
||||
const { alt, loginInfo, logo, bodyText: errorMessage, i18n } = this.props;
|
||||
const logoSrc = logo ? `data:image/jpeg;${logo}` : towerLogo;
|
||||
const logoSrc = logo ? `data:image/jpeg;${logo}` : logoImg;
|
||||
// Setting BrandName to a variable here is necessary to get the jest tests
|
||||
// passing. Attempting to use BrandName in the template literal results
|
||||
// in failing tests.
|
||||
const brandName = BrandName;
|
||||
|
||||
if (isAuthenticated) {
|
||||
return (<Redirect to="/" />);
|
||||
@@ -73,8 +85,8 @@ class AWXLogin extends Component {
|
||||
return (
|
||||
<LoginPage
|
||||
brandImgSrc={logoSrc}
|
||||
brandImgAlt={alt || 'Ansible Tower'}
|
||||
loginTitle={i18n._(t`Welcome to Ansible Tower! Please Sign In.`)}
|
||||
brandImgAlt={alt || brandName}
|
||||
loginTitle={i18n._(t`Welcome to Ansible ${brandName}! Please Sign In.`)}
|
||||
textContent={loginInfo}
|
||||
>
|
||||
<LoginForm
|
||||
|
||||
2
src/variables.js
Normal file
2
src/variables.js
Normal file
@@ -0,0 +1,2 @@
|
||||
export const BrandName = 'AWX';
|
||||
export const PendoAPIKey = '';
|
||||
Reference in New Issue
Block a user