updated names and added changeset
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-tech-radar': minor
|
||||
---
|
||||
|
||||
Added tech radar blip history backend support and normalized the datastructure
|
||||
@@ -37,12 +37,12 @@ export interface RadarEntry {
|
||||
quadrant: string;
|
||||
title: string;
|
||||
url: string;
|
||||
history: Array<RadarEntryHistory>;
|
||||
timeline: Array<RadarEntrySnapshot>;
|
||||
}
|
||||
|
||||
export interface RadarEntryHistory {
|
||||
export interface RadarEntrySnapshot {
|
||||
date: Date;
|
||||
ring: string;
|
||||
ringId: string;
|
||||
description?: string;
|
||||
moved?: MovedState;
|
||||
}
|
||||
|
||||
@@ -56,11 +56,13 @@ const RadarComponent = (props: TechRadarComponentProps): JSX.Element => {
|
||||
id: entry.key,
|
||||
quadrant: loaderResponse!.quadrants.find(q => q.id === entry.quadrant)!,
|
||||
title: entry.title,
|
||||
ring: loaderResponse!.rings.find(r => r.id === entry.history[0].ring)!,
|
||||
history: entry.history.map(e => {
|
||||
ring: loaderResponse!.rings.find(
|
||||
r => r.id === entry.timeline[0].ringId,
|
||||
)!,
|
||||
history: entry.timeline.map(e => {
|
||||
return {
|
||||
date: e.date,
|
||||
ring: loaderResponse!.rings.find(a => a.id === e.ring)!,
|
||||
ring: loaderResponse!.rings.find(a => a.id === e.ringId)!,
|
||||
description: e.description,
|
||||
moved: e.moved,
|
||||
};
|
||||
|
||||
@@ -35,10 +35,10 @@ quadrants.push({ id: 'process', name: 'Process' });
|
||||
|
||||
const entries = new Array<RadarEntry>();
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
description:
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
|
||||
@@ -51,10 +51,10 @@ entries.push({
|
||||
quadrant: 'languages',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
description:
|
||||
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat',
|
||||
@@ -67,10 +67,10 @@ entries.push({
|
||||
quadrant: 'languages',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
@@ -81,10 +81,10 @@ entries.push({
|
||||
quadrant: 'frameworks',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
@@ -95,10 +95,10 @@ entries.push({
|
||||
quadrant: 'frameworks',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
@@ -109,10 +109,10 @@ entries.push({
|
||||
quadrant: 'process',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'assess',
|
||||
ringId: 'assess',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
@@ -123,10 +123,10 @@ entries.push({
|
||||
quadrant: 'process',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
moved: 0,
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
@@ -137,9 +137,9 @@ entries.push({
|
||||
quadrant: 'process',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
ring: 'hold',
|
||||
ringId: 'hold',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
@@ -150,9 +150,9 @@ entries.push({
|
||||
quadrant: 'process',
|
||||
});
|
||||
entries.push({
|
||||
history: [
|
||||
timeline: [
|
||||
{
|
||||
ring: 'use',
|
||||
ringId: 'use',
|
||||
date: new Date('2020-08-06'),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -69,10 +69,10 @@ export type Entry = {
|
||||
// How this entry has recently moved; -1 for "down", +1 for "up", 0 for not moved
|
||||
moved?: MovedState;
|
||||
active?: boolean;
|
||||
history?: Array<EntryHistory>;
|
||||
timeline?: Array<EntrySnapshot>;
|
||||
};
|
||||
|
||||
export type EntryHistory = {
|
||||
export type EntrySnapshot = {
|
||||
date: Date;
|
||||
ring: Ring;
|
||||
description?: string;
|
||||
|
||||
Reference in New Issue
Block a user