backstage

Форк
0
55 строк · 1.5 Кб
1
/*
2
 * Copyright 2020 The Backstage Authors
3
 *
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
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
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.
15
 */
16

17
import { rollbarApiRef } from './api/RollbarApi';
18
import { RollbarClient } from './api/RollbarClient';
19
import {
20
  createApiFactory,
21
  createPlugin,
22
  createRoutableExtension,
23
  createRouteRef,
24
  discoveryApiRef,
25
  identityApiRef,
26
} from '@backstage/core-plugin-api';
27

28
export const rootRouteRef = createRouteRef({
29
  id: 'rollbar',
30
});
31

32
/** @public */
33
export const rollbarPlugin = createPlugin({
34
  id: 'rollbar',
35
  apis: [
36
    createApiFactory({
37
      api: rollbarApiRef,
38
      deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },
39
      factory: ({ discoveryApi, identityApi }) =>
40
        new RollbarClient({ discoveryApi, identityApi }),
41
    }),
42
  ],
43
  routes: {
44
    entityContent: rootRouteRef,
45
  },
46
});
47

48
/** @public */
49
export const EntityRollbarContent = rollbarPlugin.provide(
50
  createRoutableExtension({
51
    name: 'EntityRollbarContent',
52
    component: () => import('./components/Router').then(m => m.Router),
53
    mountPoint: rootRouteRef,
54
  }),
55
);
56

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.