Skip to content

Commit 198632f

Browse files
feat: fix multy server for actions
1 parent 36284e5 commit 198632f

23 files changed

Lines changed: 430 additions & 318 deletions

File tree

src/public/dist/local/bundle/main.bundle.js

Lines changed: 213 additions & 164 deletions
Large diffs are not rendered by default.

src/public/js/App.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const ViewsSwitches = React.lazy(() =>
99
const TopBar = React.lazy(() =>
1010
import(/* webpackChunkName: "top-bar" */ 'components/topBar/subPanel/SubPanelContainer')
1111
);
12-
const TreeDiagram = React.lazy(() =>
13-
import(/* webpackChunkName: "tree-diagram" */ 'components/treeDiagram/TreeDiagramContainer')
12+
const TreeDiagramsContainer = React.lazy(() =>
13+
import(/* webpackChunkName: "tree-diagram" */ 'components/treeDiagram/TreeDiagramsContainer')
1414
);
1515
const SideBar = React.lazy(() =>
1616
import(/* webpackChunkName: "side-bar" */ 'components/sideBar/SideBarContainer')
@@ -28,30 +28,30 @@ const App = (props = {}) => {
2828
<Suspense fallback={null}>
2929
<DataBus standalone={props.standalone} predefinedState={props.predefinedState} />
3030
</Suspense>
31-
<Suspense fallback={<div className={'headerPlaceholder'} />}>
31+
{/*<Suspense fallback={<div className={'headerPlaceholder'} />}>
3232
<ViewsSwitches />
33-
</Suspense>
34-
<Suspense fallback={null}>
33+
</Suspense>*/}
34+
{/*<Suspense fallback={null}>
3535
<TopBar />
36-
</Suspense>
36+
</Suspense>*/}
3737
</header>
3838

3939
<div className="body">
40-
<Suspense fallback={null}>
40+
{/*<Suspense fallback={null}>
4141
<ExplorerBar />
42-
</Suspense>
42+
</Suspense>*/}
4343
<Suspense
4444
fallback={
4545
<div className={'loader'}>
4646
<Spin />
4747
</div>
4848
}
4949
>
50-
<TreeDiagram />
50+
<TreeDiagramsContainer />
5151
</Suspense>
52-
<Suspense fallback={null}>
52+
{/* <Suspense fallback={null}>
5353
<SideBar />
54-
</Suspense>
54+
</Suspense>*/}
5555
</div>
5656

5757
<footer className="footer">

src/public/js/components/treeDiagram/TreeDiagramContainer.js

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react';
2+
import { connect } from 'react-redux';
3+
4+
import TreeDiagram from './component/TreeDiagram';
5+
6+
const TreeDiagramsContainer = ({ namespaces }) => {
7+
if (!namespaces || !namespaces.length) {
8+
return null;
9+
}
10+
11+
return (
12+
<React.Fragment>
13+
{namespaces.map(namespace => (
14+
<TreeDiagram key={namespace} namespace={namespace} />
15+
))}
16+
</React.Fragment>
17+
);
18+
};
19+
20+
const mapStateToProps = state => ({
21+
namespaces: Object.keys(state.dataBus)
22+
});
23+
24+
export default connect(mapStateToProps)(TreeDiagramsContainer);

src/public/js/components/treeDiagram/component/Edge/CodeCrumbEdge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { SYMBOL_WIDTH } from 'components/treeDiagram/store/constants';
3+
import { SYMBOL_WIDTH } from 'components/treeDiagram/component/constants';
44
import Arrow from 'components/treeDiagram/component/Icons/Arrow';
55
import './index.scss';
66

src/public/js/components/treeDiagram/component/Edge/DepenenciesEdge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import classNames from 'classnames';
33

4-
import { LAYOUT_CONFIG, DepEdgeGroups } from 'components/treeDiagram/store/constants';
4+
import { LAYOUT_CONFIG, DepEdgeGroups } from 'components/treeDiagram/component/constants';
55
import Arrow from 'components/treeDiagram/component/Icons/Arrow';
66
import './index.scss';
77

src/public/js/components/treeDiagram/component/Node/CodeCrumb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import classNames from 'classnames';
33

44
import './index.scss';
5-
import { SYMBOL_WIDTH } from 'components/treeDiagram/store/constants';
5+
import { SYMBOL_WIDTH } from 'components/treeDiagram/component/constants';
66

77
export const CodeCrumbName = props => {
88
// onMouseOver maybe use onMouseOver to show crumb details in popover

src/public/js/components/treeDiagram/component/Node/File.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import classNames from 'classnames';
33

4-
import { SYMBOL_WIDTH } from 'components/treeDiagram/store/constants';
4+
import { SYMBOL_WIDTH } from 'components/treeDiagram/component/constants';
55
import FileIcon from 'components/treeDiagram/component/Icons/File';
66
import DepCirclesIcon from 'components/treeDiagram/component/Icons/DepCircles';
77
import './index.scss';

src/public/js/components/treeDiagram/component/Node/Folder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from 'components/treeDiagram/component/Icons/Folder';
88

99
import './index.scss';
10-
import { SYMBOL_WIDTH } from '../../store/constants';
10+
import { SYMBOL_WIDTH } from 'components/treeDiagram/component/constants';
1111

1212
export const FolderName = props => {
1313
const { position, name, cover, disabled, openedState, onNodeClick } = props;

src/public/js/components/treeDiagram/component/Tree/Dependencies/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ const DependenciesTree = props => {
8383
sourcePosition={sourcePosition}
8484
targetPosition={targetPosition}
8585
firstSourcePosition={i ? firstSourcePosition : null}
86-
onClick={() => onDependencyEdgeClick(moduleName, [importedNodePath], groupName)}
86+
onClick={() =>
87+
onDependencyEdgeClick({
88+
target: moduleName,
89+
sources: [importedNodePath],
90+
groupName
91+
})
92+
}
8793
/>
8894
);
8995
selected ? selectedEdges.push(edge) : edges.push(edge);

0 commit comments

Comments
 (0)