From cee827ad5ff417d306863bbf34dab848688f2d96 Mon Sep 17 00:00:00 2001 From: Jason Bulicek Date: Thu, 6 Aug 2020 11:35:24 -0700 Subject: [PATCH] fix issue with expanding uploaded traces --- .../traces/upload/uploadContainer.jsx | 56 ++++++++++--------- src/components/traces/upload/uploadHeader.jsx | 2 +- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/components/traces/upload/uploadContainer.jsx b/src/components/traces/upload/uploadContainer.jsx index fbb841ee..0416648c 100644 --- a/src/components/traces/upload/uploadContainer.jsx +++ b/src/components/traces/upload/uploadContainer.jsx @@ -26,34 +26,36 @@ import traceDetailsStore from '../stores/traceDetailsStore'; import Error from '../../common/error'; import '../traces.less'; -@observer -class UploadContainer extends React.Component { - render() { - return ( -
-
-
-
- {traceDetailsStore.spans && traceDetailsStore.spans.length > 0 ? - <> - - - : - - } -
+ +const UploadContainer = observer(() => { + const toggleExpand = (id) => { + traceDetailsStore.toggleExpand(id); + }; + + return ( +
+
+
+
+ {traceDetailsStore.spans && traceDetailsStore.spans.length > 0 ? + <> + + + : + + }
-
- ); - } -} +
+
+ ); +}); export default withRouter(UploadContainer); diff --git a/src/components/traces/upload/uploadHeader.jsx b/src/components/traces/upload/uploadHeader.jsx index 7f7defd7..bdd05eb2 100644 --- a/src/components/traces/upload/uploadHeader.jsx +++ b/src/components/traces/upload/uploadHeader.jsx @@ -56,7 +56,7 @@ class UploadHeader extends React.Component {
{Object.keys(services).map(svc => ( - {svc} x{services[svc]}))} + {svc} x{services[svc]}))}
);