@perses-dev/dashboards 0.28.0 → 0.29.0
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.
|
@@ -86,6 +86,9 @@ const bundledPluginLoader = (0, _pluginSystem.dynamicImportPluginLoader)([
|
|
|
86
86
|
const WithPluginRegistry = (Story)=>{
|
|
87
87
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginSystem.PluginRegistry, {
|
|
88
88
|
pluginLoader: bundledPluginLoader,
|
|
89
|
+
defaultPluginKinds: {
|
|
90
|
+
TimeSeriesQuery: 'PrometheusTimeSeriesQuery'
|
|
91
|
+
},
|
|
89
92
|
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(Story, {})
|
|
90
93
|
});
|
|
91
94
|
};
|
|
@@ -39,6 +39,9 @@ const bundledPluginLoader = dynamicImportPluginLoader([
|
|
|
39
39
|
export const WithPluginRegistry = (Story)=>{
|
|
40
40
|
return /*#__PURE__*/ _jsx(PluginRegistry, {
|
|
41
41
|
pluginLoader: bundledPluginLoader,
|
|
42
|
+
defaultPluginKinds: {
|
|
43
|
+
TimeSeriesQuery: 'PrometheusTimeSeriesQuery'
|
|
44
|
+
},
|
|
42
45
|
children: /*#__PURE__*/ _jsx(Story, {})
|
|
43
46
|
});
|
|
44
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/stories/decorators/WithPluginRegistry.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { StoryFn } from '@storybook/react';\nimport {\n PluginRegistry,\n PluginLoader,\n PluginModuleResource,\n dynamicImportPluginLoader,\n} from '@perses-dev/plugin-system';\n\n// NOTE: the aliases we use for components break these top level imports, so we\n// import relatively.\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst prometheusResource = require('../../../../prometheus-plugin/plugin.json');\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst panelsResource = require('../../../../panels-plugin/plugin.json');\n\nconst bundledPluginLoader: PluginLoader = dynamicImportPluginLoader([\n {\n resource: prometheusResource as PluginModuleResource,\n // This throws an error in CI (but not locally for some reason), likely because\n // this package isn't a dependency for dashboards. We probably do not want to\n // make it one solely for type-checking in storybook.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n importPlugin: () => import('@perses-dev/prometheus-plugin'),\n },\n {\n resource: panelsResource as PluginModuleResource,\n // Same comment as above.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n importPlugin: () => import('@perses-dev/panels-plugin'),\n },\n]);\n\nexport const WithPluginRegistry = (Story: StoryFn) => {\n return (\n <PluginRegistry
|
|
1
|
+
{"version":3,"sources":["../../../src/stories/decorators/WithPluginRegistry.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { StoryFn } from '@storybook/react';\nimport {\n PluginRegistry,\n PluginLoader,\n PluginModuleResource,\n dynamicImportPluginLoader,\n} from '@perses-dev/plugin-system';\n\n// NOTE: the aliases we use for components break these top level imports, so we\n// import relatively.\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst prometheusResource = require('../../../../prometheus-plugin/plugin.json');\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst panelsResource = require('../../../../panels-plugin/plugin.json');\n\nconst bundledPluginLoader: PluginLoader = dynamicImportPluginLoader([\n {\n resource: prometheusResource as PluginModuleResource,\n // This throws an error in CI (but not locally for some reason), likely because\n // this package isn't a dependency for dashboards. We probably do not want to\n // make it one solely for type-checking in storybook.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n importPlugin: () => import('@perses-dev/prometheus-plugin'),\n },\n {\n resource: panelsResource as PluginModuleResource,\n // Same comment as above.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n importPlugin: () => import('@perses-dev/panels-plugin'),\n },\n]);\n\nexport const WithPluginRegistry = (Story: StoryFn) => {\n return (\n <PluginRegistry\n pluginLoader={bundledPluginLoader}\n defaultPluginKinds={{ TimeSeriesQuery: 'PrometheusTimeSeriesQuery' }}\n >\n <Story />\n </PluginRegistry>\n );\n};\n"],"names":["PluginRegistry","dynamicImportPluginLoader","prometheusResource","require","panelsResource","bundledPluginLoader","resource","importPlugin","WithPluginRegistry","Story","pluginLoader","defaultPluginKinds","TimeSeriesQuery"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AACA,SACEA,cAAc,EAGdC,yBAAyB,QACpB,2BAA2B,CAAC;AAEnC,+EAA+E;AAC/E,qBAAqB;AACrB,8DAA8D;AAC9D,MAAMC,kBAAkB,GAAGC,OAAO,CAAC,2CAA2C,CAAC,AAAC;AAChF,8DAA8D;AAC9D,MAAMC,cAAc,GAAGD,OAAO,CAAC,uCAAuC,CAAC,AAAC;AAExE,MAAME,mBAAmB,GAAiBJ,yBAAyB,CAAC;IAClE;QACEK,QAAQ,EAAEJ,kBAAkB;QAC5B,+EAA+E;QAC/E,6EAA6E;QAC7E,qDAAqD;QACrD,6DAA6D;QAC7D,aAAa;QACbK,YAAY,EAAE,IAAM,MAAM,CAAC,+BAA+B,CAAC;KAC5D;IACD;QACED,QAAQ,EAAEF,cAAc;QACxB,yBAAyB;QACzB,6DAA6D;QAC7D,aAAa;QACbG,YAAY,EAAE,IAAM,MAAM,CAAC,2BAA2B,CAAC;KACxD;CACF,CAAC,AAAC;AAEH,OAAO,MAAMC,kBAAkB,GAAG,CAACC,KAAc,GAAK;IACpD,qBACE,KAACT,cAAc;QACbU,YAAY,EAAEL,mBAAmB;QACjCM,kBAAkB,EAAE;YAAEC,eAAe,EAAE,2BAA2B;SAAE;kBAEpE,cAAA,KAACH,KAAK,KAAG;MACM,CACjB;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/dashboards",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "The dashboards feature in Perses",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@perses-dev/components": "0.
|
|
33
|
-
"@perses-dev/core": "0.
|
|
34
|
-
"@perses-dev/plugin-system": "0.
|
|
32
|
+
"@perses-dev/components": "0.29.0",
|
|
33
|
+
"@perses-dev/core": "0.29.0",
|
|
34
|
+
"@perses-dev/plugin-system": "0.29.0",
|
|
35
35
|
"@types/react-grid-layout": "^1.3.2",
|
|
36
36
|
"date-fns": "^2.28.0",
|
|
37
37
|
"immer": "^9.0.15",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"zustand": "^4.3.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@perses-dev/internal-utils": "0.
|
|
48
|
-
"@perses-dev/storybook": "0.
|
|
47
|
+
"@perses-dev/internal-utils": "0.29.0",
|
|
48
|
+
"@perses-dev/storybook": "0.29.0",
|
|
49
49
|
"intersection-observer": "^0.12.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|