diff --git a/frontend/app/components/Errors/Error/MainSection.js b/frontend/app/components/Errors/Error/MainSection.js index 96dcb8b41..ef04cb325 100644 --- a/frontend/app/components/Errors/Error/MainSection.js +++ b/frontend/app/components/Errors/Error/MainSection.js @@ -19,101 +19,138 @@ import SessionBar from './SessionBar'; @withSiteIdRouter @connect( - (state) => ({ - error: state.getIn(['errors', 'instance']), - trace: state.getIn(['errors', 'instanceTrace']), - sourcemapUploaded: state.getIn(['errors', 'sourcemapUploaded']), - resolveToggleLoading: state.getIn(['errors', 'resolve', 'loading']) || state.getIn(['errors', 'unresolve', 'loading']), - ignoreLoading: state.getIn(['errors', 'ignore', 'loading']), - toggleFavoriteLoading: state.getIn(['errors', 'toggleFavorite', 'loading']), - traceLoading: state.getIn(['errors', 'fetchTrace', 'loading']), - }), - { - resolve, - unresolve, - ignore, - toggleFavorite, - addFilterByKeyAndValue, - } + (state) => ({ + error: state.getIn(['errors', 'instance']), + trace: state.getIn(['errors', 'instanceTrace']), + sourcemapUploaded: state.getIn(['errors', 'sourcemapUploaded']), + resolveToggleLoading: + state.getIn(['errors', 'resolve', 'loading']) || + state.getIn(['errors', 'unresolve', 'loading']), + ignoreLoading: state.getIn(['errors', 'ignore', 'loading']), + toggleFavoriteLoading: state.getIn(['errors', 'toggleFavorite', 'loading']), + traceLoading: state.getIn(['errors', 'fetchTrace', 'loading']), + }), + { + resolve, + unresolve, + ignore, + toggleFavorite, + addFilterByKeyAndValue, + } ) export default class MainSection extends React.PureComponent { - resolve = () => { - const { error } = this.props; - this.props.resolve(error.errorId); - }; + resolve = () => { + const { error } = this.props; + this.props.resolve(error.errorId); + }; - unresolve = () => { - const { error } = this.props; - this.props.unresolve(error.errorId); - }; + unresolve = () => { + const { error } = this.props; + this.props.unresolve(error.errorId); + }; - ignore = () => { - const { error } = this.props; - this.props.ignore(error.errorId); - }; - bookmark = () => { - const { error } = this.props; - this.props.toggleFavorite(error.errorId); - }; + ignore = () => { + const { error } = this.props; + this.props.ignore(error.errorId); + }; + bookmark = () => { + const { error } = this.props; + this.props.toggleFavorite(error.errorId); + }; - findSessions = () => { - this.props.addFilterByKeyAndValue(FilterKey.ERROR, this.props.error.message); - this.props.history.push(sessionsRoute()); - }; + findSessions = () => { + this.props.addFilterByKeyAndValue(FilterKey.ERROR, this.props.error.message); + this.props.history.push(sessionsRoute()); + }; - render() { - const { error, trace, sourcemapUploaded, ignoreLoading, resolveToggleLoading, toggleFavoriteLoading, className, traceLoading } = this.props; - const isPlayer = window.location.pathname.includes('/session/') + render() { + const { + error, + trace, + sourcemapUploaded, + ignoreLoading, + resolveToggleLoading, + toggleFavoriteLoading, + className, + traceLoading, + } = this.props; + const isPlayer = window.location.pathname.includes('/session/'); - return ( -
-
- -
-
- {error.message} -
-
-
-
-
Over the past 30 days
-
-
-
- - -
-
-

Last session with this error

- {resentOrDate(error.lastOccurrence)} - -
- - {/* meta tags place */} -
- -
- - - -
+ return ( +
+
+ +
+
+ {error.message}
- ); - } +
+
+
+
Over the past 30 days
+
+
+
+ + +
+
+

Last session with this error

+ {resentOrDate(error.lastOccurrence)} + +
+ + {error.customTags ? ( +
+
+ More Info (most recent call) +
+
+ {error.customTags.map((tag) => ( +
+
{Object.entries(tag)[0][0]}
{Object.entries(tag)[0][1]}
+
+ ))} +
+
+ ) : null} +
+ +
+ + + +
+
+ ); + } } diff --git a/frontend/app/components/Errors/Error/SideSection.js b/frontend/app/components/Errors/Error/SideSection.js index da6e5803b..017387f26 100644 --- a/frontend/app/components/Errors/Error/SideSection.js +++ b/frontend/app/components/Errors/Error/SideSection.js @@ -31,12 +31,12 @@ function partitionsWrapper(partitions = [], mapCountry = false) { .sort((a, b) => b.count - a.count) .slice(0, showLength) .map(p => ({ - label: mapCountry - ? (countries[p.name] || "Unknown") + label: mapCountry + ? (countries[p.name] || "Unknown") : p.name, prc: p.count/sum * 100, })) - + if (otherPrcsSum > 0) { show.push({ label: "Other", @@ -47,9 +47,9 @@ function partitionsWrapper(partitions = [], mapCountry = false) { return show; } function tagsWrapper(tags = []) { - return tags.map(({ name, partitions }) => ({ - name, - partitions: partitionsWrapper(partitions, name === "country") + return tags.map(({ name, partitions }) => ({ + name, + partitions: partitionsWrapper(partitions, name === "country") })) } @@ -59,7 +59,7 @@ function dataWrapper(data = {}) { chart30: data.chart30 || [], tags: tagsWrapper(data.tags), }; -} +} @connect(state => ({ error: state.getIn([ "errors", "instance" ]) @@ -75,7 +75,7 @@ export default class SideSection extends React.PureComponent { } render() { - const { + const { className, error, data, @@ -96,20 +96,20 @@ export default class SideSection extends React.PureComponent { timeFormat={'l'} />
- - - { data.tags.length > 0 &&

Tags

} + { data.tags.length > 0 &&

Summary

} { data.tags.map(({ name, partitions }) => -