{displayText}
- {type !== "platform" && (
+ {labelType !== "builtin" && (
<>
);
}
+ return null;
};
renderForm = () => {
diff --git a/frontend/utilities/constants.ts b/frontend/utilities/constants.ts
index f8eb0fcf98..7181900f97 100644
--- a/frontend/utilities/constants.ts
+++ b/frontend/utilities/constants.ts
@@ -11,13 +11,6 @@ export const FREQUENCY_DROPDOWN_OPTIONS = [
{ value: 604800, label: "Every week" },
];
-export const PLATFORM_OPTIONS = [
- { label: "All", value: "" },
- { label: "Windows", value: "windows" },
- { label: "Linux", value: "linux" },
- { label: "macOS", value: "darwin" },
-];
-
export const LOGGING_TYPE_OPTIONS = [
{ label: "Snapshot", value: "snapshot" },
{ label: "Differential", value: "differential" },
@@ -54,3 +47,39 @@ export const MIN_OSQUERY_VERSION_OPTIONS = [
{ label: "1.8.2 +", value: "1.8.2" },
{ label: "1.8.1 +", value: "1.8.1" },
];
+
+export const PLATFORM_LABEL_DISPLAY_NAMES: Record
= {
+ "All Hosts": "All Hosts",
+ "All Linux": "Linux",
+ "CentOS Linux": "CentOS Linux",
+ macOS: "macOS",
+ "MS Windows": "Windows",
+ "Red Hat Linux": "Red Hat Linux",
+ "Ubuntu Linux": "Ubuntu Linux",
+};
+
+export const PLATFORM_LABEL_DISPLAY_ORDER = [
+ "macOS",
+ "All Linux",
+ "CentOS Linux",
+ "Red Hat Linux",
+ "Ubuntu Linux",
+ "MS Windows",
+];
+
+export const PLATFORM_LABEL_DISPLAY_TYPES: Record = {
+ "All Hosts": "all",
+ "All Linux": "platform",
+ "CentOS Linux": "platform",
+ macOS: "platform",
+ "MS Windows": "platform",
+ "Red Hat Linux": "platform",
+ "Ubuntu Linux": "platform",
+};
+
+export const PLATFORM_OPTIONS = [
+ { label: "All", value: "" },
+ { label: "Windows", value: "windows" },
+ { label: "Linux", value: "linux" },
+ { label: "macOS", value: "darwin" },
+];