Skip to content

Commit

Permalink
allow inserting/overriding remote config
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Apr 25, 2024
1 parent bef4aa7 commit 122e459
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cmd/ui/extensions/install/install.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ func NewCmdInstall(f *cmdutil.Factory) *CmdInstall {
$ c8y ui extensions install --application devicemanagement --update-versions
Update to the latest versions for all of the existing UI extensions that are installed in the application
$ c8y ui extensions install --application devicemanagement --extension myext --template "{config+:{remotes+:{'[email protected]':[]}}}"
Install myext via a lookup and add manual configuration using templates (for power users only!)
`),
PreRunE: func(cmd *cobra.Command, args []string) error {
return f.UpdateModeEnabled()
Expand Down Expand Up @@ -255,6 +258,9 @@ func (n *CmdInstall) RunE(cmd *cobra.Command, args []string) error {
body = mapbuilder.NewMapBuilderWithInit([]byte(app.Get("config").Str))
}

// Allow the template values to override values provided by the --extension flags
body.SetAppendTemplatePreference(true)

body.Set("id", app.Get("id").String())
body.Set("config.remotes", formatApplicationRemotes(remotes))

Expand Down

0 comments on commit 122e459

Please sign in to comment.