add angular + translations
This commit is contained in:
@@ -18,6 +18,10 @@ pluginMetaV0Alpha1: {
|
||||
type?: "grafana" | "commercial" | "community" | "private" | "private-glob"
|
||||
org?: string
|
||||
}
|
||||
angular?: {
|
||||
detected: bool
|
||||
}
|
||||
translations?: [string]: string
|
||||
// +listType=atomic
|
||||
children?: [...string]
|
||||
}
|
||||
|
||||
+16
-4
@@ -207,10 +207,12 @@ func NewPluginMetaExtensions() *PluginMetaExtensions {
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginMetaSpec struct {
|
||||
PluginJson PluginMetaJSONData `json:"pluginJson"`
|
||||
Module *PluginMetaV0alpha1SpecModule `json:"module,omitempty"`
|
||||
BaseURL *string `json:"baseURL,omitempty"`
|
||||
Signature *PluginMetaV0alpha1SpecSignature `json:"signature,omitempty"`
|
||||
PluginJson PluginMetaJSONData `json:"pluginJson"`
|
||||
Module *PluginMetaV0alpha1SpecModule `json:"module,omitempty"`
|
||||
BaseURL *string `json:"baseURL,omitempty"`
|
||||
Signature *PluginMetaV0alpha1SpecSignature `json:"signature,omitempty"`
|
||||
Angular *PluginMetaV0alpha1SpecAngular `json:"angular,omitempty"`
|
||||
Translations map[string]string `json:"translations,omitempty"`
|
||||
// +listType=atomic
|
||||
Children []string `json:"children,omitempty"`
|
||||
}
|
||||
@@ -440,6 +442,16 @@ func NewPluginMetaV0alpha1SpecSignature() *PluginMetaV0alpha1SpecSignature {
|
||||
return &PluginMetaV0alpha1SpecSignature{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginMetaV0alpha1SpecAngular struct {
|
||||
Detected bool `json:"detected"`
|
||||
}
|
||||
|
||||
// NewPluginMetaV0alpha1SpecAngular creates a new PluginMetaV0alpha1SpecAngular object.
|
||||
func NewPluginMetaV0alpha1SpecAngular() *PluginMetaV0alpha1SpecAngular {
|
||||
return &PluginMetaV0alpha1SpecAngular{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginMetaJSONDataType string
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -121,6 +121,11 @@ func (p *CloudProvider) GetMeta(ctx context.Context, pluginID, version string) (
|
||||
spec.Signature = signature
|
||||
}
|
||||
|
||||
// Set angular info
|
||||
spec.Angular = &pluginsv0alpha1.PluginMetaV0alpha1SpecAngular{
|
||||
Detected: gcomMeta.AngularDetected,
|
||||
}
|
||||
|
||||
return &Result{
|
||||
Meta: spec,
|
||||
TTL: p.ttl,
|
||||
|
||||
@@ -537,6 +537,14 @@ func pluginStorePluginToPluginMetaSpec(plugin pluginstore.Plugin, loadingStrateg
|
||||
spec.Children = plugin.Children
|
||||
}
|
||||
|
||||
spec.Angular = &pluginsv0alpha1.PluginMetaV0alpha1SpecAngular{
|
||||
Detected: plugin.Angular.Detected,
|
||||
}
|
||||
|
||||
if len(plugin.Translations) > 0 {
|
||||
spec.Translations = plugin.Translations
|
||||
}
|
||||
|
||||
return spec
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user