2
* Copyright 2021 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 React from 'react';
17
import { createDevApp } from '@backstage/dev-utils';
18
import { EntityAllureReportContent } from '../src/plugin';
19
import { Content, Header, Page } from '@backstage/core-components';
20
import { EntityProvider } from '@backstage/plugin-catalog-react';
21
import { Entity } from '@backstage/catalog-model';
23
import exampleEntity from './example-entity.yaml';
24
import { allureApiRef } from '../src/api';
32
async getReportUrl(projectId: string) {
33
return Promise.resolve(
34
// Follow the instructions from https://github.com/fescobar/allure-docker-service-ui
35
// to setup Allure service locally
36
`http://localhost:5050/allure-docker-service/projects/${projectId}/reports/latest/index.html`,
39
} as unknown as typeof allureApiRef.T),
44
<Header title="Allure Report" />
46
<EntityProvider entity={exampleEntity as any as Entity}>
47
<EntityAllureReportContent />
52
title: 'Allure Report',