datajunction-ui 0.0.1-rc.24 → 0.0.1-rc.25
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/.env +1 -0
- package/package.json +3 -2
- package/src/app/components/Tab.jsx +0 -1
- package/src/app/constants.js +2 -2
- package/src/app/icons/LoadingIcon.jsx +14 -0
- package/src/app/index.tsx +11 -1
- package/src/app/pages/AddEditNodePage/__tests__/AddEditNodePageFormFailed.test.jsx +28 -2
- package/src/app/pages/AddEditNodePage/__tests__/AddEditNodePageFormSuccess.test.jsx +44 -9
- package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/AddEditNodePageFormFailed.test.jsx.snap +1 -0
- package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/AddEditNodePageFormSuccess.test.jsx.snap +0 -50
- package/src/app/pages/AddEditNodePage/__tests__/index.test.jsx +2 -0
- package/src/app/pages/AddEditNodePage/index.jsx +60 -6
- package/src/app/pages/AddEditTagPage/Loadable.jsx +16 -0
- package/src/app/pages/AddEditTagPage/__tests__/AddEditTagPage.test.jsx +107 -0
- package/src/app/pages/AddEditTagPage/index.jsx +132 -0
- package/src/app/pages/LoginPage/LoginForm.jsx +116 -0
- package/src/app/pages/LoginPage/SignupForm.jsx +144 -0
- package/src/app/pages/LoginPage/__tests__/index.test.jsx +34 -2
- package/src/app/pages/LoginPage/index.jsx +9 -82
- package/src/app/pages/NamespacePage/index.jsx +5 -0
- package/src/app/pages/NodePage/EditColumnPopover.jsx +1 -1
- package/src/app/pages/NodePage/NodeColumnTab.jsx +11 -0
- package/src/app/pages/NodePage/NodeInfoTab.jsx +5 -1
- package/src/app/pages/NodePage/__tests__/NodePage.test.jsx +6 -3
- package/src/app/pages/RegisterTablePage/__tests__/__snapshots__/RegisterTablePage.test.jsx.snap +1 -0
- package/src/app/pages/Root/index.tsx +1 -1
- package/src/app/pages/TagPage/Loadable.jsx +16 -0
- package/src/app/pages/TagPage/__tests__/TagPage.test.jsx +70 -0
- package/src/app/pages/TagPage/index.jsx +79 -0
- package/src/app/services/DJService.js +79 -1
- package/src/app/services/__tests__/DJService.test.jsx +84 -1
- package/src/mocks/mockNodes.jsx +88 -44
- package/src/styles/index.css +19 -0
- package/src/styles/loading.css +35 -0
- package/src/styles/login.css +17 -3
- package/src/utils/form.jsx +2 -2
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import fetchMock from 'jest-fetch-mock';
|
|
4
|
+
import { render } from '../../../../setupTests';
|
|
5
|
+
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
|
6
|
+
import DJClientContext from '../../../providers/djclient';
|
|
7
|
+
import { TagPage } from '../index';
|
|
8
|
+
|
|
9
|
+
describe('<TagPage />', () => {
|
|
10
|
+
const initializeMockDJClient = () => {
|
|
11
|
+
return {
|
|
12
|
+
DataJunctionAPI: {
|
|
13
|
+
getTag: jest.fn(),
|
|
14
|
+
listNodesForTag: jest.fn(),
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const mockDjClient = initializeMockDJClient();
|
|
20
|
+
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
fetchMock.resetMocks();
|
|
23
|
+
jest.clearAllMocks();
|
|
24
|
+
window.scrollTo = jest.fn();
|
|
25
|
+
|
|
26
|
+
mockDjClient.DataJunctionAPI.getTag.mockReturnValue({
|
|
27
|
+
name: 'domains.com',
|
|
28
|
+
tag_type: 'domains',
|
|
29
|
+
description: 'Top-level domain .com',
|
|
30
|
+
});
|
|
31
|
+
mockDjClient.DataJunctionAPI.listNodesForTag.mockReturnValue([
|
|
32
|
+
{
|
|
33
|
+
name: 'random.node_a',
|
|
34
|
+
type: 'metric',
|
|
35
|
+
display_name: 'Node A',
|
|
36
|
+
},
|
|
37
|
+
]);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const renderTagsPage = element => {
|
|
41
|
+
return render(
|
|
42
|
+
<MemoryRouter initialEntries={['/tags/:name']}>
|
|
43
|
+
<Routes>
|
|
44
|
+
<Route path="tags/:name" element={element} />
|
|
45
|
+
</Routes>
|
|
46
|
+
</MemoryRouter>,
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const testElement = djClient => {
|
|
51
|
+
return (
|
|
52
|
+
<DJClientContext.Provider value={djClient}>
|
|
53
|
+
<TagPage />
|
|
54
|
+
</DJClientContext.Provider>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
it('renders the tag page correctly', async () => {
|
|
59
|
+
const element = testElement(mockDjClient);
|
|
60
|
+
renderTagsPage(element);
|
|
61
|
+
await waitFor(() => {
|
|
62
|
+
expect(mockDjClient.DataJunctionAPI.getTag).toHaveBeenCalledTimes(1);
|
|
63
|
+
expect(
|
|
64
|
+
mockDjClient.DataJunctionAPI.listNodesForTag,
|
|
65
|
+
).toHaveBeenCalledTimes(1);
|
|
66
|
+
});
|
|
67
|
+
expect(screen.getByText('Nodes')).toBeInTheDocument();
|
|
68
|
+
expect(screen.getByText('Node A')).toBeInTheDocument();
|
|
69
|
+
}, 60000);
|
|
70
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For a given tag, displays nodes tagged with it
|
|
3
|
+
*/
|
|
4
|
+
import NamespaceHeader from '../../components/NamespaceHeader';
|
|
5
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
6
|
+
import 'styles/node-creation.scss';
|
|
7
|
+
import DJClientContext from '../../providers/djclient';
|
|
8
|
+
import { useParams } from 'react-router-dom';
|
|
9
|
+
|
|
10
|
+
export function TagPage() {
|
|
11
|
+
const [nodes, setNodes] = useState([]);
|
|
12
|
+
const [tag, setTag] = useState([]);
|
|
13
|
+
|
|
14
|
+
const { name } = useParams();
|
|
15
|
+
|
|
16
|
+
const djClient = useContext(DJClientContext).DataJunctionAPI;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const fetchData = async () => {
|
|
19
|
+
const data = await djClient.listNodesForTag(name);
|
|
20
|
+
const tagData = await djClient.getTag(name);
|
|
21
|
+
setNodes(data);
|
|
22
|
+
setTag(tagData);
|
|
23
|
+
};
|
|
24
|
+
fetchData().catch(console.error);
|
|
25
|
+
}, [djClient, name]);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className="mid">
|
|
29
|
+
<NamespaceHeader namespace="" />
|
|
30
|
+
<div className="card">
|
|
31
|
+
<div className="card-header">
|
|
32
|
+
<h3
|
|
33
|
+
className="card-title align-items-start flex-column"
|
|
34
|
+
style={{ display: 'inline-block' }}
|
|
35
|
+
>
|
|
36
|
+
Tag
|
|
37
|
+
</h3>
|
|
38
|
+
<div>
|
|
39
|
+
<div style={{ marginBottom: '1.5rem' }}>
|
|
40
|
+
<h6 className="mb-0 w-100">Display Name</h6>
|
|
41
|
+
<p className="mb-0 opacity-75">{tag.display_name}</p>
|
|
42
|
+
</div>
|
|
43
|
+
<div style={{ marginBottom: '1.5rem' }}>
|
|
44
|
+
<h6 className="mb-0 w-100">Name</h6>
|
|
45
|
+
<p className="mb-0 opacity-75">{name}</p>
|
|
46
|
+
</div>
|
|
47
|
+
<div style={{ marginBottom: '1.5rem' }}>
|
|
48
|
+
<h6 className="mb-0 w-100">Tag Type</h6>
|
|
49
|
+
<p className="mb-0 opacity-75">{tag.tag_type}</p>
|
|
50
|
+
</div>
|
|
51
|
+
<div style={{ marginBottom: '1.5rem' }}>
|
|
52
|
+
<h6 className="mb-0 w-100">Description</h6>
|
|
53
|
+
<p className="mb-0 opacity-75">{tag.description}</p>
|
|
54
|
+
</div>
|
|
55
|
+
<div style={{ marginBottom: '1.5rem' }}>
|
|
56
|
+
<h6 className="mb-0 w-100">Nodes</h6>
|
|
57
|
+
<div className={`list-group-item`}>
|
|
58
|
+
{nodes?.map(node => (
|
|
59
|
+
<div
|
|
60
|
+
className="button-3 cube-element"
|
|
61
|
+
key={node.name}
|
|
62
|
+
role="cell"
|
|
63
|
+
aria-label="CubeElement"
|
|
64
|
+
aria-hidden="false"
|
|
65
|
+
>
|
|
66
|
+
<a href={`/nodes/${node.name}`}>{node.display_name}</a>
|
|
67
|
+
<span className={`badge node_type__${node.type}`}>
|
|
68
|
+
{node.type}
|
|
69
|
+
</span>
|
|
70
|
+
</div>
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -12,7 +12,7 @@ export const DataJunctionAPI = {
|
|
|
12
12
|
},
|
|
13
13
|
|
|
14
14
|
logout: async function () {
|
|
15
|
-
await await fetch(`${DJ_URL}/
|
|
15
|
+
await await fetch(`${DJ_URL}/logout/`, {
|
|
16
16
|
credentials: 'include',
|
|
17
17
|
method: 'POST',
|
|
18
18
|
});
|
|
@@ -497,4 +497,82 @@ export const DataJunctionAPI = {
|
|
|
497
497
|
});
|
|
498
498
|
return { status: response.status, json: await response.json() };
|
|
499
499
|
},
|
|
500
|
+
listTags: async function () {
|
|
501
|
+
const response = await fetch(`${DJ_URL}/tags`, {
|
|
502
|
+
method: 'GET',
|
|
503
|
+
headers: {
|
|
504
|
+
'Content-Type': 'application/json',
|
|
505
|
+
},
|
|
506
|
+
credentials: 'include',
|
|
507
|
+
});
|
|
508
|
+
return await response.json();
|
|
509
|
+
},
|
|
510
|
+
getTag: async function (tagName) {
|
|
511
|
+
const response = await fetch(`${DJ_URL}/tags/${tagName}`, {
|
|
512
|
+
method: 'GET',
|
|
513
|
+
headers: {
|
|
514
|
+
'Content-Type': 'application/json',
|
|
515
|
+
},
|
|
516
|
+
credentials: 'include',
|
|
517
|
+
});
|
|
518
|
+
return await response.json();
|
|
519
|
+
},
|
|
520
|
+
listNodesForTag: async function (tagName) {
|
|
521
|
+
const response = await fetch(`${DJ_URL}/tags/${tagName}/nodes`, {
|
|
522
|
+
method: 'GET',
|
|
523
|
+
headers: {
|
|
524
|
+
'Content-Type': 'application/json',
|
|
525
|
+
},
|
|
526
|
+
credentials: 'include',
|
|
527
|
+
});
|
|
528
|
+
return await response.json();
|
|
529
|
+
},
|
|
530
|
+
tagsNode: async function (nodeName, tagNames) {
|
|
531
|
+
const url = tagNames
|
|
532
|
+
.map(value => `tag_names=${encodeURIComponent(value)}`)
|
|
533
|
+
.join('&');
|
|
534
|
+
const response = await fetch(`${DJ_URL}/nodes/${nodeName}/tags?${url}`, {
|
|
535
|
+
method: 'POST',
|
|
536
|
+
headers: {
|
|
537
|
+
'Content-Type': 'application/json',
|
|
538
|
+
},
|
|
539
|
+
credentials: 'include',
|
|
540
|
+
});
|
|
541
|
+
return { status: response.status, json: await response.json() };
|
|
542
|
+
},
|
|
543
|
+
addTag: async function (name, displayName, tagType, description) {
|
|
544
|
+
const response = await fetch(`${DJ_URL}/tags`, {
|
|
545
|
+
method: 'POST',
|
|
546
|
+
headers: {
|
|
547
|
+
'Content-Type': 'application/json',
|
|
548
|
+
},
|
|
549
|
+
body: JSON.stringify({
|
|
550
|
+
name: name,
|
|
551
|
+
display_name: displayName,
|
|
552
|
+
tag_type: tagType,
|
|
553
|
+
description: description,
|
|
554
|
+
}),
|
|
555
|
+
credentials: 'include',
|
|
556
|
+
});
|
|
557
|
+
return { status: response.status, json: await response.json() };
|
|
558
|
+
},
|
|
559
|
+
editTag: async function (name, description, displayName) {
|
|
560
|
+
const updates = {};
|
|
561
|
+
if (description) {
|
|
562
|
+
updates.description = description;
|
|
563
|
+
}
|
|
564
|
+
if (displayName) {
|
|
565
|
+
updates.display_name = displayName;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const response = await fetch(`${DJ_URL}/tags/${name}`, {
|
|
569
|
+
method: 'PATCH',
|
|
570
|
+
headers: {
|
|
571
|
+
'Content-Type': 'application/json',
|
|
572
|
+
},
|
|
573
|
+
body: JSON.stringify(updates),
|
|
574
|
+
credentials: 'include',
|
|
575
|
+
});
|
|
576
|
+
return { status: response.status, json: await response.json() };
|
|
577
|
+
},
|
|
500
578
|
};
|
|
@@ -28,7 +28,7 @@ describe('DataJunctionAPI', () => {
|
|
|
28
28
|
it('calls logout correctly', async () => {
|
|
29
29
|
fetch.mockResponseOnce(JSON.stringify({}));
|
|
30
30
|
await DataJunctionAPI.logout();
|
|
31
|
-
expect(fetch).toHaveBeenCalledWith(`${DJ_URL}/
|
|
31
|
+
expect(fetch).toHaveBeenCalledWith(`${DJ_URL}/logout/`, {
|
|
32
32
|
credentials: 'include',
|
|
33
33
|
method: 'POST',
|
|
34
34
|
});
|
|
@@ -606,4 +606,87 @@ describe('DataJunctionAPI', () => {
|
|
|
606
606
|
},
|
|
607
607
|
);
|
|
608
608
|
});
|
|
609
|
+
|
|
610
|
+
it('calls listTags correctly', async () => {
|
|
611
|
+
fetch.mockResponseOnce(JSON.stringify(mocks.tags));
|
|
612
|
+
const res = await DataJunctionAPI.listTags();
|
|
613
|
+
expect(fetch).toHaveBeenCalledWith(`${DJ_URL}/tags`, {
|
|
614
|
+
credentials: 'include',
|
|
615
|
+
headers: {
|
|
616
|
+
'Content-Type': 'application/json',
|
|
617
|
+
},
|
|
618
|
+
method: 'GET',
|
|
619
|
+
});
|
|
620
|
+
expect(res).toEqual(mocks.tags);
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
it('calls getTag correctly', async () => {
|
|
624
|
+
fetch.mockResponseOnce(JSON.stringify(mocks.tags[0]));
|
|
625
|
+
const res = await DataJunctionAPI.getTag('report.financials');
|
|
626
|
+
expect(fetch).toHaveBeenCalledWith(`${DJ_URL}/tags/report.financials`, {
|
|
627
|
+
credentials: 'include',
|
|
628
|
+
headers: {
|
|
629
|
+
'Content-Type': 'application/json',
|
|
630
|
+
},
|
|
631
|
+
method: 'GET',
|
|
632
|
+
});
|
|
633
|
+
expect(res).toEqual(mocks.tags[0]);
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
it('calls listNodesForTag correctly', async () => {
|
|
637
|
+
fetch.mockResponseOnce(JSON.stringify(mocks.mockLinkedNodes));
|
|
638
|
+
const res = await DataJunctionAPI.listNodesForTag('report.financials');
|
|
639
|
+
expect(fetch).toHaveBeenCalledWith(
|
|
640
|
+
`${DJ_URL}/tags/report.financials/nodes`,
|
|
641
|
+
{
|
|
642
|
+
credentials: 'include',
|
|
643
|
+
headers: {
|
|
644
|
+
'Content-Type': 'application/json',
|
|
645
|
+
},
|
|
646
|
+
method: 'GET',
|
|
647
|
+
},
|
|
648
|
+
);
|
|
649
|
+
expect(res).toEqual(mocks.mockLinkedNodes);
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
it('calls tagsNode correctly', async () => {
|
|
653
|
+
fetch.mockResponseOnce(JSON.stringify(mocks.mockLinkedNodes));
|
|
654
|
+
await DataJunctionAPI.tagsNode('default.num_repair_orders', [
|
|
655
|
+
'report.financials',
|
|
656
|
+
'report.forecasts',
|
|
657
|
+
]);
|
|
658
|
+
expect(fetch).toHaveBeenCalledWith(
|
|
659
|
+
`${DJ_URL}/nodes/default.num_repair_orders/tags?tag_names=report.financials&tag_names=report.forecasts`,
|
|
660
|
+
{
|
|
661
|
+
credentials: 'include',
|
|
662
|
+
headers: {
|
|
663
|
+
'Content-Type': 'application/json',
|
|
664
|
+
},
|
|
665
|
+
method: 'POST',
|
|
666
|
+
},
|
|
667
|
+
);
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
it('calls addTag correctly', async () => {
|
|
671
|
+
fetch.mockResponseOnce(JSON.stringify(mocks.mockLinkedNodes));
|
|
672
|
+
await DataJunctionAPI.addTag(
|
|
673
|
+
'report.financials',
|
|
674
|
+
'Financial Reports',
|
|
675
|
+
'report',
|
|
676
|
+
'financial reports',
|
|
677
|
+
);
|
|
678
|
+
expect(fetch).toHaveBeenCalledWith(`${DJ_URL}/tags`, {
|
|
679
|
+
credentials: 'include',
|
|
680
|
+
headers: {
|
|
681
|
+
'Content-Type': 'application/json',
|
|
682
|
+
},
|
|
683
|
+
body: JSON.stringify({
|
|
684
|
+
name: 'report.financials',
|
|
685
|
+
display_name: 'Financial Reports',
|
|
686
|
+
tag_type: 'report',
|
|
687
|
+
description: 'financial reports',
|
|
688
|
+
}),
|
|
689
|
+
method: 'POST',
|
|
690
|
+
});
|
|
691
|
+
});
|
|
609
692
|
});
|
package/src/mocks/mockNodes.jsx
CHANGED
|
@@ -27,6 +27,7 @@ export const mocks = {
|
|
|
27
27
|
{
|
|
28
28
|
name: 'default_DOT_num_repair_orders',
|
|
29
29
|
type: 'bigint',
|
|
30
|
+
display_name: 'Default DOT num repair orders',
|
|
30
31
|
attributes: [],
|
|
31
32
|
dimension: null,
|
|
32
33
|
},
|
|
@@ -40,7 +41,7 @@ export const mocks = {
|
|
|
40
41
|
},
|
|
41
42
|
],
|
|
42
43
|
created_at: '2023-08-21T16:48:56.841631+00:00',
|
|
43
|
-
tags: [],
|
|
44
|
+
tags: [{ name: 'purpose', display_name: 'Purpose' }],
|
|
44
45
|
dimensions: [
|
|
45
46
|
{
|
|
46
47
|
value: 'default.date_dim.dateint',
|
|
@@ -243,6 +244,7 @@ export const mocks = {
|
|
|
243
244
|
{
|
|
244
245
|
name: 'default_DOT_avg_repair_price',
|
|
245
246
|
type: 'double',
|
|
247
|
+
display_name: 'Default DOT avg repair price',
|
|
246
248
|
attributes: [],
|
|
247
249
|
dimension: null,
|
|
248
250
|
},
|
|
@@ -402,6 +404,7 @@ export const mocks = {
|
|
|
402
404
|
{
|
|
403
405
|
name: 'default_DOT_avg_repair_price',
|
|
404
406
|
type: 'double',
|
|
407
|
+
display_name: 'Default DOT avg repair price',
|
|
405
408
|
attributes: [],
|
|
406
409
|
dimension: null,
|
|
407
410
|
},
|
|
@@ -442,30 +445,35 @@ export const mocks = {
|
|
|
442
445
|
{
|
|
443
446
|
name: 'default_DOT_num_repair_orders',
|
|
444
447
|
type: 'bigint',
|
|
448
|
+
display_name: 'Default DOT num repair orders',
|
|
445
449
|
attributes: [],
|
|
446
450
|
dimension: null,
|
|
447
451
|
},
|
|
448
452
|
{
|
|
449
453
|
name: 'default_DOT_avg_repair_price',
|
|
450
454
|
type: 'double',
|
|
455
|
+
display_name: 'Default DOT avg repair price',
|
|
451
456
|
attributes: [],
|
|
452
457
|
dimension: null,
|
|
453
458
|
},
|
|
454
459
|
{
|
|
455
460
|
name: 'default_DOT_total_repair_cost',
|
|
456
461
|
type: 'double',
|
|
462
|
+
display_name: 'Default DOT total repair cost',
|
|
457
463
|
attributes: [],
|
|
458
464
|
dimension: null,
|
|
459
465
|
},
|
|
460
466
|
{
|
|
461
467
|
name: 'default_DOT_total_repair_order_discounts',
|
|
462
468
|
type: 'double',
|
|
469
|
+
display_name: 'Default DOT total repair order discounts',
|
|
463
470
|
attributes: [],
|
|
464
471
|
dimension: null,
|
|
465
472
|
},
|
|
466
473
|
{
|
|
467
474
|
name: 'company_name',
|
|
468
475
|
type: 'string',
|
|
476
|
+
display_name: 'Company Name',
|
|
469
477
|
attributes: [
|
|
470
478
|
{
|
|
471
479
|
attribute_type: {
|
|
@@ -821,6 +829,7 @@ export const mocks = {
|
|
|
821
829
|
{
|
|
822
830
|
name: 'default_DOT_avg_repair_price',
|
|
823
831
|
type: 'double',
|
|
832
|
+
display_name: 'Default DOT avg repair price',
|
|
824
833
|
attributes: [],
|
|
825
834
|
dimension: null,
|
|
826
835
|
},
|
|
@@ -1044,6 +1053,7 @@ export const mocks = {
|
|
|
1044
1053
|
{
|
|
1045
1054
|
name: 'repair_order_id',
|
|
1046
1055
|
type: 'int',
|
|
1056
|
+
display_name: 'Repair Order Id',
|
|
1047
1057
|
attributes: [],
|
|
1048
1058
|
dimension: {
|
|
1049
1059
|
name: 'default.repair_order',
|
|
@@ -1052,24 +1062,28 @@ export const mocks = {
|
|
|
1052
1062
|
{
|
|
1053
1063
|
name: 'repair_type_id',
|
|
1054
1064
|
type: 'int',
|
|
1065
|
+
display_name: 'Repair Type Id',
|
|
1055
1066
|
attributes: [],
|
|
1056
1067
|
dimension: null,
|
|
1057
1068
|
},
|
|
1058
1069
|
{
|
|
1059
1070
|
name: 'price',
|
|
1060
1071
|
type: 'float',
|
|
1072
|
+
display_name: 'Price',
|
|
1061
1073
|
attributes: [],
|
|
1062
1074
|
dimension: null,
|
|
1063
1075
|
},
|
|
1064
1076
|
{
|
|
1065
1077
|
name: 'quantity',
|
|
1066
1078
|
type: 'int',
|
|
1079
|
+
display_name: 'Quantity',
|
|
1067
1080
|
attributes: [],
|
|
1068
1081
|
dimension: null,
|
|
1069
1082
|
},
|
|
1070
1083
|
{
|
|
1071
1084
|
name: 'discount',
|
|
1072
1085
|
type: 'float',
|
|
1086
|
+
display_name: 'Discount',
|
|
1073
1087
|
attributes: [],
|
|
1074
1088
|
dimension: null,
|
|
1075
1089
|
},
|
|
@@ -1108,6 +1122,7 @@ export const mocks = {
|
|
|
1108
1122
|
{
|
|
1109
1123
|
name: 'dateint',
|
|
1110
1124
|
type: 'timestamp',
|
|
1125
|
+
display_name: 'Dateint',
|
|
1111
1126
|
attributes: [
|
|
1112
1127
|
{
|
|
1113
1128
|
attribute_type: {
|
|
@@ -1121,18 +1136,21 @@ export const mocks = {
|
|
|
1121
1136
|
{
|
|
1122
1137
|
name: 'month',
|
|
1123
1138
|
type: 'int',
|
|
1139
|
+
display_name: 'Month',
|
|
1124
1140
|
attributes: [],
|
|
1125
1141
|
dimension: null,
|
|
1126
1142
|
},
|
|
1127
1143
|
{
|
|
1128
1144
|
name: 'year',
|
|
1129
1145
|
type: 'int',
|
|
1146
|
+
display_name: 'Year',
|
|
1130
1147
|
attributes: [],
|
|
1131
1148
|
dimension: null,
|
|
1132
1149
|
},
|
|
1133
1150
|
{
|
|
1134
1151
|
name: 'day',
|
|
1135
1152
|
type: 'int',
|
|
1153
|
+
display_name: 'Day',
|
|
1136
1154
|
attributes: [],
|
|
1137
1155
|
dimension: null,
|
|
1138
1156
|
},
|
|
@@ -1175,6 +1193,7 @@ export const mocks = {
|
|
|
1175
1193
|
{
|
|
1176
1194
|
name: 'hard_hat_id',
|
|
1177
1195
|
type: 'int',
|
|
1196
|
+
display_name: 'Hard Hat Id',
|
|
1178
1197
|
attributes: [
|
|
1179
1198
|
{
|
|
1180
1199
|
attribute_type: {
|
|
@@ -1188,89 +1207,94 @@ export const mocks = {
|
|
|
1188
1207
|
{
|
|
1189
1208
|
name: 'last_name',
|
|
1190
1209
|
type: 'string',
|
|
1210
|
+
display_name: 'Last Name',
|
|
1191
1211
|
attributes: [],
|
|
1192
1212
|
dimension: null,
|
|
1193
1213
|
},
|
|
1194
1214
|
{
|
|
1195
1215
|
name: 'first_name',
|
|
1196
1216
|
type: 'string',
|
|
1217
|
+
display_name: 'First Name',
|
|
1197
1218
|
attributes: [],
|
|
1198
1219
|
dimension: null,
|
|
1199
1220
|
},
|
|
1200
1221
|
{
|
|
1201
1222
|
name: 'title',
|
|
1202
1223
|
type: 'string',
|
|
1224
|
+
display_name: 'Title',
|
|
1203
1225
|
attributes: [],
|
|
1204
1226
|
dimension: null,
|
|
1205
1227
|
},
|
|
1206
1228
|
{
|
|
1207
1229
|
name: 'birth_date',
|
|
1208
1230
|
type: 'date',
|
|
1231
|
+
display_name: 'Birth Date',
|
|
1209
1232
|
attributes: [],
|
|
1210
1233
|
dimension: {
|
|
1211
1234
|
name: 'default.date_dim',
|
|
1212
1235
|
},
|
|
1213
1236
|
},
|
|
1214
1237
|
{
|
|
1215
|
-
name:
|
|
1216
|
-
type:
|
|
1217
|
-
attributes: [],
|
|
1218
|
-
dimension: {
|
|
1219
|
-
name:
|
|
1238
|
+
"name": "hire_date",
|
|
1239
|
+
"type": "date",
|
|
1240
|
+
"attributes": [],
|
|
1241
|
+
"dimension": {
|
|
1242
|
+
"name": "default.date_dim"
|
|
1220
1243
|
},
|
|
1244
|
+
"display_name": "Hire Date"
|
|
1221
1245
|
},
|
|
1222
1246
|
{
|
|
1223
|
-
name:
|
|
1224
|
-
type:
|
|
1225
|
-
attributes: [],
|
|
1226
|
-
dimension: null,
|
|
1247
|
+
"name": "address",
|
|
1248
|
+
"type": "string",
|
|
1249
|
+
"attributes": [],
|
|
1250
|
+
"dimension": null,
|
|
1251
|
+
"display_name": "Address"
|
|
1227
1252
|
},
|
|
1228
1253
|
{
|
|
1229
|
-
name:
|
|
1230
|
-
type:
|
|
1231
|
-
attributes: [],
|
|
1232
|
-
dimension: null,
|
|
1254
|
+
"name": "city",
|
|
1255
|
+
"type": "string",
|
|
1256
|
+
"attributes": [],
|
|
1257
|
+
"dimension": null,
|
|
1258
|
+
"display_name": "City"
|
|
1233
1259
|
},
|
|
1234
1260
|
{
|
|
1235
|
-
name:
|
|
1236
|
-
type:
|
|
1237
|
-
attributes: [],
|
|
1238
|
-
dimension: {
|
|
1239
|
-
name:
|
|
1261
|
+
"name": "state",
|
|
1262
|
+
"type": "string",
|
|
1263
|
+
"attributes": [],
|
|
1264
|
+
"dimension": {
|
|
1265
|
+
"name": "default.us_state"
|
|
1240
1266
|
},
|
|
1267
|
+
"display_name": "State"
|
|
1241
1268
|
},
|
|
1242
1269
|
{
|
|
1243
|
-
name:
|
|
1244
|
-
type:
|
|
1245
|
-
attributes: [],
|
|
1246
|
-
dimension: null,
|
|
1270
|
+
"name": "postal_code",
|
|
1271
|
+
"type": "string",
|
|
1272
|
+
"attributes": [],
|
|
1273
|
+
"dimension": null,
|
|
1274
|
+
"display_name": "Postal Code"
|
|
1247
1275
|
},
|
|
1248
1276
|
{
|
|
1249
|
-
name:
|
|
1250
|
-
type:
|
|
1251
|
-
attributes: [],
|
|
1252
|
-
dimension: null,
|
|
1277
|
+
"name": "country",
|
|
1278
|
+
"type": "string",
|
|
1279
|
+
"attributes": [],
|
|
1280
|
+
"dimension": null,
|
|
1281
|
+
"display_name": "Country"
|
|
1253
1282
|
},
|
|
1254
1283
|
{
|
|
1255
|
-
name:
|
|
1256
|
-
type:
|
|
1257
|
-
attributes: [],
|
|
1258
|
-
dimension: null,
|
|
1284
|
+
"name": "manager",
|
|
1285
|
+
"type": "int",
|
|
1286
|
+
"attributes": [],
|
|
1287
|
+
"dimension": null,
|
|
1288
|
+
"display_name": "Manager"
|
|
1259
1289
|
},
|
|
1260
1290
|
{
|
|
1261
|
-
name:
|
|
1262
|
-
type:
|
|
1263
|
-
attributes: [],
|
|
1264
|
-
dimension: null,
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
materializations: [],
|
|
1269
|
-
parents: [
|
|
1270
|
-
{
|
|
1271
|
-
name: 'default.hard_hats',
|
|
1272
|
-
},
|
|
1273
|
-
],
|
|
1291
|
+
"name": "contractor_id",
|
|
1292
|
+
"type": "int",
|
|
1293
|
+
"attributes": [],
|
|
1294
|
+
"dimension": null,
|
|
1295
|
+
"display_name": "Contractor Id"
|
|
1296
|
+
}
|
|
1297
|
+
],
|
|
1274
1298
|
created_at: '2023-08-21T16:48:55.594537+00:00',
|
|
1275
1299
|
tags: [],
|
|
1276
1300
|
},
|
|
@@ -1302,6 +1326,7 @@ export const mocks = {
|
|
|
1302
1326
|
{
|
|
1303
1327
|
name: 'default_DOT_avg_repair_price',
|
|
1304
1328
|
type: 'double',
|
|
1329
|
+
display_name: 'Default DOT avg repair price',
|
|
1305
1330
|
attributes: [],
|
|
1306
1331
|
dimension: null,
|
|
1307
1332
|
},
|
|
@@ -1345,6 +1370,7 @@ export const mocks = {
|
|
|
1345
1370
|
{
|
|
1346
1371
|
name: 'dispatcher_id',
|
|
1347
1372
|
type: 'int',
|
|
1373
|
+
display_name: 'Dispatcher Id',
|
|
1348
1374
|
attributes: [
|
|
1349
1375
|
{
|
|
1350
1376
|
attribute_type: {
|
|
@@ -1358,12 +1384,14 @@ export const mocks = {
|
|
|
1358
1384
|
{
|
|
1359
1385
|
name: 'company_name',
|
|
1360
1386
|
type: 'string',
|
|
1387
|
+
display_name: 'Company Name',
|
|
1361
1388
|
attributes: [],
|
|
1362
1389
|
dimension: null,
|
|
1363
1390
|
},
|
|
1364
1391
|
{
|
|
1365
1392
|
name: 'phone',
|
|
1366
1393
|
type: 'string',
|
|
1394
|
+
display_name: 'Phone',
|
|
1367
1395
|
attributes: [],
|
|
1368
1396
|
dimension: null,
|
|
1369
1397
|
},
|
|
@@ -1394,4 +1422,20 @@ export const mocks = {
|
|
|
1394
1422
|
display_name: 'Default: Num Repair Orders',
|
|
1395
1423
|
},
|
|
1396
1424
|
],
|
|
1425
|
+
tags: [
|
|
1426
|
+
{
|
|
1427
|
+
description: 'Financial-related reports',
|
|
1428
|
+
display_name: 'Financial Reports',
|
|
1429
|
+
tag_metadata: {},
|
|
1430
|
+
name: 'report.financials',
|
|
1431
|
+
tag_type: 'reports',
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
description: 'Forecasting reports',
|
|
1435
|
+
display_name: 'Forecasting Reports',
|
|
1436
|
+
tag_metadata: {},
|
|
1437
|
+
name: 'reports.forecasts',
|
|
1438
|
+
tag_type: 'reports',
|
|
1439
|
+
},
|
|
1440
|
+
],
|
|
1397
1441
|
};
|