Skip to content

Commit b29233b

Browse files
committed
Fleet UI: unreleased more display_name instances, click tooltip, display_name from right nesting... (#35668)
1 parent b52d3fe commit b29233b

File tree

17 files changed

+57
-24
lines changed

17 files changed

+57
-24
lines changed

frontend/components/PlatformSelector/PlatformSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const PlatformSelector = ({
4747
if (!installSoftware) {
4848
return null;
4949
}
50-
const softwareName = installSoftware.name;
50+
const softwareName = installSoftware.display_name || installSoftware.name;
5151
const softwareId = installSoftware.software_title_id.toString();
5252
const softwareLink = getPathWithQueryParams(
5353
paths.SOFTWARE_TITLE_DETAILS(softwareId),

frontend/components/TooltipWrapper/TooltipWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const TooltipWrapper = ({
100100
}
101101

102102
let delayHideVal;
103-
if (typeof delayHide === "boolean" && delayHide) {
103+
if ((typeof delayHide === "boolean" && delayHide) || clickable) {
104104
delayHideVal = DEFAULT_DELAY_MS;
105105
} else if (typeof delayHide === "number") {
106106
delayHideVal = delayHide;

frontend/components/forms/fields/Checkbox/Checkbox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const Checkbox = (props: ICheckboxProps) => {
129129
return (
130130
<TooltipWrapper
131131
tipContent={iconTooltipContent}
132-
clickable={false}
132+
clickable={labelTooltipClickable}
133133
underline={false}
134134
showArrow
135135
position="right"
@@ -149,7 +149,7 @@ const Checkbox = (props: ICheckboxProps) => {
149149
<span className={`${baseClass}__label-tooltip tooltip`}>
150150
<TooltipWrapper
151151
tipContent={labelTooltipContent}
152-
clickable={false} // Not block form behind tooltip
152+
clickable={labelTooltipClickable} // Allow interaction with link in tooltip
153153
>
154154
{children}
155155
</TooltipWrapper>

frontend/interfaces/activity.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ export interface IActivityDetails {
246246
software_package?: string;
247247
software_title_id?: number;
248248
software_title?: string;
249+
/** Custom name set per team by admin */
250+
software_display_name?: string;
249251
source?: SoftwareSource;
250252
specs?: IQuery[] | IPolicy[];
251253
stats?: ISchedulableQueryStats;

frontend/interfaces/policy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface IPolicy {
5151
}
5252
export interface IPolicySoftwareToInstall {
5353
name: string;
54+
display_name?: string;
5455
software_title_id: number;
5556
}
5657

frontend/interfaces/software.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface IGetSoftwareByIdResponse {
3535
export interface ISoftware {
3636
id: number;
3737
name: string; // e.g., "Figma.app"
38+
/** Custom name set per team by admin */
3839
display_name?: string; // e.g. "Figma for Desktop"
3940
version: string; // e.g., "2.1.11"
4041
bundle_identifier?: string | null; // e.g., "com.figma.Desktop"
@@ -91,6 +92,9 @@ export interface ISoftwareAppStoreAppStatus {
9192

9293
export interface ISoftwarePackage {
9394
name: string;
95+
/** Not included in SoftwareTitle software.software_package response, hoisted up one level
96+
* Custom name set per team by admin
97+
*/
9498
display_name?: string;
9599
title_id: number;
96100
url: string;
@@ -120,6 +124,9 @@ export const isSoftwarePackage = (
120124

121125
export interface IAppStoreApp {
122126
name: string;
127+
/** Not included in SoftwareTitle software.app_store_app response, hoisted up one level
128+
* Custom name set per team by admin
129+
*/
123130
display_name?: string;
124131
app_store_id: string; // API returns this as a string
125132
latest_version: string;
@@ -145,6 +152,7 @@ export interface IAppStoreApp {
145152
export interface ISoftwareTitle {
146153
id: number;
147154
name: string;
155+
/** Custom name set per team by admin */
148156
display_name?: string;
149157
icon_url: string | null;
150158
versions_count: number;
@@ -161,6 +169,7 @@ export interface ISoftwareTitle {
161169
export interface ISoftwareTitleDetails {
162170
id: number;
163171
name: string;
172+
/** Custom name set per team by admin */
164173
display_name?: string;
165174
icon_url: string | null;
166175
software_package: ISoftwarePackage | null;
@@ -191,6 +200,7 @@ export interface ISoftwareVulnerability {
191200
export interface ISoftwareVersion {
192201
id: number;
193202
name: string; // e.g., "Figma.app"
203+
/** Custom name set per team by admin */
194204
display_name?: string; // e.g. "Figma for Desktop"
195205
version: string; // e.g., "2.1.11"
196206
bundle_identifier?: string; // e.g., "com.figma.Desktop"
@@ -499,7 +509,6 @@ export interface ISoftwareInstallVersion {
499509

500510
export interface IHostSoftwarePackage {
501511
name: string;
502-
display_name?: string;
503512
self_service: boolean;
504513
icon_url: string | null;
505514
version: string;
@@ -511,7 +520,6 @@ export interface IHostSoftwarePackage {
511520
}
512521

513522
export interface IHostAppStoreApp {
514-
display_name?: string;
515523
app_store_id: string;
516524
self_service: boolean;
517525
icon_url: string;
@@ -523,8 +531,9 @@ export interface IHostAppStoreApp {
523531

524532
export interface IHostSoftware {
525533
id: number;
526-
name: string;
527-
display_name?: string;
534+
name: string; // e.g., "mock software.app"
535+
/** Custom name set per team by admin */
536+
display_name?: string; // e.g. "Mock Software"
528537
icon_url: string | null;
529538
software_package: IHostSoftwarePackage | null;
530539
app_store_app: IHostAppStoreApp | null;

frontend/pages/DashboardPage/cards/ActivityFeed/ActivityFeed.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ const ActivityFeed = ({
157157
case ActivityType.UninstalledSoftware:
158158
setPackageUninstallDetails({
159159
...details,
160-
softwareName: details?.software_title || "",
160+
softwareName:
161+
details?.software_display_name || details?.software_title || "",
161162
uninstallStatus: resolveUninstallStatus(details?.status),
162163
scriptExecutionId: details?.script_execution_id || "",
163164
hostDisplayName: details?.host_display_name,
@@ -282,7 +283,10 @@ const ActivityFeed = ({
282283
{ipaPackageInstallDetails && (
283284
<SoftwareIpaInstallDetailsModal
284285
details={{
285-
appName: ipaPackageInstallDetails.software_title || "",
286+
appName:
287+
ipaPackageInstallDetails.software_display_name ||
288+
ipaPackageInstallDetails.software_title ||
289+
"",
286290
fleetInstallStatus: (ipaPackageInstallDetails.status ||
287291
"pending_install") as SoftwareInstallUninstallStatus,
288292
hostDisplayName: ipaPackageInstallDetails.host_display_name || "",
@@ -301,7 +305,10 @@ const ActivityFeed = ({
301305
{vppInstallDetails && (
302306
<VppInstallDetailsModal
303307
details={{
304-
appName: vppInstallDetails.software_title || "",
308+
appName:
309+
vppInstallDetails.software_display_name ||
310+
vppInstallDetails.software_title ||
311+
"",
305312
fleetInstallStatus: (vppInstallDetails.status ||
306313
"pending_install") as SoftwareInstallUninstallStatus,
307314
hostDisplayName: vppInstallDetails.host_display_name || "",

frontend/pages/DashboardPage/cards/ActivityFeed/components/LibrarySoftwareDetailsModal/LibrarySoftwareDetailsModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ const LibrarySoftwareDetailsModal = ({
8888
>
8989
<>
9090
<div className={`${baseClass}__modal-content`}>
91-
<DataSet title="Name" value={details.software_title} />
91+
<DataSet
92+
title="Name"
93+
value={details.software_display_name || details.software_title}
94+
/>
9295
<DataSet title="Package name" value={details.software_package} />
9396
<DataSet
9497
title="Self-Service"

frontend/pages/DashboardPage/cards/ActivityFeed/components/VPPDetailsModal/VppDetailsModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ const VppDetailsModal = ({ details, onCancel }: IVppDetailsModalProps) => {
3030
>
3131
<>
3232
<div className={`${baseClass}__modal-content`}>
33-
<DataSet title="Name" value={details.software_title} />
33+
<DataSet
34+
title="Name"
35+
value={details.software_display_name || details.software_title}
36+
/>
3437
<DataSet title="App Store ID" value={details.app_store_id} />
3538
<DataSet
3639
title="Self-Service"

frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditIconModal/EditIconModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ const EditIconModal = ({
578578
</Card>
579579
);
580580

581-
console.log("EDIT ICON MODAL software", software);
582581
const renderForm = () => (
583582
<>
584583
<InputField

0 commit comments

Comments
 (0)