@backstage-community/plugin-grafana 0.7.1 → 0.9.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.
- package/CHANGELOG.md +12 -0
- package/dist/alpha/apis.esm.js +21 -23
- package/dist/alpha/apis.esm.js.map +1 -1
- package/dist/alpha.d.ts +18 -18
- package/dist/alpha.esm.js +1 -1
- package/dist/alpha.esm.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage-community/plugin-grafana
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 59e5a3f: Backstage version bump to v1.43.2
|
|
8
|
+
|
|
9
|
+
## 0.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c5b6192: Backstage version bump to v1.42.3
|
|
14
|
+
|
|
3
15
|
## 0.7.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/alpha/apis.esm.js
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import { ApiBlueprint,
|
|
1
|
+
import { ApiBlueprint, discoveryApiRef, identityApiRef, configApiRef, fetchApiRef } from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { grafanaApiRef, GrafanaApiClient, UnifiedAlertingGrafanaApiClient } from '../api.esm.js';
|
|
3
3
|
|
|
4
4
|
const grafanaApiExtension = ApiBlueprint.make({
|
|
5
|
-
params: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return new GrafanaApiClient({
|
|
18
|
-
fetchApi,
|
|
19
|
-
discoveryApi,
|
|
20
|
-
domain: configApi.getString("grafana.domain"),
|
|
21
|
-
proxyPath: configApi.getOptionalString("grafana.proxyPath")
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
return new UnifiedAlertingGrafanaApiClient({
|
|
5
|
+
params: (defineParams) => defineParams({
|
|
6
|
+
api: grafanaApiRef,
|
|
7
|
+
deps: {
|
|
8
|
+
discoveryApi: discoveryApiRef,
|
|
9
|
+
identityApi: identityApiRef,
|
|
10
|
+
configApi: configApiRef,
|
|
11
|
+
fetchApi: fetchApiRef
|
|
12
|
+
},
|
|
13
|
+
factory: ({ discoveryApi, configApi, fetchApi }) => {
|
|
14
|
+
const unifiedAlertingEnabled = configApi.getOptionalBoolean("grafana.unifiedAlerting") || false;
|
|
15
|
+
if (!unifiedAlertingEnabled) {
|
|
16
|
+
return new GrafanaApiClient({
|
|
25
17
|
fetchApi,
|
|
26
18
|
discoveryApi,
|
|
27
19
|
domain: configApi.getString("grafana.domain"),
|
|
28
20
|
proxyPath: configApi.getOptionalString("grafana.proxyPath")
|
|
29
21
|
});
|
|
30
22
|
}
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
return new UnifiedAlertingGrafanaApiClient({
|
|
24
|
+
fetchApi,
|
|
25
|
+
discoveryApi,
|
|
26
|
+
domain: configApi.getString("grafana.domain"),
|
|
27
|
+
proxyPath: configApi.getOptionalString("grafana.proxyPath")
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
})
|
|
33
31
|
});
|
|
34
32
|
|
|
35
33
|
export { grafanaApiExtension };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\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 {\n configApiRef,\n ApiBlueprint,\n
|
|
1
|
+
{"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\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 {\n configApiRef,\n ApiBlueprint,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport {\n GrafanaApiClient,\n grafanaApiRef,\n UnifiedAlertingGrafanaApiClient,\n} from '../api';\n\n/**\n * @alpha\n */\nexport const grafanaApiExtension = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: grafanaApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n identityApi: identityApiRef,\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, configApi, fetchApi }) => {\n const unifiedAlertingEnabled =\n configApi.getOptionalBoolean('grafana.unifiedAlerting') || false;\n\n if (!unifiedAlertingEnabled) {\n return new GrafanaApiClient({\n fetchApi,\n discoveryApi,\n domain: configApi.getString('grafana.domain'),\n proxyPath: configApi.getOptionalString('grafana.proxyPath'),\n });\n }\n\n return new UnifiedAlertingGrafanaApiClient({\n fetchApi,\n discoveryApi,\n domain: configApi.getString('grafana.domain'),\n proxyPath: configApi.getOptionalString('grafana.proxyPath'),\n });\n },\n }),\n});\n"],"names":[],"mappings":";;;AA+Ba,MAAA,mBAAA,GAAsB,aAAa,IAAK,CAAA;AAAA,EACnD,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,IACX,GAAK,EAAA,aAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,WAAa,EAAA,cAAA;AAAA,MACb,SAAW,EAAA,YAAA;AAAA,MACX,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,SAAS,CAAC,EAAE,YAAc,EAAA,SAAA,EAAW,UAAe,KAAA;AAClD,MAAA,MAAM,sBACJ,GAAA,SAAA,CAAU,kBAAmB,CAAA,yBAAyB,CAAK,IAAA,KAAA;AAE7D,MAAA,IAAI,CAAC,sBAAwB,EAAA;AAC3B,QAAA,OAAO,IAAI,gBAAiB,CAAA;AAAA,UAC1B,QAAA;AAAA,UACA,YAAA;AAAA,UACA,MAAA,EAAQ,SAAU,CAAA,SAAA,CAAU,gBAAgB,CAAA;AAAA,UAC5C,SAAA,EAAW,SAAU,CAAA,iBAAA,CAAkB,mBAAmB;AAAA,SAC3D,CAAA;AAAA;AAGH,MAAA,OAAO,IAAI,+BAAgC,CAAA;AAAA,QACzC,QAAA;AAAA,QACA,YAAA;AAAA,QACA,MAAA,EAAQ,SAAU,CAAA,SAAA,CAAU,gBAAgB,CAAA;AAAA,QAC5C,SAAA,EAAW,SAAU,CAAA,iBAAA,CAAkB,mBAAmB;AAAA,OAC3D,CAAA;AAAA;AACH,GACD;AACL,CAAC;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -10,19 +10,19 @@ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
|
10
10
|
*
|
|
11
11
|
* @alpha
|
|
12
12
|
*/
|
|
13
|
-
declare const _default: _backstage_frontend_plugin_api.
|
|
14
|
-
|
|
13
|
+
declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
|
|
14
|
+
"api:grafana": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
15
15
|
kind: "api";
|
|
16
16
|
name: undefined;
|
|
17
17
|
config: {};
|
|
18
18
|
configInput: {};
|
|
19
|
-
output: _backstage_frontend_plugin_api.
|
|
19
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
|
|
20
20
|
inputs: {};
|
|
21
|
-
params: {
|
|
22
|
-
|
|
23
|
-
}
|
|
21
|
+
params: <TApi, TImpl extends TApi, TDeps extends {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
}>(params: _backstage_core_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_core_plugin_api.AnyApiFactory>;
|
|
24
24
|
}>;
|
|
25
|
-
|
|
25
|
+
"entity-card:grafana/alerts": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
26
26
|
kind: "entity-card";
|
|
27
27
|
name: "alerts";
|
|
28
28
|
config: {
|
|
@@ -33,11 +33,11 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
33
33
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
34
34
|
type?: "content" | "summary" | "info" | undefined;
|
|
35
35
|
};
|
|
36
|
-
output: _backstage_frontend_plugin_api.
|
|
36
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
37
37
|
optional: true;
|
|
38
|
-
}> | _backstage_frontend_plugin_api.
|
|
38
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
39
39
|
optional: true;
|
|
40
|
-
}> | _backstage_frontend_plugin_api.
|
|
40
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_plugin_catalog_react_alpha.EntityCardType, "catalog.entity-card-type", {
|
|
41
41
|
optional: true;
|
|
42
42
|
}>;
|
|
43
43
|
inputs: {};
|
|
@@ -47,7 +47,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
47
47
|
type?: _backstage_plugin_catalog_react_alpha.EntityCardType | undefined;
|
|
48
48
|
};
|
|
49
49
|
}>;
|
|
50
|
-
|
|
50
|
+
"entity-card:grafana/dashboards": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
51
51
|
kind: "entity-card";
|
|
52
52
|
name: "dashboards";
|
|
53
53
|
config: {
|
|
@@ -58,11 +58,11 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
58
58
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
59
59
|
type?: "content" | "summary" | "info" | undefined;
|
|
60
60
|
};
|
|
61
|
-
output: _backstage_frontend_plugin_api.
|
|
61
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
62
62
|
optional: true;
|
|
63
|
-
}> | _backstage_frontend_plugin_api.
|
|
63
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
64
64
|
optional: true;
|
|
65
|
-
}> | _backstage_frontend_plugin_api.
|
|
65
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_plugin_catalog_react_alpha.EntityCardType, "catalog.entity-card-type", {
|
|
66
66
|
optional: true;
|
|
67
67
|
}>;
|
|
68
68
|
inputs: {};
|
|
@@ -72,7 +72,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
72
72
|
type?: _backstage_plugin_catalog_react_alpha.EntityCardType | undefined;
|
|
73
73
|
};
|
|
74
74
|
}>;
|
|
75
|
-
|
|
75
|
+
"entity-card:grafana/overview-dashboard": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
76
76
|
kind: "entity-card";
|
|
77
77
|
name: "overview-dashboard";
|
|
78
78
|
config: {
|
|
@@ -83,11 +83,11 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
83
83
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
84
84
|
type?: "content" | "summary" | "info" | undefined;
|
|
85
85
|
};
|
|
86
|
-
output: _backstage_frontend_plugin_api.
|
|
86
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
87
87
|
optional: true;
|
|
88
|
-
}> | _backstage_frontend_plugin_api.
|
|
88
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
89
89
|
optional: true;
|
|
90
|
-
}> | _backstage_frontend_plugin_api.
|
|
90
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_plugin_catalog_react_alpha.EntityCardType, "catalog.entity-card-type", {
|
|
91
91
|
optional: true;
|
|
92
92
|
}>;
|
|
93
93
|
inputs: {};
|
package/dist/alpha.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { grafanaApiExtension } from './alpha/apis.esm.js';
|
|
|
3
3
|
import { entityGrafanaAlertsCard, entityGrafanaDashboardsCard, entityGrafanaOverviewDashboardViewer } from './alpha/entityCards.esm.js';
|
|
4
4
|
|
|
5
5
|
var alpha = createFrontendPlugin({
|
|
6
|
-
|
|
6
|
+
pluginId: "grafana",
|
|
7
7
|
extensions: [
|
|
8
8
|
grafanaApiExtension,
|
|
9
9
|
entityGrafanaAlertsCard,
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\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 { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport {\n entityGrafanaAlertsCard,\n entityGrafanaDashboardsCard,\n entityGrafanaOverviewDashboardViewer,\n grafanaApiExtension,\n} from './alpha/index';\n\n/**\n * The Grafana backstage plugin.\n *\n * @alpha\n */\nexport default createFrontendPlugin({\n
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\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 { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport {\n entityGrafanaAlertsCard,\n entityGrafanaDashboardsCard,\n entityGrafanaOverviewDashboardViewer,\n grafanaApiExtension,\n} from './alpha/index';\n\n/**\n * The Grafana backstage plugin.\n *\n * @alpha\n */\nexport default createFrontendPlugin({\n pluginId: 'grafana',\n extensions: [\n grafanaApiExtension,\n entityGrafanaAlertsCard,\n entityGrafanaDashboardsCard,\n entityGrafanaOverviewDashboardViewer,\n ],\n});\n"],"names":[],"mappings":";;;;AA4BA,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,SAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,mBAAA;AAAA,IACA,uBAAA;AAAA,IACA,2BAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-grafana",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A Backstage backend plugin that integrates towards Grafana",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@backstage/catalog-model": "^1.7.5",
|
|
66
|
-
"@backstage/core-components": "^0.
|
|
67
|
-
"@backstage/core-plugin-api": "^1.
|
|
68
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
69
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
66
|
+
"@backstage/core-components": "^0.18.1",
|
|
67
|
+
"@backstage/core-plugin-api": "^1.11.0",
|
|
68
|
+
"@backstage/frontend-plugin-api": "^0.12.0",
|
|
69
|
+
"@backstage/plugin-catalog-react": "^1.21.1",
|
|
70
70
|
"@material-ui/core": "^4.12.2",
|
|
71
71
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
72
72
|
"cross-fetch": "^4.0.0",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@backstage/cli": "^0.
|
|
83
|
-
"@backstage/core-app-api": "^1.
|
|
84
|
-
"@backstage/dev-utils": "^1.1.
|
|
85
|
-
"@backstage/frontend-test-utils": "^0.3.
|
|
86
|
-
"@backstage/test-utils": "^1.7.
|
|
82
|
+
"@backstage/cli": "^0.34.3",
|
|
83
|
+
"@backstage/core-app-api": "^1.19.0",
|
|
84
|
+
"@backstage/dev-utils": "^1.1.14",
|
|
85
|
+
"@backstage/frontend-test-utils": "^0.3.6",
|
|
86
|
+
"@backstage/test-utils": "^1.7.11",
|
|
87
87
|
"@testing-library/dom": "^10.0.0",
|
|
88
88
|
"@testing-library/jest-dom": "^6.0.0",
|
|
89
89
|
"@testing-library/react": "^15.0.0",
|