2024-12-19 17:09:38 +00:00
|
|
|
import { ILabelSoftwareTitle } from "./label";
|
2024-07-30 17:14:25 +00:00
|
|
|
import { Platform } from "./platform";
|
2022-02-17 22:54:27 +00:00
|
|
|
import { IPolicy } from "./policy";
|
2021-10-18 17:44:13 +00:00
|
|
|
import { IQuery } from "./query";
|
2024-05-07 16:10:06 +00:00
|
|
|
import { ISchedulableQueryStats } from "./schedulable_query";
|
2022-11-02 18:19:05 +00:00
|
|
|
import { ITeamSummary } from "./team";
|
2023-04-07 15:36:47 +00:00
|
|
|
import { UserRole } from "./user";
|
2021-07-26 20:04:35 +00:00
|
|
|
|
|
|
|
|
export enum ActivityType {
|
|
|
|
|
CreatedPack = "created_pack",
|
|
|
|
|
DeletedPack = "deleted_pack",
|
|
|
|
|
EditedPack = "edited_pack",
|
2022-02-17 22:54:27 +00:00
|
|
|
CreatedPolicy = "created_policy",
|
|
|
|
|
DeletedPolicy = "deleted_policy",
|
|
|
|
|
EditedPolicy = "edited_policy",
|
2021-07-26 20:04:35 +00:00
|
|
|
CreatedSavedQuery = "created_saved_query",
|
|
|
|
|
DeletedSavedQuery = "deleted_saved_query",
|
2023-11-17 20:22:47 +00:00
|
|
|
DeletedMultipleSavedQuery = "deleted_multiple_saved_query",
|
2021-07-26 20:04:35 +00:00
|
|
|
EditedSavedQuery = "edited_saved_query",
|
|
|
|
|
CreatedTeam = "created_team",
|
|
|
|
|
DeletedTeam = "deleted_team",
|
|
|
|
|
LiveQuery = "live_query",
|
2021-10-18 17:44:13 +00:00
|
|
|
AppliedSpecPack = "applied_spec_pack",
|
2022-02-17 22:54:27 +00:00
|
|
|
AppliedSpecPolicy = "applied_spec_policy",
|
2021-10-18 17:44:13 +00:00
|
|
|
AppliedSpecSavedQuery = "applied_spec_saved_query",
|
2022-09-23 16:05:07 +00:00
|
|
|
AppliedSpecTeam = "applied_spec_team",
|
|
|
|
|
EditedAgentOptions = "edited_agent_options",
|
2022-12-22 20:24:13 +00:00
|
|
|
UserAddedBySSO = "user_added_by_sso",
|
|
|
|
|
UserLoggedIn = "user_logged_in",
|
2023-01-20 15:43:22 +00:00
|
|
|
UserFailedLogin = "user_failed_login",
|
2022-12-22 20:24:13 +00:00
|
|
|
UserCreated = "created_user",
|
|
|
|
|
UserDeleted = "deleted_user",
|
|
|
|
|
UserChangedGlobalRole = "changed_user_global_role",
|
|
|
|
|
UserDeletedGlobalRole = "deleted_user_global_role",
|
|
|
|
|
UserChangedTeamRole = "changed_user_team_role",
|
|
|
|
|
UserDeletedTeamRole = "deleted_user_team_role",
|
2024-11-18 21:51:36 +00:00
|
|
|
FleetEnrolled = "fleet_enrolled",
|
2023-01-16 14:09:27 +00:00
|
|
|
MdmEnrolled = "mdm_enrolled",
|
|
|
|
|
MdmUnenrolled = "mdm_unenrolled",
|
2023-02-01 15:58:24 +00:00
|
|
|
EditedMacosMinVersion = "edited_macos_min_version",
|
2024-07-25 20:33:36 +00:00
|
|
|
EditedIosMinVersion = "edited_ios_min_version",
|
|
|
|
|
EditedIpadosMinVersion = "edited_ipados_min_version",
|
2023-02-14 17:00:36 +00:00
|
|
|
ReadHostDiskEncryptionKey = "read_host_disk_encryption_key",
|
2024-07-23 16:13:09 +00:00
|
|
|
/** Note: BE not renamed (yet) from macOS even though activity is also used for iOS and iPadOS */
|
|
|
|
|
CreatedAppleOSProfile = "created_macos_profile",
|
|
|
|
|
/** Note: BE not renamed (yet) from macOS even though activity is also used for iOS and iPadOS */
|
|
|
|
|
DeletedAppleOSProfile = "deleted_macos_profile",
|
|
|
|
|
/** Note: BE not renamed (yet) from macOS even though activity is also used for iOS and iPadOS */
|
|
|
|
|
EditedAppleOSProfile = "edited_macos_profile",
|
2024-10-17 14:21:26 +00:00
|
|
|
AddedNdesScepProxy = "added_ndes_scep_proxy",
|
2024-10-15 13:23:59 +00:00
|
|
|
DeletedNdesScepProxy = "deleted_ndes_scep_proxy",
|
|
|
|
|
EditedNdesScepProxy = "edited_ndes_scep_proxy",
|
2025-03-18 19:41:03 +00:00
|
|
|
AddedDigicert = "added_digicert",
|
|
|
|
|
DeletedDigicert = "deleted_digicert",
|
|
|
|
|
EditedDigicert = "edited_digicert",
|
|
|
|
|
AddedCustomScepProxy = "added_custom_scep_proxy",
|
|
|
|
|
DeletedCustomScepProxy = "deleted_custom_scep_proxy",
|
|
|
|
|
EditedCustomScepProxy = "edited_custom_scep_proxy",
|
2023-11-21 17:11:32 +00:00
|
|
|
CreatedWindowsProfile = "created_windows_profile",
|
|
|
|
|
DeletedWindowsProfile = "deleted_windows_profile",
|
|
|
|
|
EditedWindowsProfile = "edited_windows_profile",
|
2024-02-12 18:23:57 +00:00
|
|
|
// Note: Both "enabled_disk_encryption" and "enabled_macos_disk_encryption" display the same
|
|
|
|
|
// message. The latter is deprecated in the API but it is retained here for backwards compatibility.
|
|
|
|
|
EnabledDiskEncryption = "enabled_disk_encryption",
|
2023-03-15 20:08:04 +00:00
|
|
|
EnabledMacDiskEncryption = "enabled_macos_disk_encryption",
|
2024-02-12 18:23:57 +00:00
|
|
|
// Note: Both "disabled_disk_encryption" and "disabled_macos_disk_encryption" display the same
|
|
|
|
|
// message. The latter is deprecated in the API but it is retained here for backwards compatibility.
|
|
|
|
|
DisabledDiskEncryption = "disabled_disk_encryption",
|
2023-03-15 20:08:04 +00:00
|
|
|
DisabledMacDiskEncryption = "disabled_macos_disk_encryption",
|
2023-04-26 18:40:14 +00:00
|
|
|
AddedBootstrapPackage = "added_bootstrap_package",
|
|
|
|
|
DeletedBootstrapPackage = "deleted_bootstrap_package",
|
2023-04-26 16:02:40 +00:00
|
|
|
ChangedMacOSSetupAssistant = "changed_macos_setup_assistant",
|
|
|
|
|
DeletedMacOSSetupAssistant = "deleted_macos_setup_assistant",
|
2023-05-15 16:10:43 +00:00
|
|
|
EnabledMacOSSetupEndUserAuth = "enabled_macos_setup_end_user_auth",
|
|
|
|
|
DisabledMacOSSetupEndUserAuth = "disabled_macos_setup_end_user_auth",
|
2023-06-22 16:01:42 +00:00
|
|
|
TransferredHosts = "transferred_hosts",
|
2023-06-28 16:28:17 +00:00
|
|
|
EnabledWindowsMdm = "enabled_windows_mdm",
|
|
|
|
|
DisabledWindowsMdm = "disabled_windows_mdm",
|
UI - GitOps Mode: Core abstractions, first batch of applications (#26401)
## For #26229 – Part 1

- This PR contains the core abstractions, routes, API updates, and types
for GitOps mode in the UI. Since this work will touch essentially every
part of the Fleet UI, it is ripe for merge conflicts. To mitigate such
conflicts, I'll be merging this work in a number of iterative PRs. ~To
effectively gate any of this work from showing until it is all merged to
`main`, [this commit](feedbb2d4c25ec2e304e1f18d409cee62f6752ed) hides
the settings section that allows enabling/disabling this setting,
effectively feature flagging the entire thing. In the last of these
iterative PRs, that commit will be reverted to engage the entire
feature. For testing purposes, reviewers can `git revert
feedbb2d4c25ec2e304e1f18d409cee62f6752ed` locally~ The new settings
section for this feature is feature flagged until all PRs are merged -
to show the setting section while testing, run `ALLOW_GITOPS_MODE=true
NODE_ENV=development yarn run webpack --progress --watch` in place of
`make generate-dev`
- Changes file will be added and feature flag removed in the last PR
- [x] Settings page with routing, form, API integration (hidden until
last PR)
- [x] Activities
- [x] Navbar indicator
- Apply GOM conditional UI to:
- [x] Manage enroll secret modal: .5
- Controls >
- [x] Scripts:
- Setup experience >
- [x] Install software > Select software modal
- [x] OS Settings >
- [x] Custom settings
- [x] Disk encryption
- [x] OS Updates
2/18/25, added to this PR:
- [x] Controls > Setup experience > Run script
- [x] Software >
- [x] Manage automations modal
- [x] Add software >
- [x] App Store (VPP)
- [x] Custom package
- [x] Queries
- [x] Manage
- [x] Automations modal
- [x] New
- [x] Edit
- [x] Policies
- [x] Manage
- [x] New
- [x] Edit
- Manage automations
- [x] Calendar events
- [x] Manual QA for all new/changed functionality
---------
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-02-20 16:41:07 +00:00
|
|
|
EnabledGitOpsMode = "enabled_gitops_mode",
|
|
|
|
|
DisabledGitOpsMode = "disabled_gitops_mode",
|
2024-12-02 20:30:51 +00:00
|
|
|
EnabledWindowsMdmMigration = "enabled_windows_mdm_migration",
|
|
|
|
|
DisabledWindowsMdmMigration = "disabled_windows_mdm_migration",
|
2023-08-29 10:47:37 +00:00
|
|
|
RanScript = "ran_script",
|
2023-10-10 22:00:45 +00:00
|
|
|
AddedScript = "added_script",
|
2025-02-03 22:27:44 +00:00
|
|
|
UpdatedScript = "updated_script",
|
2023-10-10 22:00:45 +00:00
|
|
|
DeletedScript = "deleted_script",
|
|
|
|
|
EditedScript = "edited_script",
|
2023-11-29 16:07:24 +00:00
|
|
|
EditedWindowsUpdates = "edited_windows_updates",
|
2024-02-13 18:03:53 +00:00
|
|
|
LockedHost = "locked_host",
|
|
|
|
|
UnlockedHost = "unlocked_host",
|
2024-02-26 14:26:30 +00:00
|
|
|
WipedHost = "wiped_host",
|
2024-03-26 17:54:23 +00:00
|
|
|
CreatedDeclarationProfile = "created_declaration_profile",
|
|
|
|
|
DeletedDeclarationProfile = "deleted_declaration_profile",
|
|
|
|
|
EditedDeclarationProfile = "edited_declaration_profile",
|
2024-04-15 13:17:08 +00:00
|
|
|
ResentConfigurationProfile = "resent_configuration_profile",
|
2024-05-08 14:08:28 +00:00
|
|
|
AddedSoftware = "added_software",
|
2024-09-17 13:40:47 +00:00
|
|
|
EditedSoftware = "edited_software",
|
2024-05-08 14:08:28 +00:00
|
|
|
DeletedSoftware = "deleted_software",
|
2024-05-09 20:45:53 +00:00
|
|
|
InstalledSoftware = "installed_software",
|
2024-09-06 13:53:29 +00:00
|
|
|
UninstalledSoftware = "uninstalled_software",
|
2024-07-16 17:16:57 +00:00
|
|
|
EnabledVpp = "enabled_vpp",
|
|
|
|
|
DisabledVpp = "disabled_vpp",
|
|
|
|
|
AddedAppStoreApp = "added_app_store_app",
|
2025-02-03 22:10:22 +00:00
|
|
|
EditedAppStoreApp = "edited_app_store_app",
|
2024-07-16 17:16:57 +00:00
|
|
|
DeletedAppStoreApp = "deleted_app_store_app",
|
|
|
|
|
InstalledAppStoreApp = "installed_app_store_app",
|
2024-11-08 15:07:56 +00:00
|
|
|
EnabledActivityAutomations = "enabled_activity_automations",
|
|
|
|
|
EditedActivityAutomations = "edited_activity_automations",
|
|
|
|
|
DisabledActivityAutomations = "disabled_activity_automations",
|
2025-01-20 10:39:46 +00:00
|
|
|
CanceledScript = "canceled_script",
|
|
|
|
|
CanceledSoftwareInstall = "canceled_software_install",
|
2025-02-27 14:07:34 +00:00
|
|
|
EnabledAndroidMdm = "enabled_android_mdm",
|
|
|
|
|
DisabledAndroidMdm = "disabled_android_mdm",
|
2021-07-26 20:04:35 +00:00
|
|
|
}
|
2024-02-26 14:26:30 +00:00
|
|
|
|
2025-01-20 10:39:46 +00:00
|
|
|
/** This is a subset of ActivityType that are shown only for the host past activities */
|
2024-05-29 10:50:39 +00:00
|
|
|
export type IHostPastActivityType =
|
2024-02-26 14:26:30 +00:00
|
|
|
| ActivityType.RanScript
|
|
|
|
|
| ActivityType.LockedHost
|
2024-05-09 20:45:53 +00:00
|
|
|
| ActivityType.UnlockedHost
|
2024-07-16 17:16:57 +00:00
|
|
|
| ActivityType.InstalledSoftware
|
2024-09-06 13:53:29 +00:00
|
|
|
| ActivityType.UninstalledSoftware
|
2025-01-20 10:39:46 +00:00
|
|
|
| ActivityType.InstalledAppStoreApp
|
|
|
|
|
| ActivityType.CanceledScript
|
|
|
|
|
| ActivityType.CanceledSoftwareInstall;
|
2024-02-26 14:26:30 +00:00
|
|
|
|
2025-01-20 10:39:46 +00:00
|
|
|
/** This is a subset of ActivityType that are shown only for the host upcoming activities */
|
2024-05-29 10:50:39 +00:00
|
|
|
export type IHostUpcomingActivityType =
|
|
|
|
|
| ActivityType.RanScript
|
2024-07-16 17:16:57 +00:00
|
|
|
| ActivityType.InstalledSoftware
|
2024-09-06 13:53:29 +00:00
|
|
|
| ActivityType.UninstalledSoftware
|
2024-07-16 17:16:57 +00:00
|
|
|
| ActivityType.InstalledAppStoreApp;
|
2024-05-29 10:50:39 +00:00
|
|
|
|
2021-07-26 20:04:35 +00:00
|
|
|
export interface IActivity {
|
|
|
|
|
created_at: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
id: number;
|
2021-07-26 20:04:35 +00:00
|
|
|
actor_full_name: string;
|
|
|
|
|
actor_id: number;
|
2021-08-16 14:30:19 +00:00
|
|
|
actor_gravatar: string;
|
|
|
|
|
actor_email?: string;
|
2021-07-26 20:04:35 +00:00
|
|
|
type: ActivityType;
|
2025-02-11 19:53:11 +00:00
|
|
|
fleet_initiated: boolean;
|
2021-07-26 20:04:35 +00:00
|
|
|
details?: IActivityDetails;
|
|
|
|
|
}
|
2024-02-26 14:26:30 +00:00
|
|
|
|
2024-05-29 10:50:39 +00:00
|
|
|
export type IHostPastActivity = Omit<IActivity, "type" | "details"> & {
|
|
|
|
|
type: IHostPastActivityType;
|
|
|
|
|
details: IActivityDetails;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type IHostUpcomingActivity = Omit<IActivity, "type" | "details"> & {
|
2025-01-20 10:39:46 +00:00
|
|
|
uuid: string;
|
2024-05-29 10:50:39 +00:00
|
|
|
type: IHostUpcomingActivityType;
|
2024-05-09 20:45:53 +00:00
|
|
|
details: IActivityDetails;
|
2024-02-26 14:26:30 +00:00
|
|
|
};
|
|
|
|
|
|
2021-07-26 20:04:35 +00:00
|
|
|
export interface IActivityDetails {
|
|
|
|
|
pack_id?: number;
|
|
|
|
|
pack_name?: string;
|
2022-02-17 22:54:27 +00:00
|
|
|
policy_id?: number;
|
|
|
|
|
policy_name?: string;
|
2021-07-26 20:04:35 +00:00
|
|
|
query_id?: number;
|
|
|
|
|
query_name?: string;
|
2022-11-17 14:25:40 +00:00
|
|
|
query_sql?: string;
|
2023-11-17 20:22:47 +00:00
|
|
|
query_ids?: number[];
|
2023-02-01 15:58:24 +00:00
|
|
|
team_id?: number | null;
|
|
|
|
|
team_name?: string | null;
|
2022-11-02 18:19:05 +00:00
|
|
|
teams?: ITeamSummary[];
|
2021-07-26 20:04:35 +00:00
|
|
|
targets_count?: number;
|
2022-02-17 22:54:27 +00:00
|
|
|
specs?: IQuery[] | IPolicy[];
|
2022-09-23 16:05:07 +00:00
|
|
|
global?: boolean;
|
2022-12-22 20:24:13 +00:00
|
|
|
public_ip?: string;
|
2023-11-20 18:29:36 +00:00
|
|
|
user_id?: number;
|
2022-12-22 20:24:13 +00:00
|
|
|
user_email?: string;
|
2023-01-20 15:43:22 +00:00
|
|
|
email?: string;
|
2023-04-07 15:36:47 +00:00
|
|
|
role?: UserRole;
|
2023-01-16 14:09:27 +00:00
|
|
|
host_serial?: string;
|
2023-01-24 19:11:39 +00:00
|
|
|
host_display_name?: string;
|
2023-06-22 16:01:42 +00:00
|
|
|
host_display_names?: string[];
|
|
|
|
|
host_ids?: number[];
|
2024-05-09 20:45:53 +00:00
|
|
|
host_id?: number;
|
2024-02-13 18:03:53 +00:00
|
|
|
host_platform?: string;
|
2023-01-16 14:09:27 +00:00
|
|
|
installed_from_dep?: boolean;
|
2023-07-06 18:33:40 +00:00
|
|
|
mdm_platform?: "microsoft" | "apple";
|
2023-02-01 15:58:24 +00:00
|
|
|
minimum_version?: string;
|
|
|
|
|
deadline?: string;
|
2023-02-22 18:42:40 +00:00
|
|
|
profile_name?: string;
|
|
|
|
|
profile_identifier?: string;
|
2023-04-27 19:52:31 +00:00
|
|
|
bootstrap_package_name?: string;
|
2023-04-26 16:02:40 +00:00
|
|
|
name?: string;
|
2023-09-05 23:09:29 +00:00
|
|
|
script_execution_id?: string;
|
2023-10-10 22:00:45 +00:00
|
|
|
script_name?: string;
|
2023-11-29 16:07:24 +00:00
|
|
|
deadline_days?: number;
|
|
|
|
|
grace_period_days?: number;
|
2024-05-07 16:10:06 +00:00
|
|
|
stats?: ISchedulableQueryStats;
|
2024-05-08 14:08:28 +00:00
|
|
|
software_title?: string;
|
|
|
|
|
software_package?: string;
|
2024-07-30 17:14:25 +00:00
|
|
|
platform?: Platform; // software platform
|
2024-05-09 20:45:53 +00:00
|
|
|
status?: string;
|
|
|
|
|
install_uuid?: string;
|
2024-05-29 10:50:39 +00:00
|
|
|
self_service?: boolean;
|
2024-07-16 17:16:57 +00:00
|
|
|
command_uuid?: string;
|
|
|
|
|
app_store_id?: number;
|
2024-08-29 22:51:46 +00:00
|
|
|
location?: string; // name of location associated with VPP token
|
2024-11-08 15:07:56 +00:00
|
|
|
webhook_url?: string;
|
2024-12-19 17:09:38 +00:00
|
|
|
software_title_id?: number;
|
|
|
|
|
labels_include_any?: ILabelSoftwareTitle[];
|
|
|
|
|
labels_exclude_any?: ILabelSoftwareTitle[];
|
2021-07-26 20:04:35 +00:00
|
|
|
}
|