1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-12 01:17:04 +02:00

refactor: description renamed to summary

This commit is contained in:
Nuno Góis 2024-09-20 14:54:53 +01:00
parent a413a38352
commit f07cc2e460
No known key found for this signature in database
GPG Key ID: 71ECC689F1091765
5 changed files with 8 additions and 9 deletions

View File

@ -13,7 +13,7 @@ import {
export type EnrichedEvent = EventSchema & { export type EnrichedEvent = EventSchema & {
label: string; label: string;
description: string; summary: string;
}; };
const StyledRow = styled('div')({ const StyledRow = styled('div')({

View File

@ -44,7 +44,7 @@ export const EventTimelineEventTooltip = ({
<StyledTooltipTitle>{event.label}</StyledTooltipTitle> <StyledTooltipTitle>{event.label}</StyledTooltipTitle>
<StyledDateTime>{eventDateTime}</StyledDateTime> <StyledDateTime>{eventDateTime}</StyledDateTime>
</StyledTooltipHeader> </StyledTooltipHeader>
<Markdown>{event.description}</Markdown> <Markdown>{event.summary}</Markdown>
</> </>
); );
}; };

View File

@ -112,13 +112,13 @@ export default class EventSearchController extends Controller {
enrichEvents(events: IEvent[]): IEvent[] | IEnrichedEvent[] { enrichEvents(events: IEvent[]): IEvent[] | IEnrichedEvent[] {
if (this.flagResolver.isEnabled('eventTimeline')) { if (this.flagResolver.isEnabled('eventTimeline')) {
return events.map((event) => { return events.map((event) => {
const { label, text: description } = const { label, text: summary } =
this.msgFormatter.format(event); this.msgFormatter.format(event);
return { return {
...event, ...event,
label, label,
description, summary,
}; };
}); });
} }

View File

@ -95,13 +95,12 @@ export const eventSchema = {
label: { label: {
type: 'string', type: 'string',
nullable: true, nullable: true,
description: 'A concise, human-readable name for the event.', description: 'The concise, human-readable name of the event.',
}, },
description: { summary: {
type: 'string', type: 'string',
nullable: true, nullable: true,
description: description: 'A markdown-formatted summary of the event.',
'A detailed description of the event, formatted in markdown.',
}, },
}, },
components: { components: {

View File

@ -376,7 +376,7 @@ export interface IEvent extends Omit<IBaseEvent, 'ip'> {
export interface IEnrichedEvent extends IEvent { export interface IEnrichedEvent extends IEvent {
label: string; label: string;
description: string; summary: string;
} }
export interface IEventList { export interface IEventList {