Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Device manager - render extended device information #9360

Merged
merged 45 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a37682e
record device client inforamtion events on app start
Sep 23, 2022
94b027b
matrix-client-information -> matrix_client_information
Sep 26, 2022
593465a
fix types
Sep 26, 2022
3f616af
Merge branch 'develop' into psg-633/save-device-client-info
Sep 26, 2022
c858656
remove another unused export
Sep 26, 2022
950f61c
add docs link
Sep 27, 2022
fb95964
Merge branch 'develop' into psg-633/save-device-client-info
Sep 27, 2022
258d364
display device client information in device details
Sep 23, 2022
a3cf263
update snapshots
Sep 23, 2022
d316ec6
integration-ish test client information in metadata
Sep 23, 2022
f24e983
tests
Sep 23, 2022
e79934f
fix tests
Sep 26, 2022
9e86e9e
export helper
Sep 26, 2022
ad81d2c
DeviceClientInformation type
Sep 26, 2022
b97ff34
Merge branch 'develop' into psg-682/display-client-info
Sep 30, 2022
d1e3b73
Merge branch 'develop' into psg-682/display-client-info
Oct 4, 2022
0e273d9
Device manager - select all devices (#9330)
Oct 4, 2022
ae76c77
rename type
Oct 4, 2022
295c6d7
use ExtendedDevice type everywhere
Oct 4, 2022
b733f61
rename clientName to appName for less collision with UA parser
Oct 4, 2022
605019c
fix bad find and replace
Oct 4, 2022
0bec4bd
Merge branch 'psg-632/device-man-type-shuffle' into psg-632/device-ma…
Oct 4, 2022
b8c3ea1
rename ExtendedDeviceInfo to ExtendedDeviceAppInfo
Oct 4, 2022
a01c3ca
Merge branch 'psg-632/device-man-type-shuffle' into psg-632/device-ma…
Oct 4, 2022
2569c0c
rename DeviceType comp to DeviceTypeIcon
Oct 4, 2022
82dbfb6
update tests for new required property deviceType
Oct 4, 2022
b10c197
add stubbed user agent parsing
Oct 4, 2022
680fb21
Merge branch 'develop' into psg-682/display-client-info
Oct 4, 2022
eef014a
Merge branch 'psg-682/display-client-info' into psg-632/device-man-pa…
Oct 4, 2022
a7a878a
setup test cases
Oct 4, 2022
7f82b8f
detect device type correctly
Oct 4, 2022
f942ab8
80% working ua parser
Oct 4, 2022
6766985
Merge branch 'develop' into psg-632/device-man-parse-ua
Oct 4, 2022
ebf3da9
Merge branch 'psg-632/device-man-parse-ua' into psg-632/dm-ua-parser-…
Oct 4, 2022
83d2f93
parse asera gents for device info
Oct 5, 2022
4b5fa8e
combine clientName/Version into one field, remove debug from tests
Oct 5, 2022
16c292e
Merge branch 'develop' into psg-632/dm-ua-parser-bowser
Oct 5, 2022
671c2c6
add new metadata to device details
Oct 5, 2022
4b327af
render device info from UA
Oct 6, 2022
adba980
Merge branch 'develop' into psg-812/dm-ua-device-details
Oct 6, 2022
f7e49a9
Merge branch 'develop' into psg-812/dm-ua-device-details
Oct 6, 2022
ecec04f
Merge branch 'develop' into psg-812/dm-ua-device-details
Oct 6, 2022
330c610
Merge branch 'develop' into psg-812/dm-ua-device-details
Oct 6, 2022
c6aadf7
Merge branch 'develop' into psg-812/dm-ua-device-details
Oct 7, 2022
ab01cb0
Merge branch 'develop' into psg-812/dm-ua-device-details
Oct 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/views/settings/devices/DeviceDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const DeviceDetails: React.FC<Props> = ({
id: 'session',
values: [
{ label: _t('Session ID'), value: device.device_id },
{ label: _t('Client'), value: device.client },
{
label: _t('Last activity'),
value: device.last_seen_ts && formatDate(new Date(device.last_seen_ts)),
Expand All @@ -81,6 +82,8 @@ const DeviceDetails: React.FC<Props> = ({
id: 'device',
heading: _t('Device'),
values: [
{ label: _t('Model'), value: device.deviceModel },
{ label: _t('Operating system'), value: device.deviceOperatingSystem },
{ label: _t('IP address'), value: device.last_seen_ip },
],
},
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1714,11 +1714,14 @@
"Rename session": "Rename session",
"Please be aware that session names are also visible to people you communicate with": "Please be aware that session names are also visible to people you communicate with",
"Session ID": "Session ID",
"Client": "Client",
"Last activity": "Last activity",
"Application": "Application",
"Version": "Version",
"URL": "URL",
"Device": "Device",
"Model": "Model",
"Operating system": "Operating system",
"IP address": "IP address",
"Session details": "Session details",
"Toggle push notifications on this session.": "Toggle push notifications on this session.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ describe('<DeviceDetails />', () => {
last_seen_ip: '123.456.789',
last_seen_ts: now - 60000000,
appName: 'Element Web',
client: 'Firefox 100',
deviceModel: 'Iphone X',
deviceOperatingSystem: 'Windows 95',
};
const { container } = render(getComponent({ device }));
expect(container).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ exports[`<DeviceDetails /> renders device with metadata 1`] = `
my-device
</td>
</tr>
<tr>
<td
class="mxDeviceDetails_metadataLabel"
>
Client
</td>
<td
class="mxDeviceDetails_metadataValue"
>
Firefox 100
</td>
</tr>
<tr>
<td
class="mxDeviceDetails_metadataLabel"
Expand Down Expand Up @@ -233,6 +245,30 @@ exports[`<DeviceDetails /> renders device with metadata 1`] = `
</tr>
</thead>
<tbody>
<tr>
<td
class="mxDeviceDetails_metadataLabel"
>
Model
</td>
<td
class="mxDeviceDetails_metadataValue"
>
Iphone X
</td>
</tr>
<tr>
<td
class="mxDeviceDetails_metadataLabel"
>
Operating system
</td>
<td
class="mxDeviceDetails_metadataValue"
>
Windows 95
</td>
</tr>
<tr>
<td
class="mxDeviceDetails_metadataLabel"
Expand Down