williaster commented on a change in pull request #3581: Dashboard refactory
URL:
https://github.com/apache/incubator-superset/pull/3581#discussion_r147903745
##########
File path: superset/assets/javascripts/components/StackTraceMessage.jsx
##########
@@ -0,0 +1,59 @@
+/* eslint-disable react/no-danger */
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Alert, Collapse } from 'react-bootstrap';
+
+const propTypes = {
+ message: PropTypes.string,
+ queryResponse: PropTypes.object,
+ showStackTrace: PropTypes.bool,
+};
+const defaultProps = {
+ showStackTrace: false,
+};
+
+class StackTraceMessage extends React.PureComponent {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ showStackTrace: props.showStackTrace,
+ };
+ }
+
+ hasTrace() {
+ return this.props.queryResponse && this.props.queryResponse.stacktrace;
+ }
+
+ render() {
+ const msg = (
+ <div>
+ <p
Review comment:
we have used this a couple of places, could create an `HTML` component for
it (nbd)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services