mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Rename "marketplace" app to "catalog" (#34149)
This commit is contained in:
@@ -284,7 +284,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
apiRoute.Any("/plugins/:pluginId/resources/*", hs.CallResource)
|
||||
apiRoute.Get("/plugins/errors", routing.Wrap(hs.GetPluginErrorsList))
|
||||
|
||||
if hs.Cfg.MarketplaceAppEnabled {
|
||||
if hs.Cfg.CatalogAppEnabled {
|
||||
apiRoute.Group("/plugins", func(pluginRoute routing.RouteRegister) {
|
||||
pluginRoute.Post("/:pluginId/install", bind(dtos.InstallPluginCommand{}), routing.Wrap(hs.InstallPlugin))
|
||||
pluginRoute.Post("/:pluginId/uninstall", routing.Wrap(hs.UninstallPlugin))
|
||||
|
||||
@@ -242,7 +242,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
"rendererAvailable": hs.RenderService.IsAvailable(),
|
||||
"http2Enabled": hs.Cfg.Protocol == setting.HTTP2Scheme,
|
||||
"sentry": hs.Cfg.Sentry,
|
||||
"marketplaceUrl": hs.Cfg.MarketplaceURL,
|
||||
"catalogUrl": hs.Cfg.CatalogURL,
|
||||
"expressionsEnabled": hs.Cfg.ExpressionsEnabled,
|
||||
"awsAllowedAuthProviders": hs.Cfg.AWSAllowedAuthProviders,
|
||||
"awsAssumeRoleEnabled": hs.Cfg.AWSAssumeRoleEnabled,
|
||||
|
||||
@@ -475,8 +475,8 @@ func verifyBundledPluginCatalogue(t *testing.T, pm *PluginManager) {
|
||||
t.Helper()
|
||||
|
||||
bundledPlugins := map[string]string{
|
||||
"input": "input-datasource",
|
||||
"grafana-marketplace-app": "marketplace-app",
|
||||
"input": "input-datasource",
|
||||
"grafana-plugin-catalog-app": "plugin-catalog-app",
|
||||
}
|
||||
|
||||
for pluginID, pluginDir := range bundledPlugins {
|
||||
@@ -489,7 +489,7 @@ func verifyBundledPluginCatalogue(t *testing.T, pm *PluginManager) {
|
||||
}
|
||||
|
||||
assert.NotNil(t, pm.dataSources["input"])
|
||||
assert.NotNil(t, pm.apps["grafana-marketplace-app"])
|
||||
assert.NotNil(t, pm.apps["grafana-plugin-catalog-app"])
|
||||
}
|
||||
|
||||
type fakeBackendPluginManager struct {
|
||||
|
||||
@@ -256,8 +256,8 @@ type Cfg struct {
|
||||
PluginsAppsSkipVerifyTLS bool
|
||||
PluginSettings PluginSettings
|
||||
PluginsAllowUnsigned []string
|
||||
MarketplaceURL string
|
||||
MarketplaceAppEnabled bool
|
||||
CatalogURL string
|
||||
CatalogAppEnabled bool
|
||||
DisableSanitizeHtml bool
|
||||
EnterpriseLicensePath string
|
||||
|
||||
@@ -890,8 +890,8 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
plug = strings.TrimSpace(plug)
|
||||
cfg.PluginsAllowUnsigned = append(cfg.PluginsAllowUnsigned, plug)
|
||||
}
|
||||
cfg.MarketplaceURL = pluginsSection.Key("marketplace_url").MustString("https://grafana.com/grafana/plugins/")
|
||||
cfg.MarketplaceAppEnabled = pluginsSection.Key("marketplace_app_enabled").MustBool(false)
|
||||
cfg.CatalogURL = pluginsSection.Key("catalog_url").MustString("https://grafana.com/grafana/plugins/")
|
||||
cfg.CatalogAppEnabled = pluginsSection.Key("catalog_app_enabled").MustBool(false)
|
||||
|
||||
// Read and populate feature toggles list
|
||||
featureTogglesSection := iniFile.Section("feature_toggles")
|
||||
|
||||
@@ -26,7 +26,7 @@ const (
|
||||
|
||||
func TestPluginInstallAccess(t *testing.T) {
|
||||
dir, cfgPath := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
|
||||
MarketplaceAppEnabled: true,
|
||||
CatalogAppEnabled: true,
|
||||
})
|
||||
store := testinfra.SetUpDatabase(t, dir)
|
||||
store.Bus = bus.GetBus() // in order to allow successful user auth
|
||||
|
||||
@@ -233,10 +233,10 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
|
||||
_, err = anonSect.NewKey("enabled", "false")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
if o.MarketplaceAppEnabled {
|
||||
if o.CatalogAppEnabled {
|
||||
anonSect, err := cfg.NewSection("plugins")
|
||||
require.NoError(t, err)
|
||||
_, err = anonSect.NewKey("marketplace_app_enabled", "true")
|
||||
_, err = anonSect.NewKey("catalog_app_enabled", "true")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
@@ -252,10 +252,10 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
|
||||
}
|
||||
|
||||
type GrafanaOpts struct {
|
||||
EnableCSP bool
|
||||
EnableFeatureToggles []string
|
||||
AnonymousUserRole models.RoleType
|
||||
EnableQuota bool
|
||||
DisableAnonymous bool
|
||||
MarketplaceAppEnabled bool
|
||||
EnableCSP bool
|
||||
EnableFeatureToggles []string
|
||||
AnonymousUserRole models.RoleType
|
||||
EnableQuota bool
|
||||
DisableAnonymous bool
|
||||
CatalogAppEnabled bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user