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:
parent
a413a38352
commit
f07cc2e460
@ -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')({
|
||||||
|
@ -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>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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: {
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user