Skip to content

Commit

Permalink
Change the order of columns
Browse files Browse the repository at this point in the history
  • Loading branch information
gkarat committed Mar 30, 2023
1 parent cb4d7ea commit d147b06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]';

Expand Down
10 changes: 9 additions & 1 deletion src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down

0 comments on commit d147b06

Please sign in to comment.