@backstage-community/plugin-newrelic-dashboard 0.21.1 → 0.23.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/Router.esm.js.map +1 -1
- package/dist/alpha/plugin.esm.js +1 -1
- package/dist/alpha/plugin.esm.js.map +1 -1
- package/dist/alpha.d.ts +12 -15
- package/dist/api/NewRelicDashboardApi.esm.js.map +1 -1
- package/dist/api/NewRelicDashboardClient.esm.js.map +1 -1
- package/dist/components/NewRelicDashboard/DashboardEntityList.esm.js.map +1 -1
- package/dist/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.esm.js.map +1 -1
- package/dist/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.esm.js.map +1 -1
- package/dist/components/NewRelicDashboard/NewRelicDashboard.esm.js.map +1 -1
- package/dist/constants.esm.js.map +1 -1
- package/dist/plugin.esm.js +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/dist/queries/getDashboardParentGuidQuery.esm.js.map +1 -1
- package/dist/queries/getDashboardSnapshotQuery.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage-community/plugin-newrelic-dashboard
|
|
2
2
|
|
|
3
|
+
## 0.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c43ea3a: Backstage version bump to v1.50.2
|
|
8
|
+
|
|
9
|
+
## 0.22.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ab9413d: Backstage version bump to v1.49.2
|
|
14
|
+
|
|
3
15
|
## 0.21.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/Router.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router.esm.js","sources":["../src/Router.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 { Entity } from '@backstage/catalog-model';\nimport Button from '@material-ui/core/Button';\nimport { NewRelicDashboard } from './components/NewRelicDashboard';\nimport {\n useEntity,\n MissingAnnotationEmptyState,\n} from '@backstage/plugin-catalog-react';\nimport { NEWRELIC_GUID_ANNOTATION } from './constants';\n\n/** @public */\nexport const isNewRelicDashboardAvailable = (entity: Entity) =>\n Boolean(entity?.metadata?.annotations?.[NEWRELIC_GUID_ANNOTATION]);\n\nexport const Router = () => {\n const { entity } = useEntity();\n\n if (isNewRelicDashboardAvailable(entity)) {\n return <NewRelicDashboard />;\n }\n\n return (\n <>\n <MissingAnnotationEmptyState annotation={NEWRELIC_GUID_ANNOTATION} />\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://github.com/backstage/backstage/tree/master/plugins/newrelic-dashboard\"\n >\n Read New Relic Dashboard Plugin Docs\n </Button>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"Router.esm.js","sources":["../src/Router.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 { Entity } from '@backstage/catalog-model';\nimport Button from '@material-ui/core/Button';\nimport { NewRelicDashboard } from './components/NewRelicDashboard';\nimport {\n useEntity,\n MissingAnnotationEmptyState,\n} from '@backstage/plugin-catalog-react';\nimport { NEWRELIC_GUID_ANNOTATION } from './constants';\n\n/** @public */\nexport const isNewRelicDashboardAvailable = (entity: Entity) =>\n Boolean(entity?.metadata?.annotations?.[NEWRELIC_GUID_ANNOTATION]);\n\nexport const Router = () => {\n const { entity } = useEntity();\n\n if (isNewRelicDashboardAvailable(entity)) {\n return <NewRelicDashboard />;\n }\n\n return (\n <>\n <MissingAnnotationEmptyState annotation={NEWRELIC_GUID_ANNOTATION} />\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://github.com/backstage/backstage/tree/master/plugins/newrelic-dashboard\"\n >\n Read New Relic Dashboard Plugin Docs\n </Button>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,4BAAA,GAA+B,CAAC,MAAA,KAC3C,OAAA,CAAQ,QAAQ,QAAA,EAAU,WAAA,GAAc,wBAAwB,CAAC;AAE5D,MAAM,SAAS,MAAM;AAC1B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAE7B,EAAA,IAAI,4BAAA,CAA6B,MAAM,CAAA,EAAG;AACxC,IAAA,2BAAQ,iBAAA,EAAA,EAAkB,CAAA;AAAA,EAC5B;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,2BAAA,EAAA,EAA4B,YAAY,wBAAA,EAA0B,CAAA;AAAA,oBACnE,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,WAAA;AAAA,QACR,KAAA,EAAM,SAAA;AAAA,QACN,IAAA,EAAK,+EAAA;AAAA,QACN,QAAA,EAAA;AAAA;AAAA;AAED,GAAA,EACF,CAAA;AAEJ;;;;"}
|
package/dist/alpha/plugin.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { ApiBlueprint,
|
|
2
|
+
import { ApiBlueprint, fetchApiRef, discoveryApiRef, createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
3
3
|
import { compatWrapper } from '@backstage/core-compat-api';
|
|
4
4
|
import { EntityContentBlueprint, EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
5
5
|
import { newRelicDashboardApiRef } from '../api/NewRelicDashboardApi.esm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 {\n ApiBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { compatWrapper } from '@backstage/core-compat-api';\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { newRelicDashboardApiRef, NewRelicDashboardClient } from '../api';\n\n/** @alpha */\nexport const newRelicApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: newRelicDashboardApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new NewRelicDashboardClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nexport const newRelicDashboardEntityContent = EntityContentBlueprint.make({\n name: 'EntityNewRelicDashboardContent',\n params: {\n path: '/newrelic-dashboard',\n title: 'New Relic Dashboard',\n loader: () => import('../Router').then(m => compatWrapper(<m.Router />)),\n },\n});\n\n/** @alpha */\nexport const newRelicDashboardCard = EntityCardBlueprint.make({\n name: 'EntityNewRelicDashboardCard',\n params: {\n loader: async () =>\n import('../components/NewRelicDashboard/DashboardEntityList').then(m =>\n compatWrapper(<m.DashboardEntityList />),\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'newrelic-dashboard',\n extensions: [\n newRelicApi,\n newRelicDashboardEntityContent,\n newRelicDashboardCard,\n ],\n});\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 {\n ApiBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { compatWrapper } from '@backstage/core-compat-api';\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { newRelicDashboardApiRef, NewRelicDashboardClient } from '../api';\n\n/** @alpha */\nexport const newRelicApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: newRelicDashboardApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new NewRelicDashboardClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nexport const newRelicDashboardEntityContent = EntityContentBlueprint.make({\n name: 'EntityNewRelicDashboardContent',\n params: {\n path: '/newrelic-dashboard',\n title: 'New Relic Dashboard',\n loader: () => import('../Router').then(m => compatWrapper(<m.Router />)),\n },\n});\n\n/** @alpha */\nexport const newRelicDashboardCard = EntityCardBlueprint.make({\n name: 'EntityNewRelicDashboardCard',\n params: {\n loader: async () =>\n import('../components/NewRelicDashboard/DashboardEntityList').then(m =>\n compatWrapper(<m.DashboardEntityList />),\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'newrelic-dashboard',\n extensions: [\n newRelicApi,\n newRelicDashboardEntityContent,\n newRelicDashboardCard,\n ],\n});\n"],"names":[],"mappings":";;;;;;;AA8BO,MAAM,WAAA,GAAc,aAAa,IAAA,CAAK;AAAA,EAC3C,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,uBAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,YAAA,EAAc,eAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,uBAAA,CAAwB,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,GACzD;AACL,CAAC;AAGM,MAAM,8BAAA,GAAiC,uBAAuB,IAAA,CAAK;AAAA,EACxE,IAAA,EAAM,gCAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,qBAAA;AAAA,IACN,KAAA,EAAO,qBAAA;AAAA,IACP,MAAA,EAAQ,MAAM,OAAO,kBAAW,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,KAAK,aAAA,iBAAc,GAAA,CAAC,CAAA,CAAE,MAAA,EAAF,EAAS,CAAE,CAAC;AAAA;AAE3E,CAAC;AAGM,MAAM,qBAAA,GAAwB,oBAAoB,IAAA,CAAK;AAAA,EAC5D,IAAA,EAAM,6BAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,YACN,OAAO,4DAAqD,CAAA,CAAE,IAAA;AAAA,MAAK,OACjE,aAAA,iBAAc,GAAA,CAAC,CAAA,CAAE,mBAAA,EAAF,EAAsB,CAAE;AAAA;AACzC;AAEN,CAAC;AAGD,aAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,oBAAA;AAAA,EACV,UAAA,EAAY;AAAA,IACV,WAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
|
|
3
2
|
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
4
3
|
import * as react from 'react';
|
|
@@ -14,9 +13,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
14
13
|
configInput: {};
|
|
15
14
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
|
|
16
15
|
inputs: {};
|
|
17
|
-
params: <TApi, TImpl extends TApi, TDeps extends {
|
|
18
|
-
[x: string]: unknown;
|
|
19
|
-
}>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
|
|
16
|
+
params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
|
|
20
17
|
}>;
|
|
21
18
|
"entity-card:newrelic-dashboard/EntityNewRelicDashboardCard": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
22
19
|
kind: "entity-card";
|
|
@@ -39,8 +36,8 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
39
36
|
inputs: {};
|
|
40
37
|
params: {
|
|
41
38
|
loader: () => Promise<JSX.Element>;
|
|
42
|
-
filter?: _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean)
|
|
43
|
-
type?: _backstage_plugin_catalog_react_alpha.EntityCardType
|
|
39
|
+
filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
40
|
+
type?: _backstage_plugin_catalog_react_alpha.EntityCardType;
|
|
44
41
|
};
|
|
45
42
|
}>;
|
|
46
43
|
"entity-content:newrelic-dashboard/EntityNewRelicDashboardContent": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
@@ -54,9 +51,9 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
54
51
|
icon: string | undefined;
|
|
55
52
|
};
|
|
56
53
|
configInput: {
|
|
57
|
-
filter?: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
58
|
-
title?: string | undefined;
|
|
59
54
|
path?: string | undefined;
|
|
55
|
+
title?: string | undefined;
|
|
56
|
+
filter?: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
60
57
|
group?: string | false | undefined;
|
|
61
58
|
icon?: string | undefined;
|
|
62
59
|
};
|
|
@@ -73,16 +70,16 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
73
70
|
}>;
|
|
74
71
|
inputs: {};
|
|
75
72
|
params: {
|
|
76
|
-
defaultPath?: [Error:
|
|
73
|
+
defaultPath?: [Error: `Use the 'path' param instead`];
|
|
77
74
|
path: string;
|
|
78
|
-
defaultTitle?: [Error:
|
|
75
|
+
defaultTitle?: [Error: `Use the 'title' param instead`];
|
|
79
76
|
title: string;
|
|
80
|
-
defaultGroup?: [Error:
|
|
81
|
-
group?: (
|
|
82
|
-
icon?: string | react.ReactElement
|
|
77
|
+
defaultGroup?: [Error: `Use the 'group' param instead`];
|
|
78
|
+
group?: ("operation" | "development" | "deployment" | "overview" | "documentation" | "observability") | (string & {});
|
|
79
|
+
icon?: string | react.ReactElement;
|
|
83
80
|
loader: () => Promise<JSX.Element>;
|
|
84
|
-
routeRef?: _backstage_frontend_plugin_api.RouteRef
|
|
85
|
-
filter?: _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean)
|
|
81
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
82
|
+
filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
86
83
|
};
|
|
87
84
|
}>;
|
|
88
85
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewRelicDashboardApi.esm.js","sources":["../../src/api/NewRelicDashboardApi.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { createApiRef } from '@backstage/core-plugin-api';\nimport { DashboardEntity } from '../types/DashboardEntity';\nimport { DashboardSnapshot } from '../types/DashboardSnapshot';\nimport { SnapshotDetails } from '../types/SnapshotDetails';\n\nexport interface DashboardEntitySummary {\n getDashboardEntity: DashboardEntity;\n}\n\nexport interface DashboardSnapshotSummary {\n getDashboardSnapshot: DashboardSnapshot;\n}\n\nexport interface SnapshotDetailsSummary {\n getSnapshotDetails: SnapshotDetails[];\n}\nexport const newRelicDashboardApiRef = createApiRef<NewRelicDashboardApi>({\n id: 'plugin.newrelicdashboard.service',\n});\n\nexport type NewRelicDashboardApi = {\n getDashboardEntity(guid: string): Promise<DashboardEntitySummary | undefined>;\n getDashboardSnapshot(\n guid: string,\n duration: number,\n ): Promise<DashboardSnapshotSummary | undefined>;\n};\n"],"names":[],"mappings":";;AA+BO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"NewRelicDashboardApi.esm.js","sources":["../../src/api/NewRelicDashboardApi.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { createApiRef } from '@backstage/core-plugin-api';\nimport { DashboardEntity } from '../types/DashboardEntity';\nimport { DashboardSnapshot } from '../types/DashboardSnapshot';\nimport { SnapshotDetails } from '../types/SnapshotDetails';\n\nexport interface DashboardEntitySummary {\n getDashboardEntity: DashboardEntity;\n}\n\nexport interface DashboardSnapshotSummary {\n getDashboardSnapshot: DashboardSnapshot;\n}\n\nexport interface SnapshotDetailsSummary {\n getSnapshotDetails: SnapshotDetails[];\n}\nexport const newRelicDashboardApiRef = createApiRef<NewRelicDashboardApi>({\n id: 'plugin.newrelicdashboard.service',\n});\n\nexport type NewRelicDashboardApi = {\n getDashboardEntity(guid: string): Promise<DashboardEntitySummary | undefined>;\n getDashboardSnapshot(\n guid: string,\n duration: number,\n ): Promise<DashboardSnapshotSummary | undefined>;\n};\n"],"names":[],"mappings":";;AA+BO,MAAM,0BAA0B,YAAA,CAAmC;AAAA,EACxE,EAAA,EAAI;AACN,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewRelicDashboardClient.esm.js","sources":["../../src/api/NewRelicDashboardClient.ts"],"sourcesContent":["/*\n * Copyright 2021 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 DashboardEntitySummary,\n DashboardSnapshotSummary,\n NewRelicDashboardApi,\n} from './NewRelicDashboardApi';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { DashboardEntity } from '../types/DashboardEntity';\nimport { DashboardSnapshot } from '../types/DashboardSnapshot';\nimport { getDashboardParentGuidQuery } from '../queries/getDashboardParentGuidQuery';\nimport { getDashboardSnapshotQuery } from '../queries/getDashboardSnapshotQuery';\nimport { ResponseError } from '@backstage/errors';\n\nexport class NewRelicDashboardClient implements NewRelicDashboardApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor({\n discoveryApi,\n fetchApi,\n }: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n baseUrl?: string;\n }) {\n this.discoveryApi = discoveryApi;\n this.fetchApi = fetchApi;\n }\n\n private async callApi<T>(\n query: string,\n variables: { [key in string]: string | number },\n ): Promise<T | undefined> {\n const myHeaders = new Headers();\n myHeaders.append('Content-Type', 'application/json');\n const graphql = JSON.stringify({\n query: query,\n variables: variables,\n });\n const requestOptions: RequestInit = {\n method: 'POST',\n headers: myHeaders,\n body: graphql,\n redirect: 'follow',\n };\n\n const apiUrl = `${await this.discoveryApi.getBaseUrl(\n 'proxy',\n )}/newrelic/api/graphql`;\n const response = await this.fetchApi.fetch(apiUrl, requestOptions);\n if (response.status === 200) {\n return (await response.json()) as T;\n }\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n } else {\n return undefined;\n }\n }\n\n async getDashboardEntity(\n guid: string,\n ): Promise<DashboardEntitySummary | undefined> {\n const DashboardEntityList = await this.callApi<DashboardEntity>(\n getDashboardParentGuidQuery,\n {\n query: `id ='${guid}' OR parentId ='${guid}'`,\n },\n );\n if (\n DashboardEntityList &&\n DashboardEntityList?.data?.actor.entitySearch.results.entities?.length > 1\n ) {\n DashboardEntityList.data.actor.entitySearch.results.entities =\n DashboardEntityList?.data.actor.entitySearch.results.entities.filter(\n entity => entity?.dashboardParentGuid !== null,\n );\n }\n return {\n getDashboardEntity: DashboardEntityList!,\n };\n }\n\n async getDashboardSnapshot(\n guid: string,\n duration: number,\n ): Promise<DashboardSnapshotSummary | undefined> {\n const DashboardSnapshotValue = await this.callApi<DashboardSnapshot>(\n getDashboardSnapshotQuery,\n {\n guid: guid,\n duration: duration,\n },\n );\n return {\n getDashboardSnapshot: DashboardSnapshotValue!,\n };\n }\n}\n"],"names":[],"mappings":";;;;AA2BO,MAAM,
|
|
1
|
+
{"version":3,"file":"NewRelicDashboardClient.esm.js","sources":["../../src/api/NewRelicDashboardClient.ts"],"sourcesContent":["/*\n * Copyright 2021 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 DashboardEntitySummary,\n DashboardSnapshotSummary,\n NewRelicDashboardApi,\n} from './NewRelicDashboardApi';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { DashboardEntity } from '../types/DashboardEntity';\nimport { DashboardSnapshot } from '../types/DashboardSnapshot';\nimport { getDashboardParentGuidQuery } from '../queries/getDashboardParentGuidQuery';\nimport { getDashboardSnapshotQuery } from '../queries/getDashboardSnapshotQuery';\nimport { ResponseError } from '@backstage/errors';\n\nexport class NewRelicDashboardClient implements NewRelicDashboardApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor({\n discoveryApi,\n fetchApi,\n }: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n baseUrl?: string;\n }) {\n this.discoveryApi = discoveryApi;\n this.fetchApi = fetchApi;\n }\n\n private async callApi<T>(\n query: string,\n variables: { [key in string]: string | number },\n ): Promise<T | undefined> {\n const myHeaders = new Headers();\n myHeaders.append('Content-Type', 'application/json');\n const graphql = JSON.stringify({\n query: query,\n variables: variables,\n });\n const requestOptions: RequestInit = {\n method: 'POST',\n headers: myHeaders,\n body: graphql,\n redirect: 'follow',\n };\n\n const apiUrl = `${await this.discoveryApi.getBaseUrl(\n 'proxy',\n )}/newrelic/api/graphql`;\n const response = await this.fetchApi.fetch(apiUrl, requestOptions);\n if (response.status === 200) {\n return (await response.json()) as T;\n }\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n } else {\n return undefined;\n }\n }\n\n async getDashboardEntity(\n guid: string,\n ): Promise<DashboardEntitySummary | undefined> {\n const DashboardEntityList = await this.callApi<DashboardEntity>(\n getDashboardParentGuidQuery,\n {\n query: `id ='${guid}' OR parentId ='${guid}'`,\n },\n );\n if (\n DashboardEntityList &&\n DashboardEntityList?.data?.actor.entitySearch.results.entities?.length > 1\n ) {\n DashboardEntityList.data.actor.entitySearch.results.entities =\n DashboardEntityList?.data.actor.entitySearch.results.entities.filter(\n entity => entity?.dashboardParentGuid !== null,\n );\n }\n return {\n getDashboardEntity: DashboardEntityList!,\n };\n }\n\n async getDashboardSnapshot(\n guid: string,\n duration: number,\n ): Promise<DashboardSnapshotSummary | undefined> {\n const DashboardSnapshotValue = await this.callApi<DashboardSnapshot>(\n getDashboardSnapshotQuery,\n {\n guid: guid,\n duration: duration,\n },\n );\n return {\n getDashboardSnapshot: DashboardSnapshotValue!,\n };\n }\n}\n"],"names":[],"mappings":";;;;AA2BO,MAAM,uBAAA,CAAwD;AAAA,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AO,CAAA,KAAA,EAAQ,IAAI,CAAA,gBAAA,EAAmB,IAAI,CAAA,CAAA;AAAA;AAC5C,KACF;AACA,IAAA,IACE,mBAAA,IACA,qBAAqB,IAAA,EAAM,KAAA,CAAM,aAAa,OAAA,CAAQ,QAAA,EAAU,SAAS,CAAA,EACzE;AACA,MAAA,mBAAA,CAAoB,IAAA,CAAK,KAAA,CAAM,YAAA,CAAa,OAAA,CAAQ,QAAA,GAClD,qBAAqB,IAAA,CAAK,KAAA,CAAM,YAAA,CAAa,OAAA,CAAQ,QAAA,CAAS,MAAA;AAAA,QAC5D,CAAA,MAAA,KAAU,QAAQ,mBAAA,KAAwB;AAAA,OAC5C;AAAA,IACJ;AACA,IAAA,OAAO;AAAA,MACL,kBAAA,EAAoB;AAAA,KACtB;AAAA,EACF;AAAA,EAEA,MAAM,oBAAA,CACJ,IAAA,EACA,QAAA,EAC+C;AAC/C,IAAA,MAAM,sBAAA,GAAyB,MAAM,IAAA,CAAK,OAAA;AAAA,MACxC,yBAAA;AAAA,MACA;AAAA,QACE,IAAA;AAAA,QACA;AAAA;AACF,KACF;AACA,IAAA,OAAO;AAAA,MACL,oBAAA,EAAsB;AAAA,KACxB;AAAA,EACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardEntityList.esm.js","sources":["../../../src/components/NewRelicDashboard/DashboardEntityList.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Box from '@material-ui/core/Box';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport Typography from '@material-ui/core/Typography';\nimport { newRelicDashboardApiRef } from '../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n Progress,\n InfoCard,\n Link,\n ErrorPanel,\n} from '@backstage/core-components';\nimport DesktopMac from '@material-ui/icons/DesktopMac';\nimport { DashboardEntitySummary } from '../../api/NewRelicDashboardApi';\nimport { ResultEntity } from '../../types/DashboardEntity';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { NEWRELIC_GUID_ANNOTATION } from '../../constants';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\nexport const DashboardEntityList = () => {\n const { entity } = useEntity();\n const classes = useStyles();\n const newRelicDashboardAPI = useApi(newRelicDashboardApiRef);\n const { value, loading, error } = useAsync(async (): Promise<\n DashboardEntitySummary | undefined\n > => {\n const dashboardObject: Promise<DashboardEntitySummary | undefined> =\n newRelicDashboardAPI.getDashboardEntity(\n String(entity.metadata.annotations?.[NEWRELIC_GUID_ANNOTATION]),\n );\n return dashboardObject;\n }, [entity.metadata.annotations?.[NEWRELIC_GUID_ANNOTATION]]);\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel title={error.name} defaultExpanded error={error} />;\n }\n return (\n <InfoCard title=\"New Relic Dashboard Pages\" variant=\"gridItem\">\n {value?.getDashboardEntity === undefined &&\n 'Unauthorized Request , please check API Key'}\n {value?.getDashboardEntity !== undefined &&\n value?.getDashboardEntity?.data.actor.entitySearch.results?.entities\n ?.length <= 0 && (\n <>No Dashboard Pages found with the specified Dashboard GUID</>\n )}\n {value?.getDashboardEntity?.data.actor.entitySearch.results.entities?.map(\n (entityResult: ResultEntity, index: number) => {\n return (\n <Box style={{ margin: '10px' }} display=\"flex\" key={index}>\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n <DesktopMac />\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={entityResult.permalink}>{entityResult.name}</Link>\n </Box>\n </Box>\n );\n },\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"DashboardEntityList.esm.js","sources":["../../../src/components/NewRelicDashboard/DashboardEntityList.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Box from '@material-ui/core/Box';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport Typography from '@material-ui/core/Typography';\nimport { newRelicDashboardApiRef } from '../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n Progress,\n InfoCard,\n Link,\n ErrorPanel,\n} from '@backstage/core-components';\nimport DesktopMac from '@material-ui/icons/DesktopMac';\nimport { DashboardEntitySummary } from '../../api/NewRelicDashboardApi';\nimport { ResultEntity } from '../../types/DashboardEntity';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { NEWRELIC_GUID_ANNOTATION } from '../../constants';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\nexport const DashboardEntityList = () => {\n const { entity } = useEntity();\n const classes = useStyles();\n const newRelicDashboardAPI = useApi(newRelicDashboardApiRef);\n const { value, loading, error } = useAsync(async (): Promise<\n DashboardEntitySummary | undefined\n > => {\n const dashboardObject: Promise<DashboardEntitySummary | undefined> =\n newRelicDashboardAPI.getDashboardEntity(\n String(entity.metadata.annotations?.[NEWRELIC_GUID_ANNOTATION]),\n );\n return dashboardObject;\n }, [entity.metadata.annotations?.[NEWRELIC_GUID_ANNOTATION]]);\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel title={error.name} defaultExpanded error={error} />;\n }\n return (\n <InfoCard title=\"New Relic Dashboard Pages\" variant=\"gridItem\">\n {value?.getDashboardEntity === undefined &&\n 'Unauthorized Request , please check API Key'}\n {value?.getDashboardEntity !== undefined &&\n value?.getDashboardEntity?.data.actor.entitySearch.results?.entities\n ?.length <= 0 && (\n <>No Dashboard Pages found with the specified Dashboard GUID</>\n )}\n {value?.getDashboardEntity?.data.actor.entitySearch.results.entities?.map(\n (entityResult: ResultEntity, index: number) => {\n return (\n <Box style={{ margin: '10px' }} display=\"flex\" key={index}>\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n <DesktopMac />\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={entityResult.permalink}>{entityResult.name}</Link>\n </Box>\n </Box>\n );\n },\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,OAAA,EAAS;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS;AAAA,MACP,OAAA,EAAS,cAAA;AAAA,MACT,QAAA,EAAU,SAAA;AAAA,MACV,aAAA,EAAe;AAAA;AACjB;AAEJ,CAAC,CAAA;AACM,MAAM,sBAAsB,MAAM;AACvC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,oBAAA,GAAuB,OAAO,uBAAuB,CAAA;AAC3D,EAAA,MAAM,EAAE,KAAA,EAAO,OAAA,EAAS,KAAA,EAAM,GAAI,SAAS,YAEtC;AACH,IAAA,MAAM,kBACJ,oBAAA,CAAqB,kBAA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AW,GACd,CAAA,EACF,CAAA;AAAA,0BACA,GAAA,CAAC,GAAA,EAAA,EAAI,QAAA,EAAS,GAAA,EACZ,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,YAAA,CAAa,SAAA,EAAY,QAAA,EAAA,YAAA,CAAa,IAAA,EAAK,CAAA,EACvD;AAAA,SAAA,EAAA,EARkD,KASpD,CAAA;AAAA,MAEJ;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
|
package/dist/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardSnapshot.esm.js","sources":["../../../../src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Box from '@material-ui/core/Box';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport { useApi, storageApiRef } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n InfoCard,\n Progress,\n ErrorPanel,\n Link,\n} from '@backstage/core-components';\nimport { newRelicDashboardApiRef } from '../../../api';\nimport { DashboardSnapshotSummary } from '../../../api/NewRelicDashboardApi';\nimport useObservable from 'react-use/esm/useObservable';\n\nconst useStyles = makeStyles(\n theme => ({\n cardSelect: {\n margin: theme.spacing(2, 1, 0, 0),\n },\n img: {\n width: '100%',\n height: 'auto',\n border: `solid 1px ${theme.palette.common.black}`,\n },\n }),\n { name: 'BackstageNewRelicDashboardSnapshot' },\n);\n\n/**\n * @public\n */\nexport const DashboardSnapshot = (props: {\n guid: string;\n name: string;\n permalink: string;\n}) => {\n const classes = useStyles();\n const { guid, name, permalink } = props;\n const newRelicDashboardAPI = useApi(newRelicDashboardApiRef);\n const storageApi = useApi(storageApiRef).forBucket('newrelic-dashboard');\n const setStorageValue = (value: number) => {\n storageApi.set(guid, value);\n };\n const storageSnapshot = useObservable(\n storageApi.observe$<number>(guid),\n storageApi.snapshot(guid),\n );\n\n const { value, loading, error } = useAsync(async (): Promise<\n DashboardSnapshotSummary | undefined\n > => {\n const dashboardObject: Promise<DashboardSnapshotSummary | undefined> =\n newRelicDashboardAPI.getDashboardSnapshot(\n guid,\n storageSnapshot.value || 2592000000,\n );\n return dashboardObject;\n }, [guid, storageSnapshot.value]);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel title={error.name} defaultExpanded error={error} />;\n }\n\n const url = value?.getDashboardSnapshot?.data?.dashboardCreateSnapshotUrl;\n\n return (\n <InfoCard\n variant=\"gridItem\"\n title={name}\n action={\n <div>\n <Select\n className={classes.cardSelect}\n defaultValue={2592000000}\n value={storageSnapshot.value}\n onChange={event => {\n setStorageValue(Number(event.target.value));\n }}\n >\n <MenuItem value={3600000}>1 Hour</MenuItem>\n <MenuItem value={43200000}>12 Hours</MenuItem>\n <MenuItem value={86400000}>1 Day</MenuItem>\n <MenuItem value={259200000}>3 Days</MenuItem>\n <MenuItem value={604800000}>1 Week</MenuItem>\n <MenuItem value={2592000000}>1 Month</MenuItem>\n </Select>\n </div>\n }\n >\n <Box display=\"flex\">\n <Box flexGrow=\"1\">\n <Link to={permalink}>\n {url ? (\n <img\n alt={`${name} Dashboard`}\n className={classes.img}\n src={url}\n />\n ) : (\n 'Dashboard loading... , click here to open if it did not render correctly'\n )}\n </Link>\n </Box>\n </Box>\n </InfoCard>\n );\n};\n"],"names":["value"],"mappings":";;;;;;;;;;;;AAgCA,MAAM,
|
|
1
|
+
{"version":3,"file":"DashboardSnapshot.esm.js","sources":["../../../../src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Box from '@material-ui/core/Box';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport { useApi, storageApiRef } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n InfoCard,\n Progress,\n ErrorPanel,\n Link,\n} from '@backstage/core-components';\nimport { newRelicDashboardApiRef } from '../../../api';\nimport { DashboardSnapshotSummary } from '../../../api/NewRelicDashboardApi';\nimport useObservable from 'react-use/esm/useObservable';\n\nconst useStyles = makeStyles(\n theme => ({\n cardSelect: {\n margin: theme.spacing(2, 1, 0, 0),\n },\n img: {\n width: '100%',\n height: 'auto',\n border: `solid 1px ${theme.palette.common.black}`,\n },\n }),\n { name: 'BackstageNewRelicDashboardSnapshot' },\n);\n\n/**\n * @public\n */\nexport const DashboardSnapshot = (props: {\n guid: string;\n name: string;\n permalink: string;\n}) => {\n const classes = useStyles();\n const { guid, name, permalink } = props;\n const newRelicDashboardAPI = useApi(newRelicDashboardApiRef);\n const storageApi = useApi(storageApiRef).forBucket('newrelic-dashboard');\n const setStorageValue = (value: number) => {\n storageApi.set(guid, value);\n };\n const storageSnapshot = useObservable(\n storageApi.observe$<number>(guid),\n storageApi.snapshot(guid),\n );\n\n const { value, loading, error } = useAsync(async (): Promise<\n DashboardSnapshotSummary | undefined\n > => {\n const dashboardObject: Promise<DashboardSnapshotSummary | undefined> =\n newRelicDashboardAPI.getDashboardSnapshot(\n guid,\n storageSnapshot.value || 2592000000,\n );\n return dashboardObject;\n }, [guid, storageSnapshot.value]);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel title={error.name} defaultExpanded error={error} />;\n }\n\n const url = value?.getDashboardSnapshot?.data?.dashboardCreateSnapshotUrl;\n\n return (\n <InfoCard\n variant=\"gridItem\"\n title={name}\n action={\n <div>\n <Select\n className={classes.cardSelect}\n defaultValue={2592000000}\n value={storageSnapshot.value}\n onChange={event => {\n setStorageValue(Number(event.target.value));\n }}\n >\n <MenuItem value={3600000}>1 Hour</MenuItem>\n <MenuItem value={43200000}>12 Hours</MenuItem>\n <MenuItem value={86400000}>1 Day</MenuItem>\n <MenuItem value={259200000}>3 Days</MenuItem>\n <MenuItem value={604800000}>1 Week</MenuItem>\n <MenuItem value={2592000000}>1 Month</MenuItem>\n </Select>\n </div>\n }\n >\n <Box display=\"flex\">\n <Box flexGrow=\"1\">\n <Link to={permalink}>\n {url ? (\n <img\n alt={`${name} Dashboard`}\n className={classes.img}\n src={url}\n />\n ) : (\n 'Dashboard loading... , click here to open if it did not render correctly'\n )}\n </Link>\n </Box>\n </Box>\n </InfoCard>\n );\n};\n"],"names":["value"],"mappings":";;;;;;;;;;;;AAgCA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,UAAA,EAAY;AAAA,MACV,QAAQ,KAAA,CAAM,OAAA,CAAQ,CAAA,EAAG,CAAA,EAAG,GAAG,CAAC;AAAA,KAClC;AAAA,IACA,GAAA,EAAK;AAAA,MACH,KAAA,EAAO,MAAA;AAAA,MACP,MAAA,EAAQ,MAAA;AAAA,MACR,MAAA,EAAQ,CAAA,UAAA,EAAa,KAAA,CAAM,OAAA,CAAQ,OAAO,KAAK,CAAA;AAAA;AACj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EAAI,SAAA,EACP,QAAA,EAAA,GAAA,mBACC,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,GAAA,EAAK,GAAG,IAAI,CAAA,UAAA,CAAA;AAAA,UACZ,WAAW,OAAA,CAAQ,GAAA;AAAA,UACnB,GAAA,EAAK;AAAA;AAAA,OACP,GAEA,0EAAA,EAEJ,CAAA,EACF,CAAA,EACF;AAAA;AAAA,GACF;AAEJ;;;;"}
|
package/dist/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardSnapshotList.esm.js","sources":["../../../../src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 type { ReactNode, ChangeEvent } from 'react';\n\nimport { useState } from 'react';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport Box from '@material-ui/core/Box';\nimport { newRelicDashboardApiRef } from '../../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { Progress, ErrorPanel } from '@backstage/core-components';\nimport { DashboardSnapshot } from './DashboardSnapshot';\nimport { DashboardEntitySummary } from '../../../api/NewRelicDashboardApi';\nimport { ResultEntity } from '../../../types/DashboardEntity';\n\ninterface TabPanelProps {\n children?: ReactNode;\n index: number;\n value1: number;\n}\n\nconst tabPanelStyles = makeStyles(\n theme => ({\n tabPanel: {\n marginTop: theme.spacing(0.5),\n },\n }),\n { name: 'BackstageNewRelicDashboardTabPanel' },\n);\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value1, index, ...other } = props;\n const classes = tabPanelStyles(tabPanelStyles);\n\n return (\n <div\n className={classes.tabPanel}\n role=\"tabpanel\"\n hidden={value1 !== index}\n id={`simple-tabpanel-${index}`}\n aria-labelledby={`simple-tab-${index}`}\n {...other}\n >\n {children}\n </div>\n );\n}\n\nfunction a11yProps(index: number) {\n return {\n id: `simple-tab-${index}`,\n 'aria-controls': `simple-tabpanel-${index}`,\n };\n}\n\nconst useStyles = makeStyles(\n theme => ({\n tabsWrapper: {\n gridArea: 'pageSubheader',\n backgroundColor: theme.palette.background.paper,\n paddingLeft: theme.spacing(3),\n },\n defaultTab: {\n padding: theme.spacing(3, 3),\n ...theme.typography.caption,\n textTransform: 'uppercase',\n fontWeight: 'bold',\n color: theme.palette.text.secondary,\n },\n selected: {\n color: theme.palette.text.primary,\n },\n tabRoot: {\n '&:hover': {\n backgroundColor: theme.palette.background.default,\n color: theme.palette.text.primary,\n },\n },\n }),\n { name: 'DashboardHeaderTabs' },\n);\n\nexport const DashboardSnapshotList = (props: { guid: string }) => {\n const { guid } = props;\n const styles = useStyles();\n const newRelicDashboardAPI = useApi(newRelicDashboardApiRef);\n const { value, loading, error } = useAsync(async (): Promise<\n DashboardEntitySummary | undefined\n > => {\n const dashboardObject: Promise<DashboardEntitySummary | undefined> =\n newRelicDashboardAPI.getDashboardEntity(guid);\n return dashboardObject;\n }, [guid]);\n const [value1, setValue1] = useState<number>(0);\n const handleChange = ({}: ChangeEvent<{}>, newValue: number) => {\n setValue1(newValue);\n };\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel title={error.name} defaultExpanded error={error} />;\n }\n return (\n <Box>\n <Tabs\n selectionFollowsFocus\n indicatorColor=\"primary\"\n textColor=\"inherit\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n aria-label=\"scrollable auto tabs example\"\n onChange={handleChange}\n value={value1}\n >\n {value?.getDashboardEntity?.data?.actor.entitySearch.results.entities?.map(\n (Entity: ResultEntity, index: number) => {\n return (\n <Tab\n label={Entity.name}\n className={styles.defaultTab}\n classes={{\n selected: styles.selected,\n root: styles.tabRoot,\n }}\n {...a11yProps(index)}\n />\n );\n },\n )}\n </Tabs>\n {value?.getDashboardEntity?.data?.actor.entitySearch.results.entities?.map(\n (Entity: ResultEntity, index: number) => {\n return (\n <TabPanel value1={value1} index={index}>\n <DashboardSnapshot\n name={Entity.name}\n permalink={Entity.permalink}\n guid={Entity.guid}\n />\n </TabPanel>\n );\n },\n )}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoCA,MAAM,
|
|
1
|
+
{"version":3,"file":"DashboardSnapshotList.esm.js","sources":["../../../../src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 type { ReactNode, ChangeEvent } from 'react';\n\nimport { useState } from 'react';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport Box from '@material-ui/core/Box';\nimport { newRelicDashboardApiRef } from '../../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { Progress, ErrorPanel } from '@backstage/core-components';\nimport { DashboardSnapshot } from './DashboardSnapshot';\nimport { DashboardEntitySummary } from '../../../api/NewRelicDashboardApi';\nimport { ResultEntity } from '../../../types/DashboardEntity';\n\ninterface TabPanelProps {\n children?: ReactNode;\n index: number;\n value1: number;\n}\n\nconst tabPanelStyles = makeStyles(\n theme => ({\n tabPanel: {\n marginTop: theme.spacing(0.5),\n },\n }),\n { name: 'BackstageNewRelicDashboardTabPanel' },\n);\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value1, index, ...other } = props;\n const classes = tabPanelStyles(tabPanelStyles);\n\n return (\n <div\n className={classes.tabPanel}\n role=\"tabpanel\"\n hidden={value1 !== index}\n id={`simple-tabpanel-${index}`}\n aria-labelledby={`simple-tab-${index}`}\n {...other}\n >\n {children}\n </div>\n );\n}\n\nfunction a11yProps(index: number) {\n return {\n id: `simple-tab-${index}`,\n 'aria-controls': `simple-tabpanel-${index}`,\n };\n}\n\nconst useStyles = makeStyles(\n theme => ({\n tabsWrapper: {\n gridArea: 'pageSubheader',\n backgroundColor: theme.palette.background.paper,\n paddingLeft: theme.spacing(3),\n },\n defaultTab: {\n padding: theme.spacing(3, 3),\n ...theme.typography.caption,\n textTransform: 'uppercase',\n fontWeight: 'bold',\n color: theme.palette.text.secondary,\n },\n selected: {\n color: theme.palette.text.primary,\n },\n tabRoot: {\n '&:hover': {\n backgroundColor: theme.palette.background.default,\n color: theme.palette.text.primary,\n },\n },\n }),\n { name: 'DashboardHeaderTabs' },\n);\n\nexport const DashboardSnapshotList = (props: { guid: string }) => {\n const { guid } = props;\n const styles = useStyles();\n const newRelicDashboardAPI = useApi(newRelicDashboardApiRef);\n const { value, loading, error } = useAsync(async (): Promise<\n DashboardEntitySummary | undefined\n > => {\n const dashboardObject: Promise<DashboardEntitySummary | undefined> =\n newRelicDashboardAPI.getDashboardEntity(guid);\n return dashboardObject;\n }, [guid]);\n const [value1, setValue1] = useState<number>(0);\n const handleChange = ({}: ChangeEvent<{}>, newValue: number) => {\n setValue1(newValue);\n };\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel title={error.name} defaultExpanded error={error} />;\n }\n return (\n <Box>\n <Tabs\n selectionFollowsFocus\n indicatorColor=\"primary\"\n textColor=\"inherit\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n aria-label=\"scrollable auto tabs example\"\n onChange={handleChange}\n value={value1}\n >\n {value?.getDashboardEntity?.data?.actor.entitySearch.results.entities?.map(\n (Entity: ResultEntity, index: number) => {\n return (\n <Tab\n label={Entity.name}\n className={styles.defaultTab}\n classes={{\n selected: styles.selected,\n root: styles.tabRoot,\n }}\n {...a11yProps(index)}\n />\n );\n },\n )}\n </Tabs>\n {value?.getDashboardEntity?.data?.actor.entitySearch.results.entities?.map(\n (Entity: ResultEntity, index: number) => {\n return (\n <TabPanel value1={value1} index={index}>\n <DashboardSnapshot\n name={Entity.name}\n permalink={Entity.permalink}\n guid={Entity.guid}\n />\n </TabPanel>\n );\n },\n )}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoCA,MAAM,cAAA,GAAiB,UAAA;AAAA,EACrB,CAAA,KAAA,MAAU;AAAA,IACR,QAAA,EAAU;AAAA,MACR,SAAA,EAAW,KAAA,CAAM,OAAA,CAAQ,GAAG;AAAA;AAC9B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oCAAA;AACV,CAAA;AAEA,SAAS,SAAS,KAAA,EAAsB;AACtC,EAAA,MAAM,EAAE,QAAA,EAAU,MAAA,EAAQ,KAAA,EAAO,GAAG,OAAM,GAAI,KAAA;AAC9C,EAAA,MAAM,OAAA,GAAU,eAAe,cAAc,CAAA;AAE7C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,QAAA;AAAA,MACnB,IAAA,EAAK,UAAA;AAAA,MACL,QAAQ,MAAA,KAAW,KAAA;AAAA,MACnB,EAAA,EAAI,mBAAmB,KAAK,CAAA,CAAA;AAAA,MAC5B,iBAAA,EAAiB,cAAc,KAAK,CAAA,CAAA;AAAA,MACnC,GAAG,KAAA;AAAA,MAEH;AA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gBAClB,OAAA,EAAS;AAAA,kBACP,UAAU,MAAA,CAAO,QAAA;AAAA,kBACjB,MAAM,MAAA,CAAO;AAAA,iBACf;AAAA,gBACC,GAAG,UAAU,KAAK;AAAA;AAAA,aACrB;AAAA,UAEJ;AAAA;AACF;AAAA,KACF;AAAA,IACC,OAAO,kBAAA,EAAoB,IAAA,EAAM,KAAA,CAAM,YAAA,CAAa,QAAQ,QAAA,EAAU,GAAA;AAAA,MACrE,CAAC,QAAsB,KAAA,KAAkB;AACvC,QAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,MAAA,EAAgB,KAAA,EACxB,QAAA,kBAAA,GAAA;AAAA,UAAC,iBAAA;AAAA,UAAA;AAAA,YACC,MAAM,MAAA,CAAO,IAAA;AAAA,YACb,WAAW,MAAA,CAAO,SAAA;AAAA,YAClB,MAAM,MAAA,CAAO;AAAA;AAAA,SACf,EACF,CAAA;AAAA,MAEJ;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewRelicDashboard.esm.js","sources":["../../../src/components/NewRelicDashboard/NewRelicDashboard.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Grid from '@material-ui/core/Grid';\nimport { Page, Content } from '@backstage/core-components';\nimport { DashboardEntityList } from './DashboardEntityList';\nimport { DashboardSnapshotList } from './DashboardSnapshotList';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { NEWRELIC_GUID_ANNOTATION } from '../../constants';\n\nexport const NewRelicDashboard = () => {\n const { entity } = useEntity();\n return (\n <Page themeId=\"home\">\n <Content>\n <Grid container spacing={6} direction=\"row\" alignItems=\"stretch\">\n <Grid item xs={12}>\n <DashboardEntityList />\n </Grid>\n <Grid item xs={12}>\n <DashboardSnapshotList\n guid={String(\n entity.metadata.annotations?.[NEWRELIC_GUID_ANNOTATION],\n )}\n />\n </Grid>\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAsBO,MAAM,oBAAoB,MAAM;AACrC,
|
|
1
|
+
{"version":3,"file":"NewRelicDashboard.esm.js","sources":["../../../src/components/NewRelicDashboard/NewRelicDashboard.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Grid from '@material-ui/core/Grid';\nimport { Page, Content } from '@backstage/core-components';\nimport { DashboardEntityList } from './DashboardEntityList';\nimport { DashboardSnapshotList } from './DashboardSnapshotList';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { NEWRELIC_GUID_ANNOTATION } from '../../constants';\n\nexport const NewRelicDashboard = () => {\n const { entity } = useEntity();\n return (\n <Page themeId=\"home\">\n <Content>\n <Grid container spacing={6} direction=\"row\" alignItems=\"stretch\">\n <Grid item xs={12}>\n <DashboardEntityList />\n </Grid>\n <Grid item xs={12}>\n <DashboardSnapshotList\n guid={String(\n entity.metadata.annotations?.[NEWRELIC_GUID_ANNOTATION],\n )}\n />\n </Grid>\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAsBO,MAAM,oBAAoB,MAAM;AACrC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,MAAA,EACZ,8BAAC,OAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAS,MAAC,OAAA,EAAS,CAAA,EAAG,SAAA,EAAU,KAAA,EAAM,YAAW,SAAA,EACrD,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA,CAAC,uBAAoB,CAAA,EACvB,CAAA;AAAA,oBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA;AAAA,MAAC,qBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,MAAA;AAAA,UACJ,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,wBAAwB;AAAA;AACxD;AAAA,KACF,EACF;AAAA,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.esm.js","sources":["../src/constants.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const NEWRELIC_GUID_ANNOTATION = 'newrelic.com/dashboard-guid';\n"],"names":[],"mappings":"AAeO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.esm.js","sources":["../src/constants.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const NEWRELIC_GUID_ANNOTATION = 'newrelic.com/dashboard-guid';\n"],"names":[],"mappings":"AAeO,MAAM,wBAAA,GAA2B;;;;"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createPlugin, createApiFactory,
|
|
1
|
+
import { createPlugin, createApiFactory, fetchApiRef, discoveryApiRef, configApiRef, createComponentExtension } from '@backstage/core-plugin-api';
|
|
2
2
|
import { newRelicDashboardApiRef } from './api/NewRelicDashboardApi.esm.js';
|
|
3
3
|
import { NewRelicDashboardClient } from './api/NewRelicDashboardClient.esm.js';
|
|
4
4
|
import { rootRouteRef } from './routes.esm.js';
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {\n createPlugin,\n configApiRef,\n createApiFactory,\n discoveryApiRef,\n createComponentExtension,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport { newRelicDashboardApiRef, NewRelicDashboardClient } from './api';\nimport { rootRouteRef } from './routes';\n\n/** @public */\nexport const newRelicDashboardPlugin = createPlugin({\n id: 'newrelic-dashboard',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: newRelicDashboardApiRef,\n deps: {\n configApi: configApiRef,\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, discoveryApi, fetchApi }) =>\n new NewRelicDashboardClient({\n discoveryApi,\n fetchApi,\n baseUrl: configApi.getOptionalString('newrelicdashboard.baseUrl'),\n }),\n }),\n ],\n});\n\n/** @public */\nexport const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'EntityNewRelicDashboardContent',\n component: {\n lazy: () => import('./Router').then(m => m.Router),\n },\n }),\n);\n\n/** @public */\nexport const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'EntityNewRelicDashboardCard',\n component: {\n lazy: () =>\n import('./components/NewRelicDashboard/DashboardEntityList').then(\n m => m.DashboardEntityList,\n ),\n },\n }),\n);\n\n/**\n * Render dashboard snapshots from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`\n *\n * @remarks\n * This can be helpful for rendering dashboards outside of Entity Catalog.\n *\n * @public\n */\nexport const DashboardSnapshot = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'DashboardSnapshot',\n component: {\n lazy: () =>\n import(\n './components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot'\n ).then(m => m.DashboardSnapshot),\n },\n }),\n);\n\n/**\n * Render a dashboard snapshots list from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`\n *\n * @remarks\n * This can be helpful for rendering dashboards outside of Entity Catalog.\n *\n * @public\n */\nexport const DashboardSnapshotList = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'DashboardSnapshotList',\n component: {\n lazy: () =>\n import(\n './components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList'\n ).then(m => m.DashboardSnapshotList),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {\n createPlugin,\n configApiRef,\n createApiFactory,\n discoveryApiRef,\n createComponentExtension,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport { newRelicDashboardApiRef, NewRelicDashboardClient } from './api';\nimport { rootRouteRef } from './routes';\n\n/** @public */\nexport const newRelicDashboardPlugin = createPlugin({\n id: 'newrelic-dashboard',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: newRelicDashboardApiRef,\n deps: {\n configApi: configApiRef,\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, discoveryApi, fetchApi }) =>\n new NewRelicDashboardClient({\n discoveryApi,\n fetchApi,\n baseUrl: configApi.getOptionalString('newrelicdashboard.baseUrl'),\n }),\n }),\n ],\n});\n\n/** @public */\nexport const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'EntityNewRelicDashboardContent',\n component: {\n lazy: () => import('./Router').then(m => m.Router),\n },\n }),\n);\n\n/** @public */\nexport const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'EntityNewRelicDashboardCard',\n component: {\n lazy: () =>\n import('./components/NewRelicDashboard/DashboardEntityList').then(\n m => m.DashboardEntityList,\n ),\n },\n }),\n);\n\n/**\n * Render dashboard snapshots from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`\n *\n * @remarks\n * This can be helpful for rendering dashboards outside of Entity Catalog.\n *\n * @public\n */\nexport const DashboardSnapshot = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'DashboardSnapshot',\n component: {\n lazy: () =>\n import(\n './components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot'\n ).then(m => m.DashboardSnapshot),\n },\n }),\n);\n\n/**\n * Render a dashboard snapshots list from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`\n *\n * @remarks\n * This can be helpful for rendering dashboards outside of Entity Catalog.\n *\n * @public\n */\nexport const DashboardSnapshotList = newRelicDashboardPlugin.provide(\n createComponentExtension({\n name: 'DashboardSnapshotList',\n component: {\n lazy: () =>\n import(\n './components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList'\n ).then(m => m.DashboardSnapshotList),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,0BAA0B,YAAA,CAAa;AAAA,EAClD,EAAA,EAAI,oBAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,uBAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,SAAA,EAAW,YAAA;AAAA,QACX,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,SAAA,EAAW,cAAc,QAAA,EAAS,KAC5C,IAAI,uBAAA,CAAwB;AAAA,QAC1B,YAAA;AAAA,QACA,QAAA;AAAA,QACA,OAAA,EAAS,SAAA,CAAU,iBAAA,CAAkB,2BAA2B;AAAA,OACjE;AAAA,KACJ;AAAA;AAEL,CAAC;AAGM,MAAM,iCAAiC,uBAAA,CAAwB,OAAA;AAAA,EACpE,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,gCAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,iBAAU,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,MAAM;AAAA;AACnD,GACD;AACH;AAGO,MAAM,8BAA8B,uBAAA,CAAwB,OAAA;AAAA,EACjE,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,6BAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,2DAAoD,CAAA,CAAE,IAAA;AAAA,QAC3D,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;AAUO,MAAM,oBAAoB,uBAAA,CAAwB,OAAA;AAAA,EACvD,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,mBAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OACE,+EACF,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,iBAAiB;AAAA;AACnC,GACD;AACH;AAUO,MAAM,wBAAwB,uBAAA,CAAwB,OAAA;AAAA,EAC3D,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,uBAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OACE,mFACF,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,qBAAqB;AAAA;AACvC,GACD;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDashboardParentGuidQuery.esm.js","sources":["../../src/queries/getDashboardParentGuidQuery.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const getDashboardParentGuidQuery =\n 'query ($query: String) {\\n actor {\\n entitySearch(query: $query) {\\n results {\\n entities {\\n name\\n ... on DashboardEntityOutline {\\n name\\n dashboardParentGuid\\n guid\\n }\\n permalink\\n }\\n }\\n }\\n }\\n}\\n';\n"],"names":[],"mappings":"AAeO,MAAM,
|
|
1
|
+
{"version":3,"file":"getDashboardParentGuidQuery.esm.js","sources":["../../src/queries/getDashboardParentGuidQuery.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const getDashboardParentGuidQuery =\n 'query ($query: String) {\\n actor {\\n entitySearch(query: $query) {\\n results {\\n entities {\\n name\\n ... on DashboardEntityOutline {\\n name\\n dashboardParentGuid\\n guid\\n }\\n permalink\\n }\\n }\\n }\\n }\\n}\\n';\n"],"names":[],"mappings":"AAeO,MAAM,2BAAA,GACX;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDashboardSnapshotQuery.esm.js","sources":["../../src/queries/getDashboardSnapshotQuery.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const getDashboardSnapshotQuery =\n 'mutation($guid: EntityGuid! , ,$duration: Milliseconds) {\\n dashboardCreateSnapshotUrl(guid: $guid , params: {timeWindow: {duration: $duration}, format: PNG })\\n}';\n"],"names":[],"mappings":"AAeO,MAAM,
|
|
1
|
+
{"version":3,"file":"getDashboardSnapshotQuery.esm.js","sources":["../../src/queries/getDashboardSnapshotQuery.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const getDashboardSnapshotQuery =\n 'mutation($guid: EntityGuid! , ,$duration: Milliseconds) {\\n dashboardCreateSnapshotUrl(guid: $guid , params: {timeWindow: {duration: $duration}, format: PNG })\\n}';\n"],"names":[],"mappings":"AAeO,MAAM,yBAAA,GACX;;;;"}
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'newrelic-dashboard',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'newrelic-dashboard',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-newrelic-dashboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "newrelic-dashboard",
|
|
@@ -61,22 +61,22 @@
|
|
|
61
61
|
"test": "backstage-cli package test"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@backstage/catalog-model": "^1.
|
|
65
|
-
"@backstage/core-compat-api": "^0.5.
|
|
66
|
-
"@backstage/core-components": "^0.18.
|
|
67
|
-
"@backstage/core-plugin-api": "^1.12.
|
|
68
|
-
"@backstage/errors": "^1.
|
|
69
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
70
|
-
"@backstage/plugin-catalog-react": "^2.
|
|
64
|
+
"@backstage/catalog-model": "^1.8.0",
|
|
65
|
+
"@backstage/core-compat-api": "^0.5.10",
|
|
66
|
+
"@backstage/core-components": "^0.18.9",
|
|
67
|
+
"@backstage/core-plugin-api": "^1.12.5",
|
|
68
|
+
"@backstage/errors": "^1.3.0",
|
|
69
|
+
"@backstage/frontend-plugin-api": "^0.16.2",
|
|
70
|
+
"@backstage/plugin-catalog-react": "^2.1.4",
|
|
71
71
|
"@material-ui/core": "^4.12.2",
|
|
72
72
|
"@material-ui/icons": "^4.9.1",
|
|
73
73
|
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
74
74
|
"react-use": "^17.2.4"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@backstage/cli": "^0.
|
|
78
|
-
"@backstage/dev-utils": "^1.1.
|
|
79
|
-
"@backstage/test-utils": "^1.7.
|
|
77
|
+
"@backstage/cli": "^0.36.1",
|
|
78
|
+
"@backstage/dev-utils": "^1.1.22",
|
|
79
|
+
"@backstage/test-utils": "^1.7.17",
|
|
80
80
|
"@testing-library/dom": "^10.0.0",
|
|
81
81
|
"@testing-library/jest-dom": "^6.0.0",
|
|
82
82
|
"@testing-library/react": "^15.0.0",
|