Add apiVersion to plugin models (#87510)
This commit is contained in:
@@ -840,6 +840,7 @@ func (hs *HTTPServer) convertModelToDtos(ctx context.Context, ds *datasources.Da
|
||||
SecureJsonFields: map[string]bool{},
|
||||
Version: ds.Version,
|
||||
ReadOnly: ds.ReadOnly,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
|
||||
if hs.pluginStore != nil {
|
||||
|
||||
@@ -28,6 +28,8 @@ type DataSource struct {
|
||||
Version int `json:"version"`
|
||||
ReadOnly bool `json:"readOnly"`
|
||||
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
|
||||
// swagger:ignore
|
||||
APIVersion string `json:"apiVersion"`
|
||||
}
|
||||
|
||||
type DataSourceListItemDTO struct {
|
||||
|
||||
@@ -28,6 +28,7 @@ type PluginSetting struct {
|
||||
SignatureType plugins.SignatureType `json:"signatureType"`
|
||||
SignatureOrg string `json:"signatureOrg"`
|
||||
AngularDetected bool `json:"angularDetected"`
|
||||
APIVersion string `json:"apiVersion"`
|
||||
}
|
||||
|
||||
type PluginListItem struct {
|
||||
@@ -49,6 +50,7 @@ type PluginListItem struct {
|
||||
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
|
||||
AngularDetected bool `json:"angularDetected"`
|
||||
IAM *pfs.IAM `json:"iam,omitempty"`
|
||||
APIVersion string `json:"apiVersion"`
|
||||
}
|
||||
|
||||
type PluginList []PluginListItem
|
||||
|
||||
@@ -142,6 +142,7 @@ func (hs *HTTPServer) GetPluginList(c *contextmodel.ReqContext) response.Respons
|
||||
SignatureOrg: pluginDef.SignatureOrg,
|
||||
AccessControl: pluginsMetadata[pluginDef.ID],
|
||||
AngularDetected: pluginDef.Angular.Detected,
|
||||
APIVersion: pluginDef.APIVersion,
|
||||
}
|
||||
|
||||
if hs.Features.IsEnabled(c.Req.Context(), featuremgmt.FlagExternalServiceAccounts) {
|
||||
@@ -208,6 +209,7 @@ func (hs *HTTPServer) GetPluginSettingByID(c *contextmodel.ReqContext) response.
|
||||
SignatureOrg: plugin.SignatureOrg,
|
||||
SecureJsonFields: map[string]bool{},
|
||||
AngularDetected: plugin.Angular.Detected,
|
||||
APIVersion: plugin.APIVersion,
|
||||
}
|
||||
|
||||
if plugin.IsApp() {
|
||||
|
||||
Reference in New Issue
Block a user