Chore: Rename "marketplace" app to "catalog" (#34149)
This commit is contained in:
1 parent
315ca109e1
commit
edcefe1c8e
52 files changed
+86
-94
No files matched your search
+2
-2
@@ -877,9 +877,9 @@ enable_alpha = false
|
||||
app_tls_skip_verify_insecure = false
|
||||
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
|
||||
allow_loading_unsigned_plugins =
|
||||
marketplace_url = https://grafana.com/grafana/plugins/
|
||||
catalog_url = https://grafana.com/grafana/plugins/
|
||||
# Enable or disable the Marketplace app which can be used to manage plugins from within Grafana.
|
||||
marketplace_app_enabled = false
|
||||
catalog_app_enabled = false
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
|
||||
+2
-2
@@ -863,9 +863,9 @@
|
||||
;app_tls_skip_verify_insecure = false
|
||||
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
|
||||
;allow_loading_unsigned_plugins =
|
||||
;marketplace_url = https://grafana.com/grafana/plugins/
|
||||
;catalog_url = https://grafana.com/grafana/plugins/
|
||||
# Enable or disable the Marketplace app which can be used to manage plugins from within Grafana.
|
||||
;marketplace_app_enabled = false
|
||||
;catalog_app_enabled = false
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
|
||||
@@ -1467,17 +1467,16 @@ Set to `true` if you want to test alpha plugins that are not yet ready for gener
|
||||
|
||||
Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
|
||||
|
||||
### marketplace_url
|
||||
### catalog_url
|
||||
|
||||
Custom install/learn more url for enterprise plugins. Defaults to https://grafana.com/grafana/plugins/.
|
||||
Custom install/learn more URL for enterprise plugins. Defaults to https://grafana.com/grafana/plugins/.
|
||||
|
||||
### marketplace_app_enabled
|
||||
### catalog_app_enabled
|
||||
|
||||
> **Note:** Available in Grafana 8.0 and later versions.
|
||||
|
||||
Available to Grafana administrators only, the plugin marketplace app is set to `false` by default. Set it to `true` to enable the app.
|
||||
Available to Grafana administrators only, the plugin catalog app is set to `false` by default. Set it to `true` to enable the app.
|
||||
|
||||
For more information, refer to [Plugin marketplace]({{< relref "../plugins/marketplace.md" >}}).
|
||||
For more information, refer to [Plugin catalog]({{< relref "../plugins/catalog.md" >}}).
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
+++
|
||||
title = "Plugin catalog"
|
||||
aliases = ["/docs/grafana/latest/plugins/catalog/"]
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Plugin catalog
|
||||
|
||||
Catalog for Grafana is a plugin bundled with Grafana versions 8.0+. It allows users to browse and manage plugins from within Grafana. Only Grafana Admins can access and use the Marketplace.
|
||||
|
||||
[screenshot placeholder]
|
||||
|
||||
To use the Catalog for Grafana, you first need to enable it in the Grafana [configuration]({{< relref "../administration/configuration.md#catalog_app_enabled" >}}).
|
||||
|
||||
## Install a plugin from the Catalog
|
||||
To install a plugin ...
|
||||
|
||||
### Updating a plugin
|
||||
To update a plugin ...
|
||||
|
||||
## Uninstall a plugin from the Catalog
|
||||
To uninstall a plugin ...
|
||||
@@ -23,7 +23,7 @@ Follow the instructions on the Install tab. You can either install the plugin wi
|
||||
|
||||
For more information about Grafana CLI plugin commands, refer to [Plugin commands]({{< relref "../administration/cli.md#plugins-commands" >}}).
|
||||
|
||||
As of Grafana v8.0, Marketplace for Grafana was introduced in order to make managing plugins easier. For more information, refer to [Plugin marketplace]({{< relref "./marketplace.md" >}}).
|
||||
As of Grafana v8.0, a plugin catalog app was introduced in order to make managing plugins easier. For more information, refer to [Plugin catalog]({{< relref "./catalog.md" >}}).
|
||||
|
||||
### Install a packaged plugin
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
+++
|
||||
title = "Plugin marketplace"
|
||||
aliases = ["/docs/grafana/latest/plugins/marketplace/"]
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Plugin marketplace
|
||||
|
||||
Marketplace for Grafana is a plugin bundled with Grafana versions 8.0+. It allows users to browse and manage plugins from within Grafana. Only Grafana Admins can access and use the Marketplace.
|
||||
|
||||
[screenshot placeholder]
|
||||
|
||||
To use the Marketplace for Grafana, you first need to enable it in the Grafana [configuration]({{< relref "../administration/configuration.md#marketplace_app_enabled" >}}).
|
||||
|
||||
## Install a plugin from the Marketplace
|
||||
To install a plugin ...
|
||||
|
||||
### Updating a plugin
|
||||
To update a plugin ...
|
||||
|
||||
## Uninstall a plugin from the Marketplace
|
||||
To uninstall a plugin ...
|
||||
@@ -74,9 +74,9 @@ Log navigation in Explore has been significantly improved. We added pagination t
|
||||
- Better Jaeger search in Explore
|
||||
- Show trace graph for Jaeger, Zipkin, and Tempo
|
||||
|
||||
### Plugin marketplace
|
||||
### Plugin catalog
|
||||
|
||||
You can now use the Plugin Marketplace app to easily manage your plugins from within Grafana. Install, update, and uninstall plugins without requiring a server restart.
|
||||
You can now use the Plugin catalog app to easily manage your plugins from within Grafana. Install, update, and uninstall plugins without requiring a server restart.
|
||||
|
||||
### Data source updates
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
|
||||
customEndpoint: '',
|
||||
sampleRate: 1,
|
||||
};
|
||||
marketplaceUrl?: string;
|
||||
catalogUrl?: string;
|
||||
expressionsEnabled = false;
|
||||
customTheme?: any;
|
||||
awsAllowedAuthProviders: string[] = [];
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export const API_ROOT = '/api/plugins';
|
||||
export const PLUGIN_ROOT = '/a/grafana-marketplace-app';
|
||||
export const GRAFANA_API_ROOT = '/api/gnet';
|
||||
File renamed without changes.
+3
-3
@@ -1,4 +1,4 @@
|
||||
# Marketplace for Grafana
|
||||
# Grafana plugin catalog
|
||||
|
||||
Browse and manage plugins from within Grafana.
|
||||
|
||||
@@ -8,7 +8,7 @@ Browse and manage plugins from within Grafana.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Navigate to **Configuration** -> **Plugins** and click on the Marketplace plugin in the list
|
||||
1. Navigate to **Configuration** -> **Plugins** and click on the Catalog plugin in the list
|
||||
1. Click the **Enable app** to enable the plugin
|
||||
1. Click the **Pin app** to add it to the side menu
|
||||
|
||||
@@ -18,4 +18,4 @@ Browse and manage plugins from within Grafana.
|
||||
| ------------------------- | ------------------------------------------------ |
|
||||
| _Enable app_ | Must be done before being able to use the plugin |
|
||||
| _Pin app_ | Add the app to the side menu |
|
||||
| _Show Enterprise plugins_ | Show Enterprise plugins in the marketplace |
|
||||
| _Show Enterprise plugins_ | Show Enterprise plugins in the catalog |
|
||||
File renamed without changes.
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@grafana-plugins/marketplace-app",
|
||||
"name": "@grafana-plugins/catalog-app",
|
||||
"version": "8.1.0-pre",
|
||||
"description": "Marketplace",
|
||||
"description": "Plugins catalog",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5
-4
@@ -1,20 +1,21 @@
|
||||
import React, { useState } from 'react';
|
||||
import { PluginConfigPageProps, AppPluginMeta, PluginMeta } from '@grafana/data';
|
||||
import { MarketplaceAppSettings } from 'types';
|
||||
import { CatalogAppSettings } from 'types';
|
||||
import { Button, Field, Legend, Switch } from '@grafana/ui';
|
||||
import { api } from '../api';
|
||||
import { PLUGIN_ID } from '../constants';
|
||||
|
||||
interface Props extends PluginConfigPageProps<AppPluginMeta<MarketplaceAppSettings>> {}
|
||||
interface Props extends PluginConfigPageProps<AppPluginMeta<CatalogAppSettings>> {}
|
||||
|
||||
export const Settings = ({ plugin }: Props) => {
|
||||
const [meta, setMeta] = useState(plugin.meta);
|
||||
const [state, setState] = useState<MarketplaceAppSettings>(meta.jsonData ?? {});
|
||||
const [state, setState] = useState<CatalogAppSettings>(meta.jsonData ?? {});
|
||||
|
||||
const { pinned, enabled } = meta;
|
||||
const { includeEnterprise } = state;
|
||||
|
||||
const onSave = () => {
|
||||
updateAndReload('grafana-marketplace-app', {
|
||||
updateAndReload(PLUGIN_ID, {
|
||||
pinned,
|
||||
enabled,
|
||||
jsonData: state,
|
||||
@@ -0,0 +1,4 @@
|
||||
export const API_ROOT = '/api/plugins';
|
||||
export const PLUGIN_ID = 'grafana-plugin-catalog-app';
|
||||
export const PLUGIN_ROOT = '/a/' + PLUGIN_ID;
|
||||
export const GRAFANA_API_ROOT = '/api/gnet';
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-3
@@ -3,13 +3,13 @@ import { ComponentClass } from 'react';
|
||||
import { AppPlugin, AppPluginMeta, AppRootProps, PluginConfigPageProps } from '@grafana/data';
|
||||
import { Settings } from './config/Settings';
|
||||
import { MarketplaceRootPage } from './RootPage';
|
||||
import { MarketplaceAppSettings } from './types';
|
||||
import { CatalogAppSettings } from './types';
|
||||
|
||||
export const plugin = new AppPlugin<MarketplaceAppSettings>()
|
||||
export const plugin = new AppPlugin<CatalogAppSettings>()
|
||||
.setRootPage((MarketplaceRootPage as unknown) as ComponentClass<AppRootProps>)
|
||||
.addConfigPage({
|
||||
title: 'Settings',
|
||||
icon: 'info-circle',
|
||||
body: (Settings as unknown) as ComponentClass<PluginConfigPageProps<AppPluginMeta<MarketplaceAppSettings>>>,
|
||||
body: (Settings as unknown) as ComponentClass<PluginConfigPageProps<AppPluginMeta<CatalogAppSettings>>>,
|
||||
id: 'settings',
|
||||
});
|
||||
+2
-2
@@ -8,12 +8,12 @@ import { SearchField } from '../components/SearchField';
|
||||
import { HorizontalGroup } from '../components/HorizontalGroup';
|
||||
import { usePlugins } from '../hooks/usePlugins';
|
||||
import { useHistory } from '../hooks/useHistory';
|
||||
import { MarketplaceAppSettings, Plugin } from '../types';
|
||||
import { CatalogAppSettings, Plugin } from '../types';
|
||||
import { Page } from 'components/Page';
|
||||
|
||||
export const Browse = ({ query, meta }: AppRootProps) => {
|
||||
const { q, filterBy, sortBy } = query;
|
||||
const { includeEnterprise } = meta.jsonData as MarketplaceAppSettings;
|
||||
const { includeEnterprise } = meta.jsonData as CatalogAppSettings;
|
||||
|
||||
const plugins = usePlugins(includeEnterprise);
|
||||
const history = useHistory();
|
||||
+2
-2
@@ -12,12 +12,12 @@ import { SearchField } from '../components/SearchField';
|
||||
import { PluginTypeIcon } from '../components/PluginTypeIcon';
|
||||
import { usePlugins } from '../hooks/usePlugins';
|
||||
import { useHistory } from '../hooks/useHistory';
|
||||
import { MarketplaceAppSettings, Plugin } from '../types';
|
||||
import { CatalogAppSettings, Plugin } from '../types';
|
||||
import { Page } from 'components/Page';
|
||||
import { Loader } from 'components/Loader';
|
||||
|
||||
export const Discover = ({ meta }: AppRootProps) => {
|
||||
const { includeEnterprise } = meta.jsonData as MarketplaceAppSettings;
|
||||
const { includeEnterprise } = meta.jsonData as CatalogAppSettings;
|
||||
|
||||
const { items, isLoading } = usePlugins(includeEnterprise);
|
||||
const history = useHistory();
|
||||
+1
-1
@@ -27,7 +27,7 @@ export const Library = () => {
|
||||
<p>
|
||||
You haven't installed any plugins. Browse the{' '}
|
||||
<a className={styles.link} href={`${PLUGIN_ROOT}/?tab=browse&sortBy=popularity`}>
|
||||
marketplace
|
||||
catalog
|
||||
</a>{' '}
|
||||
for plugins to install.
|
||||
</p>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+9
-18
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"$schema": "https://github.com/grafana/grafana/raw/master/docs/sources/developers/plugins/plugin.schema.json",
|
||||
"type": "app",
|
||||
"name": "Marketplace",
|
||||
"id": "grafana-marketplace-app",
|
||||
"name": "Plugin Catalog",
|
||||
"id": "grafana-plugin-catalog-app",
|
||||
"backend": false,
|
||||
"info": {
|
||||
"author": {
|
||||
@@ -14,16 +14,7 @@
|
||||
"small": "img/logo.svg",
|
||||
"large": "img/logo.svg"
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"name": "Website",
|
||||
"url": "https://github.com/grafana/marketplace-app"
|
||||
},
|
||||
{
|
||||
"name": "License",
|
||||
"url": "https://github.com/grafana/marketplace-app/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"screenshots": [
|
||||
{
|
||||
"name": "Discover",
|
||||
@@ -45,7 +36,7 @@
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Discover",
|
||||
"path": "/a/grafana-marketplace-app?tab=discover",
|
||||
"path": "/a/grafana-plugin-catalog-app?tab=discover",
|
||||
"role": "Admin",
|
||||
"addToNav": true,
|
||||
"defaultNav": true
|
||||
@@ -53,27 +44,27 @@
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Browse",
|
||||
"path": "/a/grafana-marketplace-app/?tab=browse",
|
||||
"path": "/a/grafana-plugin-catalog-app/?tab=browse",
|
||||
"role": "Admin",
|
||||
"addToNav": true
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Library",
|
||||
"path": "/a/grafana-marketplace-app/?tab=library",
|
||||
"path": "/a/grafana-plugin-catalog-app/?tab=library",
|
||||
"role": "Admin",
|
||||
"addToNav": true
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "View plugin",
|
||||
"path": "/a/grafana-marketplace-app?tab=plugin",
|
||||
"path": "/a/grafana-plugin-catalog-app?tab=plugin",
|
||||
"role": "Admin"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"grafanaDependency": ">=7.3.0",
|
||||
"grafanaVersion": "7.3.x",
|
||||
"grafanaDependency": ">=8.0.0",
|
||||
"grafanaVersion": "8.0.x",
|
||||
"plugins": []
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
export interface MarketplaceAppSettings {
|
||||
export interface CatalogAppSettings {
|
||||
includeEnterprise?: boolean;
|
||||
}
|
||||
|
||||
File renamed without changes.
@@ -203,7 +203,7 @@ function getPhantomPlugin(options: GetPhantomPluginOptions): DataSourcePluginMet
|
||||
author: { name: 'Grafana Labs' },
|
||||
links: [
|
||||
{
|
||||
url: config.marketplaceUrl + options.id,
|
||||
url: config.catalogUrl + options.id,
|
||||
name: 'Install now',
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user