mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
Merge branch '7765-frontend' of https://github.com/fleetdm/fleet into 7765-frontend
This commit is contained in:
commit
53bad0b398
@ -165,18 +165,11 @@ const generateTableHeaders = ({
|
||||
accessor: "platforms",
|
||||
Cell: (cellProps: IPlatformCellProps): JSX.Element => {
|
||||
// translate the SelectedPlatformString into an array of `SupportedPlatform`s
|
||||
const selectedPlatforms =
|
||||
(cellProps.row.original.platform
|
||||
?.split(",")
|
||||
.filter((platform) => platform !== "") as SupportedPlatform[]) ??
|
||||
[];
|
||||
|
||||
const platformIconsToRender: SupportedPlatform[] =
|
||||
selectedPlatforms.length === 0
|
||||
? // User didn't select any platforms, so we render all compatible
|
||||
cellProps.cell.value
|
||||
: // Render the platforms the user has selected for this query
|
||||
selectedPlatforms;
|
||||
const platformIconsToRender = (cellProps.row.original.platform === ""
|
||||
? ["darwin", "windows", "linux", "chrome"]
|
||||
: cellProps.row.original.platform
|
||||
?.split(",")
|
||||
.filter((platform) => platform !== "")) as SupportedPlatform[];
|
||||
|
||||
return <PlatformCell platforms={platformIconsToRender} />;
|
||||
},
|
||||
|
@ -486,7 +486,7 @@ const globalQueries = {
|
||||
query: "SELECT * FROM osquery_info",
|
||||
team_id: 2,
|
||||
interval: 604800, // Every week
|
||||
platform: "Windows",
|
||||
platform: "windows",
|
||||
min_osquery_version: "",
|
||||
automations_enabled: false,
|
||||
logging: "differential",
|
||||
@ -563,7 +563,6 @@ const teamQueries = {
|
||||
total_executions: 1,
|
||||
},
|
||||
performance: "Undetermined",
|
||||
platforms: ["windows"],
|
||||
},
|
||||
{
|
||||
created_at: "2023-06-08T15:31:35Z",
|
||||
|
@ -201,8 +201,8 @@ export const PLATFORM_LABEL_DISPLAY_TYPES: Record<string, string> = {
|
||||
|
||||
interface IPlatformDropdownOptions {
|
||||
label: "All" | "Windows" | "Linux" | "macOS" | "ChromeOS";
|
||||
value: "all" | "windows" | "linux" | "darwin" | "chrome";
|
||||
path: string;
|
||||
value: "all" | "windows" | "linux" | "darwin" | "chrome" | "";
|
||||
path?: string;
|
||||
}
|
||||
export const PLATFORM_DROPDOWN_OPTIONS: IPlatformDropdownOptions[] = [
|
||||
{ label: "All", value: "all", path: paths.DASHBOARD },
|
||||
@ -213,10 +213,12 @@ export const PLATFORM_DROPDOWN_OPTIONS: IPlatformDropdownOptions[] = [
|
||||
];
|
||||
|
||||
// Schedules does not support ChromeOS
|
||||
export const SCHEDULE_PLATFORM_DROPDOWN_OPTIONS: IPlatformDropdownOptions[] = PLATFORM_DROPDOWN_OPTIONS.slice(
|
||||
0,
|
||||
-1
|
||||
);
|
||||
export const SCHEDULE_PLATFORM_DROPDOWN_OPTIONS: IPlatformDropdownOptions[] = [
|
||||
{ label: "All", value: "" }, // API empty string runs on all platforms
|
||||
{ label: "macOS", value: "darwin" },
|
||||
{ label: "Windows", value: "windows" },
|
||||
{ label: "Linux", value: "linux" },
|
||||
];
|
||||
|
||||
export const PLATFORM_NAME_TO_LABEL_NAME = {
|
||||
all: "",
|
||||
|
Loading…
Reference in New Issue
Block a user