diff --git a/frontend/components/PlatformSelector/PlatformSelector.tsx b/frontend/components/PlatformSelector/PlatformSelector.tsx
index 3eb907f9b2ea..6f87dd236841 100644
--- a/frontend/components/PlatformSelector/PlatformSelector.tsx
+++ b/frontend/components/PlatformSelector/PlatformSelector.tsx
@@ -71,8 +71,9 @@ export const PlatformSelector = ({
- To apply the profile to new hosts, you'll have to delete it and
- upload a new profile.
+ Your policy will only run on the selected platform(s). Additionally, if
+ install software automation is enabled, it will only be installed on
+ hosts defined in the software scope.
);
diff --git a/frontend/interfaces/software.ts b/frontend/interfaces/software.ts
index 5f8797f27fb3..99470e4585df 100644
--- a/frontend/interfaces/software.ts
+++ b/frontend/interfaces/software.ts
@@ -82,7 +82,7 @@ export interface ISoftwarePackage {
pending_uninstall: number;
failed_uninstall: number;
};
- automatic_install_policies?: ISoftwarePackagePolicy[];
+ automatic_install_policies?: ISoftwarePackagePolicy[] | null;
install_during_setup?: boolean;
labels_include_any: ILabelSoftwareTitle[] | null;
labels_exclude_any: ILabelSoftwareTitle[] | null;
diff --git a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ConfirmSaveChangesModal/ConfirmSaveChangesModal.tsx b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ConfirmSaveChangesModal/ConfirmSaveChangesModal.tsx
index d164f8dd8b89..ecc4bc8f8832 100644
--- a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ConfirmSaveChangesModal/ConfirmSaveChangesModal.tsx
+++ b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ConfirmSaveChangesModal/ConfirmSaveChangesModal.tsx
@@ -3,8 +3,6 @@ import React from "react";
import Button from "components/buttons/Button";
import Modal from "components/Modal";
-import { IPackageFormData } from "pages/SoftwarePage/components/PackageForm/PackageForm";
-
const baseClass = "save-changes-modal";
export interface IConfirmSaveChangesModalProps {
@@ -38,7 +36,7 @@ const ConfirmSaveChangesModal = ({
{warningText}
Installs or uninstalls currently running on a host will still
- complete, but results won’t appear in Fleet.
+ complete, but results won't appear in Fleet.
You cannot undo this action.
diff --git a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/EditSoftwareModal.tsx b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/EditSoftwareModal.tsx
index 98f2ee9bc69e..a7c69196906d 100644
--- a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/EditSoftwareModal.tsx
+++ b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/EditSoftwareModal.tsx
@@ -24,6 +24,7 @@ import { IPackageFormData } from "pages/SoftwarePage/components/PackageForm/Pack
import {
generateSelectedLabels,
getCustomTarget,
+ getInstallType,
getTargetType,
} from "pages/SoftwarePage/components/PackageForm/helpers";
@@ -70,11 +71,7 @@ const EditSoftwareModal = ({
});
const [uploadProgress, setUploadProgress] = useState(0);
- const {
- data: labels,
- isLoading: isLoadingLabels,
- isError: isErrorLabels,
- } = useQuery
(
+ const { data: labels } = useQuery(
["custom_labels"],
() => labelsAPI.summary().then((res) => getCustomLabels(res.labels)),
{
@@ -178,6 +175,7 @@ const EditSoftwareModal = ({
postInstallScript: software.post_install_script || "",
uninstallScript: software.uninstall_script || "",
selfService: software.self_service || false,
+ installType: getInstallType(software),
targetType: getTargetType(software),
customTarget: getCustomTarget(software),
labelTargets: generateSelectedLabels(software),
diff --git a/frontend/pages/SoftwarePage/components/PackageForm/helpers.tsx b/frontend/pages/SoftwarePage/components/PackageForm/helpers.tsx
index b1b87262f698..8b18db4308eb 100644
--- a/frontend/pages/SoftwarePage/components/PackageForm/helpers.tsx
+++ b/frontend/pages/SoftwarePage/components/PackageForm/helpers.tsx
@@ -120,6 +120,10 @@ export const CUSTOM_TARGET_OPTIONS: IDropdownOption[] = [
},
];
+export const getInstallType = (softwarePackage: ISoftwarePackage) => {
+ return softwarePackage.automatic_install_policies ? "automatic" : "manual";
+};
+
export const getTargetType = (softwarePackage: ISoftwarePackage) => {
if (!softwarePackage) return "All hosts";
diff --git a/frontend/pages/hosts/ManageHostsPage/components/DeleteLabelModal/DeleteLabelModal.tsx b/frontend/pages/hosts/ManageHostsPage/components/DeleteLabelModal/DeleteLabelModal.tsx
index 8780026f1d1d..7bd4f7753186 100644
--- a/frontend/pages/hosts/ManageHostsPage/components/DeleteLabelModal/DeleteLabelModal.tsx
+++ b/frontend/pages/hosts/ManageHostsPage/components/DeleteLabelModal/DeleteLabelModal.tsx
@@ -26,11 +26,13 @@ const DeleteLabelModal = ({
<>
If a configuration profile uses this label as a custom target, the
- profile will break: it won't be applied to new hosts.
+ profile will break. After deleting the label, remove broken profiles
+ and upload new profiles in their place.
- To apply the profile to new hosts, you'll have to delete it and
- upload a new profile.
+ If software uses this label as a custom target, the label will not be
+ able to be deleted. Please remove the label from the software target
+ first before deleting.
{
if (hasStatusKey(error) && error.status === 422) {
return getErrorReason(error).includes("built-in")
? "Built-in labels can't be modified or deleted."
- : "Couldn't delete. Software uses this label as a custom target. Please delete the software and try again.";
+ : "Couldn't delete. Software uses this label as a custom target. Remove the label from the software target and try again.";
}
return "Could not delete label. Please try again.";