From 2dc298ba5e18623fcc494c72b2d18cdb80e55d2c Mon Sep 17 00:00:00 2001 From: Federico Rodriguez Date: Fri, 1 Dec 2023 19:15:21 +0100 Subject: [PATCH] Fix snapshot --- .../__snapshots__/inventory.test.tsx.snap | 4754 ++++++++++++++--- .../agents/syscollector/inventory.tsx | 1 - 2 files changed, 3979 insertions(+), 776 deletions(-) diff --git a/plugins/main/public/components/agents/syscollector/__snapshots__/inventory.test.tsx.snap b/plugins/main/public/components/agents/syscollector/__snapshots__/inventory.test.tsx.snap index 4e01bcc51e..227faac4a4 100644 --- a/plugins/main/public/components/agents/syscollector/__snapshots__/inventory.test.tsx.snap +++ b/plugins/main/public/components/agents/syscollector/__snapshots__/inventory.test.tsx.snap @@ -483,50 +483,6 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = `
-
-
-
-
- - - Not enough hardware or operating system information - -
-
-
-
-
- -
-
- Network settings + Network ports (0) @@ -747,72 +703,42 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = ` - + - + @@ -827,7 +753,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = ` - Netmask + State @@ -836,7 +762,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_proto_3" + data-test-subj="tableHeaderCell_protocol_3" role="columnheader" scope="col" > @@ -856,30 +782,6 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = ` - - - @@ -888,7 +790,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = ` >
-
- + Network settings - Not enough hardware or operating system information + (0) -
+
-
-
-
-
-
-
-
-
- - - Not enough hardware or operating system information - + +
+
+ +
-
-
-
-
-`; - -exports[`Inventory component A Linux agent should be well rendered. 1`] = ` -
-
-
-
-
-
-
- Cores: - -
-
+
- Memory: - -
-
-
-
- Arch: - -
-
-
-
- Operating system: - -
-
-
-
- CPU: - -
-
-
-
- Last scan: - -
-
-
-
-
-
-
-
-
-
-
-

- Network interfaces - - (0) - -

-
-
-
-
- -
-
- -
-
-
-
-
-
-
+ > + + @@ -1307,7 +1039,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="ascending" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_name_0" + data-test-subj="tableHeaderCell_iface_0" role="columnheader" scope="col" > @@ -1322,18 +1054,22 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - Name + Interface + > + + @@ -1341,7 +1077,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_mac_1" + data-test-subj="tableHeaderCell_address_1" role="columnheader" scope="col" > @@ -1356,7 +1092,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - MAC + Address @@ -1365,7 +1101,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_state_2" + data-test-subj="tableHeaderCell_netmask_2" role="columnheader" scope="col" > @@ -1380,7 +1116,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - State + Netmask @@ -1389,7 +1125,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_mtu_3" + data-test-subj="tableHeaderCell_proto_3" role="columnheader" scope="col" > @@ -1404,7 +1140,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - MTU + Protocol @@ -1413,7 +1149,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_type_4" + data-test-subj="tableHeaderCell_broadcast_4" role="columnheader" scope="col" > @@ -1428,7 +1164,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - Type + Broadcast @@ -1460,48 +1196,12 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = `
-
-
-
-
-
- - - Not enough hardware or operating system information - -
-
-
-
-
- Network settings + Packages (0) @@ -1539,14 +1239,18 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` > + > + + @@ -1568,14 +1272,18 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` > + > + + @@ -1677,14 +1385,19 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` > + > + + @@ -1712,7 +1425,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="ascending" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_iface_0" + data-test-subj="tableHeaderCell_name_0" role="columnheader" scope="col" > @@ -1727,18 +1440,22 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - Interface + Name + > + + @@ -1746,7 +1463,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_address_1" + data-test-subj="tableHeaderCell_version_1" role="columnheader" scope="col" > @@ -1761,7 +1478,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - Address + Version @@ -1770,7 +1487,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_netmask_2" + data-test-subj="tableHeaderCell_format_2" role="columnheader" scope="col" > @@ -1785,7 +1502,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` - Netmask + Format @@ -1794,9 +1511,10 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_proto_3" + data-test-subj="tableHeaderCell_location_3" role="columnheader" scope="col" + style="width:30%" > @@ -1818,9 +1536,10 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_broadcast_4" + data-test-subj="tableHeaderCell_description_4" role="columnheader" scope="col" + style="width:20%" > @@ -1871,180 +1590,6 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = ` >
-
-
-
-
- - - Not enough hardware or operating system information - -
-
-
-
-
-
-
-
-
-
-
-
- - - Not enough hardware or operating system information - -
-
-
-
-
-
-
-`; - -exports[`Inventory component A Windows agent should be well rendered. 1`] = ` -
-
-
-
-
-
-
- Cores: - -
-
-
-
- Memory: - -
-
-
-
- Arch: - -
-
-
-
- Operating system: - -
-
-
-
- CPU: - -
-
-
-
- Last scan: - -
-
-
-
-
-
-
-
- Network interfaces + Processes (0) @@ -2271,6 +1816,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` data-test-subj="tableHeaderCell_name_0" role="columnheader" scope="col" + style="width:10%" > @@ -2330,7 +1876,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_state_2" + data-test-subj="tableHeaderCell_pid_2" role="columnheader" scope="col" > @@ -2345,7 +1891,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` - State + PID @@ -2354,7 +1900,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_mtu_3" + data-test-subj="tableHeaderCell_ppid_3" role="columnheader" scope="col" > @@ -2369,7 +1915,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` - MTU + Parent PID @@ -2378,7 +1924,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_type_4" + data-test-subj="tableHeaderCell_vm_size_4" role="columnheader" scope="col" > @@ -2393,7 +1939,56 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` - Type + VM size + + + + + + + + + @@ -2406,7 +2001,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` >
+
+
+`; + +exports[`Inventory component A Linux agent should be well rendered. 1`] = ` +
+
+ Cores: + +
+
+
+
- - - Not enough hardware or operating system information - + Memory: + +
+
+
+
+ Arch: +
+
+
+ Operating system: + +
+
+
+
+ CPU: + +
+
+
+
+ Last scan: + +
+
+
+
+
+
+
+
+
+
+
+

+ Network interfaces + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+

+ Network ports + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+ + + Local port + + + + + + Local IP address + + + + + + Process + + + + + + PID + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+
+
+

+ Network settings + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+
+
+

+ Packages + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+
+
+

+ Processes + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+`; + +exports[`Inventory component A Windows agent should be well rendered. 1`] = ` +
+
+
+
+
+
+
+ Cores: + +
+
+
+
+ Memory: + +
+
+
+
+ Arch: + +
+
+
+
+ Operating system: + +
+
+
+
+ CPU: + +
+
+
+
+ Last scan: + +
+
+
+
+
+
+
+
+
+
+
+

+ Network interfaces + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+

+ Network ports + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + Local port + + + + + + Local IP address + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+
+
+

+ Network settings + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + No items found + +
+
+
+
+
+
+
+
+
+
+

+ Windows updates + + (0) + +

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + +
+
+ +
+
+ + No items found + +
+
+
@@ -2470,8 +5634,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiFlexGroup--responsive" >
- Network settings + Packages (0) @@ -2695,7 +5858,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="ascending" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_iface_0" + data-test-subj="tableHeaderCell_name_0" role="columnheader" scope="col" > @@ -2710,7 +5873,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` - Interface + Name - - Address - - - - - @@ -2781,7 +5921,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_proto_3" + data-test-subj="tableHeaderCell_version_2" role="columnheader" scope="col" > @@ -2796,7 +5936,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` - Protocol + Version @@ -2805,9 +5945,10 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="none" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_broadcast_4" + data-test-subj="tableHeaderCell_vendor_3" role="columnheader" scope="col" + style="width:30%" > @@ -2833,7 +5974,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` >
+
+
- Windows updates + Processes (0) @@ -3078,9 +6222,10 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` aria-live="polite" aria-sort="ascending" class="euiTableHeaderCell" - data-test-subj="tableHeaderCell_hotfix_0" + data-test-subj="tableHeaderCell_name_0" role="columnheader" scope="col" + style="width:10%" > + + + + + + + + + + + + + + + + + + @@ -3120,7 +6410,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = ` >
-
-
-
-
-
-
- - - Not enough hardware or operating system information - -
-
-
-
-
-
-
-
-
-
-
-
- - - Not enough hardware or operating system information - -
-
-
-
-
-
`; diff --git a/plugins/main/public/components/agents/syscollector/inventory.tsx b/plugins/main/public/components/agents/syscollector/inventory.tsx index e1b13f138e..57df7132ee 100644 --- a/plugins/main/public/components/agents/syscollector/inventory.tsx +++ b/plugins/main/public/components/agents/syscollector/inventory.tsx @@ -47,7 +47,6 @@ export const SyscollectorInventory = compose( } else if (agent?.os?.uname?.toLowerCase().includes('sunos')) { soPlatform = 'solaris'; } - soPlatform = undefined; return (