@@ -8,7 +8,6 @@
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { InfoCardVariants } from '@backstage/core-components';
|
||||
import { default as React_2 } from 'react';
|
||||
|
||||
// @public (undocumented)
|
||||
export type DuplicationRating = {
|
||||
@@ -23,11 +22,9 @@ export const EntitySonarQubeCard: (props: {
|
||||
}) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const EntitySonarQubeContentPage: ({
|
||||
title,
|
||||
supportTitle,
|
||||
...otherProps
|
||||
}: SonarQubeContentPageProps) => JSX.Element;
|
||||
export const EntitySonarQubeContentPage: (
|
||||
props: SonarQubeContentPageProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const isSonarQubeAvailable: (entity: Entity) => boolean;
|
||||
@@ -35,24 +32,11 @@ export const isSonarQubeAvailable: (entity: Entity) => boolean;
|
||||
// @public (undocumented)
|
||||
export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key';
|
||||
|
||||
// @public (undocumented)
|
||||
export const SonarQubeCard: (props: {
|
||||
variant?: InfoCardVariants;
|
||||
duplicationRatings?: DuplicationRating[];
|
||||
}) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const SonarQubeContentPage: ({
|
||||
title,
|
||||
supportTitle,
|
||||
...otherProps
|
||||
}: SonarQubeContentPageProps) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type SonarQubeContentPageProps = {
|
||||
title?: string;
|
||||
supportTitle?: string;
|
||||
} & React_2.ComponentPropsWithoutRef<'div'>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
const sonarQubePlugin: BackstagePlugin<{}, {}, {}>;
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
"@material-ui/styles": "^4.10.0",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"rc-progress": "3.4.0",
|
||||
"react-use": "^17.2.4",
|
||||
"@types/react": "^16.13.1 || ^17.0.0"
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
|
||||
@@ -32,19 +32,16 @@ import { SonarQubeCard } from '../SonarQubeCard';
|
||||
export type SonarQubeContentPageProps = {
|
||||
title?: string;
|
||||
supportTitle?: string;
|
||||
} & React.ComponentPropsWithoutRef<'div'>;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export const SonarQubeContentPage = ({
|
||||
title = 'SonarQube Dashboard',
|
||||
supportTitle,
|
||||
...otherProps
|
||||
}: SonarQubeContentPageProps) => {
|
||||
export const SonarQubeContentPage = (props: SonarQubeContentPageProps) => {
|
||||
const { entity } = useEntity();
|
||||
const { title, supportTitle } = props;
|
||||
|
||||
return isSonarQubeAvailable(entity) ? (
|
||||
<Content {...otherProps}>
|
||||
<ContentHeader title={title}>
|
||||
<Content>
|
||||
<ContentHeader title={title ?? 'SonarQube Dashboard'}>
|
||||
{supportTitle && <SupportButton>{supportTitle}</SupportButton>}
|
||||
</ContentHeader>
|
||||
<SonarQubeCard />
|
||||
|
||||
@@ -21,7 +21,13 @@
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
export * from './components';
|
||||
export type {
|
||||
DuplicationRating,
|
||||
SonarQubeContentPageProps,
|
||||
SONARQUBE_PROJECT_KEY_ANNOTATION,
|
||||
isSonarQubeAvailable,
|
||||
} from './components';
|
||||
|
||||
export {
|
||||
sonarQubePlugin,
|
||||
sonarQubePlugin as plugin,
|
||||
|
||||
Reference in New Issue
Block a user