fleet/frontend/pages/SoftwarePage/components/modals/ManageSoftwareAutomationsModal/ManageSoftwareAutomationsModal.tsx

612 lines
20 KiB
TypeScript
Raw Normal View History

UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
import React, { useState, useEffect, useContext } from "react";
import { useQuery } from "react-query";
import { InjectedRouter } from "react-router";
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
import { isEmpty, omit } from "lodash";
import useDeepEffect from "hooks/useDeepEffect";
Remove UI gating in GitOps mode for excepted entities (#42486) <!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #42184 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [ ] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. - [ ] If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes ## Testing - [ ] Added/updated automated tests - [ ] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [ ] QA'd all new/changed functionality manually For unreleased bug fixes in a release candidate, one of: - [ ] Confirmed that the fix is not expected to adversely impact load test results - [ ] Alerted the release DRI if additional load testing is needed ## Database migrations - [ ] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [ ] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [ ] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). ## New Fleet configuration settings - [ ] Setting(s) is/are explicitly excluded from GitOps If you didn't check the box above, follow this checklist for GitOps-enabled settings: - [ ] Verified that the setting is exported via `fleetctl generate-gitops` - [ ] Verified the setting is documented in a separate PR to [the GitOps documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485) - [ ] Verified that the setting is cleared on the server if it is not supplied in a YAML file (or that it is documented as being optional) - [ ] Verified that any relevant UI is disabled when GitOps mode is enabled ## fleetd/orbit/Fleet Desktop - [ ] Verified compatibility with the latest released version of Fleet (see [Must rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)) - [ ] If the change applies to only one platform, confirmed that `runtime.GOOS` is used as needed to isolate changes - [ ] Verified that fleetd runs on macOS, Linux and Windows - [ ] Verified auto-update works from the released version of component to the new version (see [tools/tuf/test](../tools/tuf/test/README.md)) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added support for GitOps exceptions per entity type (labels, software, secrets), allowing specific areas to bypass GitOps mode restrictions when configured. * **Bug Fixes** * Improved GitOps mode behavior to properly respect per-entity-type exception settings across software, labels, and secrets management. * **Tests** * Extended test coverage for GitOps exception handling scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-31 14:10:56 +00:00
import useGitOpsMode from "hooks/useGitOpsMode";
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
import PATHS from "router/paths";
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
import { AppContext } from "context/app";
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
import configAPI from "services/entities/config";
import { SUPPORT_LINK } from "utilities/constants";
import {
IJiraIntegration,
2022-05-11 02:33:30 +00:00
IZendeskIntegration,
IIntegration,
IGlobalIntegrations,
IIntegrationType,
} from "interfaces/integration";
import {
IConfig,
CONFIG_DEFAULT_RECENT_VULNERABILITY_MAX_AGE_IN_DAYS,
} from "interfaces/config";
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
import { ITeamConfig } from "interfaces/team";
import { IWebhookSoftwareVulnerabilities } from "interfaces/webhook";
// @ts-ignore
import Dropdown from "components/forms/fields/Dropdown";
import Modal from "components/Modal";
import Button from "components/buttons/Button";
import Slider from "components/forms/fields/Slider";
import Radio from "components/forms/fields/Radio";
import InputField from "components/forms/fields/InputField";
import CustomLink from "components/CustomLink";
import validUrl from "components/forms/validators/valid_url";
UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
import TooltipWrapper from "components/TooltipWrapper";
import GitOpsModeTooltipWrapper from "components/GitOpsModeTooltipWrapper";
import PreviewPayloadModal from "../PreviewPayloadModal";
import PreviewTicketModal from "../PreviewTicketModal";
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
export const isGlobalSWConfig = (
config: IConfig | ITeamConfig
): config is IConfig => "vulnerabilities" in config;
interface ISoftwareAutomations {
webhook_settings: {
vulnerabilities_webhook: IWebhookSoftwareVulnerabilities;
};
integrations: {
jira: IJiraIntegration[];
2022-05-11 02:33:30 +00:00
zendesk: IZendeskIntegration[];
};
}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
interface IManageSoftwareAutomationsModalProps {
router: InjectedRouter;
onCancel: () => void;
onCreateWebhookSubmit: (formData: ISoftwareAutomations) => void;
togglePreviewPayloadModal: () => void;
togglePreviewTicketModal: () => void;
showPreviewPayloadModal: boolean;
showPreviewTicketModal: boolean;
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
softwareConfig: IConfig | ITeamConfig;
}
const validateWebhookURL = (url: string) => {
const errors: { [key: string]: string } = {};
if (!url) {
errors.url = "Please add a destination URL";
} else if (!validUrl({ url })) {
errors.url = "Destination URL is not a valid URL";
} else {
delete errors.url;
}
return { valid: isEmpty(errors), errors };
};
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
const baseClass = "manage-software-automations-modal";
const ManageAutomationsModal = ({
router,
onCancel: onReturnToApp,
onCreateWebhookSubmit,
togglePreviewPayloadModal,
togglePreviewTicketModal,
showPreviewPayloadModal,
showPreviewTicketModal,
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
softwareConfig,
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
}: IManageSoftwareAutomationsModalProps): JSX.Element => {
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
const vulnWebhookSettings =
softwareConfig?.webhook_settings?.vulnerabilities_webhook;
const softwareVulnerabilityWebhookEnabled = !!vulnWebhookSettings?.enable_vulnerabilities_webhook;
const currentDestinationUrl = vulnWebhookSettings?.destination_url || "";
const isVulnIntegrationEnabled =
!!softwareConfig?.integrations.jira?.some(
(j) => j.enable_software_vulnerabilities
) ||
!!softwareConfig?.integrations.zendesk?.some(
(z) => z.enable_software_vulnerabilities
);
const softwareVulnerabilityAutomationEnabled =
softwareVulnerabilityWebhookEnabled || isVulnIntegrationEnabled;
const [destinationUrl, setDestinationUrl] = useState(
currentDestinationUrl || ""
);
const [errors, setErrors] = useState<{ [key: string]: string }>({});
const [softwareAutomationsEnabled, setSoftwareAutomationsEnabled] = useState(
softwareVulnerabilityAutomationEnabled || false
);
const [integrationEnabled, setIntegrationEnabled] = useState(
!softwareVulnerabilityWebhookEnabled
);
2022-05-11 02:33:30 +00:00
const [jiraIntegrationsIndexed, setJiraIntegrationsIndexed] = useState<
IIntegration[]
>();
const [zendeskIntegrationsIndexed, setZendeskIntegrationsIndexed] = useState<
IIntegration[]
>();
const [allIntegrationsIndexed, setAllIntegrationsIndexed] = useState<
IIntegration[]
>();
const [
selectedIntegration,
setSelectedIntegration,
2022-05-11 02:33:30 +00:00
] = useState<IIntegration>();
const { config: globalConfigFromContext, isFreeTier } = useContext(
AppContext
);
Remove UI gating in GitOps mode for excepted entities (#42486) <!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #42184 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [ ] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. - [ ] If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes ## Testing - [ ] Added/updated automated tests - [ ] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [ ] QA'd all new/changed functionality manually For unreleased bug fixes in a release candidate, one of: - [ ] Confirmed that the fix is not expected to adversely impact load test results - [ ] Alerted the release DRI if additional load testing is needed ## Database migrations - [ ] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [ ] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [ ] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). ## New Fleet configuration settings - [ ] Setting(s) is/are explicitly excluded from GitOps If you didn't check the box above, follow this checklist for GitOps-enabled settings: - [ ] Verified that the setting is exported via `fleetctl generate-gitops` - [ ] Verified the setting is documented in a separate PR to [the GitOps documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485) - [ ] Verified that the setting is cleared on the server if it is not supplied in a YAML file (or that it is documented as being optional) - [ ] Verified that any relevant UI is disabled when GitOps mode is enabled ## fleetd/orbit/Fleet Desktop - [ ] Verified compatibility with the latest released version of Fleet (see [Must rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)) - [ ] If the change applies to only one platform, confirmed that `runtime.GOOS` is used as needed to isolate changes - [ ] Verified that fleetd runs on macOS, Linux and Windows - [ ] Verified auto-update works from the released version of component to the new version (see [tools/tuf/test](../tools/tuf/test/README.md)) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added support for GitOps exceptions per entity type (labels, software, secrets), allowing specific areas to bypass GitOps mode restrictions when configured. * **Bug Fixes** * Improved GitOps mode behavior to properly respect per-entity-type exception settings across software, labels, and secrets management. * **Tests** * Extended test coverage for GitOps exception handling scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-31 14:10:56 +00:00
const { gitOpsModeEnabled } = useGitOpsMode("software");
Allow users of Fleet in Primo mode to access Software automations and Failing policy ticket & webhook automations (#30865) ## For #30749, #31013 This PR implements changes to the UI and back end to accommodate Software automations and Failing policy Ticket and Webhook automations when Fleet is in Primo mode. Follow-up to https://github.com/fleetdm/fleet/pull/30291 ### Software automations - When on the `/software` page and in Primo mode, the UI is, under the hood, on "No team," though any reference to "team"s is hidden as much as possible. In "normal" Fleet, Software automations can only be accessed when on "All teams." This PR implements a special case in Primo mode: when on No team and Primo mode is enabled, the user can now access the "Software automations" modal to configure automation settings, which are global. - Simplified some conditions - Moved logic living in the parent Software page that was specific to the `SoftwareAutomations` modal into the modal for better encapsulation. ### Policy automations The calendar, software, and scripts failing policy automations are currently only configurable on a team (including No team) and not for All teams. Ticket and webhook automations, accessible via the "Other workflows" modal, by contrast, are only configurable for All teams and teams other than No team, but not for No team. This PR updates the Policies page, when in Primo mode (and therefore forced to be on "No team") to: - Continue providing "No team" data to the first 3 mentioned policy automations modals. - Include an enabled Other workflows option in the automations dropdown - Update the submission handler of the Other workflows modal to update the relevant _global_ config values - The backend is updated to recognize this case (Failing policy webhook / ticket destination, policy on No team, in Primo mode) and handle it using the global config, making the above logic sound _Product should consider if any of these changes should be implemented for "normal" Fleet_ ### Listing and deleting policies - Primo mode presents a pseudo-team-less UX. However, it is still possible for earlier clients to have policies on "All teams." This implements the ability to both see and delete "teamless" (No team under the hood) policies and any such inherited global policies ### Other UI considerations - Remove teams-related functionality in a couple more places - see #31013 ### Demos - [Deleting policies, including any potentially inherited from All teams (possible from before Primo mode)](https://drive.google.com/file/d/1ZI4MNM3bkiOtD5MInAU32htQw8kDEupK/view?usp=drive_link) - [x] Changes file added for user-visible changes in `changes/ - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-07-17 22:53:31 +00:00
const maxAgeInNanoseconds = isGlobalSWConfig(softwareConfig)
? softwareConfig.vulnerabilities.recent_vulnerability_max_age
: globalConfigFromContext?.vulnerabilities.recent_vulnerability_max_age;
const recentVulnerabilityMaxAge = maxAgeInNanoseconds
? Math.round(maxAgeInNanoseconds / 86400000000000) // convert from nanoseconds to days
: CONFIG_DEFAULT_RECENT_VULNERABILITY_MAX_AGE_IN_DAYS;
UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
useDeepEffect(() => {
setSoftwareAutomationsEnabled(
softwareVulnerabilityAutomationEnabled || false
);
}, [softwareVulnerabilityAutomationEnabled]);
useDeepEffect(() => {
if (destinationUrl) {
setErrors({});
}
}, [destinationUrl]);
const { data: integrations } = useQuery<IConfig, Error, IGlobalIntegrations>(
["integrations"],
() => configAPI.loadAll(),
{
select: (data: IConfig) => {
2022-05-11 02:33:30 +00:00
return data.integrations;
},
onSuccess: (data) => {
2022-05-11 02:33:30 +00:00
// Set jira and zendesk integrations
const addJiraIndexed = data.jira
? data.jira.map((integration, index) => {
return {
...integration,
originalIndex: index,
type: "jira" as IIntegrationType,
};
2022-05-11 02:33:30 +00:00
})
: [];
setJiraIntegrationsIndexed(addJiraIndexed);
const addZendeskIndexed = data.zendesk
? data.zendesk.map((integration, index) => {
return {
...integration,
originalIndex: index,
type: "zendesk" as IIntegrationType,
2022-05-11 02:33:30 +00:00
};
})
: [];
setZendeskIntegrationsIndexed(addZendeskIndexed);
},
}
);
2022-05-11 02:33:30 +00:00
useEffect(() => {
if (jiraIntegrationsIndexed && zendeskIntegrationsIndexed) {
const combineDataSets = jiraIntegrationsIndexed.concat(
zendeskIntegrationsIndexed
);
setAllIntegrationsIndexed(
combineDataSets?.map((integration, index) => {
return { ...integration, dropdownIndex: index };
})
);
}
}, [
jiraIntegrationsIndexed,
zendeskIntegrationsIndexed,
setAllIntegrationsIndexed,
]);
useEffect(() => {
if (allIntegrationsIndexed) {
const currentSelectedIntegration = allIntegrationsIndexed.find(
(integration) => {
return integration.enable_software_vulnerabilities === true;
}
);
setSelectedIntegration(currentSelectedIntegration);
}
}, [allIntegrationsIndexed]);
const onAddIntegration = () => {
router.push(PATHS.ADMIN_INTEGRATIONS);
};
const onURLChange = (value: string) => {
setDestinationUrl(value);
};
const handleSaveAutomation = (evt: React.MouseEvent<HTMLFormElement>) => {
evt.preventDefault();
const {
valid: validWebhookUrl,
errors: errorsWebhookUrl,
} = validateWebhookURL(destinationUrl);
if (!validWebhookUrl) {
setErrors((prevErrs) => ({ ...prevErrs, ...errorsWebhookUrl }));
} else {
setErrors((prevErrs) => omit(prevErrs, "url"));
}
// Original config keys for software automation (webhook_settings, integrations)
const configSoftwareAutomations: ISoftwareAutomations = {
webhook_settings: {
vulnerabilities_webhook: {
destination_url: validWebhookUrl
? destinationUrl
: currentDestinationUrl, // if new destination url is not valid, revert to current destination url
enable_vulnerabilities_webhook: softwareVulnerabilityWebhookEnabled,
},
},
integrations: {
2022-05-11 02:33:30 +00:00
jira: integrations?.jira || [],
zendesk: integrations?.zendesk || [],
},
};
const readyForSubmission = (): boolean => {
if (!softwareAutomationsEnabled) {
2022-05-11 02:33:30 +00:00
// set enable_vulnerabilities_webhook
// jira.enable_software_vulnerabilities
// and zendesk.enable_software_vulnerabilities to false
configSoftwareAutomations.webhook_settings.vulnerabilities_webhook.enable_vulnerabilities_webhook = false;
const disableAllJira = configSoftwareAutomations.integrations.jira.map(
(integration) => {
return { ...integration, enable_software_vulnerabilities: false };
}
);
configSoftwareAutomations.integrations.jira = disableAllJira;
2022-05-11 02:33:30 +00:00
const disableAllZendesk = configSoftwareAutomations.integrations.zendesk.map(
(integration) => {
return {
...integration,
enable_software_vulnerabilities: false,
};
}
);
configSoftwareAutomations.integrations.zendesk = disableAllZendesk;
return true;
}
2022-05-11 02:33:30 +00:00
if (!integrationEnabled) {
if (!isEmpty(errorsWebhookUrl)) {
return false;
}
2022-05-11 02:33:30 +00:00
// set enable_vulnerabilities_webhook to true
// all jira.enable_software_vulnerabilities to false
// all zendesk.enable_software_vulnerabilities to false
configSoftwareAutomations.webhook_settings.vulnerabilities_webhook.enable_vulnerabilities_webhook = true;
const disableAllJira = configSoftwareAutomations.integrations.jira.map(
(integration) => {
return {
...integration,
enable_software_vulnerabilities: false,
};
}
);
configSoftwareAutomations.integrations.jira = disableAllJira;
2022-05-11 02:33:30 +00:00
const disableAllZendesk = configSoftwareAutomations.integrations.zendesk.map(
(integration) => {
return {
...integration,
enable_software_vulnerabilities: false,
};
}
);
configSoftwareAutomations.integrations.zendesk = disableAllZendesk;
return true;
}
2022-05-11 02:33:30 +00:00
// set enable_vulnerabilities_webhook to false
// all jira.enable_software_vulnerabilities to false
// all zendesk.enable_software_vulnerabilities to false
// except the one integration selected
configSoftwareAutomations.webhook_settings.vulnerabilities_webhook.enable_vulnerabilities_webhook = false;
const enableSelectedJiraIntegrationOnly = configSoftwareAutomations.integrations.jira.map(
(integration, index) => {
return {
...integration,
enable_software_vulnerabilities:
2022-05-11 02:33:30 +00:00
selectedIntegration?.type === "jira"
? index === selectedIntegration?.originalIndex
: false,
};
}
);
configSoftwareAutomations.integrations.jira = enableSelectedJiraIntegrationOnly;
2022-05-11 02:33:30 +00:00
const enableSelectedZendeskIntegrationOnly = configSoftwareAutomations.integrations.zendesk.map(
(integration, index) => {
return {
...integration,
enable_software_vulnerabilities:
selectedIntegration?.type === "zendesk"
? index === selectedIntegration?.originalIndex
: false,
};
}
);
configSoftwareAutomations.integrations.zendesk = enableSelectedZendeskIntegrationOnly;
return true;
};
if (!readyForSubmission()) {
return;
}
onCreateWebhookSubmit(configSoftwareAutomations);
onReturnToApp();
};
const createIntegrationDropdownOptions = () => {
2022-05-11 02:33:30 +00:00
const integrationOptions = allIntegrationsIndexed?.map((i) => {
return {
2022-05-11 02:33:30 +00:00
value: String(i.dropdownIndex),
label: `${i.url} - ${i.project_key || i.group_id}`,
};
});
return integrationOptions;
};
const onChangeSelectIntegration = (selectIntegrationIndex: string) => {
const integrationWithIndex:
2022-05-11 02:33:30 +00:00
| IIntegration
| undefined = allIntegrationsIndexed?.find(
(integ: IIntegration) =>
integ.dropdownIndex === parseInt(selectIntegrationIndex, 10)
);
setSelectedIntegration(integrationWithIndex);
};
2022-05-11 02:33:30 +00:00
const onRadioChange = (
enableIntegration: boolean
): ((evt: string) => void) => {
return () => {
2022-05-11 02:33:30 +00:00
setIntegrationEnabled(enableIntegration);
};
};
const renderTicket = () => {
return (
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
<>
<div className={`${baseClass}__software-automation-description`}>
{isFreeTier ? (
<>
A ticket will be created in your <b>Integration</b> for each
detected vulnerability (CVE).
</>
) : (
<>
A ticket will be created in your <b>Integration</b> if a detected
vulnerability (CVE) was published in the last{" "}
{recentVulnerabilityMaxAge ||
CONFIG_DEFAULT_RECENT_VULNERABILITY_MAX_AGE_IN_DAYS}{" "}
days.
</>
)}
</div>
2022-05-11 02:33:30 +00:00
{(jiraIntegrationsIndexed && jiraIntegrationsIndexed.length > 0) ||
(zendeskIntegrationsIndexed &&
zendeskIntegrationsIndexed.length > 0) ? (
<Dropdown
disabled={gitOpsModeEnabled}
searchable
options={createIntegrationDropdownOptions()}
onChange={onChangeSelectIntegration}
placeholder="Select integration"
2022-05-11 02:33:30 +00:00
value={selectedIntegration?.dropdownIndex}
label="Integration"
wrapperClassName={`${baseClass}__form-field ${baseClass}__form-field--frequency`}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
helpText="For each new vulnerability detected, Fleet will create a ticket with a list of the affected hosts."
/>
) : (
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
<div className={`form-field ${baseClass}__no-integrations`}>
<div className="form-field__label">You have no integrations.</div>
<div>
<Button
onClick={onAddIntegration}
disabled={gitOpsModeEnabled || !softwareAutomationsEnabled} // Not keyboard accessible if modal is disabled
>
Add integration
</Button>
</div>
</div>
)}
{!!selectedIntegration && (
<Button
type="button"
2025-09-29 17:10:41 +00:00
variant="inverse"
onClick={togglePreviewTicketModal}
>
Preview ticket
</Button>
)}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
</>
);
};
const renderWebhook = () => {
return (
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
<>
<div className={`${baseClass}__software-automation-description`}>
<p>
{isFreeTier ? (
<>
A request will be sent to your configured <b>Destination URL</b>{" "}
for each detected vulnerability (CVE).
</>
) : (
<>
A request will be sent to your configured <b>Destination URL</b>{" "}
if a detected vulnerability (CVE) was published in the last{" "}
{recentVulnerabilityMaxAge || "30"} days.
</>
)}
</p>
</div>
<InputField
inputWrapperClass={`${baseClass}__url-input`}
name="webhook-url"
label="Destination URL"
type="text"
value={destinationUrl}
onChange={onURLChange}
error={errors.url}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
helpText={
"For each new vulnerability detected, Fleet will send a JSON payload to this URL with a list of the affected hosts."
}
placeholder="https://server.com/example"
tooltip="Provide a URL to deliver a webhook request to."
disabled={!softwareAutomationsEnabled || gitOpsModeEnabled}
/>
<Button
type="button"
2025-09-29 17:10:41 +00:00
variant="inverse"
onClick={togglePreviewPayloadModal}
disabled={!softwareAutomationsEnabled}
>
Preview payload
</Button>
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
</>
);
};
if (showPreviewTicketModal && selectedIntegration?.type) {
return (
<PreviewTicketModal
integrationType={selectedIntegration.type}
onCancel={togglePreviewTicketModal}
/>
);
}
if (showPreviewPayloadModal) {
return <PreviewPayloadModal onCancel={togglePreviewPayloadModal} />;
}
UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
const renderSaveButton = () => {
const hasIntegrations = !(
((jiraIntegrationsIndexed && jiraIntegrationsIndexed.length === 0) ||
(zendeskIntegrationsIndexed &&
zendeskIntegrationsIndexed.length === 0)) &&
integrationEnabled &&
softwareAutomationsEnabled
);
const renderRawButton = (gomDisabled = false) => (
<TooltipWrapper
tipContent={
<>
Add an integration to create
<br /> tickets for vulnerability automations.
</>
}
disableTooltip={hasIntegrations || gomDisabled}
position="bottom"
underline={false}
showArrow
tipOffset={6}
>
<Button
type="submit"
onClick={handleSaveAutomation}
disabled={
(softwareAutomationsEnabled &&
integrationEnabled &&
!selectedIntegration) ||
(softwareAutomationsEnabled &&
!integrationEnabled &&
destinationUrl === "") ||
gomDisabled
}
>
Save
</Button>
</TooltipWrapper>
);
return (
<GitOpsModeTooltipWrapper
Remove UI gating in GitOps mode for excepted entities (#42486) <!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #42184 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [ ] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. - [ ] If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes ## Testing - [ ] Added/updated automated tests - [ ] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [ ] QA'd all new/changed functionality manually For unreleased bug fixes in a release candidate, one of: - [ ] Confirmed that the fix is not expected to adversely impact load test results - [ ] Alerted the release DRI if additional load testing is needed ## Database migrations - [ ] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [ ] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [ ] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). ## New Fleet configuration settings - [ ] Setting(s) is/are explicitly excluded from GitOps If you didn't check the box above, follow this checklist for GitOps-enabled settings: - [ ] Verified that the setting is exported via `fleetctl generate-gitops` - [ ] Verified the setting is documented in a separate PR to [the GitOps documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485) - [ ] Verified that the setting is cleared on the server if it is not supplied in a YAML file (or that it is documented as being optional) - [ ] Verified that any relevant UI is disabled when GitOps mode is enabled ## fleetd/orbit/Fleet Desktop - [ ] Verified compatibility with the latest released version of Fleet (see [Must rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)) - [ ] If the change applies to only one platform, confirmed that `runtime.GOOS` is used as needed to isolate changes - [ ] Verified that fleetd runs on macOS, Linux and Windows - [ ] Verified auto-update works from the released version of component to the new version (see [tools/tuf/test](../tools/tuf/test/README.md)) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added support for GitOps exceptions per entity type (labels, software, secrets), allowing specific areas to bypass GitOps mode restrictions when configured. * **Bug Fixes** * Improved GitOps mode behavior to properly respect per-entity-type exception settings across software, labels, and secrets management. * **Tests** * Extended test coverage for GitOps exception handling scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-31 14:10:56 +00:00
entityType="software"
UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
renderChildren={renderRawButton}
tipOffset={6}
/>
);
};
return (
<Modal
onExit={onReturnToApp}
title="Manage automations"
className={baseClass}
UI: Make all Modal widths consistent (#11722) ## Addresses #11356 Images of 3 fixed modals referenced in the issue: <img width="1235" alt="Screenshot 2023-05-12 at 4 11 52 PM" src="https://github.com/fleetdm/fleet/assets/61553566/098081c7-15d4-4009-92a0-7a2e14ffaab1"> <img width="1235" alt="Screenshot 2023-05-12 at 4 12 50 PM" src="https://github.com/fleetdm/fleet/assets/61553566/7d0f268d-f2dc-4686-a64d-94e28a94c717"> <img width="1235" alt="Screenshot 2023-05-12 at 4 13 26 PM" src="https://github.com/fleetdm/fleet/assets/61553566/d486b005-1344-4656-adec-c4929332816b"> ## Implemented: - [x] Updated global modal styles for consistency - [x] Add optional "width" prop to `Modal` - [x] Misc cleanup: - [x] Restore missing padding from inverse-alert buttons - [x] Improve naming, lots of cleanup - [x] More coming in separate PR - [x] Check each of the following modals, define `width` where necessary: - [x] Add hosts - [x] EnrollSecret - [x] Also fix misaligned icons - [x] SecretEditor - [x] DeleteSecret - [x] ShowQuery - [x] AddIntegration - [x] DeleteIntegration - [x] EditIntegration - [x] EditTeam - [x] RequestCSR - [x] HostStatusWebhook - [x] CreateTeam - [x] DeleteTeam - [x] EditTeam - [x] AddMember - [x] RemoveMember - [x] CreateUser - [x] DeleteUser - [x] EditUser - [x] Also fix randomly shorter 'Password' field - [x] ResetPassword - [x] ResetSessions - [x] WelcomeHost - [x] DeletHost - [x] TransferHost - [x] POlicyDetails - [x] AutoEnrollMdm - [x] Info - [x] ManualEnrollMdm - [x] ResetKey - [x] BootstrapPackage - [x] DiskEncryption - [x] OSPOlicy - [x] SelectQuery - [x] UnenrollMdm - [x] MacSettings - [x] DeleteLabel - [x] EditCOlumns - WIP, cannot QA yet (cc @ghernandez345): - DeleteScript - RerunScript - [x] DeleteProfile - [x] DeletePackage - allow to conform to default "m" width, 650px - [x] PackQueryEditor - allow to conform to default "m" width - [x] RemovePackQuery - allow to conform to default "m" width - [x] DeletePack - allow to conform to default "m" width - [x] AddPolicy - [x] DeletePolicy - allow to conform to default "m" width - [x] NewPolicy (now "SaveNewPolicyModal") - allow to conform to default "m" width - [x] DeleteQuery - [x] NewQuery - allow to conform to default "m" width - [x] PreviewData - [x] RemoveScheduledQuery - [x] ScheduleEditor - [x] UserSettingsPage (aka "get API token") - [x] 2 x ManageAutomations – set to large - [x] 2 x PreviewPayload - allow to conform to default "m" width - [x] 2 x PreviewTicket - same as ManageAutomations ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-05-17 17:07:38 +00:00
width="large"
>
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
<div className={`${baseClass} form`}>
<Slider
disabled={gitOpsModeEnabled}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
value={softwareAutomationsEnabled}
onChange={() =>
setSoftwareAutomationsEnabled(!softwareAutomationsEnabled)
}
inactiveText="Vulnerability automations disabled"
activeText="Vulnerability automations enabled"
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
/>
<div
className={`form ${baseClass}__software-automations${
softwareAutomationsEnabled ? "" : "__disabled"
}`}
>
<div className="form-field">
<div className="form-field__label">Workflow</div>
<Radio
className={`${baseClass}__radio-input`}
label="Ticket"
id="ticket-radio-btn"
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
checked={integrationEnabled}
value="ticket"
name="workflow-type"
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
onChange={onRadioChange(true)}
disabled={!softwareAutomationsEnabled || gitOpsModeEnabled}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
/>
<Radio
className={`${baseClass}__radio-input`}
label="Webhook"
id="webhook-radio-btn"
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
checked={!integrationEnabled}
value="webhook"
name="workflow-type"
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
onChange={onRadioChange(false)}
disabled={!softwareAutomationsEnabled || gitOpsModeEnabled}
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
/>
</div>
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
{integrationEnabled ? renderTicket() : renderWebhook()}
<p>
Vulnerability automations currently run for software
vulnerabilities. Interested in automations for OS vulnerabilities?{" "}
<CustomLink
url={SUPPORT_LINK}
text="Let us know"
newTab
disableKeyboardNavigation={!softwareAutomationsEnabled}
/>
</p>
</div>
<div className="modal-cta-wrap">
UI - GitOps Mode: Core abstractions, first batch of applications (#26401) ## For #26229 – Part 1 ![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562) - 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
{renderSaveButton()}
<Button onClick={onReturnToApp} variant="inverse">
Cancel
</Button>
</div>
UI – refactor forms and form fields (#16159) ## Addresses #15325 - Define shared global styles for forms (`form` and `.form`s) and `.form-field`s - Sweep through the app, updating each form from being locally styled to first prioritizing the global styles and only defining local styles where needed for custom behavior - Remove lots of unnecessary nesting of elements - Other small bug fixes and improvements ### Samples, before (L) | after (R): **Save query modal** ![Screenshot 2024-01-17 at 11 49 14 AM](https://github.com/fleetdm/fleet/assets/61553566/14f209fb-31db-41ef-8e63-e0d8994698c1) **Edit query form** ![Screenshot 2024-01-17 at 11 50 35 AM](https://github.com/fleetdm/fleet/assets/61553566/b07e70ea-3095-4e4f-be73-95a3c499839b) **Add hosts modal** ![Screenshot 2024-01-17 at 11 51 48 AM](https://github.com/fleetdm/fleet/assets/61553566/4ef1f410-a823-41d1-b2f6-ea8eb5231f93) ## QA Plan: @xpkoala here's the same list from the issue, freshly de-checked for you to use if it's helpful: * Please check error states of each field #### Specified by issue: ##### In "Save query" modal: - [ ] Reduce space between checkboxes and their help text to 8px/0.5rem for the following fields: - [ ] Observers can run - [ ] Discard data - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Discard data ##### On "Edit query" page: - [ ] Update the following checkbox labels to have normal font weight (not bold): - [ ] Observers can run - [ ] Discard data ##### In "Add hosts" modal, for copy text fields: - [ ] match typical form form field styles - [ ] Adjust the positioning of the copy icon to keep it from being too far down ##### Further locations to check - [ ] ChangeEmailForm.jsx - [ ] ChangePasswordForm.jsx - [ ] ConfirmInviteForm.jsx - [ ] ConfirmSSOInviteForm.jsx - [ ] EnrollSecretModal.tsx - [ ] ForgotPasswordForm.jsx - [ ] LoginForm.tsx - [ ] EditPackForm.tsx - [ ] (New)PackForm.tsx - [ ] AdminDetails.jsx - [ ] ConfirmationPage.tsx - [ ] FleetDetails.jsx - [ ] OrgDetails.jsx - [ ] ResetPasswordForm.tsx - [ ] UserSettingsForm.jsx - [ ] EditTeamModal.tsx - [ ] IdpSection.tsx - [ ] DeleteIntegrationModal.tsx - [ ] IntegrationForm.tsx - [ ] EndUserMigrationSection.tsx - [ ] RequestCSRModal.tsx - [ ] Advanced.tsx - [ ] Agents.tsx - [ ] FleetDesktop.tsx - [ ] HostStatusWebhook.tsx front - [ ] Info.tsx - [ ] Smtp.tsx - [ ] Sso.tsx - [ ] Statistics.tsx - [ ] WebAddress.tsx - [ ] CreateTeamModal.tsx - [ ] DeleteTeamModal.tsx - [ ] EditTeamModal.tsx - [ ] AgentOptionsPage.tsx - updated the layout of this page to align with the rest of the forms in the UI – can easily revert if it's not what we want - [ ] AddMemberModal.tsx - [ ] RemoveMemberModal.tsx - [ ] UserForm.tsx - Used by both `EditUserModal` and `CreateUserModal` - A few different conditions that cause different rendering behavior - [ ] DeleteHostModal.tsx - [ ] TransferHostModal.tsx - [ ] LabelForm.tsx - [ ] MacOSTargetForm.tsx - [ ] WindowsTargetForm.tsx - [ ] BootstrapPackageListltem.ts - [ ] EndUserAuthForm.tsx - [ ] PackQueryEditorModal.tsx - [ ] PolicyForm.tsx - [ ] SaveNewPolicyModal.tsx - [ ] ConfirmSaveChangesModal.tsx - [ ] Query automations modal - [ ] Policy automations modal - addresses #16010 - [ ] SoftwareAutomationsModal ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-01-18 15:48:44 +00:00
</div>
</Modal>
);
};
export default ManageAutomationsModal;