mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add OSVersion column to DevicesTable component
This commit is contained in:
parent
1201ae0e1e
commit
efd7b34e60
@ -116,12 +116,6 @@ const columns = [
|
||||
},
|
||||
// todo add filtering options
|
||||
},
|
||||
{
|
||||
title: 'OS Version',
|
||||
dataIndex: 'deviceInfo',
|
||||
key: 'osVersion',
|
||||
render: deviceInfo => deviceInfo.osVersion,
|
||||
},
|
||||
];
|
||||
|
||||
const getTimeAgo = time => {
|
||||
@ -185,6 +179,17 @@ class deviceTable extends React.Component {
|
||||
.then(res => {
|
||||
if (res.status === 200) {
|
||||
const pagination = { ...this.state.pagination };
|
||||
if (
|
||||
res.data.data.devices.length &&
|
||||
res.data.data.devices[0].hasOwnProperty('deviceInfo')
|
||||
) {
|
||||
columns.push({
|
||||
title: 'OS Version',
|
||||
dataIndex: 'deviceInfo',
|
||||
key: 'osVersion',
|
||||
render: deviceInfo => deviceInfo.osVersion,
|
||||
});
|
||||
}
|
||||
this.setState({
|
||||
loading: false,
|
||||
data: res.data.data,
|
||||
|
||||
@ -178,7 +178,7 @@ class Reports extends React.Component {
|
||||
style={{ fontSize: '25px', color: '#08c' }}
|
||||
/>
|
||||
<h2>
|
||||
<b>Expired Devices Report</b>
|
||||
<b>Outdated OS Version Report</b>
|
||||
</h2>
|
||||
<p>Report based on device OS version</p>
|
||||
</div>
|
||||
|
||||
@ -121,10 +121,14 @@ class OutdatedOSversionReport extends React.Component {
|
||||
<Breadcrumb.Item>
|
||||
<Link to="/entgra/reports">Reports</Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>Expired Devices</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>Outdated OS Version</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
<div className="wrap" style={{ marginBottom: '10px' }}>
|
||||
<h3>Expired Devices Report</h3>
|
||||
<h3>Outdated OS Version Report</h3>
|
||||
<p>
|
||||
This report displays devices with an OS Version below the
|
||||
specified version.
|
||||
</p>
|
||||
<div className="wrap" style={{ marginBottom: '10px' }}>
|
||||
<Select
|
||||
showSearch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user