mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Fleet UI: Clean up Policies > Manage automation > Software options .tar.gz / missing version (#28770)
This commit is contained in:
parent
db5444d6cd
commit
38c84be9b1
1 changed files with 11 additions and 4 deletions
|
|
@ -13,6 +13,7 @@ import { IPaginatedListHandle } from "components/PaginatedList";
|
|||
|
||||
import { DEFAULT_USE_QUERY_OPTIONS } from "utilities/constants";
|
||||
import { getPathWithQueryParams } from "utilities/url";
|
||||
import { getExtensionFromFileName } from "utilities/file/fileUtils";
|
||||
|
||||
// @ts-ignore
|
||||
import Dropdown from "components/forms/fields/Dropdown";
|
||||
|
|
@ -64,15 +65,17 @@ const generateSoftwareOptionHelpText = (title: IEnhancedSoftwareTitle) => {
|
|||
let versionString = "";
|
||||
|
||||
if (vppOption) {
|
||||
platformString = "macOS (App Store) • ";
|
||||
platformString = "macOS (App Store)";
|
||||
versionString = title.app_store_app?.version || "";
|
||||
} else {
|
||||
if (title.platform && title.extension) {
|
||||
platformString = `${PLATFORM_DISPLAY_NAMES[title.platform]} (.${
|
||||
title.extension
|
||||
}) • `;
|
||||
})`;
|
||||
}
|
||||
versionString = title.software_package?.version || "";
|
||||
versionString = title.software_package?.version
|
||||
? ` • ${title.software_package?.version}`
|
||||
: "";
|
||||
}
|
||||
|
||||
return `${platformString}${versionString}`;
|
||||
|
|
@ -115,7 +118,11 @@ const InstallSoftwareModal = ({
|
|||
{
|
||||
select: (data): IEnhancedSoftwareTitle[] =>
|
||||
data.software_titles.map((title) => {
|
||||
const extension = title.software_package?.name.split(".").pop();
|
||||
const extension =
|
||||
(title.software_package &&
|
||||
getExtensionFromFileName(title.software_package?.name)) ||
|
||||
undefined;
|
||||
|
||||
return {
|
||||
...title,
|
||||
platform: formatSoftwarePlatform(title.source),
|
||||
|
|
|
|||
Loading…
Reference in a new issue