<>
This will remove the record of {hostText()}.{largeVolumeText()}
diff --git a/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tests.tsx b/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tests.tsx
index ecc33559d4..ba82675e8a 100644
--- a/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tests.tsx
+++ b/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tests.tsx
@@ -116,7 +116,7 @@ describe("Host Actions Dropdown", () => {
expect(
screen.getByText("Query").parentElement?.parentElement?.parentElement
- ).toHaveClass("is-disabled");
+ ).toHaveClass("actions-dropdown-select__option--is-disabled");
await waitFor(() => {
waitFor(() => {
@@ -153,7 +153,7 @@ describe("Host Actions Dropdown", () => {
await user.click(screen.getByText("Actions"));
expect(
screen.getByText("Query").parentElement?.parentElement?.parentElement
- ).toHaveClass("is-disabled");
+ ).toHaveClass("actions-dropdown-select__option--is-disabled");
});
it("renders the Query action as disabled when a host is updating", async () => {
@@ -180,7 +180,7 @@ describe("Host Actions Dropdown", () => {
await user.click(screen.getByText("Actions"));
expect(screen.getByText("Query").parentElement).toHaveClass(
- "is-disabled"
+ "actions-dropdown-select__option--is-disabled"
);
});
});
@@ -388,7 +388,7 @@ describe("Host Actions Dropdown", () => {
debug();
expect(screen.getByText("Turn off MDM").parentElement).toHaveClass(
- "is-disabled"
+ "actions-dropdown-select__option--is-disabled"
);
});
@@ -590,7 +590,7 @@ describe("Host Actions Dropdown", () => {
expect(
screen.getByText("Lock").parentElement?.parentElement?.parentElement
- ).toHaveClass("is-disabled");
+ ).toHaveClass("actions-dropdown-select__option--is-disabled");
await waitFor(() => {
waitFor(() => {
@@ -845,7 +845,7 @@ describe("Host Actions Dropdown", () => {
expect(
screen.getByText("Unlock").parentElement?.parentElement?.parentElement
- ).toHaveClass("is-disabled");
+ ).toHaveClass("actions-dropdown-select__option--is-disabled");
await waitFor(() => {
waitFor(() => {
@@ -981,7 +981,7 @@ describe("Host Actions Dropdown", () => {
expect(
screen.getByText("Wipe").parentElement?.parentElement?.parentElement
- ).toHaveClass("is-disabled");
+ ).toHaveClass("actions-dropdown-select__option--is-disabled");
await waitFor(() => {
waitFor(() => {
@@ -1055,7 +1055,7 @@ describe("Host Actions Dropdown", () => {
screen
.getByText("Run script")
.parentElement?.parentElement?.parentElement?.classList.contains(
- "is-disabled"
+ "actions-dropdown-select__option--is-disabled"
)
).toBeFalsy();
@@ -1098,7 +1098,7 @@ describe("Host Actions Dropdown", () => {
expect(
screen.getByText("Run script").parentElement?.parentElement
?.parentElement
- ).toHaveClass("is-disabled");
+ ).toHaveClass("actions-dropdown-select__option--is-disabled");
await waitFor(() => {
waitFor(() => {
diff --git a/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tsx b/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tsx
index c283527410..c8a62d193f 100644
--- a/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tsx
+++ b/frontend/pages/hosts/details/HostDetailsPage/HostActionsDropdown/HostActionsDropdown.tsx
@@ -4,8 +4,7 @@ import { MdmEnrollmentStatus } from "interfaces/mdm";
import permissions from "utilities/permissions";
import { AppContext } from "context/app";
-// @ts-ignore
-import Dropdown from "components/forms/fields/Dropdown";
+import ActionsDropdown from "components/ActionsDropdown";
import { generateHostActionOptions } from "./helpers";
import { HostMdmDeviceStatusUIState } from "../../helpers";
@@ -81,12 +80,12 @@ const HostActionsDropdown = ({
return (
-
);
diff --git a/frontend/pages/hosts/details/HostDetailsPage/modals/RunScriptModal/ScriptsTableConfig.tsx b/frontend/pages/hosts/details/HostDetailsPage/modals/RunScriptModal/ScriptsTableConfig.tsx
index d115185f1a..a8ecb5e368 100644
--- a/frontend/pages/hosts/details/HostDetailsPage/modals/RunScriptModal/ScriptsTableConfig.tsx
+++ b/frontend/pages/hosts/details/HostDetailsPage/modals/RunScriptModal/ScriptsTableConfig.tsx
@@ -5,7 +5,7 @@ import { IHostScript, ILastExecution } from "interfaces/script";
import { IUser } from "interfaces/user";
import Icon from "components/Icon";
-import DropdownCell from "components/TableContainer/DataTable/DropdownCell";
+import ActionsDropdown from "components/ActionsDropdown";
import {
isGlobalAdmin,
isTeamMaintainer,
@@ -24,7 +24,7 @@ interface IStatusCellProps {
};
}
-interface IDropdownCellProps {
+interface IActionsDropdownProps {
cell: {
value: IDropdownOption[];
};
@@ -94,7 +94,7 @@ export const generateTableColumnConfigs = (
Header: "",
disableSortBy: true,
accessor: "actions",
- Cell: (cellProps: IDropdownCellProps) => {
+ Cell: (cellProps: IActionsDropdownProps) => {
if (scriptsDisabled) {
// create a basic span that doesn't use the dropdown component (which relies on react-select
// and makes it difficult for us to style the disabled tooltip underline on the placeholder text.
@@ -120,7 +120,7 @@ export const generateTableColumnConfigs = (
cellProps.row.original
);
return (
-
onSelectAction(value, cellProps.row.original)
diff --git a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx
index e52b93ea12..8e0bf618de 100644
--- a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx
+++ b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx
@@ -23,7 +23,7 @@ import PATHS from "router/paths";
import HeaderCell from "components/TableContainer/DataTable/HeaderCell/HeaderCell";
import TextCell from "components/TableContainer/DataTable/TextCell";
import SoftwareNameCell from "components/TableContainer/DataTable/SoftwareNameCell";
-import DropdownCell from "components/TableContainer/DataTable/DropdownCell";
+import ActionsDropdown from "components/ActionsDropdown";
import VulnerabilitiesCell from "pages/SoftwarePage/components/VulnerabilitiesCell";
import VersionCell from "pages/SoftwarePage/components/VersionCell";
@@ -237,7 +237,7 @@ export const generateSoftwareTableHeaders = ({
} = original;
return (
- {
+ const baseSize = 16; // Assuming the base font size is 16px
+ return `${px / baseSize}rem`;
+};
+
+export const PADDING = {
+ "pad-auto": "auto",
+ "pad-xxsmall": pxToRem(2),
+ "pad-xsmall": pxToRem(4),
+ "pad-small": pxToRem(8),
+ "pad-icon": pxToRem(14),
+ "pad-medium": pxToRem(16),
+ "pad-large": pxToRem(24),
+ "pad-xlarge": pxToRem(32),
+ "pad-xxlarge": pxToRem(40),
+ "pad-xxxlarge": pxToRem(80),
+};
+
+export type Padding = keyof typeof PADDING;