Skip to content

Commit

Permalink
added skipViewLogEvent as props (#233)
Browse files Browse the repository at this point in the history
* added skipViewLogEvent as props

* fixed typo
  • Loading branch information
deepakprabhakara authored Aug 15, 2023
1 parent 8967449 commit 681a8b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/containers/EventsBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class EventsBrowser extends React.Component {
search_text: query,
cursor,
length: this.state.resultsPerPage,
skipViewLogEvent: this.props.skipViewLogEvent,
};
this.props.requestEventSearch(queryObj);
}
Expand Down
1 change: 1 addition & 0 deletions src/dev/LogsViewerWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const LogsViewerWrapper = (props) => {
host={`${endpoint}/viewer/v1`}
fields={props.fields ? (Array.isArray(props.fields) ? props.fields : defaultFields) : defaultFields}
disableShowRawEvent={props.disableShowRawEvent ? props.disableShowRawEvent : false}
skipViewLogEvent={true}
/>
);
};
Expand Down
3 changes: 3 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default class RetracedEventsBrowser extends React.Component {
mount: PropTypes.bool,
disableShowRawEvent: PropTypes.bool,
fields: PropTypes.arrayOf(eventField),
skipViewLogEvent: PropTypes.bool,
};
static defaultProps = {
header: "Events",
Expand All @@ -35,6 +36,7 @@ export default class RetracedEventsBrowser extends React.Component {
searchHelpURL: "https://boxyhq.com/docs/retraced/apis/graphql#search",
mount: true,
fields: [],
skipViewLogEvent: false,
};
render() {
return (
Expand All @@ -53,6 +55,7 @@ export default class RetracedEventsBrowser extends React.Component {
searchHelpURL={this.props.searchHelpURL}
fields={this.props.fields}
disableShowRawEvent={this.props.disableShowRawEvent}
skipViewLogEvent={this.props.skipViewLogEvent}
/>
</Provider>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/redux/data/events/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export function requestEventSearch(query) {
return async (dispatch, getState) => {
dispatch(loadingData("eventFetch", true));
let data;
const skipViewLogEvent = query.skipViewLogEvent ? "?skipViewLogEvent=true" : "";
const state = getState();
const host = state.data.sessionData.host;
const url = `${host}/graphql`;
const url = `${host}/graphql${skipViewLogEvent}`;
try {
const response = await fetch(url, {
method: "POST",
Expand Down

0 comments on commit 681a8b7

Please sign in to comment.