Skip to content

Commit

Permalink
refactor: description renamed to summary
Browse files Browse the repository at this point in the history
  • Loading branch information
nunogois committed Sep 20, 2024
1 parent a413a38 commit f07cc2e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

export type EnrichedEvent = EventSchema & {
label: string;
description: string;
summary: string;
};

const StyledRow = styled('div')({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const EventTimelineEventTooltip = ({
<StyledTooltipTitle>{event.label}</StyledTooltipTitle>
<StyledDateTime>{eventDateTime}</StyledDateTime>
</StyledTooltipHeader>
<Markdown>{event.description}</Markdown>
<Markdown>{event.summary}</Markdown>
</>
);
};
4 changes: 2 additions & 2 deletions src/lib/features/events/event-search-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ export default class EventSearchController extends Controller {
enrichEvents(events: IEvent[]): IEvent[] | IEnrichedEvent[] {
if (this.flagResolver.isEnabled('eventTimeline')) {
return events.map((event) => {
const { label, text: description } =
const { label, text: summary } =
this.msgFormatter.format(event);

return {
...event,
label,
description,
summary,
};
});
}
Expand Down
7 changes: 3 additions & 4 deletions src/lib/openapi/spec/event-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,12 @@ export const eventSchema = {
label: {
type: 'string',
nullable: true,
description: 'A concise, human-readable name for the event.',
description: 'The concise, human-readable name of the event.',
},
description: {
summary: {
type: 'string',
nullable: true,
description:
'A detailed description of the event, formatted in markdown.',
description: 'A markdown-formatted summary of the event.',
},
},
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export interface IEvent extends Omit<IBaseEvent, 'ip'> {

export interface IEnrichedEvent extends IEvent {
label: string;
description: string;
summary: string;
}

export interface IEventList {
Expand Down

0 comments on commit f07cc2e

Please sign in to comment.