KEYCLOAK-12431 don't use user agent but patternfly

This commit is contained in:
Erik Jan de Wit 2020-01-20 16:15:46 +01:00 committed by Stan Silvert
parent 3cdfb422ad
commit d3e5bf48f0
2 changed files with 46 additions and 50 deletions

View file

@ -53,7 +53,7 @@ export class ContentPage extends React.Component<ContentPageProps> {
</Grid>
</section>
<section className="pf-c-page__main-section">
<section className="pf-c-page__main-section pf-m-no-padding-mobile">
{this.props.children}
</section>
</React.Fragment>

View file

@ -249,6 +249,7 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
</DataListItem>
<DataListItem aria-labelledby='sessions'>
<DataListItemRow>
<Grid gutter='sm'>
<GridItem span={12} /> {/* <-- top spacing */}
{this.state.devices.map((device: Device, deviceIndex: number) => {
@ -258,16 +259,14 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
return (
<React.Fragment key={'device-' + deviceIndex + '-session-' + sessionIndex}>
<GridItem span={3}>
<GridItem md={3}>
<Stack>
<StackItem isFilled={false}>
<Bullseye>{this.findBrowserIcon(session)}</Bullseye>
</StackItem>
{!this.state.devices[0].mobile &&
<StackItem isFilled={false}>
<Bullseye id={this.elementId('ip', session)}>{session.ipAddress}</Bullseye>
</StackItem>
}
{session.current &&
<StackItem isFilled={false}>
<Bullseye id={this.elementId('current-badge', session)}><strong className='pf-c-badge pf-m-read'><Msg msgKey="currentSession" /></strong></Bullseye>
@ -275,13 +274,9 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
}
</Stack>
</GridItem>
<GridItem span={9}>
<GridItem md={9}>
{!session.browser.toLowerCase().includes('unknown') &&
<p id={this.elementId('browser', session)}><strong>{session.browser} / {this.findOS(device)} {this.findOSVersion(device)}</strong></p>
}
{this.state.devices[0].mobile &&
<p id={this.elementId('ip', session)}><strong>{Msg.localize('ipAddress')} </strong> {session.ipAddress}</p>
}
<p id={this.elementId('browser', session)}><strong>{session.browser} / {this.findOS(device)} {this.findOSVersion(device)}</strong></p>}
<p id={this.elementId('last-access', session)}><strong>{Msg.localize('lastAccessedOn')}</strong> {this.time(session.lastAccess)}</p>
<p id={this.elementId('clients', session)}><strong>{Msg.localize('clients')}</strong> {this.makeClientsString(session.clients)}</p>
<p id={this.elementId('started', session)}><strong>{Msg.localize('startedAt')}</strong> {this.time(session.started)}</p>
@ -306,6 +301,7 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
})}
<GridItem span={12} /> {/* <-- bottom spacing */}
</Grid>
</DataListItemRow>
</DataListItem>
</DataList>
</StackItem>