diff --git a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx
index 002ee6e090..dd3a67168a 100644
--- a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx
+++ b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx
@@ -1329,8 +1329,6 @@ const ManageHostsPage = ({
}`}
>
{`${count} host${count === 1 ? "" : "s"}`}
- {/* Export all columns initially in 4.13 release but feature being pushed
- back by product until we build client side filtering to export only selected columns
*/}
+
);
}, [isHostCountLoading, filteredHostCount]);
@@ -1494,14 +1492,19 @@ const ManageHostsPage = ({
},
];
+ const tableColumns = generateVisibleTableColumns(
+ hiddenColumns,
+ config,
+ currentUser,
+ currentTeam
+ );
+
+ const columnAccessors = tableColumns.map((column) => column.accessor);
+ columnAccessors.shift();
+
return (
!isValidPolicyResponse(policy.response)
diff --git a/frontend/services/entities/hosts.ts b/frontend/services/entities/hosts.ts
index fa71b87f23..ca690597b5 100644
--- a/frontend/services/entities/hosts.ts
+++ b/frontend/services/entities/hosts.ts
@@ -18,6 +18,7 @@ export interface ILoadHostsOptions {
policyId?: number;
policyResponse?: string;
softwareId?: number;
+ columns?: string;
}
export type ILoadHostDetailsExtension = "device_mapping" | "macadmins";
@@ -59,6 +60,7 @@ export default {
const policyId = options?.policyId || null;
const policyResponse = options?.policyResponse || null;
const softwareId = options?.softwareId || null;
+ const columns = options?.columns || null;
let orderKeyParam = "";
let orderDirection = "";
@@ -129,6 +131,7 @@ export default {
const policyId = options?.policyId || null;
const policyResponse = options?.policyResponse || null;
const softwareId = options?.softwareId || null;
+ const columns = options?.columns || null;
// TODO: add this query param logic to client class
const pagination = `page=${page}&per_page=${perPage}`;
@@ -187,6 +190,10 @@ export default {
path += `&software_id=${softwareId}`;
}
+ if (columns) {
+ path += `&columns=${columns}`;
+ }
+
return sendRequest("GET", path);
},
loadHostDetails: (hostID: number) => {