mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
use the right JSON structure for Nudge config (#10072)
This commit is contained in:
parent
cc4d6c9a2c
commit
16a724f067
1 changed files with 8 additions and 8 deletions
|
|
@ -12,7 +12,6 @@ type NudgeConfig struct {
|
|||
OSVersionRequirements []nudgeOSVersionRequirements `json:"osVersionRequirements"`
|
||||
UserInterface nudgeUserInterface `json:"userInterface"`
|
||||
UserExperience nudgeUserExperience `json:"userExperience"`
|
||||
UpdateElements []nudgeUpdateElements `json:"updateElements"`
|
||||
}
|
||||
|
||||
type nudgeAboutUpdateURLs struct {
|
||||
|
|
@ -27,8 +26,9 @@ type nudgeOSVersionRequirements struct {
|
|||
}
|
||||
|
||||
type nudgeUserInterface struct {
|
||||
SimpleMode bool `json:"simpleMode"`
|
||||
ShowDeferralCount bool `json:"showDeferralCount"`
|
||||
SimpleMode bool `json:"simpleMode"`
|
||||
ShowDeferralCount bool `json:"showDeferralCount"`
|
||||
UpdateElements []nudgeUpdateElements `json:"updateElements"`
|
||||
}
|
||||
|
||||
type nudgeUserExperience struct {
|
||||
|
|
@ -68,6 +68,11 @@ func NewNudgeConfig(macOSUpdates MacOSUpdates) (*NudgeConfig, error) {
|
|||
UserInterface: nudgeUserInterface{
|
||||
SimpleMode: true,
|
||||
ShowDeferralCount: false,
|
||||
UpdateElements: []nudgeUpdateElements{{
|
||||
Language: "en",
|
||||
ActionButtonText: "Update",
|
||||
MainHeader: "Your device requires an update",
|
||||
}},
|
||||
},
|
||||
UserExperience: nudgeUserExperience{
|
||||
/* Initially, we show Nudge once every 24 hours */
|
||||
|
|
@ -88,10 +93,5 @@ func NewNudgeConfig(macOSUpdates MacOSUpdates) (*NudgeConfig, error) {
|
|||
*/
|
||||
ElapsedRefreshCycle: 3600,
|
||||
},
|
||||
UpdateElements: []nudgeUpdateElements{{
|
||||
Language: "en",
|
||||
ActionButtonText: "Update",
|
||||
MainHeader: "Your device requires an update",
|
||||
}},
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue