datajunction-ui 0.0.1-rc.19 → 0.0.1-rc.20
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 +6 -5
- package/src/__tests__/reportWebVitals.test.jsx +44 -0
- package/src/app/components/DeleteNode.jsx +79 -0
- package/src/app/components/ListGroupItem.jsx +8 -1
- package/src/app/components/QueryInfo.jsx +4 -4
- package/src/app/components/Tab.jsx +9 -1
- package/src/app/components/ToggleSwitch.jsx +3 -0
- package/src/app/components/__tests__/QueryInfo.test.jsx +55 -0
- package/src/app/components/__tests__/Tab.test.jsx +27 -0
- package/src/app/components/__tests__/ToggleSwitch.test.jsx +43 -0
- package/src/app/components/__tests__/__snapshots__/ListGroupItem.test.tsx.snap +3 -0
- package/src/app/components/djgraph/DJNodeColumns.jsx +4 -1
- package/src/app/components/djgraph/DJNodeDimensions.jsx +9 -2
- package/src/app/components/djgraph/__tests__/Collapse.test.jsx +51 -0
- package/src/app/components/djgraph/__tests__/DJNodeColumns.test.jsx +83 -0
- package/src/app/components/djgraph/__tests__/DJNodeDimensions.test.jsx +118 -0
- package/src/app/index.tsx +6 -0
- package/src/app/pages/AddEditNodePage/FormikSelect.jsx +15 -2
- package/src/app/pages/AddEditNodePage/FullNameField.jsx +2 -1
- package/src/app/pages/AddEditNodePage/__tests__/AddEditNodePageFormFailed.test.jsx +77 -0
- package/src/app/pages/AddEditNodePage/__tests__/AddEditNodePageFormSuccess.test.jsx +93 -0
- package/src/app/pages/AddEditNodePage/__tests__/FormikSelect.test.jsx +34 -3
- package/src/app/pages/AddEditNodePage/__tests__/FullNameField.test.jsx +4 -2
- package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/AddEditNodePageFormFailed.test.jsx.snap +53 -0
- package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/AddEditNodePageFormSuccess.test.jsx.snap +53 -0
- package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/index.test.jsx.snap +0 -81
- package/src/app/pages/AddEditNodePage/__tests__/index.test.jsx +82 -257
- package/src/app/pages/AddEditNodePage/index.jsx +13 -5
- package/src/app/pages/LoginPage/__tests__/index.test.jsx +70 -0
- package/src/app/pages/NamespacePage/__tests__/index.test.jsx +95 -0
- package/src/app/pages/NamespacePage/index.jsx +8 -5
- package/src/app/pages/NodePage/ClientCodePopover.jsx +3 -1
- package/src/app/pages/NodePage/EditColumnPopover.jsx +102 -0
- package/src/app/pages/NodePage/LinkDimensionPopover.jsx +135 -0
- package/src/app/pages/NodePage/NodeColumnTab.jsx +80 -17
- package/src/app/pages/NodePage/NodeHistory.jsx +63 -30
- package/src/app/pages/NodePage/NodeInfoTab.jsx +52 -7
- package/src/app/pages/NodePage/NodeMaterializationTab.jsx +50 -27
- package/src/app/pages/NodePage/NodeSQLTab.jsx +0 -10
- package/src/app/pages/NodePage/NodesWithDimension.jsx +4 -2
- package/src/app/pages/NodePage/__tests__/ClientCodePopover.test.jsx +49 -0
- package/src/app/pages/NodePage/__tests__/EditColumnPopover.test.jsx +148 -0
- package/src/app/pages/NodePage/__tests__/LinkDimensionPopover.test.jsx +165 -0
- package/src/app/pages/NodePage/__tests__/NodeGraphTab.test.jsx +591 -0
- package/src/app/pages/NodePage/__tests__/NodeLineageTab.test.jsx +57 -0
- package/src/app/pages/NodePage/__tests__/NodePage.test.jsx +725 -0
- package/src/app/pages/NodePage/__tests__/NodeWithDimension.test.jsx +175 -0
- package/src/app/pages/NodePage/__tests__/__snapshots__/NodePage.test.jsx.snap +402 -0
- package/src/app/pages/NodePage/index.jsx +22 -6
- package/src/app/pages/NotFoundPage/__tests__/index.test.jsx +16 -0
- package/src/app/pages/RegisterTablePage/Loadable.jsx +16 -0
- package/src/app/pages/RegisterTablePage/index.jsx +163 -0
- package/src/app/pages/Root/__tests__/index.test.jsx +77 -0
- package/src/app/pages/SQLBuilderPage/__tests__/index.test.jsx +173 -0
- package/src/app/pages/SQLBuilderPage/index.jsx +61 -43
- package/src/app/services/DJService.js +125 -54
- package/src/app/services/__tests__/DJService.test.jsx +609 -0
- package/src/mocks/mockNodes.jsx +1397 -0
- package/src/setupTests.ts +30 -0
- package/src/styles/index.css +43 -0
- package/src/styles/node-creation.scss +7 -0
- package/src/utils/form.jsx +23 -0
- package/.github/pull_request_template.md +0 -11
- package/.github/workflows/ci.yml +0 -33
- package/src/app/pages/NamespacePage/__tests__/__snapshots__/index.test.tsx.snap +0 -118
- package/src/app/pages/NamespacePage/__tests__/index.test.tsx +0 -14
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, waitFor, screen } from '@testing-library/react';
|
|
3
|
+
import NodesWithDimension from '../NodesWithDimension';
|
|
4
|
+
|
|
5
|
+
describe('<NodesWithDimension />', () => {
|
|
6
|
+
const mockDjClient = {
|
|
7
|
+
nodesWithDimension: jest.fn(),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const mockNodesWithDimension = [
|
|
11
|
+
{
|
|
12
|
+
node_revision_id: 2,
|
|
13
|
+
node_id: 2,
|
|
14
|
+
type: 'source',
|
|
15
|
+
name: 'default.repair_order_details',
|
|
16
|
+
display_name: 'Default: Repair Order Details',
|
|
17
|
+
version: 'v1.0',
|
|
18
|
+
status: 'valid',
|
|
19
|
+
mode: 'published',
|
|
20
|
+
catalog: {
|
|
21
|
+
id: 1,
|
|
22
|
+
uuid: '0fc18295-e1a2-4c3c-b72a-894725c12488',
|
|
23
|
+
created_at: '2023-08-21T16:48:51.146121+00:00',
|
|
24
|
+
updated_at: '2023-08-21T16:48:51.146122+00:00',
|
|
25
|
+
extra_params: {},
|
|
26
|
+
name: 'warehouse',
|
|
27
|
+
},
|
|
28
|
+
schema_: 'roads',
|
|
29
|
+
table: 'repair_order_details',
|
|
30
|
+
description: 'Details on repair orders',
|
|
31
|
+
query: null,
|
|
32
|
+
availability: null,
|
|
33
|
+
columns: [
|
|
34
|
+
{
|
|
35
|
+
name: 'repair_order_id',
|
|
36
|
+
type: 'int',
|
|
37
|
+
attributes: [],
|
|
38
|
+
dimension: {
|
|
39
|
+
name: 'default.repair_order',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'repair_type_id',
|
|
44
|
+
type: 'int',
|
|
45
|
+
attributes: [],
|
|
46
|
+
dimension: null,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'price',
|
|
50
|
+
type: 'float',
|
|
51
|
+
attributes: [],
|
|
52
|
+
dimension: null,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'quantity',
|
|
56
|
+
type: 'int',
|
|
57
|
+
attributes: [],
|
|
58
|
+
dimension: null,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'discount',
|
|
62
|
+
type: 'float',
|
|
63
|
+
attributes: [],
|
|
64
|
+
dimension: null,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
updated_at: '2023-08-21T16:48:52.981201+00:00',
|
|
68
|
+
materializations: [],
|
|
69
|
+
parents: [],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
node_revision_id: 1,
|
|
73
|
+
node_id: 1,
|
|
74
|
+
type: 'source',
|
|
75
|
+
name: 'default.repair_orders',
|
|
76
|
+
display_name: 'Default: Repair Orders',
|
|
77
|
+
version: 'v1.0',
|
|
78
|
+
status: 'valid',
|
|
79
|
+
mode: 'published',
|
|
80
|
+
catalog: {
|
|
81
|
+
id: 1,
|
|
82
|
+
uuid: '0fc18295-e1a2-4c3c-b72a-894725c12488',
|
|
83
|
+
created_at: '2023-08-21T16:48:51.146121+00:00',
|
|
84
|
+
updated_at: '2023-08-21T16:48:51.146122+00:00',
|
|
85
|
+
extra_params: {},
|
|
86
|
+
name: 'warehouse',
|
|
87
|
+
},
|
|
88
|
+
schema_: 'roads',
|
|
89
|
+
table: 'repair_orders',
|
|
90
|
+
description: 'Repair orders',
|
|
91
|
+
query: null,
|
|
92
|
+
availability: null,
|
|
93
|
+
columns: [
|
|
94
|
+
{
|
|
95
|
+
name: 'repair_order_id',
|
|
96
|
+
type: 'int',
|
|
97
|
+
attributes: [],
|
|
98
|
+
dimension: {
|
|
99
|
+
name: 'default.repair_order',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'municipality_id',
|
|
104
|
+
type: 'string',
|
|
105
|
+
attributes: [],
|
|
106
|
+
dimension: null,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'hard_hat_id',
|
|
110
|
+
type: 'int',
|
|
111
|
+
attributes: [],
|
|
112
|
+
dimension: null,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'order_date',
|
|
116
|
+
type: 'date',
|
|
117
|
+
attributes: [],
|
|
118
|
+
dimension: null,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'required_date',
|
|
122
|
+
type: 'date',
|
|
123
|
+
attributes: [],
|
|
124
|
+
dimension: null,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'dispatched_date',
|
|
128
|
+
type: 'date',
|
|
129
|
+
attributes: [],
|
|
130
|
+
dimension: null,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'dispatcher_id',
|
|
134
|
+
type: 'int',
|
|
135
|
+
attributes: [],
|
|
136
|
+
dimension: null,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
updated_at: '2023-08-21T16:48:52.880498+00:00',
|
|
140
|
+
materializations: [],
|
|
141
|
+
parents: [],
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
|
|
145
|
+
const defaultProps = {
|
|
146
|
+
node: {
|
|
147
|
+
name: 'TestNode',
|
|
148
|
+
},
|
|
149
|
+
djClient: mockDjClient,
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
beforeEach(() => {
|
|
153
|
+
// Reset the mocks before each test
|
|
154
|
+
mockDjClient.nodesWithDimension.mockReset();
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('renders nodes with dimensions', async () => {
|
|
158
|
+
mockDjClient.nodesWithDimension.mockReturnValue(mockNodesWithDimension);
|
|
159
|
+
render(<NodesWithDimension {...defaultProps} />);
|
|
160
|
+
await waitFor(() => {
|
|
161
|
+
// calls nodesWithDimension with the correct node name
|
|
162
|
+
expect(mockDjClient.nodesWithDimension).toHaveBeenCalledWith(
|
|
163
|
+
defaultProps.node.name,
|
|
164
|
+
);
|
|
165
|
+
for (const node of mockNodesWithDimension) {
|
|
166
|
+
// renders nodes based on nodesWithDimension data
|
|
167
|
+
expect(screen.getByText(node.display_name)).toBeInTheDocument();
|
|
168
|
+
|
|
169
|
+
// renders links to the correct URLs
|
|
170
|
+
const link = screen.getByText(node.display_name).closest('a');
|
|
171
|
+
expect(link).toHaveAttribute('href', `/nodes/${node.name}`);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<NodePage /> renders the NodeHistory tab correctly 1`] = `
|
|
4
|
+
<table
|
|
5
|
+
aria-label="Revisions"
|
|
6
|
+
class="card-inner-table table"
|
|
7
|
+
>
|
|
8
|
+
<thead
|
|
9
|
+
class="fs-7 fw-bold text-gray-400 border-bottom-0"
|
|
10
|
+
>
|
|
11
|
+
<tr>
|
|
12
|
+
<th
|
|
13
|
+
class="text-start"
|
|
14
|
+
>
|
|
15
|
+
Version
|
|
16
|
+
</th>
|
|
17
|
+
<th>
|
|
18
|
+
Display Name
|
|
19
|
+
</th>
|
|
20
|
+
<th>
|
|
21
|
+
Description
|
|
22
|
+
</th>
|
|
23
|
+
<th>
|
|
24
|
+
Query
|
|
25
|
+
</th>
|
|
26
|
+
<th>
|
|
27
|
+
Tags
|
|
28
|
+
</th>
|
|
29
|
+
</tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr>
|
|
33
|
+
<td
|
|
34
|
+
class="text-start"
|
|
35
|
+
>
|
|
36
|
+
<span
|
|
37
|
+
class="badge node_type__source"
|
|
38
|
+
>
|
|
39
|
+
v1.0
|
|
40
|
+
</span>
|
|
41
|
+
</td>
|
|
42
|
+
<td>
|
|
43
|
+
Default: Avg Repair Price
|
|
44
|
+
</td>
|
|
45
|
+
<td>
|
|
46
|
+
Average repair price
|
|
47
|
+
</td>
|
|
48
|
+
<td>
|
|
49
|
+
SELECT avg(price) default_DOT_avg_repair_price
|
|
50
|
+
FROM default.repair_order_details
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</td>
|
|
54
|
+
<td />
|
|
55
|
+
</tr>
|
|
56
|
+
</tbody>
|
|
57
|
+
</table>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
exports[`<NodePage /> renders the NodeInfo tab correctly 1`] = `
|
|
61
|
+
HTMLCollection [
|
|
62
|
+
<code
|
|
63
|
+
class="language-sql"
|
|
64
|
+
style="white-space: pre;"
|
|
65
|
+
>
|
|
66
|
+
<span
|
|
67
|
+
style="color: rgb(0, 153, 153);"
|
|
68
|
+
>
|
|
69
|
+
SELECT
|
|
70
|
+
</span>
|
|
71
|
+
<span>
|
|
72
|
+
|
|
73
|
+
</span>
|
|
74
|
+
<span
|
|
75
|
+
class="hljs-built_in"
|
|
76
|
+
>
|
|
77
|
+
count
|
|
78
|
+
</span>
|
|
79
|
+
<span>
|
|
80
|
+
(repair_order_id) default_DOT_num_repair_orders
|
|
81
|
+
</span>
|
|
82
|
+
<span
|
|
83
|
+
style="color: rgb(0, 153, 153);"
|
|
84
|
+
>
|
|
85
|
+
FROM
|
|
86
|
+
</span>
|
|
87
|
+
<span>
|
|
88
|
+
default.repair_orders
|
|
89
|
+
</span>
|
|
90
|
+
</code>,
|
|
91
|
+
]
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
exports[`<NodePage /> renders the NodeMaterialization tab with materializations correctly 1`] = `
|
|
95
|
+
<table
|
|
96
|
+
aria-hidden="false"
|
|
97
|
+
aria-label="Materializations"
|
|
98
|
+
class="card-inner-table table"
|
|
99
|
+
>
|
|
100
|
+
<thead
|
|
101
|
+
class="fs-7 fw-bold text-gray-400 border-bottom-0"
|
|
102
|
+
>
|
|
103
|
+
<tr>
|
|
104
|
+
<th
|
|
105
|
+
class="text-start"
|
|
106
|
+
>
|
|
107
|
+
Name
|
|
108
|
+
</th>
|
|
109
|
+
<th>
|
|
110
|
+
Schedule
|
|
111
|
+
</th>
|
|
112
|
+
<th>
|
|
113
|
+
Engine
|
|
114
|
+
</th>
|
|
115
|
+
<th>
|
|
116
|
+
Partitions
|
|
117
|
+
</th>
|
|
118
|
+
<th>
|
|
119
|
+
Output Tables
|
|
120
|
+
</th>
|
|
121
|
+
<th>
|
|
122
|
+
Backfills
|
|
123
|
+
</th>
|
|
124
|
+
<th>
|
|
125
|
+
URLs
|
|
126
|
+
</th>
|
|
127
|
+
</tr>
|
|
128
|
+
</thead>
|
|
129
|
+
<tbody>
|
|
130
|
+
<tr>
|
|
131
|
+
<td
|
|
132
|
+
class="text-start node_name"
|
|
133
|
+
>
|
|
134
|
+
<a
|
|
135
|
+
href="http://fake.url/job"
|
|
136
|
+
>
|
|
137
|
+
country_birth_date_contractor_id_379232101
|
|
138
|
+
</a>
|
|
139
|
+
<button
|
|
140
|
+
aria-label="code-button"
|
|
141
|
+
class="code-button"
|
|
142
|
+
height="45px"
|
|
143
|
+
tabindex="0"
|
|
144
|
+
>
|
|
145
|
+
<svg
|
|
146
|
+
fill="none"
|
|
147
|
+
height="45px"
|
|
148
|
+
viewBox="0 0 64 64"
|
|
149
|
+
width="45px"
|
|
150
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
151
|
+
>
|
|
152
|
+
<g
|
|
153
|
+
id="SVGRepo_bgCarrier"
|
|
154
|
+
stroke-width="0"
|
|
155
|
+
/>
|
|
156
|
+
<g
|
|
157
|
+
id="SVGRepo_tracerCarrier"
|
|
158
|
+
stroke-linecap="round"
|
|
159
|
+
stroke-linejoin="round"
|
|
160
|
+
/>
|
|
161
|
+
<g
|
|
162
|
+
id="SVGRepo_iconCarrier"
|
|
163
|
+
>
|
|
164
|
+
<path
|
|
165
|
+
d="M31.885 16c-8.124 0-7.617 3.523-7.617 3.523l.01 3.65h7.752v1.095H21.197S16 23.678 16 31.876c0 8.196 4.537 7.906 4.537 7.906h2.708v-3.804s-.146-4.537 4.465-4.537h7.688s4.32.07 4.32-4.175v-7.019S40.374 16 31.885 16zm-4.275 2.454c.771 0 1.395.624 1.395 1.395s-.624 1.395-1.395 1.395a1.393 1.393 0 0 1-1.395-1.395c0-.771.624-1.395 1.395-1.395z"
|
|
166
|
+
fill="url(#a)"
|
|
167
|
+
/>
|
|
168
|
+
<path
|
|
169
|
+
d="M32.115 47.833c8.124 0 7.617-3.523 7.617-3.523l-.01-3.65H31.97v-1.095h10.832S48 40.155 48 31.958c0-8.197-4.537-7.906-4.537-7.906h-2.708v3.803s.146 4.537-4.465 4.537h-7.688s-4.32-.07-4.32 4.175v7.019s-.656 4.247 7.833 4.247zm4.275-2.454a1.393 1.393 0 0 1-1.395-1.395c0-.77.624-1.394 1.395-1.394s1.395.623 1.395 1.394c0 .772-.624 1.395-1.395 1.395z"
|
|
170
|
+
fill="url(#b)"
|
|
171
|
+
/>
|
|
172
|
+
<defs>
|
|
173
|
+
<lineargradient
|
|
174
|
+
gradientUnits="userSpaceOnUse"
|
|
175
|
+
id="a"
|
|
176
|
+
x1="19.075"
|
|
177
|
+
x2="34.898"
|
|
178
|
+
y1="18.782"
|
|
179
|
+
y2="34.658"
|
|
180
|
+
>
|
|
181
|
+
<stop
|
|
182
|
+
stop-color="#387EB8"
|
|
183
|
+
/>
|
|
184
|
+
<stop
|
|
185
|
+
offset="1"
|
|
186
|
+
stop-color="#366994"
|
|
187
|
+
/>
|
|
188
|
+
</lineargradient>
|
|
189
|
+
<lineargradient
|
|
190
|
+
gradientUnits="userSpaceOnUse"
|
|
191
|
+
id="b"
|
|
192
|
+
x1="28.809"
|
|
193
|
+
x2="45.803"
|
|
194
|
+
y1="28.882"
|
|
195
|
+
y2="45.163"
|
|
196
|
+
>
|
|
197
|
+
<stop
|
|
198
|
+
stop-color="#FFE052"
|
|
199
|
+
/>
|
|
200
|
+
<stop
|
|
201
|
+
offset="1"
|
|
202
|
+
stop-color="#FFC331"
|
|
203
|
+
/>
|
|
204
|
+
</lineargradient>
|
|
205
|
+
</defs>
|
|
206
|
+
</g>
|
|
207
|
+
</svg>
|
|
208
|
+
</button>
|
|
209
|
+
<div
|
|
210
|
+
aria-label="client-code"
|
|
211
|
+
id="node-create-code"
|
|
212
|
+
role="dialog"
|
|
213
|
+
style="display: none;"
|
|
214
|
+
>
|
|
215
|
+
<pre
|
|
216
|
+
style="display: block; overflow-x: auto; padding: 0.5em; background: rgb(1, 22, 39); color: rgb(214, 222, 235);"
|
|
217
|
+
>
|
|
218
|
+
<code
|
|
219
|
+
class="language-python"
|
|
220
|
+
style="white-space: pre;"
|
|
221
|
+
/>
|
|
222
|
+
</pre>
|
|
223
|
+
</div>
|
|
224
|
+
</td>
|
|
225
|
+
<td>
|
|
226
|
+
<span
|
|
227
|
+
class="badge cron"
|
|
228
|
+
>
|
|
229
|
+
0 * * * *
|
|
230
|
+
</span>
|
|
231
|
+
<div
|
|
232
|
+
class="cron-description"
|
|
233
|
+
>
|
|
234
|
+
Every hour
|
|
235
|
+
|
|
236
|
+
</div>
|
|
237
|
+
</td>
|
|
238
|
+
<td>
|
|
239
|
+
spark
|
|
240
|
+
<br />
|
|
241
|
+
2.4.4
|
|
242
|
+
</td>
|
|
243
|
+
<td>
|
|
244
|
+
<div
|
|
245
|
+
class="partition__full"
|
|
246
|
+
>
|
|
247
|
+
<div
|
|
248
|
+
class="partition__header"
|
|
249
|
+
>
|
|
250
|
+
country
|
|
251
|
+
</div>
|
|
252
|
+
<div
|
|
253
|
+
class="partition__body"
|
|
254
|
+
>
|
|
255
|
+
<span
|
|
256
|
+
class="badge partition_value"
|
|
257
|
+
>
|
|
258
|
+
DE
|
|
259
|
+
</span>
|
|
260
|
+
<span
|
|
261
|
+
class="badge partition_value"
|
|
262
|
+
>
|
|
263
|
+
MY
|
|
264
|
+
</span>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
<div
|
|
268
|
+
class="partition__full"
|
|
269
|
+
>
|
|
270
|
+
<div
|
|
271
|
+
class="partition__header"
|
|
272
|
+
>
|
|
273
|
+
contractor_id
|
|
274
|
+
</div>
|
|
275
|
+
<div
|
|
276
|
+
class="partition__body"
|
|
277
|
+
>
|
|
278
|
+
<div>
|
|
279
|
+
<span
|
|
280
|
+
class="badge partition_value"
|
|
281
|
+
>
|
|
282
|
+
<span
|
|
283
|
+
class="badge partition_value"
|
|
284
|
+
>
|
|
285
|
+
1
|
|
286
|
+
</span>
|
|
287
|
+
to
|
|
288
|
+
<span
|
|
289
|
+
class="badge partition_value"
|
|
290
|
+
>
|
|
291
|
+
10
|
|
292
|
+
</span>
|
|
293
|
+
</span>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
</td>
|
|
298
|
+
<td>
|
|
299
|
+
<div
|
|
300
|
+
class="table__full"
|
|
301
|
+
>
|
|
302
|
+
<div
|
|
303
|
+
class="table__header"
|
|
304
|
+
>
|
|
305
|
+
<svg
|
|
306
|
+
class="bi bi-table"
|
|
307
|
+
fill="currentColor"
|
|
308
|
+
height="16"
|
|
309
|
+
viewBox="0 0 16 16"
|
|
310
|
+
width="16"
|
|
311
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
312
|
+
>
|
|
313
|
+
<path
|
|
314
|
+
d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"
|
|
315
|
+
/>
|
|
316
|
+
</svg>
|
|
317
|
+
|
|
318
|
+
<span
|
|
319
|
+
class="entity-info"
|
|
320
|
+
>
|
|
321
|
+
common.a
|
|
322
|
+
</span>
|
|
323
|
+
</div>
|
|
324
|
+
<div
|
|
325
|
+
class="table__body upstream_tables"
|
|
326
|
+
/>
|
|
327
|
+
</div>
|
|
328
|
+
<div
|
|
329
|
+
class="table__full"
|
|
330
|
+
>
|
|
331
|
+
<div
|
|
332
|
+
class="table__header"
|
|
333
|
+
>
|
|
334
|
+
<svg
|
|
335
|
+
class="bi bi-table"
|
|
336
|
+
fill="currentColor"
|
|
337
|
+
height="16"
|
|
338
|
+
viewBox="0 0 16 16"
|
|
339
|
+
width="16"
|
|
340
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
341
|
+
>
|
|
342
|
+
<path
|
|
343
|
+
d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"
|
|
344
|
+
/>
|
|
345
|
+
</svg>
|
|
346
|
+
|
|
347
|
+
<span
|
|
348
|
+
class="entity-info"
|
|
349
|
+
>
|
|
350
|
+
common.b
|
|
351
|
+
</span>
|
|
352
|
+
</div>
|
|
353
|
+
<div
|
|
354
|
+
class="table__body upstream_tables"
|
|
355
|
+
/>
|
|
356
|
+
</div>
|
|
357
|
+
</td>
|
|
358
|
+
<td>
|
|
359
|
+
<div
|
|
360
|
+
class="partition__full"
|
|
361
|
+
>
|
|
362
|
+
<div
|
|
363
|
+
class="partition__header"
|
|
364
|
+
>
|
|
365
|
+
birth_date
|
|
366
|
+
</div>
|
|
367
|
+
<div
|
|
368
|
+
class="partition__body"
|
|
369
|
+
>
|
|
370
|
+
<div>
|
|
371
|
+
<span
|
|
372
|
+
class="badge partition_value"
|
|
373
|
+
>
|
|
374
|
+
<span
|
|
375
|
+
class="badge partition_value"
|
|
376
|
+
>
|
|
377
|
+
20010101
|
|
378
|
+
</span>
|
|
379
|
+
to
|
|
380
|
+
<span
|
|
381
|
+
class="badge partition_value"
|
|
382
|
+
>
|
|
383
|
+
20020101
|
|
384
|
+
</span>
|
|
385
|
+
</span>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
</td>
|
|
390
|
+
<td>
|
|
391
|
+
<a
|
|
392
|
+
href="http://fake.url/job"
|
|
393
|
+
>
|
|
394
|
+
[
|
|
395
|
+
1
|
|
396
|
+
]
|
|
397
|
+
</a>
|
|
398
|
+
</td>
|
|
399
|
+
</tr>
|
|
400
|
+
</tbody>
|
|
401
|
+
</table>
|
|
402
|
+
`;
|
|
@@ -125,7 +125,7 @@ export function NodePage() {
|
|
|
125
125
|
break;
|
|
126
126
|
case 4:
|
|
127
127
|
tabToDisplay =
|
|
128
|
-
node
|
|
128
|
+
node?.type === 'metric' ? <NodeSQLTab djNode={node} /> : <br />;
|
|
129
129
|
break;
|
|
130
130
|
case 5:
|
|
131
131
|
tabToDisplay = <NodeMaterializationTab node={node} djClient={djClient} />;
|
|
@@ -136,7 +136,7 @@ export function NodePage() {
|
|
|
136
136
|
case 7:
|
|
137
137
|
tabToDisplay = <NodeColumnLineage djNode={node} djClient={djClient} />;
|
|
138
138
|
break;
|
|
139
|
-
default:
|
|
139
|
+
default: /* istanbul ignore next */
|
|
140
140
|
tabToDisplay = <NodeInfoTab node={node} />;
|
|
141
141
|
}
|
|
142
142
|
// @ts-ignore
|
|
@@ -144,16 +144,24 @@ export function NodePage() {
|
|
|
144
144
|
<div className="node__header">
|
|
145
145
|
<NamespaceHeader namespace={name.split('.').slice(0, -1).join('.')} />
|
|
146
146
|
<div className="card">
|
|
147
|
-
{node
|
|
147
|
+
{node?.message === undefined ? (
|
|
148
148
|
<div className="card-header">
|
|
149
149
|
<h3
|
|
150
150
|
className="card-title align-items-start flex-column"
|
|
151
151
|
style={{ display: 'inline-block' }}
|
|
152
152
|
>
|
|
153
|
-
<span
|
|
153
|
+
<span
|
|
154
|
+
className="card-label fw-bold text-gray-800"
|
|
155
|
+
role="dialog"
|
|
156
|
+
aria-hidden="false"
|
|
157
|
+
aria-label="DisplayName"
|
|
158
|
+
>
|
|
154
159
|
{node?.display_name}{' '}
|
|
155
160
|
<span
|
|
156
161
|
className={'node_type__' + node?.type + ' badge node_type'}
|
|
162
|
+
role="dialog"
|
|
163
|
+
aria-hidden="false"
|
|
164
|
+
aria-label="NodeType"
|
|
157
165
|
>
|
|
158
166
|
{node?.type}
|
|
159
167
|
</span>
|
|
@@ -167,7 +175,13 @@ export function NodePage() {
|
|
|
167
175
|
</a>
|
|
168
176
|
<ClientCodePopover code={node?.createNodeClientCode} />
|
|
169
177
|
<div>
|
|
170
|
-
<a
|
|
178
|
+
<a
|
|
179
|
+
href={'/nodes/' + node?.name}
|
|
180
|
+
className="link-table"
|
|
181
|
+
role="dialog"
|
|
182
|
+
aria-hidden="false"
|
|
183
|
+
aria-label="NodeName"
|
|
184
|
+
>
|
|
171
185
|
{node?.name}
|
|
172
186
|
</a>
|
|
173
187
|
<span
|
|
@@ -182,11 +196,13 @@ export function NodePage() {
|
|
|
182
196
|
</div>
|
|
183
197
|
{tabToDisplay}
|
|
184
198
|
</div>
|
|
185
|
-
) : (
|
|
199
|
+
) : node?.message !== undefined ? (
|
|
186
200
|
<div className="message alert" style={{ margin: '20px' }}>
|
|
187
201
|
<AlertIcon />
|
|
188
202
|
Node `{name}` does not exist!
|
|
189
203
|
</div>
|
|
204
|
+
) : (
|
|
205
|
+
''
|
|
190
206
|
)}
|
|
191
207
|
</div>
|
|
192
208
|
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { NotFoundPage } from '../index';
|
|
4
|
+
import { HelmetProvider } from 'react-helmet-async';
|
|
5
|
+
|
|
6
|
+
describe('<NotFoundPage />', () => {
|
|
7
|
+
it('displays the correct 404 message ', () => {
|
|
8
|
+
const { getByText } = render(
|
|
9
|
+
<HelmetProvider>
|
|
10
|
+
<NotFoundPage />
|
|
11
|
+
</HelmetProvider>,
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
expect(getByText('Page not found.')).toBeInTheDocument();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asynchronously loads the component for the Node page
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { lazyLoad } from '../../../utils/loadable';
|
|
7
|
+
|
|
8
|
+
export const RegisterTablePage = () => {
|
|
9
|
+
return lazyLoad(
|
|
10
|
+
() => import('./index'),
|
|
11
|
+
module => module.RegisterTablePage,
|
|
12
|
+
{
|
|
13
|
+
fallback: <div></div>,
|
|
14
|
+
},
|
|
15
|
+
)();
|
|
16
|
+
};
|