From d147b0641931510a3c52d29c196a9255a1db5ee7 Mon Sep 17 00:00:00 2001 From: Georgy Karataev Date: Thu, 30 Mar 2023 12:06:22 +0200 Subject: [PATCH] Change the order of columns --- .../Modals/AddSystemsToGroupModal.cy.js | 9 ++++++++- .../InventoryGroups/Modals/AddSystemsToGroupModal.js | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js index f585a2f6c..bc7220c5f 100644 --- a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js @@ -23,7 +23,14 @@ import { import { getStore } from '../../../store'; import AddSystemsToGroupModal from './AddSystemsToGroupModal'; -const TABLE_HEADERS = ['Name', 'Group', 'Tags', 'Update method', 'OS', 'Last seen']; +const TABLE_HEADERS = [ + 'Name', + 'OS', + 'Tags', + 'Update method', + 'Group', + 'Last seen' +]; const ALERT = '[data-ouia-component-type="PF4/Alert"]'; diff --git a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js index 10dbafac0..828f8328e 100644 --- a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js +++ b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js @@ -36,7 +36,15 @@ export const prepareColumns = (initialColumns) => { } }); - return columns; + // map columns to the speicifc order + return [ + 'display_name', + 'system_profile', + 'tags', + 'update_method', + 'groups', + 'updated' + ].map((colKey) => columns.find(({ key }) => key === colKey)); }; const AddSystemsToGroupModal = ({