2
* Copyright 2020 The Backstage Authors
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
16
import { pagerDutyApiRef, PagerDutyClient } from './api';
24
createComponentExtension,
25
} from '@backstage/core-plugin-api';
26
import { createCardExtension } from '@backstage/plugin-home-react';
27
import { HomePagePagerDutyCardProps } from './components/HomePagePagerDutyCard/Content';
29
export const rootRouteRef = createRouteRef({
35
* @deprecated This plugin will be removed in a future release. Please use \@pagerduty/backstage-plugin plugin instead (https://www.npmjs.com/package/\@pagerduty/backstage-plugin).
37
export const pagerDutyPlugin = createPlugin({
43
discoveryApi: discoveryApiRef,
44
configApi: configApiRef,
45
fetchApi: fetchApiRef,
47
factory: ({ configApi, discoveryApi, fetchApi }) =>
48
PagerDutyClient.fromConfig(configApi, { discoveryApi, fetchApi }),
55
* @deprecated This plugin and it's cards will be removed in a future release. Please use \@pagerduty/backstage-plugin plugin instead (https://www.npmjs.com/package/\@pagerduty/backstage-plugin).
57
export const EntityPagerDutyCard = pagerDutyPlugin.provide(
58
createComponentExtension({
59
name: 'EntityPagerDutyCard',
62
import('./components/EntityPagerDutyCard').then(
63
m => m.EntityPagerDutyCard,
71
* @deprecated This plugin and it's cards will be removed in a future release. Please use \@pagerduty/backstage-plugin plugin instead (https://www.npmjs.com/package/\@pagerduty/backstage-plugin).
73
export const HomePagePagerDutyCard = pagerDutyPlugin.provide(
74
createCardExtension<HomePagePagerDutyCardProps>({
75
name: 'HomePagePagerDutyCard',
76
title: 'PagerDuty Homepage Card',
77
components: () => import('./components/HomePagePagerDutyCard'),
84
title: 'PagerDuty integration key',
88
title: 'PagerDuty service id',
92
title: 'PagerDuty service name',