@@ -13,10 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiRef, createApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* {@link @backstage/core-plugin-api#ApiRef} for the {@link TechRadarApi}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const techRadarApiRef: ApiRef<TechRadarApi> = createApiRef<TechRadarApi>(
|
||||
{
|
||||
@@ -31,6 +34,8 @@ export const techRadarApiRef: ApiRef<TechRadarApi> = createApiRef<TechRadarApi>(
|
||||
*
|
||||
* This should be implemented by user, as {@link https://github.com/backstage/backstage/blob/master/plugins/tech-radar/src/sample.ts | default}
|
||||
* serves only some static data for example purposes
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface TechRadarApi {
|
||||
/**
|
||||
@@ -46,6 +51,8 @@ export interface TechRadarApi {
|
||||
|
||||
/**
|
||||
* Tech Radar Ring which indicates stage of {@link RadarEntry}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface RadarRing {
|
||||
/**
|
||||
@@ -68,6 +75,8 @@ export interface RadarRing {
|
||||
|
||||
/**
|
||||
* Tech Radar Quadrant which represent area/topic of {@link RadarEntry}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface RadarQuadrant {
|
||||
/**
|
||||
@@ -82,6 +91,8 @@ export interface RadarQuadrant {
|
||||
|
||||
/**
|
||||
* Single Entry in Tech Radar
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface RadarEntry {
|
||||
/**
|
||||
@@ -120,6 +131,8 @@ export interface RadarEntry {
|
||||
|
||||
/**
|
||||
* State of {@link RadarEntry} at given point in time
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface RadarEntrySnapshot {
|
||||
/**
|
||||
@@ -142,6 +155,8 @@ export interface RadarEntrySnapshot {
|
||||
|
||||
/**
|
||||
* Indicates how {@link RadarEntry} moved though {@link RadarRing} on {@link RadarEntry.timeline}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export enum MovedState {
|
||||
/**
|
||||
@@ -164,6 +179,8 @@ export enum MovedState {
|
||||
|
||||
/**
|
||||
* Response from {@link TechRadarApi}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface TechRadarLoaderResponse {
|
||||
/**
|
||||
|
||||
@@ -61,6 +61,8 @@ function matchFilter(filter?: string): (entry: RadarEntry) => boolean {
|
||||
|
||||
/**
|
||||
* Properties of {@link TechRadarComponent}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface TechRadarComponentProps {
|
||||
/**
|
||||
@@ -95,6 +97,8 @@ export interface TechRadarComponentProps {
|
||||
* @remarks
|
||||
*
|
||||
* For advanced use cases. Typically, you want to use {@link TechRadarPage}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export function RadarComponent(props: TechRadarComponentProps) {
|
||||
const { loading, error, value: data } = useTechRadarLoader(props.id);
|
||||
|
||||
@@ -34,6 +34,8 @@ const useStyles = makeStyles(() => ({
|
||||
|
||||
/**
|
||||
* Properties for {@link TechRadarPage}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface TechRadarPageProps extends TechRadarComponentProps {
|
||||
/**
|
||||
@@ -52,6 +54,8 @@ export interface TechRadarPageProps extends TechRadarComponentProps {
|
||||
|
||||
/**
|
||||
* Main Page of Tech Radar
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export function RadarPage(props: TechRadarPageProps) {
|
||||
const {
|
||||
|
||||
@@ -32,6 +32,8 @@ export * from './components';
|
||||
|
||||
/**
|
||||
* @deprecated Use plugin extensions instead
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const Router = RadarPage;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import { techRadarApiRef } from './api';
|
||||
|
||||
import { SampleTechRadarApi } from './sample';
|
||||
import {
|
||||
createPlugin,
|
||||
@@ -30,6 +29,8 @@ const rootRouteRef = createRouteRef({
|
||||
|
||||
/**
|
||||
* Tech Radar plugin instance
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const techRadarPlugin = createPlugin({
|
||||
id: 'tech-radar',
|
||||
@@ -45,6 +46,8 @@ export const techRadarPlugin = createPlugin({
|
||||
* @remarks
|
||||
*
|
||||
* Uses {@link TechRadarPageProps} as props
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const TechRadarPage = techRadarPlugin.provide(
|
||||
createRoutableExtension({
|
||||
|
||||
Reference in New Issue
Block a user