datajunction-ui 0.0.1-rc.10 → 0.0.1-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/src/app/__tests__/__snapshots__/index.test.tsx.snap +18 -16
- package/src/app/components/NamespaceHeader.jsx +4 -13
- package/src/app/components/QueryInfo.jsx +109 -0
- package/src/app/components/ToggleSwitch.jsx +17 -0
- package/src/app/components/__tests__/__snapshots__/NamespaceHeader.test.jsx.snap +2 -18
- package/src/app/components/djgraph/Collapse.jsx +46 -0
- package/src/app/components/djgraph/DJNode.jsx +56 -80
- package/src/app/components/djgraph/DJNodeColumns.jsx +68 -0
- package/src/app/components/djgraph/DJNodeDimensions.jsx +69 -0
- package/src/app/components/djgraph/__tests__/__snapshots__/DJNode.test.tsx.snap +82 -43
- package/src/app/icons/CollapsedIcon.jsx +15 -0
- package/src/app/icons/ExpandedIcon.jsx +15 -0
- package/src/app/icons/HorizontalHierarchyIcon.jsx +15 -0
- package/src/app/icons/InvalidIcon.jsx +14 -0
- package/src/app/icons/PythonIcon.jsx +52 -0
- package/src/app/icons/TableIcon.jsx +14 -0
- package/src/app/icons/ValidIcon.jsx +14 -0
- package/src/app/index.tsx +3 -2
- package/src/app/pages/NamespacePage/Explorer.jsx +57 -0
- package/src/app/pages/NamespacePage/__tests__/__snapshots__/index.test.tsx.snap +24 -5
- package/src/app/pages/NamespacePage/index.jsx +78 -10
- package/src/app/pages/NodePage/ClientCodePopover.jsx +30 -0
- package/src/app/pages/NodePage/NodeColumnTab.jsx +36 -20
- package/src/app/pages/NodePage/NodeGraphTab.jsx +45 -17
- package/src/app/pages/NodePage/NodeHistory.jsx +71 -0
- package/src/app/pages/NodePage/NodeInfoTab.jsx +132 -49
- package/src/app/pages/NodePage/NodeMaterializationTab.jsx +151 -0
- package/src/app/pages/NodePage/NodeSQLTab.jsx +100 -0
- package/src/app/pages/NodePage/NodeStatus.jsx +14 -20
- package/src/app/pages/NodePage/index.jsx +43 -8
- package/src/app/pages/Root/index.tsx +5 -0
- package/src/app/pages/SQLBuilderPage/Loadable.jsx +16 -0
- package/src/app/pages/SQLBuilderPage/index.jsx +317 -0
- package/src/app/services/DJService.js +125 -1
- package/src/styles/dag.css +111 -5
- package/src/styles/index.css +328 -22
- package/webpack.config.js +4 -5
- package/.babelrc +0 -4
- package/.env.local +0 -4
- package/.env.production +0 -1
- package/.vscode/extensions.json +0 -7
- package/.vscode/launch.json +0 -15
- package/.vscode/settings.json +0 -25
- package/Dockerfile +0 -7
- package/src/app/components/DashboardItem.jsx +0 -29
- package/src/app/pages/ListNamespacesPage/Loadable.jsx +0 -14
- package/src/app/pages/ListNamespacesPage/index.jsx +0 -60
package/.vscode/settings.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
-
"[typescript]": {
|
|
4
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
5
|
-
"editor.tabSize": 2
|
|
6
|
-
},
|
|
7
|
-
"[typescriptreact]": {
|
|
8
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
9
|
-
},
|
|
10
|
-
"[javascript]": {
|
|
11
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
12
|
-
},
|
|
13
|
-
"[json]": {
|
|
14
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
15
|
-
},
|
|
16
|
-
"[html]": {
|
|
17
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
18
|
-
},
|
|
19
|
-
"editor.codeActionsOnSave": {
|
|
20
|
-
"source.fixAll": true,
|
|
21
|
-
"source.fixAll.eslint": true
|
|
22
|
-
},
|
|
23
|
-
"editor.formatOnSave": true,
|
|
24
|
-
"javascript.format.enable": false
|
|
25
|
-
}
|
package/Dockerfile
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
|
|
3
|
-
export default class DashboardItem extends Component {
|
|
4
|
-
render() {
|
|
5
|
-
const { label, value } = this.props;
|
|
6
|
-
return (
|
|
7
|
-
// <div className="col-xl col-md-6 col-12">
|
|
8
|
-
// <div className="card">
|
|
9
|
-
// <div className="card-body">
|
|
10
|
-
// <div className="align-items-center row">
|
|
11
|
-
// <div className="col"><h6 className="text-uppercase text-muted mb-2">{ label }</h6><span
|
|
12
|
-
// className="h2 mb-0">{ value }</span><span className="mt-n1 ms-2 badge bg-success-soft">+3.5%</span></div>
|
|
13
|
-
// <div className="col-auto">
|
|
14
|
-
// <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
15
|
-
// stroke-linecap="round" stroke-linejoin="round" className="feather feather-dollar-sign text-muted">
|
|
16
|
-
// <g>
|
|
17
|
-
// <line x1="12" y1="1" x2="12" y2="23"></line>
|
|
18
|
-
// <path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>
|
|
19
|
-
// </g>
|
|
20
|
-
// </svg>
|
|
21
|
-
// </div>
|
|
22
|
-
// </div>
|
|
23
|
-
// </div>
|
|
24
|
-
// </div>
|
|
25
|
-
// </div>
|
|
26
|
-
<div></div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Asynchronously loads the component for namespaces node-viewing page
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { lazyLoad } from '../../../utils/loadable';
|
|
7
|
-
|
|
8
|
-
export const ListNamespacesPage = lazyLoad(
|
|
9
|
-
() => import('./index'),
|
|
10
|
-
module => module.ListNamespacesPage,
|
|
11
|
-
{
|
|
12
|
-
fallback: <div></div>,
|
|
13
|
-
},
|
|
14
|
-
);
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useContext, useEffect, useState } from 'react';
|
|
3
|
-
import NamespaceHeader from '../../components/NamespaceHeader';
|
|
4
|
-
import { DataJunctionAPI } from '../../services/DJService';
|
|
5
|
-
import DJClientContext from '../../providers/djclient';
|
|
6
|
-
// const datajunction = require('datajunction');
|
|
7
|
-
// const dj = new datajunction.DJClient('http://localhost:8000');
|
|
8
|
-
|
|
9
|
-
export function ListNamespacesPage() {
|
|
10
|
-
const djClient = useContext(DJClientContext).DataJunctionAPI;
|
|
11
|
-
const [state, setState] = useState({
|
|
12
|
-
namespaces: [],
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
const fetchData = async () => {
|
|
17
|
-
const namespaces = await djClient.namespaces();
|
|
18
|
-
setState({
|
|
19
|
-
namespaces: namespaces,
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
fetchData().catch(console.error);
|
|
23
|
-
}, [djClient, djClient.namespaces]);
|
|
24
|
-
|
|
25
|
-
const namespacesList = state.namespaces.map(node => (
|
|
26
|
-
<tr>
|
|
27
|
-
<td>
|
|
28
|
-
<a href={'/namespaces/' + node.namespace}>{node.namespace}</a>
|
|
29
|
-
</td>
|
|
30
|
-
<td></td>
|
|
31
|
-
</tr>
|
|
32
|
-
));
|
|
33
|
-
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
return (
|
|
36
|
-
<>
|
|
37
|
-
<div className="mid">
|
|
38
|
-
<NamespaceHeader namespace="" />
|
|
39
|
-
<div className="card">
|
|
40
|
-
<div className="card-header">
|
|
41
|
-
<h2>Namespaces</h2>
|
|
42
|
-
<div className="table-responsive">
|
|
43
|
-
<table className="card-table table">
|
|
44
|
-
<thead>
|
|
45
|
-
<th>Namespace</th>
|
|
46
|
-
<th>Node Count</th>
|
|
47
|
-
</thead>
|
|
48
|
-
{namespacesList}
|
|
49
|
-
</table>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
ListNamespacesPage.defaultProps = {
|
|
59
|
-
djClient: DataJunctionAPI,
|
|
60
|
-
};
|