KEYCLOAK-12431 don't use user agent but patternfly
This commit is contained in:
parent
3cdfb422ad
commit
d3e5bf48f0
2 changed files with 46 additions and 50 deletions
|
@ -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>
|
||||
|
|
|
@ -249,8 +249,9 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
|
|||
</DataListItem>
|
||||
|
||||
<DataListItem aria-labelledby='sessions'>
|
||||
<DataListItemRow>
|
||||
<Grid gutter='sm'>
|
||||
<GridItem span={12}/> {/* <-- top spacing */}
|
||||
<GridItem span={12} /> {/* <-- top spacing */}
|
||||
{this.state.devices.map((device: Device, deviceIndex: number) => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
@ -258,41 +259,35 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
|
|||
return (
|
||||
<React.Fragment key={'device-' + deviceIndex + '-session-' + sessionIndex}>
|
||||
|
||||
<GridItem span={3}>
|
||||
<Stack>
|
||||
<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>
|
||||
}
|
||||
<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>
|
||||
<Bullseye id={this.elementId('current-badge', session)}><strong className='pf-c-badge pf-m-read'><Msg msgKey="currentSession" /></strong></Bullseye>
|
||||
</StackItem>
|
||||
}
|
||||
</Stack>
|
||||
</GridItem>
|
||||
<GridItem span={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>
|
||||
}
|
||||
<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>}
|
||||
<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>
|
||||
<p id={this.elementId('expires', session)}><strong>{Msg.localize('expiresAt')}</strong> {this.time(session.expires)}</p>
|
||||
{!session.current &&
|
||||
<ContinueCancelModal buttonTitle='doSignOut'
|
||||
buttonId={this.elementId('sign-out', session)}
|
||||
modalTitle='doSignOut'
|
||||
buttonVariant='secondary'
|
||||
modalMessage='signOutWarning'
|
||||
onContinue={() => this.signOutSession(device, session)}
|
||||
buttonId={this.elementId('sign-out', session)}
|
||||
modalTitle='doSignOut'
|
||||
buttonVariant='secondary'
|
||||
modalMessage='signOutWarning'
|
||||
onContinue={() => this.signOutSession(device, session)}
|
||||
/>
|
||||
}
|
||||
|
||||
|
@ -304,9 +299,10 @@ export class DeviceActivityPage extends React.Component<DeviceActivityPageProps,
|
|||
</React.Fragment>
|
||||
)
|
||||
})}
|
||||
<GridItem span={12}/> {/* <-- bottom spacing */}
|
||||
<GridItem span={12} /> {/* <-- bottom spacing */}
|
||||
</Grid>
|
||||
</DataListItem>
|
||||
</DataListItemRow>
|
||||
</DataListItem>
|
||||
</DataList>
|
||||
</StackItem>
|
||||
|
||||
|
|
Loading…
Reference in a new issue