feat(apps): auto update dashboard dashboards, #5529

This commit is contained in:
Torkel Ödegaard
2016-07-07 18:11:03 +02:00
parent 4545b4d323
commit b62f1f00cd
6 changed files with 134 additions and 12 deletions

View File

@ -20,6 +20,7 @@ type PluginSetting struct {
Pinned bool
JsonData map[string]interface{}
SecureJsonData SecureJsonData
PluginVersion string
Created time.Time
Updated time.Time
@ -44,11 +45,19 @@ type UpdatePluginSettingCmd struct {
Pinned bool `json:"pinned"`
JsonData map[string]interface{} `json:"jsonData"`
SecureJsonData map[string]string `json:"secureJsonData"`
PluginVersion string `json:"version"`
PluginId string `json:"-"`
OrgId int64 `json:"-"`
}
// specific command, will only update version
type UpdatePluginSettingVersionCmd struct {
PluginVersion string
PluginId string `json:"-"`
OrgId int64 `json:"-"`
}
func (cmd *UpdatePluginSettingCmd) GetEncryptedJsonData() SecureJsonData {
encrypted := make(SecureJsonData)
for key, data := range cmd.SecureJsonData {
@ -65,10 +74,11 @@ type GetPluginSettingsQuery struct {
}
type PluginSettingInfoDTO struct {
OrgId int64
PluginId string
Enabled bool
Pinned bool
OrgId int64
PluginId string
Enabled bool
Pinned bool
PluginVersion string
}
type GetPluginSettingByIdQuery struct {