mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Move fleet_maintained_app_id from title level to package level in software title list endpoint (#29033)
For #29032. - [x] If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes - [x] Manual QA for all new/changed functionality - [x] For unreleased bug fixes in a release candidate, confirmed that the fix is not expected to adversely impact load test results or alerted the release DRI if additional load testing is needed.
This commit is contained in:
parent
d4d4a662e2
commit
4b9774d49e
3 changed files with 14 additions and 12 deletions
|
|
@ -130,6 +130,7 @@ func (ds *Datastore) ListSoftwareTitles(
|
|||
VPPAppPlatform *string `db:"vpp_app_platform"`
|
||||
VPPAppIconURL *string `db:"vpp_app_icon_url"`
|
||||
VPPInstallDuringSetup *bool `db:"vpp_install_during_setup"`
|
||||
FleetMaintainedAppID *uint `db:"fleet_maintained_app_id"`
|
||||
}
|
||||
var softwareList []*softwareTitle
|
||||
getTitlesStmt, args = appendListOptionsWithCursorToSQL(getTitlesStmt, args, &opt.ListOptions)
|
||||
|
|
@ -157,7 +158,7 @@ func (ds *Datastore) ListSoftwareTitles(
|
|||
// build an index to quickly access a title by its ID
|
||||
titleIndex := make(map[uint]int, len(softwareList))
|
||||
for i, title := range softwareList {
|
||||
// promote the package name and version to the proper destination fields
|
||||
// promote software installer properties to their proper destination fields
|
||||
if title.PackageName != nil {
|
||||
var version string
|
||||
if title.PackageVersion != nil {
|
||||
|
|
@ -169,12 +170,13 @@ func (ds *Datastore) ListSoftwareTitles(
|
|||
}
|
||||
|
||||
title.SoftwarePackage = &fleet.SoftwarePackageOrApp{
|
||||
Name: *title.PackageName,
|
||||
Version: version,
|
||||
Platform: platform,
|
||||
SelfService: title.PackageSelfService,
|
||||
PackageURL: title.PackageURL,
|
||||
InstallDuringSetup: title.PackageInstallDuringSetup,
|
||||
Name: *title.PackageName,
|
||||
Version: version,
|
||||
Platform: platform,
|
||||
SelfService: title.PackageSelfService,
|
||||
PackageURL: title.PackageURL,
|
||||
InstallDuringSetup: title.PackageInstallDuringSetup,
|
||||
FleetMaintainedAppID: title.FleetMaintainedAppID,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -239,9 +239,8 @@ type SoftwareTitleListResult struct {
|
|||
// BundleIdentifier is used by Apple installers to uniquely identify
|
||||
// the software installed. It's surfaced in software_titles to match
|
||||
// with existing software entries.
|
||||
BundleIdentifier *string `json:"bundle_identifier,omitempty" db:"bundle_identifier"`
|
||||
HashSHA256 *string `json:"hash_sha256,omitempty" db:"package_storage_id"`
|
||||
FleetMaintainedAppID *uint `json:"fleet_maintained_app_id,omitempty" db:"fleet_maintained_app_id"`
|
||||
BundleIdentifier *string `json:"bundle_identifier,omitempty" db:"bundle_identifier"`
|
||||
HashSHA256 *string `json:"hash_sha256,omitempty" db:"package_storage_id"`
|
||||
}
|
||||
|
||||
type SoftwareTitleListOptions struct {
|
||||
|
|
|
|||
|
|
@ -532,8 +532,9 @@ type SoftwarePackageOrApp struct {
|
|||
PackageURL *string `json:"package_url"`
|
||||
// InstallDuringSetup is a boolean that indicates if the package
|
||||
// will be installed during the macos setup experience.
|
||||
InstallDuringSetup *bool `json:"install_during_setup,omitempty" db:"install_during_setup"`
|
||||
Categories []string `json:"categories,omitempty"`
|
||||
InstallDuringSetup *bool `json:"install_during_setup,omitempty" db:"install_during_setup"`
|
||||
FleetMaintainedAppID *uint `json:"fleet_maintained_app_id,omitempty" db:"fleet_maintained_app_id"`
|
||||
Categories []string `json:"categories,omitempty"`
|
||||
}
|
||||
|
||||
type SoftwarePackageSpec struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue