@perses-dev/plugin-system 0.54.0-beta.1 → 0.54.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/PluginRegistry/PluginRegistry.js +11 -15
- package/dist/cjs/components/PluginRegistry/getPluginSearchHelper.js +92 -0
- package/dist/cjs/components/PluginRegistry/plugin-indexes.js +16 -13
- package/dist/cjs/components/Variables/variable-model.js +115 -29
- package/dist/cjs/context/ValidationProvider.js +3 -3
- package/dist/cjs/model/alerts-queries.js +16 -0
- package/dist/cjs/model/index.js +2 -0
- package/dist/cjs/model/log-volume-utils.js +10 -10
- package/dist/cjs/model/plugin-loading.js +24 -8
- package/dist/cjs/model/plugins.js +10 -0
- package/dist/cjs/model/silences-queries.js +16 -0
- package/dist/cjs/remote/PluginRuntime.js +38 -9
- package/dist/cjs/remote/remotePluginLoader.js +28 -5
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +18 -2
- package/dist/cjs/runtime/DataQueriesProvider/model.js +30 -4
- package/dist/cjs/runtime/UsageMetricsProvider.js +2 -2
- package/dist/cjs/runtime/alerts-queries.js +101 -0
- package/dist/cjs/runtime/index.js +2 -0
- package/dist/cjs/runtime/item-actions.js +3 -3
- package/dist/cjs/runtime/log-queries.js +4 -1
- package/dist/cjs/runtime/plugin-registry.js +12 -3
- package/dist/cjs/runtime/profile-queries.js +4 -1
- package/dist/cjs/runtime/silences-queries.js +101 -0
- package/dist/cjs/runtime/time-series-queries.js +4 -1
- package/dist/cjs/runtime/trace-queries.js +4 -1
- package/dist/cjs/test/mock-data.js +51 -0
- package/dist/cjs/test/test-plugins/bert/index.js +9 -12
- package/dist/cjs/test/test-plugins/ernie/index.js +9 -12
- package/dist/cjs/test/test-plugins/index.js +2 -2
- package/dist/cjs/test-utils/mock-plugin-registry.js +8 -2
- package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
- package/dist/components/DatasourceSelect/DatasourceSelect.js +2 -2
- package/dist/components/DatasourceSelect/DatasourceSelect.js.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.js +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.js.map +1 -1
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js +1 -1
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +1 -1
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +12 -16
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/PluginRegistry/getPluginSearchHelper.d.ts +12 -0
- package/dist/components/PluginRegistry/getPluginSearchHelper.d.ts.map +1 -0
- package/dist/components/PluginRegistry/getPluginSearchHelper.js +88 -0
- package/dist/components/PluginRegistry/getPluginSearchHelper.js.map +1 -0
- package/dist/components/PluginRegistry/plugin-indexes.d.ts +4 -6
- package/dist/components/PluginRegistry/plugin-indexes.d.ts.map +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js +15 -13
- package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js +1 -1
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/components/Variables/variable-model.d.ts +9 -1
- package/dist/components/Variables/variable-model.d.ts.map +1 -1
- package/dist/components/Variables/variable-model.js +117 -31
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/context/ValidationProvider.d.ts +1 -1
- package/dist/context/ValidationProvider.d.ts.map +1 -1
- package/dist/context/ValidationProvider.js +2 -2
- package/dist/context/ValidationProvider.js.map +1 -1
- package/dist/model/alerts-queries.d.ts +33 -0
- package/dist/model/alerts-queries.d.ts.map +1 -0
- package/dist/model/alerts-queries.js +15 -0
- package/dist/model/alerts-queries.js.map +1 -0
- package/dist/model/datasource.d.ts +1 -8
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js +1 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/index.d.ts +2 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +2 -0
- package/dist/model/index.js.map +1 -1
- package/dist/model/plugin-loading.d.ts.map +1 -1
- package/dist/model/plugin-loading.js +24 -8
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/model/plugins.d.ts +21 -0
- package/dist/model/plugins.d.ts.map +1 -1
- package/dist/model/plugins.js +4 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/model/silences-queries.d.ts +33 -0
- package/dist/model/silences-queries.d.ts.map +1 -0
- package/dist/model/silences-queries.js +15 -0
- package/dist/model/silences-queries.js.map +1 -0
- package/dist/remote/PersesPlugin.types.d.ts +2 -0
- package/dist/remote/PersesPlugin.types.d.ts.map +1 -1
- package/dist/remote/PersesPlugin.types.js.map +1 -1
- package/dist/remote/PluginLoaderComponent.js +1 -1
- package/dist/remote/PluginLoaderComponent.js.map +1 -1
- package/dist/remote/PluginRuntime.d.ts +7 -1
- package/dist/remote/PluginRuntime.d.ts.map +1 -1
- package/dist/remote/PluginRuntime.js +38 -9
- package/dist/remote/PluginRuntime.js.map +1 -1
- package/dist/remote/remotePluginLoader.d.ts.map +1 -1
- package/dist/remote/remotePluginLoader.js +28 -5
- package/dist/remote/remotePluginLoader.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +19 -3
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js +30 -4
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/QueryCountProvider.js +1 -1
- package/dist/runtime/QueryCountProvider.js.map +1 -1
- package/dist/runtime/RouterProvider.js +1 -1
- package/dist/runtime/RouterProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -1
- package/dist/runtime/UsageMetricsProvider.js +2 -2
- package/dist/runtime/UsageMetricsProvider.js.map +1 -1
- package/dist/runtime/alerts-queries.d.ts +11 -0
- package/dist/runtime/alerts-queries.d.ts.map +1 -0
- package/dist/runtime/alerts-queries.js +89 -0
- package/dist/runtime/alerts-queries.js.map +1 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/item-actions.js +1 -1
- package/dist/runtime/item-actions.js.map +1 -1
- package/dist/runtime/log-queries.js +4 -1
- package/dist/runtime/log-queries.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +2 -1
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js +12 -3
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/runtime/profile-queries.js +4 -1
- package/dist/runtime/profile-queries.js.map +1 -1
- package/dist/runtime/silences-queries.d.ts +11 -0
- package/dist/runtime/silences-queries.d.ts.map +1 -0
- package/dist/runtime/silences-queries.js +89 -0
- package/dist/runtime/silences-queries.js.map +1 -0
- package/dist/runtime/time-series-queries.js +4 -1
- package/dist/runtime/time-series-queries.js.map +1 -1
- package/dist/runtime/trace-queries.js +4 -1
- package/dist/runtime/trace-queries.js.map +1 -1
- package/dist/test/mock-data.d.ts +3 -1
- package/dist/test/mock-data.d.ts.map +1 -1
- package/dist/test/mock-data.js +45 -0
- package/dist/test/mock-data.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/test-plugins/bert/index.d.ts +12 -6
- package/dist/test/test-plugins/bert/index.d.ts.map +1 -1
- package/dist/test/test-plugins/bert/index.js +6 -2
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.d.ts +8 -6
- package/dist/test/test-plugins/ernie/index.d.ts.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +6 -2
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test/test-plugins/index.js +2 -2
- package/dist/test/test-plugins/index.js.map +1 -1
- package/dist/test/utils.js +1 -1
- package/dist/test/utils.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js +8 -2
- package/dist/test-utils/mock-plugin-registry.js.map +1 -1
- package/package.json +6 -5
|
@@ -25,6 +25,7 @@ const _react = require("react");
|
|
|
25
25
|
const _runtime = require("../../runtime");
|
|
26
26
|
const _utils = require("../../utils");
|
|
27
27
|
const _pluginindexes = require("./plugin-indexes");
|
|
28
|
+
const _getPluginSearchHelper = require("./getPluginSearchHelper");
|
|
28
29
|
function PluginRegistry(props) {
|
|
29
30
|
const { pluginLoader: { getInstalledPlugins, importPluginModule }, children, defaultPluginKinds } = props;
|
|
30
31
|
const getPluginIndexes = (0, _pluginindexes.usePluginIndexes)(getInstalledPlugins);
|
|
@@ -42,23 +43,18 @@ function PluginRegistry(props) {
|
|
|
42
43
|
}
|
|
43
44
|
return request;
|
|
44
45
|
});
|
|
45
|
-
const getPlugin = (0, _react.useCallback)(async (
|
|
46
|
-
// Get the indexes of the installed plugins
|
|
46
|
+
const getPlugin = (0, _react.useCallback)(async (compoundKeyObj)=>{
|
|
47
47
|
const pluginIndexes = await getPluginIndexes();
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
const { kind, name } = compoundKeyObj;
|
|
49
|
+
const candidateKeys = (0, _getPluginSearchHelper.resolvePluginKeys)(pluginIndexes.pluginResourcesByNameKindRegistryVersion.keys(), compoundKeyObj);
|
|
50
|
+
for (const resourceKey of candidateKeys){
|
|
51
|
+
const resource = pluginIndexes.pluginResourcesByNameKindRegistryVersion.get(resourceKey);
|
|
52
|
+
if (!resource) continue;
|
|
53
|
+
const pluginModule = await loadPluginModule(resource);
|
|
54
|
+
const plugin = pluginModule?.[resourceKey];
|
|
55
|
+
if (plugin) return plugin;
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
const pluginModule = await loadPluginModule(resource);
|
|
56
|
-
// We currently assume that plugin modules will have named exports that match the kinds they handle
|
|
57
|
-
const plugin = pluginModule[name];
|
|
58
|
-
if (plugin === undefined) {
|
|
59
|
-
throw new Error(`The ${name} plugin for kind '${kind}' is missing from the ${resource.metadata.name} plugin module`);
|
|
60
|
-
}
|
|
61
|
-
return plugin;
|
|
57
|
+
throw new Error(`A ${name} plugin for kind '${kind}' is not installed`);
|
|
62
58
|
}, [
|
|
63
59
|
getPluginIndexes,
|
|
64
60
|
loadPluginModule
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "resolvePluginKeys", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return resolvePluginKeys;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _semver = require("semver");
|
|
24
|
+
const _model = require("../../model");
|
|
25
|
+
const PLUGIN_LOOKUP_PRECEDENCE_LOGIC = {
|
|
26
|
+
registryOverVersion: false
|
|
27
|
+
};
|
|
28
|
+
const resolvePluginKeys = (allKeys, query, precedenceLogic = PLUGIN_LOOKUP_PRECEDENCE_LOGIC)=>{
|
|
29
|
+
const { kind, name, version, registry } = query;
|
|
30
|
+
const candidates = [];
|
|
31
|
+
// Exact match first when version or registry is specified
|
|
32
|
+
if (version || registry) {
|
|
33
|
+
candidates.push((0, _model.getPluginModuleCompoundKey)({
|
|
34
|
+
kind,
|
|
35
|
+
name,
|
|
36
|
+
registry,
|
|
37
|
+
version
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
const latestWithRegistry = {
|
|
41
|
+
key: '',
|
|
42
|
+
version: ''
|
|
43
|
+
};
|
|
44
|
+
const latestWithoutRegistry = {
|
|
45
|
+
key: '',
|
|
46
|
+
version: ''
|
|
47
|
+
};
|
|
48
|
+
const prefix = `${kind}:${name}:`;
|
|
49
|
+
for (const key of allKeys){
|
|
50
|
+
if (!key.startsWith(prefix)) continue;
|
|
51
|
+
const split = key.split(':');
|
|
52
|
+
if (split.length !== 4) {
|
|
53
|
+
console.warn(`An invalid Plugin Resource key detected during default plugin lookup: ${key}`);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const [, , reg, ver] = split;
|
|
57
|
+
if (!ver) {
|
|
58
|
+
console.warn(`An invalid Plugin Resource key detected during default plugin lookup: ${key}`);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (reg) {
|
|
62
|
+
if (!latestWithRegistry.key || (0, _semver.gt)(ver, latestWithRegistry.version)) {
|
|
63
|
+
latestWithRegistry.key = key;
|
|
64
|
+
latestWithRegistry.version = ver;
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
if (!latestWithoutRegistry.key || (0, _semver.gt)(ver, latestWithoutRegistry.version)) {
|
|
68
|
+
latestWithoutRegistry.key = key;
|
|
69
|
+
latestWithoutRegistry.version = ver;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// Determine the best fallback key from the two buckets
|
|
74
|
+
let fallbackKey;
|
|
75
|
+
if (latestWithRegistry.key && latestWithoutRegistry.key) {
|
|
76
|
+
const { registryOverVersion } = precedenceLogic;
|
|
77
|
+
if ((0, _semver.gt)(latestWithRegistry.version, latestWithoutRegistry.version)) {
|
|
78
|
+
fallbackKey = latestWithRegistry.key;
|
|
79
|
+
} else if ((0, _semver.gt)(latestWithoutRegistry.version, latestWithRegistry.version)) {
|
|
80
|
+
fallbackKey = latestWithoutRegistry.key;
|
|
81
|
+
} else {
|
|
82
|
+
// Versions are equal — use the tie-breaker
|
|
83
|
+
fallbackKey = registryOverVersion ? latestWithRegistry.key : latestWithoutRegistry.key;
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
fallbackKey = latestWithRegistry.key || latestWithoutRegistry.key || undefined;
|
|
87
|
+
}
|
|
88
|
+
if (fallbackKey && !candidates.includes(fallbackKey)) {
|
|
89
|
+
candidates.push(fallbackKey);
|
|
90
|
+
}
|
|
91
|
+
return candidates;
|
|
92
|
+
};
|
|
@@ -21,14 +21,15 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
get
|
|
25
|
-
return
|
|
24
|
+
get getPluginModuleCompoundKey () {
|
|
25
|
+
return _model.getPluginModuleCompoundKey;
|
|
26
26
|
},
|
|
27
27
|
get usePluginIndexes () {
|
|
28
28
|
return usePluginIndexes;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
const _react = require("react");
|
|
32
|
+
const _model = require("../../model");
|
|
32
33
|
const _utils = require("../../utils");
|
|
33
34
|
function usePluginIndexes(getInstalledPlugins) {
|
|
34
35
|
// Creates indexes from the installed plugins data (does useEvent because this accesses the getInstalledPlugins prop
|
|
@@ -36,17 +37,22 @@ function usePluginIndexes(getInstalledPlugins) {
|
|
|
36
37
|
const createPluginIndexes = (0, _utils.useEvent)(async ()=>{
|
|
37
38
|
const installedPlugins = await getInstalledPlugins();
|
|
38
39
|
// Create the two indexes from the installed plugins
|
|
39
|
-
const
|
|
40
|
+
const pluginResourcesByNameKindRegistryVersion = new Map();
|
|
40
41
|
const pluginMetadataByKind = new Map();
|
|
41
42
|
for (const resource of installedPlugins){
|
|
43
|
+
const { metadata: { version, registry } } = resource;
|
|
42
44
|
for (const pluginMetadata of resource.spec.plugins){
|
|
43
45
|
const { kind, spec: { name } } = pluginMetadata;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const key = (0, _model.getPluginModuleCompoundKey)({
|
|
47
|
+
kind,
|
|
48
|
+
name,
|
|
49
|
+
registry,
|
|
50
|
+
version
|
|
51
|
+
});
|
|
52
|
+
if (pluginResourcesByNameKindRegistryVersion.has(key)) {
|
|
53
|
+
console.warn(`Got more than one ${kind} plugin for kind ${name}, registry '${registry || 'undefined'}', and version '${version || 'undefined'}'`);
|
|
48
54
|
}
|
|
49
|
-
|
|
55
|
+
pluginResourcesByNameKindRegistryVersion.set(key, resource);
|
|
50
56
|
// Index the metadata by plugin type
|
|
51
57
|
let list = pluginMetadataByKind.get(kind);
|
|
52
58
|
if (list === undefined) {
|
|
@@ -60,7 +66,7 @@ function usePluginIndexes(getInstalledPlugins) {
|
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
return {
|
|
63
|
-
|
|
69
|
+
pluginResourcesByNameKindRegistryVersion,
|
|
64
70
|
pluginMetadataByKind
|
|
65
71
|
};
|
|
66
72
|
});
|
|
@@ -72,7 +78,7 @@ function usePluginIndexes(getInstalledPlugins) {
|
|
|
72
78
|
request = createPluginIndexes();
|
|
73
79
|
pluginIndexesCache.current = request;
|
|
74
80
|
// Remove failed requests from the cache so they can potentially be retried
|
|
75
|
-
request.catch(()=>pluginIndexesCache.current
|
|
81
|
+
request.catch(()=>pluginIndexesCache.current = undefined);
|
|
76
82
|
}
|
|
77
83
|
return request;
|
|
78
84
|
}, [
|
|
@@ -80,6 +86,3 @@ function usePluginIndexes(getInstalledPlugins) {
|
|
|
80
86
|
]);
|
|
81
87
|
return getPluginIndexes;
|
|
82
88
|
}
|
|
83
|
-
function getTypeAndKindKey(kind, name) {
|
|
84
|
-
return `${kind}:${name}`;
|
|
85
|
-
}
|
|
@@ -32,9 +32,13 @@ _export(exports, {
|
|
|
32
32
|
},
|
|
33
33
|
get useListVariablePluginValues () {
|
|
34
34
|
return useListVariablePluginValues;
|
|
35
|
+
},
|
|
36
|
+
get useResolveListVariableValues () {
|
|
37
|
+
return useResolveListVariableValues;
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
const _reactquery = require("@tanstack/react-query");
|
|
41
|
+
const _react = require("react");
|
|
38
42
|
const _runtime = require("../../runtime");
|
|
39
43
|
function filterVariableList(data, capturedRegexp) {
|
|
40
44
|
const result = [];
|
|
@@ -61,54 +65,136 @@ function filterVariableList(data, capturedRegexp) {
|
|
|
61
65
|
}
|
|
62
66
|
return result;
|
|
63
67
|
}
|
|
64
|
-
function
|
|
65
|
-
const { data: variablePlugin } = (0, _runtime.usePlugin)('Variable', definition.spec.plugin.kind);
|
|
68
|
+
function useVariablePluginContext() {
|
|
66
69
|
const datasourceStore = (0, _runtime.useDatasourceStore)();
|
|
67
70
|
const allVariables = (0, _runtime.useAllVariableValues)();
|
|
68
71
|
const { absoluteTimeRange: timeRange } = (0, _runtime.useTimeRange)();
|
|
69
|
-
|
|
72
|
+
return {
|
|
70
73
|
timeRange,
|
|
71
74
|
datasourceStore,
|
|
72
75
|
variables: allVariables
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
}
|
|
78
|
+
const getVariableQueryConfig = (definition, variablePluginCtx, variablePlugin, enabled, onFetched)=>{
|
|
75
79
|
const capturingRegexp = definition.spec.capturingRegexp !== undefined ? new RegExp(definition.spec.capturingRegexp, 'g') : undefined;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const dependencies = variablePlugin.dependsOn(spec, variablePluginCtx);
|
|
79
|
-
dependsOnVariables = dependencies.variables ? dependencies.variables : dependsOnVariables;
|
|
80
|
-
}
|
|
81
|
-
// Exclude self variable to avoid circular dependency
|
|
82
|
-
dependsOnVariables = dependsOnVariables.filter((v)=>v !== definition.spec.name);
|
|
83
|
-
const variables = (0, _runtime.useAllVariableValues)(dependsOnVariables);
|
|
84
|
-
let waitToLoad = false;
|
|
85
|
-
if (dependsOnVariables) {
|
|
86
|
-
waitToLoad = dependsOnVariables.some((v)=>variables[v]?.loading);
|
|
87
|
-
}
|
|
88
|
-
const variablesValueKey = getVariableValuesKey(variables);
|
|
89
|
-
return (0, _reactquery.useQuery)({
|
|
80
|
+
const variablesValueKey = getVariableValuesKey(variablePluginCtx.variables);
|
|
81
|
+
return {
|
|
90
82
|
queryKey: [
|
|
91
83
|
'variable',
|
|
92
84
|
definition,
|
|
93
|
-
timeRange,
|
|
85
|
+
variablePluginCtx.timeRange,
|
|
94
86
|
variablesValueKey
|
|
95
87
|
],
|
|
96
88
|
queryFn: async ({ signal })=>{
|
|
97
|
-
const resp = await variablePlugin?.getVariableOptions(spec,
|
|
98
|
-
datasourceStore,
|
|
99
|
-
variables,
|
|
100
|
-
timeRange
|
|
101
|
-
}, signal);
|
|
89
|
+
const resp = await variablePlugin?.getVariableOptions(definition.spec.plugin.spec, variablePluginCtx, signal);
|
|
102
90
|
if (!resp?.data?.length) {
|
|
91
|
+
onFetched?.(definition.spec.name, [], definition);
|
|
103
92
|
return [];
|
|
104
93
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return filterVariableList(resp.data, capturingRegexp);
|
|
94
|
+
const options = capturingRegexp ? filterVariableList(resp.data, capturingRegexp) : resp.data;
|
|
95
|
+
onFetched?.(definition.spec.name, options, definition);
|
|
96
|
+
return options;
|
|
109
97
|
},
|
|
110
|
-
enabled
|
|
98
|
+
enabled
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
function resolveDependsOnVariables(variablePlugin, variablePluginCtx, definition) {
|
|
102
|
+
if (variablePlugin?.dependsOn) {
|
|
103
|
+
const dependencies = variablePlugin.dependsOn(definition.spec.plugin.spec, variablePluginCtx);
|
|
104
|
+
return dependencies.variables ? dependencies.variables.filter((v)=>v !== definition.spec.name) : []; // Exclude self variable to avoid circular dependency and default to empty array to avoid deadlock
|
|
105
|
+
}
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
function useListVariablePluginValues(definition) {
|
|
109
|
+
const { data: variablePlugin } = (0, _runtime.usePlugin)('Variable', definition.spec.plugin.kind);
|
|
110
|
+
const variablePluginCtx = useVariablePluginContext();
|
|
111
|
+
const dependsOnVariables = resolveDependsOnVariables(variablePlugin, variablePluginCtx, definition);
|
|
112
|
+
const dependentVariables = (0, _runtime.useAllVariableValues)(dependsOnVariables);
|
|
113
|
+
const waitToLoad = dependsOnVariables.some((v)=>dependentVariables[v]?.loading);
|
|
114
|
+
const ctx = {
|
|
115
|
+
...variablePluginCtx,
|
|
116
|
+
variables: dependentVariables
|
|
117
|
+
};
|
|
118
|
+
return (0, _reactquery.useQuery)(getVariableQueryConfig(definition, ctx, variablePlugin, !!variablePlugin && !waitToLoad));
|
|
119
|
+
}
|
|
120
|
+
function resolveDefaultValue(definition, options) {
|
|
121
|
+
const { defaultValue, allowMultiple } = definition.spec;
|
|
122
|
+
if (defaultValue !== undefined && defaultValue !== null) {
|
|
123
|
+
return defaultValue;
|
|
124
|
+
}
|
|
125
|
+
if (options[0]?.value) {
|
|
126
|
+
const first = options[0].value;
|
|
127
|
+
return allowMultiple ? [
|
|
128
|
+
first
|
|
129
|
+
] : first;
|
|
130
|
+
}
|
|
131
|
+
return allowMultiple ? [] : '';
|
|
132
|
+
}
|
|
133
|
+
function useResolveListVariableValues(variableDefinitions) {
|
|
134
|
+
const { timeRange, datasourceStore, variables: outerVariableValues } = useVariablePluginContext();
|
|
135
|
+
const listVariables = (0, _react.useMemo)(()=>variableDefinitions.filter((v)=>v.kind === 'ListVariable'), [
|
|
136
|
+
variableDefinitions
|
|
137
|
+
]);
|
|
138
|
+
const pluginResults = (0, _runtime.usePlugins)('Variable', listVariables.map((d)=>({
|
|
139
|
+
kind: d.spec.plugin.kind
|
|
140
|
+
})));
|
|
141
|
+
// Resolved variable state. Updated by onFetched when queries resolve.
|
|
142
|
+
// Needed because of dependencies between variables that require multiple rounds of fetching.
|
|
143
|
+
const [resolvedVariables, setResolvedVariables] = (0, _react.useState)({});
|
|
144
|
+
const allVariables = (0, _react.useMemo)(()=>{
|
|
145
|
+
return {
|
|
146
|
+
...outerVariableValues,
|
|
147
|
+
...resolvedVariables
|
|
148
|
+
};
|
|
149
|
+
}, [
|
|
150
|
+
outerVariableValues,
|
|
151
|
+
resolvedVariables
|
|
152
|
+
]);
|
|
153
|
+
const onFetched = (0, _react.useCallback)((name, options, definition)=>{
|
|
154
|
+
setResolvedVariables((prev)=>({
|
|
155
|
+
...prev,
|
|
156
|
+
[name]: {
|
|
157
|
+
value: resolveDefaultValue(definition, options),
|
|
158
|
+
loading: false,
|
|
159
|
+
options
|
|
160
|
+
}
|
|
161
|
+
}));
|
|
162
|
+
}, []);
|
|
163
|
+
const queryResults = (0, _reactquery.useQueries)({
|
|
164
|
+
queries: listVariables.map((definition, index)=>{
|
|
165
|
+
const plugin = pluginResults[index]?.data;
|
|
166
|
+
const isPluginLoading = pluginResults[index]?.isLoading ?? true;
|
|
167
|
+
const dependsOn = resolveDependsOnVariables(plugin, {
|
|
168
|
+
timeRange,
|
|
169
|
+
datasourceStore,
|
|
170
|
+
variables: allVariables
|
|
171
|
+
}, definition);
|
|
172
|
+
const hasPendingDeps = dependsOn.some((v)=>resolvedVariables[v] === undefined && listVariables.some((lv)=>lv.spec.name === v) || allVariables[v]?.loading);
|
|
173
|
+
const dependentVariables = {};
|
|
174
|
+
for (const v of dependsOn){
|
|
175
|
+
const state = allVariables[v];
|
|
176
|
+
if (state) {
|
|
177
|
+
dependentVariables[v] = state;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const ctx = {
|
|
181
|
+
timeRange,
|
|
182
|
+
datasourceStore,
|
|
183
|
+
variables: dependentVariables
|
|
184
|
+
};
|
|
185
|
+
return getVariableQueryConfig(definition, ctx, plugin, !hasPendingDeps && !isPluginLoading, onFetched);
|
|
186
|
+
})
|
|
111
187
|
});
|
|
188
|
+
const initialVariableValues = (0, _react.useMemo)(()=>Object.fromEntries(Object.entries(allVariables).filter(([, state])=>state?.value !== undefined).map(([name, state])=>[
|
|
189
|
+
name,
|
|
190
|
+
state.value
|
|
191
|
+
])), [
|
|
192
|
+
allVariables
|
|
193
|
+
]);
|
|
194
|
+
return {
|
|
195
|
+
initialVariableValues,
|
|
196
|
+
isLoading: queryResults.some((r)=>r.isLoading)
|
|
197
|
+
};
|
|
112
198
|
}
|
|
113
199
|
function getVariableValuesKey(v) {
|
|
114
200
|
return Object.values(v).map((v)=>JSON.stringify(v.value)).join(',');
|
|
@@ -34,7 +34,7 @@ _export(exports, {
|
|
|
34
34
|
const _jsxruntime = require("react/jsx-runtime");
|
|
35
35
|
const _react = require("react");
|
|
36
36
|
const _spec = require("@perses-dev/spec");
|
|
37
|
-
const
|
|
37
|
+
const _client = require("@perses-dev/client");
|
|
38
38
|
const ValidationSchemasContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
|
|
39
39
|
function useValidationSchemas() {
|
|
40
40
|
const ctx = (0, _react.useContext)(ValidationSchemasContext);
|
|
@@ -44,11 +44,11 @@ function useValidationSchemas() {
|
|
|
44
44
|
return ctx;
|
|
45
45
|
}
|
|
46
46
|
function ValidationProvider({ children }) {
|
|
47
|
-
const [datasourceEditorSchema, setDatasourceEditorSchema] = (0, _react.useState)(
|
|
47
|
+
const [datasourceEditorSchema, setDatasourceEditorSchema] = (0, _react.useState)(_client.datasourceDefinitionSchema);
|
|
48
48
|
const [panelEditorSchema, setPanelEditorSchema] = (0, _react.useState)(_spec.panelEditorSchema); // TODO I don't get why this does not compile
|
|
49
49
|
const [variableEditorSchema, setVariableEditorSchema] = (0, _react.useState)(_spec.variableDefinitionSchema);
|
|
50
50
|
function setDatasourceEditorSchemaPlugin(pluginSchema) {
|
|
51
|
-
setDatasourceEditorSchema((0,
|
|
51
|
+
setDatasourceEditorSchema((0, _client.buildDatasourceDefinitionSchema)(pluginSchema));
|
|
52
52
|
}
|
|
53
53
|
function setPanelEditorSchemaPlugin(pluginSchema) {
|
|
54
54
|
setPanelEditorSchema((0, _spec.buildPanelEditorSchema)(pluginSchema));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -27,6 +27,8 @@ _export_star(require("./trace-queries"), exports);
|
|
|
27
27
|
_export_star(require("./profile-queries"), exports);
|
|
28
28
|
_export_star(require("./variables"), exports);
|
|
29
29
|
_export_star(require("./calculations"), exports);
|
|
30
|
+
_export_star(require("./alerts-queries"), exports);
|
|
31
|
+
_export_star(require("./silences-queries"), exports);
|
|
30
32
|
function _export_star(from, to) {
|
|
31
33
|
Object.keys(from).forEach(function(k) {
|
|
32
34
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "calculateVolumeInterval", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return calculateVolumeInterval;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
1
11
|
// Copyright The Perses Authors
|
|
2
12
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
13
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,16 +21,6 @@
|
|
|
11
21
|
// See the License for the specific language governing permissions and
|
|
12
22
|
// limitations under the License.
|
|
13
23
|
// Target number of bars for log volume histogram
|
|
14
|
-
"use strict";
|
|
15
|
-
Object.defineProperty(exports, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "calculateVolumeInterval", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function() {
|
|
21
|
-
return calculateVolumeInterval;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
24
|
const TARGET_HISTOGRAM_BARS = 40;
|
|
25
25
|
// Standard intervals for histogram calculations (in milliseconds)
|
|
26
26
|
const STANDARD_INTERVALS = [
|
|
@@ -20,21 +20,37 @@ Object.defineProperty(exports, "dynamicImportPluginLoader", {
|
|
|
20
20
|
return dynamicImportPluginLoader;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
+
const _plugins = require("./plugins");
|
|
23
24
|
function dynamicImportPluginLoader(plugins) {
|
|
24
|
-
const importMap = new Map(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const importMap = new Map();
|
|
26
|
+
for (const p of plugins){
|
|
27
|
+
const { resource, resource: { kind, metadata: { name, registry, version } }, importPlugin } = p;
|
|
28
|
+
importMap.set((0, _plugins.getPluginModuleCompoundKey)({
|
|
29
|
+
kind,
|
|
30
|
+
name,
|
|
31
|
+
registry,
|
|
32
|
+
version
|
|
33
|
+
}), {
|
|
34
|
+
resource,
|
|
35
|
+
importPlugin
|
|
36
|
+
});
|
|
37
|
+
}
|
|
28
38
|
return {
|
|
29
39
|
async getInstalledPlugins () {
|
|
30
|
-
return Promise.resolve(Array.from(importMap.
|
|
40
|
+
return Promise.resolve(Array.from(importMap.values()).map((v)=>v.resource));
|
|
31
41
|
},
|
|
32
42
|
importPluginModule (resource) {
|
|
33
|
-
const
|
|
34
|
-
|
|
43
|
+
const { kind, metadata: { name, version, registry } } = resource;
|
|
44
|
+
const { importPlugin } = importMap.get((0, _plugins.getPluginModuleCompoundKey)({
|
|
45
|
+
kind,
|
|
46
|
+
name,
|
|
47
|
+
registry,
|
|
48
|
+
version
|
|
49
|
+
})) || {};
|
|
50
|
+
if (importPlugin === undefined) {
|
|
35
51
|
throw new Error('Plugin not found');
|
|
36
52
|
}
|
|
37
|
-
return
|
|
53
|
+
return importPlugin();
|
|
38
54
|
}
|
|
39
55
|
};
|
|
40
56
|
}
|
|
@@ -14,3 +14,13 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
+
Object.defineProperty(exports, "getPluginModuleCompoundKey", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return getPluginModuleCompoundKey;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function getPluginModuleCompoundKey(compoundKey) {
|
|
24
|
+
const { kind, name, registry, version } = compoundKey;
|
|
25
|
+
return `${kind}:${name}:${registry ?? ''}:${version ?? ''}`;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
@@ -156,6 +156,14 @@ const getPluginRuntime = ()=>{
|
|
|
156
156
|
requiredVersion: '^0.53.1'
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
+
'@perses-dev/client': {
|
|
160
|
+
version: '0.54.0-beta.1',
|
|
161
|
+
lib: ()=>require('@perses-dev/client'),
|
|
162
|
+
shareConfig: {
|
|
163
|
+
singleton: true,
|
|
164
|
+
requiredVersion: '^0.54.0-beta.1'
|
|
165
|
+
}
|
|
166
|
+
},
|
|
159
167
|
'@perses-dev/components': {
|
|
160
168
|
version: '0.53.1',
|
|
161
169
|
lib: ()=>require('@perses-dev/components'),
|
|
@@ -268,28 +276,49 @@ const getPluginRuntime = ()=>{
|
|
|
268
276
|
}
|
|
269
277
|
return instance;
|
|
270
278
|
};
|
|
271
|
-
|
|
279
|
+
function getModuleFederationRemoteName(name, registry, version) {
|
|
280
|
+
return `${name}:${registry ?? ''}:${version ?? ''}`;
|
|
281
|
+
}
|
|
282
|
+
const registerRemote = (name, registry, version, baseURL)=>{
|
|
272
283
|
const pluginRuntime = getPluginRuntime();
|
|
273
|
-
const
|
|
284
|
+
const registryName = getModuleFederationRemoteName(name, registry, version);
|
|
285
|
+
const existingRemote = pluginRuntime.options.remotes.find((remote)=>remote.name === registryName);
|
|
274
286
|
if (!existingRemote) {
|
|
275
|
-
const
|
|
287
|
+
const nameVersionRegistry = [
|
|
288
|
+
name,
|
|
289
|
+
version,
|
|
290
|
+
registry
|
|
291
|
+
].filter(Boolean).join('~');
|
|
292
|
+
const prefix = baseURL || '/plugins';
|
|
293
|
+
const remoteEntryURL = `${prefix}/${nameVersionRegistry}/mf-manifest.json`;
|
|
276
294
|
pluginRuntime.registerRemotes([
|
|
277
295
|
{
|
|
278
|
-
name,
|
|
296
|
+
name: registryName,
|
|
279
297
|
entry: remoteEntryURL,
|
|
280
|
-
alias:
|
|
298
|
+
alias: registryName
|
|
281
299
|
}
|
|
282
300
|
]);
|
|
283
301
|
}
|
|
284
302
|
};
|
|
285
|
-
const loadPlugin = async (
|
|
286
|
-
|
|
303
|
+
const loadPlugin = async (target)=>{
|
|
304
|
+
const { moduleName, pluginName, registry, version, baseURL } = target;
|
|
305
|
+
registerRemote(moduleName, registry, version, baseURL);
|
|
287
306
|
const pluginRuntime = getPluginRuntime();
|
|
288
|
-
|
|
307
|
+
const registryName = getModuleFederationRemoteName(moduleName, registry, version);
|
|
308
|
+
return pluginRuntime.loadRemote(`${registryName}/${pluginName}`);
|
|
289
309
|
};
|
|
290
310
|
function usePluginRuntime({ plugin }) {
|
|
291
311
|
return {
|
|
292
312
|
pluginRuntime: getPluginRuntime(),
|
|
293
|
-
loadPlugin: ()=>
|
|
313
|
+
loadPlugin: ()=>{
|
|
314
|
+
const { moduleName, name: pluginName, registry, version, baseURL } = plugin;
|
|
315
|
+
return loadPlugin({
|
|
316
|
+
moduleName,
|
|
317
|
+
pluginName,
|
|
318
|
+
registry,
|
|
319
|
+
version,
|
|
320
|
+
baseURL
|
|
321
|
+
});
|
|
322
|
+
}
|
|
294
323
|
};
|
|
295
324
|
}
|