mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Refactor import statements and update component types in multiple files
This commit is contained in:
parent
b139d667d2
commit
a5fec2560a
@ -219,6 +219,8 @@ export default class CommonModel {
|
||||
recordValue as Array<CommonModel>,
|
||||
column.nestedModelType
|
||||
);
|
||||
} else {
|
||||
json[column.key] = recordValue;
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -247,8 +247,6 @@ export default class AnalyticsDatabaseService<
|
||||
findStatement.columns
|
||||
);
|
||||
|
||||
debugger;
|
||||
|
||||
let items: Array<TBaseModel> =
|
||||
AnalyticsBaseModel.fromJSONArray<TBaseModel>(
|
||||
jsonItems,
|
||||
|
@ -18,6 +18,7 @@ export interface ComponentProps {
|
||||
rightElement?: ReactElement | undefined;
|
||||
isLastElement?: boolean | undefined;
|
||||
isInitiallyExpanded?: boolean | undefined;
|
||||
titleClassName?: string | undefined;
|
||||
}
|
||||
|
||||
const Accordion: FunctionComponent<ComponentProps> = (
|
||||
@ -92,7 +93,7 @@ const Accordion: FunctionComponent<ComponentProps> = (
|
||||
props.onClick ? 'cursor-pointer' : ''
|
||||
}`}
|
||||
>
|
||||
<div className="text-gray-500">
|
||||
<div className={`text-gray-500 ${props.titleClassName}`}>
|
||||
{props.title}{' '}
|
||||
</div>
|
||||
<div className="mb-2 text-sm">
|
||||
|
@ -24,6 +24,8 @@ import SpanStatusElement from './SpanStatusElement';
|
||||
import CodeEditor from 'CommonUI/src/Components/CodeEditor/CodeEditor';
|
||||
import CodeType from 'Common/Types/Code/CodeType';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import AccordionGroup from 'CommonUI/src/Components/Accordion/AccordionGroup';
|
||||
import Accordion from 'CommonUI/src/Components/Accordion/Accordion';
|
||||
|
||||
export interface ComponentProps {
|
||||
id: string;
|
||||
@ -279,16 +281,20 @@ const SpanViewer: FunctionComponent<ComponentProps> = (
|
||||
return <ErrorMessage error="No events found for this span." />;
|
||||
}
|
||||
|
||||
// remove this. this is just for testing
|
||||
console.log(span.events);
|
||||
span.events = [...span.events, ...span.events];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AccordionGroup>
|
||||
{span.events.map((event: SpanEvent, index: number) => {
|
||||
return (
|
||||
<div key={index} className="space-y-5">
|
||||
<Accordion titleClassName='text-sm' title={`Event: ${event.name}`} key={index} >
|
||||
{getEventContentElement(event)}
|
||||
</div>
|
||||
</Accordion>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</AccordionGroup>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user