change(ui): add project key to all integration plugins
This commit is contained in:
parent
7b5b9c7b1a
commit
73ea3e6556
11 changed files with 20 additions and 13 deletions
|
|
@ -5,6 +5,7 @@ import AssistScript from './AssistScript';
|
||||||
import AssistNpm from './AssistNpm';
|
import AssistNpm from './AssistNpm';
|
||||||
import { Tabs } from 'UI';
|
import { Tabs } from 'UI';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const NPM = 'NPM';
|
const NPM = 'NPM';
|
||||||
const SCRIPT = 'SCRIPT';
|
const SCRIPT = 'SCRIPT';
|
||||||
|
|
@ -53,4 +54,4 @@ const AssistDoc = (props) => {
|
||||||
|
|
||||||
AssistDoc.displayName = 'AssistDoc';
|
AssistDoc.displayName = 'AssistDoc';
|
||||||
|
|
||||||
export default AssistDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(AssistDoc)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from 'Shared/ToggleContent';
|
import ToggleContent from 'Shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const AxiosDoc = (props) => {
|
const AxiosDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -65,4 +66,4 @@ function MyApp() {
|
||||||
|
|
||||||
AxiosDoc.displayName = 'AxiosDoc';
|
AxiosDoc.displayName = 'AxiosDoc';
|
||||||
|
|
||||||
export default AxiosDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(AxiosDoc)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from 'Shared/ToggleContent';
|
import ToggleContent from 'Shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const FetchDoc = (props) => {
|
const FetchDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -69,4 +70,4 @@ fetch('https://api.openreplay.com/').then(response => console.log(response.json(
|
||||||
|
|
||||||
FetchDoc.displayName = 'FetchDoc';
|
FetchDoc.displayName = 'FetchDoc';
|
||||||
|
|
||||||
export default FetchDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(FetchDoc)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
import ToggleContent from 'Shared/ToggleContent';
|
import ToggleContent from 'Shared/ToggleContent';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const GraphQLDoc = (props) => {
|
const GraphQLDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -69,4 +70,4 @@ export const recordGraphQL = tracker.use(trackerGraphQL());`}
|
||||||
|
|
||||||
GraphQLDoc.displayName = 'GraphQLDoc';
|
GraphQLDoc.displayName = 'GraphQLDoc';
|
||||||
|
|
||||||
export default GraphQLDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(GraphQLDoc)
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ const integrations = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Plugins',
|
title: 'Plugins',
|
||||||
isProject: false,
|
isProject: true,
|
||||||
description:
|
description:
|
||||||
"Reproduce issues as if they happened in your own browser. Plugins help capture your application's store, HTTP requeets, GraphQL queries, and more.",
|
"Reproduce issues as if they happened in your own browser. Plugins help capture your application's store, HTTP requeets, GraphQL queries, and more.",
|
||||||
integrations: [
|
integrations: [
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from 'Shared/ToggleContent';
|
import ToggleContent from 'Shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const MobxDoc = (props) => {
|
const MobxDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -66,4 +67,4 @@ function SomeFunctionalComponent() {
|
||||||
|
|
||||||
MobxDoc.displayName = 'MobxDoc';
|
MobxDoc.displayName = 'MobxDoc';
|
||||||
|
|
||||||
export default MobxDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(MobxDoc)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from 'Shared/ToggleContent';
|
import ToggleContent from 'Shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const NgRxDoc = (props) => {
|
const NgRxDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -79,4 +80,4 @@ const metaReducers = [tracker.use(trackerNgRx(<options>))]; // check list of ava
|
||||||
|
|
||||||
NgRxDoc.displayName = 'NgRxDoc';
|
NgRxDoc.displayName = 'NgRxDoc';
|
||||||
|
|
||||||
export default NgRxDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(NgRxDoc)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from 'Shared/ToggleContent';
|
import ToggleContent from 'Shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const ProfilerDoc = (props) => {
|
const ProfilerDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -73,4 +74,4 @@ const fn = profiler('call_name')(() => {
|
||||||
|
|
||||||
ProfilerDoc.displayName = 'ProfilerDoc';
|
ProfilerDoc.displayName = 'ProfilerDoc';
|
||||||
|
|
||||||
export default ProfilerDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(ProfilerDoc)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from '../../../shared/ToggleContent';
|
import ToggleContent from '../../../shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const ReduxDoc = (props) => {
|
const ReduxDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -72,4 +73,4 @@ const store = createStore(
|
||||||
|
|
||||||
ReduxDoc.displayName = 'ReduxDoc';
|
ReduxDoc.displayName = 'ReduxDoc';
|
||||||
|
|
||||||
export default ReduxDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(ReduxDoc)
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,12 @@ import { useModal } from 'App/components/Modal';
|
||||||
import { Button } from 'UI';
|
import { Button } from 'UI';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onEdit: (integration: any) => void;
|
onEdit?: (integration: any) => void;
|
||||||
istance: any;
|
istance: any;
|
||||||
fetchList: any;
|
fetchList: any;
|
||||||
init: any;
|
init: any;
|
||||||
}
|
}
|
||||||
const SlackForm = (props: Props) => {
|
const SlackForm = (props: Props) => {
|
||||||
const { istance } = props;
|
|
||||||
const { hideModal } = useModal();
|
|
||||||
const [active, setActive] = React.useState(false);
|
const [active, setActive] = React.useState(false);
|
||||||
|
|
||||||
const onEdit = () => {
|
const onEdit = () => {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import ToggleContent from '../../../shared/ToggleContent';
|
import ToggleContent from '../../../shared/ToggleContent';
|
||||||
import DocLink from 'Shared/DocLink/DocLink';
|
import DocLink from 'Shared/DocLink/DocLink';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const VueDoc = (props) => {
|
const VueDoc = (props) => {
|
||||||
const { projectKey } = props;
|
const { projectKey } = props;
|
||||||
|
|
@ -75,4 +76,4 @@ const store = new Vuex.Store({
|
||||||
|
|
||||||
VueDoc.displayName = 'VueDoc';
|
VueDoc.displayName = 'VueDoc';
|
||||||
|
|
||||||
export default VueDoc;
|
export default connect((state) => ({ projectKey: state.getIn(['site', 'instance', 'projectKey'])}) )(VueDoc)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue