@geode/opengeodeweb-front 10.0.2-rc.1 → 10.0.2-rc.3
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/app/components/CrsSelector.vue +5 -7
- package/app/components/ExtensionSelector.vue +14 -19
- package/app/components/FileSelector.vue +5 -10
- package/app/components/FileUploader.vue +1 -0
- package/app/components/Inspector/InspectionButton.vue +8 -10
- package/app/components/MissingFilesSelector.vue +9 -19
- package/app/components/ObjectSelector.vue +3 -3
- package/app/components/PackagesVersions.vue +10 -22
- package/app/components/RemoteRenderingView.vue +12 -12
- package/app/components/Screenshot.vue +6 -7
- package/app/components/VeaseViewToolbar.vue +4 -7
- package/app/components/ViewToolbar.vue +6 -10
- package/app/components/Viewer/Options/CellAttributeSelector.vue +4 -5
- package/app/components/Viewer/Options/PolygonAttributeSelector.vue +4 -5
- package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +4 -7
- package/app/components/Viewer/Options/TextureItem.vue +6 -8
- package/app/components/Viewer/Options/VertexAttributeSelector.vue +3 -7
- package/app/composables/project_manager.js +8 -12
- package/app/stores/data_base.js +10 -16
- package/app/stores/data_style.js +3 -3
- package/app/stores/geode.js +30 -4
- package/app/stores/hybrid_viewer.js +18 -18
- package/app/stores/infra.js +59 -44
- package/app/stores/lambda.js +63 -0
- package/app/stores/viewer.js +34 -7
- package/app/utils/file_import_workflow.js +9 -8
- package/app/{composables → utils}/upload_file.js +6 -6
- package/{internal_stores → internal/stores}/mesh/cells.js +20 -20
- package/{internal_stores → internal/stores}/mesh/edges.js +12 -6
- package/{internal_stores → internal/stores}/mesh/index.js +4 -5
- package/{internal_stores → internal/stores}/mesh/points.js +16 -11
- package/{internal_stores → internal/stores}/mesh/polygons.js +20 -19
- package/{internal_stores → internal/stores}/mesh/polyhedra.js +17 -19
- package/{internal_stores → internal/stores}/model/blocks.js +8 -10
- package/{internal_stores → internal/stores}/model/corners.js +8 -10
- package/{internal_stores → internal/stores}/model/edges.js +4 -5
- package/{internal_stores → internal/stores}/model/index.js +8 -10
- package/{internal_stores → internal/stores}/model/lines.js +8 -10
- package/{internal_stores → internal/stores}/model/points.js +8 -10
- package/{internal_stores → internal/stores}/model/surfaces.js +8 -10
- package/{app/composables → internal/utils}/api_fetch.js +11 -11
- package/{app/composables → internal/utils}/viewer_call.js +5 -5
- package/nuxt.config.js +1 -1
- package/package.json +1 -1
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +12 -21
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +3 -6
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +9 -16
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +12 -21
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +3 -6
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +3 -6
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +6 -12
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +6 -11
- package/tests/unit/components/CrsSelector.nuxt.test.js +10 -7
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +17 -2
- package/tests/unit/components/FileSelector.nuxt.test.js +2 -2
- package/tests/unit/components/FileUploader.nuxt.test.js +2 -2
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +12 -7
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +20 -9
- package/tests/unit/components/ObjectSelector.nuxt.test.js +2 -2
- package/tests/unit/components/PackagesVersions.nuxt.test.js +2 -2
- package/tests/unit/composables/ProjectManager.nuxt.test.js +9 -11
- package/tests/unit/composables/api_fetch.nuxt.test.js +17 -40
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +27 -12
- package/tests/unit/composables/upload_file.nuxt.test.js +3 -3
- package/tests/unit/plugins/project_load.nuxt.test.js +2 -3
- package/tests/unit/stores/Geode.nuxt.test.js +47 -49
- package/tests/unit/stores/Infra.nuxt.test.js +196 -66
- package/tests/unit/stores/Lambda.nuxt.test.js +131 -0
- package/tests/unit/stores/Viewer.nuxt.test.js +48 -46
- /package/{internal_stores → internal/stores}/data_style_state.js +0 -0
- /package/tests/unit/stores/{Appstore.nuxt.test.js → App.nuxt.test.js} +0 -0
|
@@ -16,8 +16,10 @@ export function useMeshPointsStyle() {
|
|
|
16
16
|
}
|
|
17
17
|
function setMeshPointsVisibility(id, visibility) {
|
|
18
18
|
const points_style = meshPointsStyle(id)
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const viewerStore = useViewerStore()
|
|
20
|
+
return viewerStore.request(
|
|
21
|
+
mesh_points_schemas.visibility,
|
|
22
|
+
{ id, visibility },
|
|
21
23
|
{
|
|
22
24
|
response_function: () => {
|
|
23
25
|
points_style.visibility = visibility
|
|
@@ -56,8 +58,10 @@ export function useMeshPointsStyle() {
|
|
|
56
58
|
}
|
|
57
59
|
function setMeshPointsColor(id, color) {
|
|
58
60
|
const coloring_style = meshPointsStyle(id).coloring
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
const viewerStore = useViewerStore()
|
|
62
|
+
return viewerStore.request(
|
|
63
|
+
mesh_points_schemas.color,
|
|
64
|
+
{ id, color },
|
|
61
65
|
{
|
|
62
66
|
response_function: () => {
|
|
63
67
|
coloring_style.color = color
|
|
@@ -75,11 +79,10 @@ export function useMeshPointsStyle() {
|
|
|
75
79
|
}
|
|
76
80
|
function setMeshPointsVertexAttribute(id, vertex_attribute) {
|
|
77
81
|
const coloring_style = meshPointsStyle(id).coloring
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
82
|
+
const viewerStore = useViewerStore()
|
|
83
|
+
return viewerStore.request(
|
|
84
|
+
mesh_points_schemas.vertex_attribute,
|
|
85
|
+
{ id, ...vertex_attribute },
|
|
83
86
|
{
|
|
84
87
|
response_function: () => {
|
|
85
88
|
coloring_style.vertex = vertex_attribute
|
|
@@ -97,8 +100,10 @@ export function useMeshPointsStyle() {
|
|
|
97
100
|
return meshPointsStyle(id).size
|
|
98
101
|
}
|
|
99
102
|
function setMeshPointsSize(id, size) {
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
const viewerStore = useViewerStore()
|
|
104
|
+
return viewerStore.request(
|
|
105
|
+
mesh_points_schemas.size,
|
|
106
|
+
{ id, size },
|
|
102
107
|
{
|
|
103
108
|
response_function: () => {
|
|
104
109
|
meshPointsStyle(id).size = size
|
|
@@ -16,8 +16,10 @@ export function useMeshPolygonsStyle() {
|
|
|
16
16
|
}
|
|
17
17
|
function setMeshPolygonsVisibility(id, visibility) {
|
|
18
18
|
const polygons_style = meshPolygonsStyle(id)
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const viewerStore = useViewerStore()
|
|
20
|
+
return viewerStore.request(
|
|
21
|
+
mesh_polygons_schemas.visibility,
|
|
22
|
+
{ id, visibility },
|
|
21
23
|
{
|
|
22
24
|
response_function: () => {
|
|
23
25
|
polygons_style.visibility = visibility
|
|
@@ -36,8 +38,10 @@ export function useMeshPolygonsStyle() {
|
|
|
36
38
|
}
|
|
37
39
|
function setMeshPolygonsColor(id, color) {
|
|
38
40
|
const coloring_style = meshPolygonsStyle(id).coloring
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
const viewerStore = useViewerStore()
|
|
42
|
+
return viewerStore.request(
|
|
43
|
+
mesh_polygons_schemas.color,
|
|
44
|
+
{ id, color },
|
|
41
45
|
{
|
|
42
46
|
response_function: () => {
|
|
43
47
|
coloring_style.color = color
|
|
@@ -56,11 +60,10 @@ export function useMeshPolygonsStyle() {
|
|
|
56
60
|
}
|
|
57
61
|
function setMeshPolygonsTextures(id, textures) {
|
|
58
62
|
const coloring_style = meshPolygonsStyle(id).coloring
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
63
|
+
const viewerStore = useViewerStore()
|
|
64
|
+
return viewerStore.request(
|
|
65
|
+
mesh_polygons_schemas.apply_textures,
|
|
66
|
+
{ id, textures },
|
|
64
67
|
{
|
|
65
68
|
response_function: () => {
|
|
66
69
|
coloring_style.textures = textures
|
|
@@ -80,11 +83,10 @@ export function useMeshPolygonsStyle() {
|
|
|
80
83
|
|
|
81
84
|
function setMeshPolygonsVertexAttribute(id, vertex_attribute) {
|
|
82
85
|
const coloring_style = meshPolygonsStyle(id).coloring
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
86
|
+
const viewerStore = useViewerStore()
|
|
87
|
+
return viewerStore.request(
|
|
88
|
+
mesh_polygons_schemas.vertex_attribute,
|
|
89
|
+
{ id, ...vertex_attribute },
|
|
88
90
|
{
|
|
89
91
|
response_function: () => {
|
|
90
92
|
coloring_style.vertex = vertex_attribute
|
|
@@ -103,11 +105,10 @@ export function useMeshPolygonsStyle() {
|
|
|
103
105
|
}
|
|
104
106
|
function setMeshPolygonsPolygonAttribute(id, polygon_attribute) {
|
|
105
107
|
const coloring_style = meshPolygonsStyle(id).coloring
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
108
|
+
const viewerStore = useViewerStore()
|
|
109
|
+
return viewerStore.request(
|
|
110
|
+
mesh_polygons_schemas.polygon_attribute,
|
|
111
|
+
{ id, ...polygon_attribute },
|
|
111
112
|
{
|
|
112
113
|
response_function: () => {
|
|
113
114
|
coloring_style.polygon = polygon_attribute
|
|
@@ -16,8 +16,10 @@ export function useMeshPolyhedraStyle() {
|
|
|
16
16
|
}
|
|
17
17
|
function setMeshPolyhedraVisibility(id, visibility) {
|
|
18
18
|
const polyhedra_style = meshPolyhedraStyle(id)
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const viewerStore = useViewerStore()
|
|
20
|
+
return viewerStore.request(
|
|
21
|
+
mesh_polyhedra_schemas.visibility,
|
|
22
|
+
{ id, visibility },
|
|
21
23
|
{
|
|
22
24
|
response_function: () => {
|
|
23
25
|
polyhedra_style.visibility = visibility
|
|
@@ -57,8 +59,10 @@ export function useMeshPolyhedraStyle() {
|
|
|
57
59
|
}
|
|
58
60
|
function setMeshPolyhedraColor(id, color) {
|
|
59
61
|
const coloring = meshPolyhedraStyle(id).coloring
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
const viewerStore = useViewerStore()
|
|
63
|
+
return viewerStore.request(
|
|
64
|
+
mesh_polyhedra_schemas.color,
|
|
65
|
+
{ id, color },
|
|
62
66
|
{
|
|
63
67
|
response_function: () => {
|
|
64
68
|
coloring.color = color
|
|
@@ -77,11 +81,9 @@ export function useMeshPolyhedraStyle() {
|
|
|
77
81
|
// }
|
|
78
82
|
// function setPolyhedraVertexAttribute(id, vertex_attribute) {
|
|
79
83
|
// const coloring_style = meshPolyhedraStyle(id).coloring
|
|
80
|
-
// return
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
// params: { id, ...vertex_attribute },
|
|
84
|
-
// },
|
|
84
|
+
// return viewerStore.request(
|
|
85
|
+
// mesh_polyhedra_schemas.vertex_attribute,
|
|
86
|
+
// { id, ...vertex_attribute },
|
|
85
87
|
// {
|
|
86
88
|
// response_function: () => {
|
|
87
89
|
// coloring_style.vertex = vertex_attribute
|
|
@@ -98,11 +100,9 @@ export function useMeshPolyhedraStyle() {
|
|
|
98
100
|
// }
|
|
99
101
|
// function setPolyhedraPolygonAttribute(id, polygon_attribute) {
|
|
100
102
|
// const coloring_style = meshPolyhedraStyle(id).coloring
|
|
101
|
-
// return
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
// params: { id, ...polygon_attribute },
|
|
105
|
-
// },
|
|
103
|
+
// return viewerStore.request(
|
|
104
|
+
// mesh_polyhedra_schemas.polygon_attribute,
|
|
105
|
+
// { id, ...polygon_attribute },
|
|
106
106
|
// {
|
|
107
107
|
// response_function: () => {
|
|
108
108
|
// coloring_style.polygon = polygon_attribute
|
|
@@ -119,11 +119,9 @@ export function useMeshPolyhedraStyle() {
|
|
|
119
119
|
// }
|
|
120
120
|
// function setPolyhedraPolyhedronAttribute(id, polyhedron_attribute) {
|
|
121
121
|
// const coloring = meshPolyhedraStyle(id).coloring
|
|
122
|
-
// return
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
// params: { id, ...polyhedron_attribute },
|
|
126
|
-
// },
|
|
122
|
+
// return viewerStore.request(
|
|
123
|
+
// mesh_polyhedra_schemas.polyhedron_attribute,
|
|
124
|
+
// { id, ...polyhedron_attribute },
|
|
127
125
|
// {
|
|
128
126
|
// response_function: () => {
|
|
129
127
|
// coloring.polyhedron = polyhedron_attribute
|
|
@@ -27,11 +27,10 @@ export function useModelBlocksStyle() {
|
|
|
27
27
|
}
|
|
28
28
|
function setModelBlocksVisibility(id, block_ids, visibility) {
|
|
29
29
|
const blocks_flat_indexes = dataBaseStore.getFlatIndexes(id, block_ids)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
30
|
+
const viewerStore = useViewerStore()
|
|
31
|
+
return viewerStore.request(
|
|
32
|
+
model_blocks_schemas.visibility,
|
|
33
|
+
{ id, block_ids: blocks_flat_indexes, visibility },
|
|
35
34
|
{
|
|
36
35
|
response_function: () => {
|
|
37
36
|
for (const block_id of block_ids) {
|
|
@@ -57,11 +56,10 @@ export function useModelBlocksStyle() {
|
|
|
57
56
|
|
|
58
57
|
function setModelBlocksColor(id, block_ids, color) {
|
|
59
58
|
const blocks_flat_indexes = dataBaseStore.getFlatIndexes(id, block_ids)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
59
|
+
const viewerStore = useViewerStore()
|
|
60
|
+
return viewerStore.request(
|
|
61
|
+
model_blocks_schemas.color,
|
|
62
|
+
{ id, block_ids: blocks_flat_indexes, color },
|
|
65
63
|
{
|
|
66
64
|
response_function: () => {
|
|
67
65
|
for (const block_id of block_ids) {
|
|
@@ -27,11 +27,10 @@ export function useModelCornersStyle() {
|
|
|
27
27
|
}
|
|
28
28
|
function setModelCornersVisibility(id, corner_ids, visibility) {
|
|
29
29
|
const corner_flat_indexes = dataBaseStore.getFlatIndexes(id, corner_ids)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
30
|
+
const viewerStore = useViewerStore()
|
|
31
|
+
return viewerStore.request(
|
|
32
|
+
model_corners_schemas.visibility,
|
|
33
|
+
{ id, block_ids: corner_flat_indexes, visibility },
|
|
35
34
|
{
|
|
36
35
|
response_function: () => {
|
|
37
36
|
for (const corner_id of corner_ids) {
|
|
@@ -58,11 +57,10 @@ export function useModelCornersStyle() {
|
|
|
58
57
|
|
|
59
58
|
function setModelCornersColor(id, corner_ids, color) {
|
|
60
59
|
const corner_flat_indexes = dataBaseStore.getFlatIndexes(id, corner_ids)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
60
|
+
const viewerStore = useViewerStore()
|
|
61
|
+
return viewerStore.request(
|
|
62
|
+
model_corners_schemas.color,
|
|
63
|
+
{ id, block_ids: corner_flat_indexes, color },
|
|
66
64
|
{
|
|
67
65
|
response_function: () => {
|
|
68
66
|
for (const corner_id of corner_ids) {
|
|
@@ -15,11 +15,10 @@ export function useModelEdgesStyle() {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function setModelEdgesVisibility(id, visibility) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
18
|
+
const viewerStore = useViewerStore()
|
|
19
|
+
return viewerStore.request(
|
|
20
|
+
model_edges_schemas.visibility,
|
|
21
|
+
{ id, visibility },
|
|
23
22
|
{
|
|
24
23
|
response_function: () => {
|
|
25
24
|
modelEdgesStyle(id).visibility = visibility
|
|
@@ -27,11 +27,10 @@ export default function useModelStyle() {
|
|
|
27
27
|
return dataStyleStore.getStyle(id).visibility
|
|
28
28
|
}
|
|
29
29
|
function setModelVisibility(id, visibility) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
30
|
+
const viewerStore = useViewerStore()
|
|
31
|
+
return viewerStore.request(
|
|
32
|
+
model_schemas.visibility,
|
|
33
|
+
{ id, visibility },
|
|
35
34
|
{
|
|
36
35
|
response_function: () => {
|
|
37
36
|
dataStyleStore.getStyle(id).visibility = visibility
|
|
@@ -83,11 +82,10 @@ export default function useModelStyle() {
|
|
|
83
82
|
return dataStyleStore.getStyle(id).color
|
|
84
83
|
}
|
|
85
84
|
function setModelColor(id, color) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
85
|
+
const viewerStore = useViewerStore()
|
|
86
|
+
return viewerStore.request(
|
|
87
|
+
model_schemas.color,
|
|
88
|
+
{ id, color },
|
|
91
89
|
{
|
|
92
90
|
response_function: () => {
|
|
93
91
|
dataStyleStore.styles[id].color = color
|
|
@@ -27,11 +27,10 @@ export function useModelLinesStyle() {
|
|
|
27
27
|
}
|
|
28
28
|
function setModelLinesVisibility(id, line_ids, visibility) {
|
|
29
29
|
const line_flat_indexes = dataBaseStore.getFlatIndexes(id, line_ids)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
30
|
+
const viewerStore = useViewerStore()
|
|
31
|
+
return viewerStore.request(
|
|
32
|
+
model_lines_schemas.visibility,
|
|
33
|
+
{ id, block_ids: line_flat_indexes, visibility },
|
|
35
34
|
{
|
|
36
35
|
response_function: () => {
|
|
37
36
|
for (const line_id of line_ids) {
|
|
@@ -56,11 +55,10 @@ export function useModelLinesStyle() {
|
|
|
56
55
|
}
|
|
57
56
|
function setModelLinesColor(id, line_ids, color) {
|
|
58
57
|
const line_flat_indexes = dataBaseStore.getFlatIndexes(id, line_ids)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
58
|
+
const viewerStore = useViewerStore()
|
|
59
|
+
return viewerStore.request(
|
|
60
|
+
model_lines_schemas.color,
|
|
61
|
+
{ id, block_ids: line_flat_indexes, color },
|
|
64
62
|
{
|
|
65
63
|
response_function: () => {
|
|
66
64
|
for (const line_id of line_ids) {
|
|
@@ -14,11 +14,10 @@ export function useModelPointsStyle() {
|
|
|
14
14
|
return modelPointsStyle(id).visibility
|
|
15
15
|
}
|
|
16
16
|
function setModelPointsVisibility(id, visibility) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
17
|
+
const viewerStore = useViewerStore()
|
|
18
|
+
return viewerStore.request(
|
|
19
|
+
model_points_schemas.visibility,
|
|
20
|
+
{ id, visibility },
|
|
22
21
|
{
|
|
23
22
|
response_function: () => {
|
|
24
23
|
modelPointsStyle(id).visibility = visibility
|
|
@@ -36,11 +35,10 @@ export function useModelPointsStyle() {
|
|
|
36
35
|
return modelPointsStyle(id).size
|
|
37
36
|
}
|
|
38
37
|
function setModelPointsSize(id, size) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
38
|
+
const viewerStore = useViewerStore()
|
|
39
|
+
return viewerStore.request(
|
|
40
|
+
model_points_schemas.size,
|
|
41
|
+
{ id, size },
|
|
44
42
|
{
|
|
45
43
|
response_function: () => {
|
|
46
44
|
dataStyleStore.styles[id].points.size = size
|
|
@@ -26,11 +26,10 @@ export function useModelSurfacesStyle() {
|
|
|
26
26
|
}
|
|
27
27
|
function setModelSurfacesVisibility(id, surface_ids, visibility) {
|
|
28
28
|
const surface_flat_indexes = dataBaseStore.getFlatIndexes(id, surface_ids)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
29
|
+
const viewerStore = useViewerStore()
|
|
30
|
+
return viewerStore.request(
|
|
31
|
+
model_surfaces_schemas.visibility,
|
|
32
|
+
{ id, block_ids: surface_flat_indexes, visibility },
|
|
34
33
|
{
|
|
35
34
|
response_function: () => {
|
|
36
35
|
for (const surface_id of surface_ids) {
|
|
@@ -55,11 +54,10 @@ export function useModelSurfacesStyle() {
|
|
|
55
54
|
|
|
56
55
|
function setModelSurfacesColor(id, surface_ids, color) {
|
|
57
56
|
const surface_flat_indexes = dataBaseStore.getFlatIndexes(id, surface_ids)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
57
|
+
const viewerStore = useViewerStore()
|
|
58
|
+
return viewerStore.request(
|
|
59
|
+
model_surfaces_schemas.color,
|
|
60
|
+
{ id, block_ids: surface_flat_indexes, color },
|
|
63
61
|
{
|
|
64
62
|
response_function: () => {
|
|
65
63
|
for (const surface_id of surface_ids) {
|
|
@@ -2,11 +2,11 @@ import _ from "lodash"
|
|
|
2
2
|
import validate_schema from "@/app/utils/validate_schema.js"
|
|
3
3
|
|
|
4
4
|
export function api_fetch(
|
|
5
|
+
microservice,
|
|
5
6
|
{ schema, params },
|
|
6
7
|
{ request_error_function, response_function, response_error_function } = {},
|
|
7
8
|
) {
|
|
8
|
-
const
|
|
9
|
-
const geode_store = useGeodeStore()
|
|
9
|
+
const feedbackStore = useFeedbackStore()
|
|
10
10
|
|
|
11
11
|
const body = params || {}
|
|
12
12
|
|
|
@@ -16,13 +16,13 @@ export function api_fetch(
|
|
|
16
16
|
if (process.env.NODE_ENV !== "production") {
|
|
17
17
|
console.log("Bad request", error, schema, params)
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
feedbackStore.add_error(400, schema.$id, "Bad request", error)
|
|
20
20
|
throw new Error(schema.$id.concat(": ", error))
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
microservice.start_request()
|
|
24
24
|
|
|
25
|
-
const method = schema.methods.filter((
|
|
25
|
+
const method = schema.methods.filter((method) => method !== "OPTIONS")[0]
|
|
26
26
|
const request_options = {
|
|
27
27
|
method: method,
|
|
28
28
|
}
|
|
@@ -34,11 +34,11 @@ export function api_fetch(
|
|
|
34
34
|
request_options.max_retry = schema.max_retry
|
|
35
35
|
}
|
|
36
36
|
return useFetch(schema.$id, {
|
|
37
|
-
baseURL:
|
|
37
|
+
baseURL: microservice.base_url,
|
|
38
38
|
...request_options,
|
|
39
39
|
async onRequestError({ error }) {
|
|
40
|
-
await
|
|
41
|
-
await
|
|
40
|
+
await microservice.stop_request()
|
|
41
|
+
await feedbackStore.add_error(
|
|
42
42
|
error.code,
|
|
43
43
|
schema.$id,
|
|
44
44
|
error.message,
|
|
@@ -50,15 +50,15 @@ export function api_fetch(
|
|
|
50
50
|
},
|
|
51
51
|
async onResponse({ response }) {
|
|
52
52
|
if (response.ok) {
|
|
53
|
-
await
|
|
53
|
+
await microservice.stop_request()
|
|
54
54
|
if (response_function) {
|
|
55
55
|
await response_function(response)
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
async onResponseError({ response }) {
|
|
60
|
-
await
|
|
61
|
-
await
|
|
60
|
+
await microservice.stop_request()
|
|
61
|
+
await feedbackStore.add_error(
|
|
62
62
|
response.status,
|
|
63
63
|
schema.$id,
|
|
64
64
|
response._data.name,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import validate_schema from "~/app/utils/validate_schema.js"
|
|
2
2
|
|
|
3
3
|
export function viewer_call(
|
|
4
|
+
microservice,
|
|
4
5
|
{ schema, params = {} },
|
|
5
6
|
{ request_error_function, response_function, response_error_function } = {},
|
|
6
7
|
) {
|
|
7
8
|
const feedback_store = useFeedbackStore()
|
|
8
|
-
const viewer_store = useViewerStore()
|
|
9
9
|
|
|
10
10
|
const { valid, error } = validate_schema(schema, params)
|
|
11
11
|
|
|
@@ -14,17 +14,17 @@ export function viewer_call(
|
|
|
14
14
|
console.log("Bad request", error, schema, params)
|
|
15
15
|
}
|
|
16
16
|
feedback_store.add_error(400, schema.$id, "Bad request", error)
|
|
17
|
-
throw new Error(schema.$id.concat(": "))
|
|
17
|
+
throw new Error(schema.$id.concat(": ", error))
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const client =
|
|
20
|
+
const client = microservice.client
|
|
21
21
|
|
|
22
22
|
return new Promise((resolve, reject) => {
|
|
23
23
|
if (!client.getConnection) {
|
|
24
24
|
resolve()
|
|
25
25
|
return
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
microservice.start_request()
|
|
28
28
|
client
|
|
29
29
|
.getConnection()
|
|
30
30
|
.getSession()
|
|
@@ -56,7 +56,7 @@ export function viewer_call(
|
|
|
56
56
|
reject()
|
|
57
57
|
})
|
|
58
58
|
.finally(() => {
|
|
59
|
-
|
|
59
|
+
microservice.stop_request()
|
|
60
60
|
})
|
|
61
61
|
})
|
|
62
62
|
}
|
package/nuxt.config.js
CHANGED
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
41
41
|
"type": "module",
|
|
42
|
-
"version": "10.0.2-rc.
|
|
42
|
+
"version": "10.0.2-rc.3",
|
|
43
43
|
"main": "./nuxt.config.js",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@geode/opengeodeweb-back": "next",
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
kill_back,
|
|
10
10
|
kill_viewer,
|
|
11
11
|
} from "@ogw_front/utils/local"
|
|
12
|
-
import * as composables from "@ogw_front/composables/viewer_call"
|
|
13
12
|
import { setupIntegrationTests } from "../../../setup.js"
|
|
14
13
|
|
|
15
14
|
// Local constants
|
|
@@ -42,13 +41,11 @@ describe("Mesh cells", () => {
|
|
|
42
41
|
const dataStyleStore = useDataStyleStore()
|
|
43
42
|
const viewerStore = useViewerStore()
|
|
44
43
|
const visibility = true
|
|
45
|
-
const spy = vi.spyOn(
|
|
44
|
+
const spy = vi.spyOn(viewerStore, "request")
|
|
46
45
|
await dataStyleStore.setMeshCellsVisibility(id, visibility)
|
|
47
46
|
expect(spy).toHaveBeenCalledWith(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
params: { id, visibility },
|
|
51
|
-
},
|
|
47
|
+
mesh_cells_schemas.visibility,
|
|
48
|
+
{ id, visibility },
|
|
52
49
|
{
|
|
53
50
|
response_function: expect.any(Function),
|
|
54
51
|
},
|
|
@@ -63,13 +60,11 @@ describe("Mesh cells", () => {
|
|
|
63
60
|
const dataStyleStore = useDataStyleStore()
|
|
64
61
|
const viewerStore = useViewerStore()
|
|
65
62
|
const color = { r: 255, g: 0, b: 0 }
|
|
66
|
-
const spy = vi.spyOn(
|
|
63
|
+
const spy = vi.spyOn(viewerStore, "request")
|
|
67
64
|
await dataStyleStore.setMeshCellsColor(id, color)
|
|
68
65
|
expect(spy).toHaveBeenCalledWith(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
params: { id, color },
|
|
72
|
-
},
|
|
66
|
+
mesh_cells_schemas.color,
|
|
67
|
+
{ id, color },
|
|
73
68
|
{
|
|
74
69
|
response_function: expect.any(Function),
|
|
75
70
|
},
|
|
@@ -84,13 +79,11 @@ describe("Mesh cells", () => {
|
|
|
84
79
|
const dataStyleStore = useDataStyleStore()
|
|
85
80
|
const viewerStore = useViewerStore()
|
|
86
81
|
const vertex_attribute = { name: "points" }
|
|
87
|
-
const spy = vi.spyOn(
|
|
82
|
+
const spy = vi.spyOn(viewerStore, "request")
|
|
88
83
|
await dataStyleStore.setMeshCellsVertexAttribute(id, vertex_attribute)
|
|
89
84
|
expect(spy).toHaveBeenCalledWith(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
params: { id, ...vertex_attribute },
|
|
93
|
-
},
|
|
85
|
+
mesh_cells_schemas.vertex_attribute,
|
|
86
|
+
{ id, ...vertex_attribute },
|
|
94
87
|
{
|
|
95
88
|
response_function: expect.any(Function),
|
|
96
89
|
},
|
|
@@ -107,13 +100,11 @@ describe("Mesh cells", () => {
|
|
|
107
100
|
const dataStyleStore = useDataStyleStore()
|
|
108
101
|
const viewerStore = useViewerStore()
|
|
109
102
|
const cell_attribute = { name: "RGB_data" }
|
|
110
|
-
const spy = vi.spyOn(
|
|
103
|
+
const spy = vi.spyOn(viewerStore, "request")
|
|
111
104
|
await dataStyleStore.setMeshCellsCellAttribute(id, cell_attribute)
|
|
112
105
|
expect(spy).toHaveBeenCalledWith(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
params: { id, ...cell_attribute },
|
|
116
|
-
},
|
|
106
|
+
mesh_cells_schemas.cell_attribute,
|
|
107
|
+
{ id, ...cell_attribute },
|
|
117
108
|
{
|
|
118
109
|
response_function: expect.any(Function),
|
|
119
110
|
},
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
kill_back,
|
|
10
10
|
kill_viewer,
|
|
11
11
|
} from "@ogw_front/utils/local"
|
|
12
|
-
import * as composables from "@ogw_front/composables/viewer_call"
|
|
13
12
|
import { setupIntegrationTests } from "../../../setup.js"
|
|
14
13
|
|
|
15
14
|
// Local constants
|
|
@@ -41,13 +40,11 @@ describe("Mesh edges", () => {
|
|
|
41
40
|
const dataStyleStore = useDataStyleStore()
|
|
42
41
|
const viewerStore = useViewerStore()
|
|
43
42
|
const visibility = true
|
|
44
|
-
const spy = vi.spyOn(
|
|
43
|
+
const spy = vi.spyOn(viewerStore, "request")
|
|
45
44
|
await dataStyleStore.setMeshEdgesVisibility(id, visibility)
|
|
46
45
|
expect(spy).toHaveBeenCalledWith(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
params: { id, visibility },
|
|
50
|
-
},
|
|
46
|
+
mesh_edges_schemas.visibility,
|
|
47
|
+
{ id, visibility },
|
|
51
48
|
{
|
|
52
49
|
response_function: expect.any(Function),
|
|
53
50
|
},
|
|
@@ -62,13 +59,11 @@ describe("Mesh edges", () => {
|
|
|
62
59
|
const dataStyleStore = useDataStyleStore()
|
|
63
60
|
const viewerStore = useViewerStore()
|
|
64
61
|
const color = { r: 255, g: 0, b: 0 }
|
|
65
|
-
const spy = vi.spyOn(
|
|
62
|
+
const spy = vi.spyOn(viewerStore, "request")
|
|
66
63
|
await dataStyleStore.setMeshEdgesColor(id, color)
|
|
67
64
|
expect(spy).toHaveBeenCalledWith(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
params: { id, color },
|
|
71
|
-
},
|
|
65
|
+
mesh_edges_schemas.color,
|
|
66
|
+
{ id, color },
|
|
72
67
|
{
|
|
73
68
|
response_function: expect.any(Function),
|
|
74
69
|
},
|