-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow inserting/overriding remote config
- Loading branch information
1 parent
bef4aa7
commit 122e459
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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() | ||
|
@@ -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)) | ||
|
||
|