@backstage-community/plugin-newrelic 0.7.0 → 0.8.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/components/NewRelicComponent/NewRelicComponent.esm.js +8 -2
- package/dist/components/NewRelicComponent/NewRelicComponent.esm.js.map +1 -1
- package/dist/components/NewRelicFetchComponent/NewRelicFetchComponent.esm.js +5 -5
- package/dist/components/NewRelicFetchComponent/NewRelicFetchComponent.esm.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/package.json +13 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage-community/plugin-newrelic
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 360460d: Backstage version bump to v1.38.1
|
|
8
|
+
|
|
9
|
+
## 0.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4aad9f3: remove unused devDependency `canvas`
|
|
14
|
+
|
|
3
15
|
## 0.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
3
|
import NewRelicFetchComponent from '../NewRelicFetchComponent/NewRelicFetchComponent.esm.js';
|
|
4
4
|
import { Page, Header, HeaderLabel, Content, ContentHeader, SupportButton } from '@backstage/core-components';
|
|
5
5
|
|
|
6
|
-
const NewRelicComponent = () => /* @__PURE__ */
|
|
6
|
+
const NewRelicComponent = () => /* @__PURE__ */ jsxs(Page, { themeId: "tool", children: [
|
|
7
|
+
/* @__PURE__ */ jsx(Header, { title: "New Relic", children: /* @__PURE__ */ jsx(HeaderLabel, { label: "Owner", value: "Engineering" }) }),
|
|
8
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(ContentHeader, { title: "New Relic", children: /* @__PURE__ */ jsx(SupportButton, { children: "New Relic Application Performance Monitoring" }) }),
|
|
10
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 3, direction: "column", children: /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(NewRelicFetchComponent, {}) }) })
|
|
11
|
+
] })
|
|
12
|
+
] });
|
|
7
13
|
|
|
8
14
|
export { NewRelicComponent as default };
|
|
9
15
|
//# sourceMappingURL=NewRelicComponent.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewRelicComponent.esm.js","sources":["../../../src/components/NewRelicComponent/NewRelicComponent.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 */\n\nimport
|
|
1
|
+
{"version":3,"file":"NewRelicComponent.esm.js","sources":["../../../src/components/NewRelicComponent/NewRelicComponent.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 */\n\nimport Grid from '@material-ui/core/Grid';\nimport NewRelicFetchComponent from '../NewRelicFetchComponent';\nimport {\n Header,\n Page,\n Content,\n ContentHeader,\n HeaderLabel,\n SupportButton,\n} from '@backstage/core-components';\n\nconst NewRelicComponent = () => (\n <Page themeId=\"tool\">\n <Header title=\"New Relic\">\n <HeaderLabel label=\"Owner\" value=\"Engineering\" />\n </Header>\n <Content>\n <ContentHeader title=\"New Relic\">\n <SupportButton>\n New Relic Application Performance Monitoring\n </SupportButton>\n </ContentHeader>\n <Grid container spacing={3} direction=\"column\">\n <Grid item>\n <NewRelicFetchComponent />\n </Grid>\n </Grid>\n </Content>\n </Page>\n);\n\nexport default NewRelicComponent;\n"],"names":[],"mappings":";;;;;AA2BA,MAAM,iBAAoB,GAAA,sBACvB,IAAA,CAAA,IAAA,EAAA,EAAK,SAAQ,MACZ,EAAA,QAAA,EAAA;AAAA,kBAAC,GAAA,CAAA,MAAA,EAAA,EAAO,OAAM,WACZ,EAAA,QAAA,kBAAA,GAAA,CAAC,eAAY,KAAM,EAAA,OAAA,EAAQ,KAAM,EAAA,aAAA,EAAc,CACjD,EAAA,CAAA;AAAA,uBACC,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAc,KAAM,EAAA,WAAA,EACnB,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,0DAEf,CACF,EAAA,CAAA;AAAA,oBACC,GAAA,CAAA,IAAA,EAAA,EAAK,SAAS,EAAA,IAAA,EAAC,SAAS,CAAG,EAAA,SAAA,EAAU,QACpC,EAAA,QAAA,kBAAA,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EACR,QAAC,kBAAA,GAAA,CAAA,sBAAA,EAAA,EAAuB,GAC1B,CACF,EAAA;AAAA,GACF,EAAA;AAAA,CACF,EAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import Alert from '@material-ui/lab/Alert';
|
|
3
3
|
import useAsync from 'react-use/esm/useAsync';
|
|
4
4
|
import { newRelicApiRef } from '../../api/index.esm.js';
|
|
@@ -60,7 +60,7 @@ const NewRelicAPMTable = ({ applications }) => {
|
|
|
60
60
|
apdexScore
|
|
61
61
|
};
|
|
62
62
|
});
|
|
63
|
-
return /* @__PURE__ */
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
64
|
Table,
|
|
65
65
|
{
|
|
66
66
|
title: "Application Performance Monitoring",
|
|
@@ -79,11 +79,11 @@ const NewRelicFetchComponent = () => {
|
|
|
79
79
|
});
|
|
80
80
|
}, []);
|
|
81
81
|
if (loading) {
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ jsx(Progress, {});
|
|
83
83
|
} else if (error) {
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ jsx(Alert, { severity: "error", children: error.message });
|
|
85
85
|
}
|
|
86
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ jsx(NewRelicAPMTable, { applications: value || [] });
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
export { NewRelicAPMTable, NewRelicFetchComponent as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewRelicFetchComponent.esm.js","sources":["../../../src/components/NewRelicFetchComponent/NewRelicFetchComponent.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 */\n\nimport
|
|
1
|
+
{"version":3,"file":"NewRelicFetchComponent.esm.js","sources":["../../../src/components/NewRelicFetchComponent/NewRelicFetchComponent.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 */\n\nimport Alert from '@material-ui/lab/Alert';\nimport useAsync from 'react-use/esm/useAsync';\nimport { newRelicApiRef, NewRelicApplications } from '../../api';\n\nimport { Progress, Table, TableColumn } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst sortNumeric =\n <F extends string>(field: F) =>\n (a: { [key in F]: number }, b: { [key in F]: number }) => {\n return a[field] - b[field];\n };\n\ntype NewRelicTableData = {\n name: string;\n responseTime: number;\n throughput: number;\n errorRate: number;\n instanceCount: number;\n apdexScore: number;\n};\n\nexport const NewRelicAPMTable = ({ applications }: NewRelicApplications) => {\n const columns: TableColumn<NewRelicTableData>[] = [\n { title: 'Application', field: 'name', searchable: true },\n {\n title: 'Response Time (ms)',\n field: 'responseTime',\n customSort: sortNumeric('responseTime'),\n searchable: false,\n },\n {\n title: 'Throughput (rpm)',\n field: 'throughput',\n customSort: sortNumeric('throughput'),\n searchable: false,\n },\n {\n title: 'Error Rate (%)',\n field: 'errorRate',\n customSort: sortNumeric('errorRate'),\n searchable: false,\n },\n {\n title: 'Instance Count',\n field: 'instanceCount',\n customSort: sortNumeric('instanceCount'),\n searchable: false,\n },\n {\n title: 'Apdex',\n field: 'apdexScore',\n customSort: sortNumeric('apdexScore'),\n searchable: false,\n },\n ];\n const data: Array<NewRelicTableData> = applications.map(app => {\n const { name, application_summary: applicationSummary } = app;\n const {\n response_time: responseTime,\n throughput,\n error_rate: errorRate,\n instance_count: instanceCount,\n apdex_score: apdexScore,\n } = applicationSummary;\n\n return {\n name,\n responseTime,\n throughput,\n errorRate,\n instanceCount,\n apdexScore,\n };\n });\n\n return (\n <Table\n title=\"Application Performance Monitoring\"\n options={{ search: true, paging: true }}\n columns={columns}\n data={data}\n />\n );\n};\n\nconst NewRelicFetchComponent = () => {\n const api = useApi(newRelicApiRef);\n\n const { value, loading, error } = useAsync(async () => {\n const data = await api.getApplications();\n return data.applications.filter(application => {\n return application.hasOwnProperty('application_summary');\n });\n }, []);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <Alert severity=\"error\">{error.message}</Alert>;\n }\n\n return <NewRelicAPMTable applications={value || []} />;\n};\n\nexport default NewRelicFetchComponent;\n"],"names":[],"mappings":";;;;;;;AAuBA,MAAM,WACJ,GAAA,CAAmB,KACnB,KAAA,CAAC,GAA2B,CAA8B,KAAA;AACxD,EAAA,OAAO,CAAE,CAAA,KAAK,CAAI,GAAA,CAAA,CAAE,KAAK,CAAA;AAC3B,CAAA;AAWK,MAAM,gBAAmB,GAAA,CAAC,EAAE,YAAA,EAAyC,KAAA;AAC1E,EAAA,MAAM,OAA4C,GAAA;AAAA,IAChD,EAAE,KAAO,EAAA,aAAA,EAAe,KAAO,EAAA,MAAA,EAAQ,YAAY,IAAK,EAAA;AAAA,IACxD;AAAA,MACE,KAAO,EAAA,oBAAA;AAAA,MACP,KAAO,EAAA,cAAA;AAAA,MACP,UAAA,EAAY,YAAY,cAAc,CAAA;AAAA,MACtC,UAAY,EAAA;AAAA,KACd;AAAA,IACA;AAAA,MACE,KAAO,EAAA,kBAAA;AAAA,MACP,KAAO,EAAA,YAAA;AAAA,MACP,UAAA,EAAY,YAAY,YAAY,CAAA;AAAA,MACpC,UAAY,EAAA;AAAA,KACd;AAAA,IACA;AAAA,MACE,KAAO,EAAA,gBAAA;AAAA,MACP,KAAO,EAAA,WAAA;AAAA,MACP,UAAA,EAAY,YAAY,WAAW,CAAA;AAAA,MACnC,UAAY,EAAA;AAAA,KACd;AAAA,IACA;AAAA,MACE,KAAO,EAAA,gBAAA;AAAA,MACP,KAAO,EAAA,eAAA;A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,CAAA;AAAA,KACxD,CAAA;AAAA,GACH,EAAG,EAAE,CAAA;AAEL,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2BAAQ,QAAS,EAAA,EAAA,CAAA;AAAA,aACR,KAAO,EAAA;AAChB,IAAA,uBAAQ,GAAA,CAAA,KAAA,EAAA,EAAM,QAAS,EAAA,OAAA,EAAS,gBAAM,OAAQ,EAAA,CAAA;AAAA;AAGhD,EAAA,uBAAQ,GAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,IAAS,EAAI,EAAA,CAAA;AACtD;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as react from 'react';
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
3
|
|
|
5
4
|
/** @public */
|
|
@@ -7,6 +6,6 @@ declare const newRelicPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
|
7
6
|
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
8
7
|
}, {}, {}>;
|
|
9
8
|
/** @public */
|
|
10
|
-
declare const NewRelicPage: () =>
|
|
9
|
+
declare const NewRelicPage: () => react_jsx_runtime.JSX.Element;
|
|
11
10
|
|
|
12
11
|
export { NewRelicPage, newRelicPlugin, newRelicPlugin as plugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-newrelic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "A Backstage plugin that integrates towards New Relic",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"test": "backstage-cli package test"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@backstage/core-components": "^0.17.
|
|
45
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
44
|
+
"@backstage/core-components": "^0.17.1",
|
|
45
|
+
"@backstage/core-plugin-api": "^1.10.6",
|
|
46
46
|
"@material-ui/core": "^4.12.2",
|
|
47
47
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
48
48
|
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
@@ -50,15 +50,14 @@
|
|
|
50
50
|
"react-use": "^17.2.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@backstage/cli": "^0.
|
|
54
|
-
"@backstage/dev-utils": "^1.1.
|
|
55
|
-
"@backstage/test-utils": "^1.7.
|
|
53
|
+
"@backstage/cli": "^0.32.0",
|
|
54
|
+
"@backstage/dev-utils": "^1.1.9",
|
|
55
|
+
"@backstage/test-utils": "^1.7.7",
|
|
56
56
|
"@testing-library/dom": "^10.0.0",
|
|
57
57
|
"@testing-library/jest-dom": "^6.0.0",
|
|
58
58
|
"@testing-library/react": "^15.0.0",
|
|
59
59
|
"@types/parse-link-header": "^2.0.1",
|
|
60
60
|
"@types/react-dom": "^18.2.19",
|
|
61
|
-
"canvas": "^2.11.2",
|
|
62
61
|
"msw": "^1.2.3",
|
|
63
62
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
64
63
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
@@ -69,5 +68,12 @@
|
|
|
69
68
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
70
69
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
71
70
|
},
|
|
71
|
+
"typesVersions": {
|
|
72
|
+
"*": {
|
|
73
|
+
"package.json": [
|
|
74
|
+
"package.json"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
72
78
|
"module": "./dist/index.esm.js"
|
|
73
79
|
}
|