Bug Add information about cause of error into log message
MODIFY
FrontEnd/Sailfish-JS-report/src/components/log/LogCard.tsx
FrontEnd/Sailfish-JS-report/src/components/log/LogCard.tsx
@@ -19,6 +19,9 @@ import Log from '../../models/Log';
import { createStyleSelector } from '../../helpers/styleCreators';
import SearchableContent from "../search/SearchableContent";
import { keyForLog } from "../../helpers/keys";
+import { RecoverableExpandablePanel } from '../ExpandablePanel';
+import { RecoverableExceptionChain } from '../ExceptionChain';
+import { stopPropagationHandler } from '../../helpers/react';
interface LogCardProps {
log: Log;
@@ -63,13 +66,34 @@ export default function LogCard({ log , index }: LogCardProps){
<div className="log-card__exception">Exception</div>
<div className="log-card__exception-val">{exception.class}</div>
</>
+
}
+
</div>
<div className="log-card__delimiter" />
<div className="log-card__content">
<SearchableContent
contentKey={keyForLog(index, 'message')}
content={message} />
+ {
+ exception &&
+ <div className="lc-body__exception-chain-header">
+ <RecoverableExpandablePanel
+ stateKey={keyForLog(index, 'exception')}>
+ {
+ toggleExpand => (
+ <div className="lc-body__item-title"
+ onClick={stopPropagationHandler(toggleExpand)}>
+ Cause
+ </div>
+ )
+ }
+ <RecoverableExceptionChain
+ exception={exception}
+ stateKey={`${keyForLog(index, 'exception')}-chain`}/>
+ </RecoverableExpandablePanel>
+ </div>
+ }
</div>
</div>
)

MODIFY
FrontEnd/Sailfish-JS-report/src/components/log/LogsList.tsx
FrontEnd/Sailfish-JS-report/src/components/log/LogsList.tsx
@@ -24,6 +24,7 @@ import { ThunkDispatch } from 'redux-thunk';
import StateAction from '../../actions/stateActions';
import SkeletonedLogsListItem from './SkeletonedLogsListItem';
import '../../styles/log.scss';
+import StateSaverProvider from '../util/StateSaverProvider';
interface StateProps {
logsCount: number;
@@ -83,6 +84,7 @@ const LogsListBase = React.forwardRef<LogListActions, Props>(({
return (
<div className="logs">
<div className="logs__list">
+ <StateSaverProvider>
<Virtuoso
ref={virtuosoRef}
totalCount={logsCount}
@@ -91,6 +93,7 @@ const LogsListBase = React.forwardRef<LogListActions, Props>(({
style={{height: '100%'}}
className="logs__scroll-container"
/>
+ </StateSaverProvider>
</div>
</div>
)

MODIFY
FrontEnd/Sailfish-JS-report/src/styles/log.scss
FrontEnd/Sailfish-JS-report/src/styles/log.scss
}
}
+.lc-body {
+ display: block;
+ box-sizing: border-box;
+ word-break: break-all;
+
+ &__item-title {
+ font-weight: bold;
+ font-size: 18px;
+
+ &:hover {
+ @include unselectable;
+ cursor: pointer;
+ }
+ }
+
+ &__exception-chain-header {
+ margin-top: 10px;
+ }
+}
+
.lc-skeleton {
@include skeleton-pulse;
box-sizing: border-box;

Bug #63789. Add information about cause of error into log message

Change-Id: I5090721b943199aa709a636de610dc8bb050ad4a