@geode/opengeodeweb-front 10.4.1 → 10.4.2-rc.1
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/DeleteDialog.vue +1 -1
- package/app/components/DragAndDrop.vue +8 -5
- package/app/components/FileUploader.vue +3 -3
- package/app/components/GlassCard.vue +4 -4
- package/app/components/HybridRenderingView.vue +1 -5
- package/app/components/Inspector/InspectionButton.vue +6 -7
- package/app/components/Launcher.vue +1 -1
- package/app/components/ObjectSelector.vue +1 -1
- package/app/components/PackagesVersions.vue +1 -1
- package/app/components/RemoteRenderingView.vue +1 -1
- package/app/components/Screenshot.vue +2 -2
- package/app/components/SearchBar.vue +10 -16
- package/app/components/Step.vue +3 -1
- package/app/components/ViewToolbar.vue +0 -1
- package/app/components/Viewer/ContextMenu.vue +11 -11
- package/app/components/Viewer/ContextMenuItem.vue +1 -1
- package/app/components/Viewer/Options/AttributeColorBar.vue +1 -5
- package/app/components/Viewer/Options/ColorMapList.vue +2 -6
- package/app/components/Viewer/Options/ColorMapPicker.vue +3 -3
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +2 -2
- package/app/components/Viewer/Options/TexturesSelector.vue +4 -4
- package/app/components/Viewer/Tree/ObjectTree.vue +4 -8
- package/app/components/ZScaling.vue +4 -4
- package/app/composables/project_manager.js +0 -2
- package/app/composables/run_function_when_microservices_connected.js +0 -2
- package/app/stores/data.js +18 -12
- package/app/stores/data_style.js +11 -11
- package/app/stores/geode.js +2 -2
- package/app/stores/hybrid_viewer.js +15 -24
- package/app/stores/infra.js +6 -2
- package/app/stores/lambda.js +1 -1
- package/app/stores/menu.js +1 -2
- package/app/stores/viewer.js +6 -6
- package/app/utils/colormap.js +3 -1
- package/app/utils/local.js +29 -34
- package/app/utils/status.js +1 -1
- package/app/utils/upload_file.js +2 -2
- package/app/utils/validate_schema.js +2 -2
- package/internal/database/database.js +17 -4
- package/internal/stores/data_style/mesh/cells/cell.js +1 -1
- package/internal/stores/data_style/mesh/cells/common.js +1 -1
- package/internal/stores/data_style/mesh/cells/vertex.js +1 -1
- package/internal/stores/data_style/mesh/edges/common.js +1 -1
- package/internal/stores/data_style/mesh/edges/edge.js +2 -2
- package/internal/stores/data_style/mesh/edges/vertex.js +1 -1
- package/internal/stores/data_style/mesh/index.js +2 -2
- package/internal/stores/data_style/mesh/points/common.js +1 -1
- package/internal/stores/data_style/mesh/points/vertex.js +1 -1
- package/internal/stores/data_style/mesh/polygons/common.js +1 -1
- package/internal/stores/data_style/mesh/polygons/polygon.js +1 -1
- package/internal/stores/data_style/mesh/polygons/vertex.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/common.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +1 -1
- package/internal/stores/data_style/model/blocks/color.js +1 -4
- package/internal/stores/data_style/model/blocks/common.js +1 -1
- package/internal/stores/data_style/model/blocks/index.js +5 -3
- package/internal/stores/data_style/model/blocks/visibility.js +1 -3
- package/internal/stores/data_style/model/corners/color.js +1 -4
- package/internal/stores/data_style/model/corners/common.js +1 -1
- package/internal/stores/data_style/model/corners/index.js +5 -3
- package/internal/stores/data_style/model/corners/visibility.js +1 -4
- package/internal/stores/data_style/model/edges/common.js +1 -1
- package/internal/stores/data_style/model/index.js +2 -2
- package/internal/stores/data_style/model/lines/color.js +1 -4
- package/internal/stores/data_style/model/lines/common.js +1 -1
- package/internal/stores/data_style/model/lines/index.js +5 -3
- package/internal/stores/data_style/model/lines/visibility.js +1 -4
- package/internal/stores/data_style/model/points/common.js +1 -1
- package/internal/stores/data_style/model/surfaces/color.js +1 -3
- package/internal/stores/data_style/model/surfaces/common.js +1 -1
- package/internal/stores/data_style/model/surfaces/index.js +5 -3
- package/internal/stores/data_style/model/surfaces/visibility.js +1 -2
- package/internal/utils/api_fetch.js +5 -7
- package/internal/utils/viewer_call.js +5 -7
- package/nuxt.config.js +8 -1
- package/package.json +3 -3
- package/scripts/generate_geode_objects.js +1 -1
- package/tests/integration/microservices/back/requirements.txt +1 -1
- package/tests/integration/microservices/viewer/requirements.txt +1 -1
- package/tests/integration/setup.js +5 -5
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +25 -25
- package/tests/integration/stores/viewer.nuxt.test.js +3 -3
- package/tests/setup_indexeddb.js +1 -1
- package/tests/unit/components/CrsSelector.nuxt.test.js +4 -4
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +4 -7
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +1 -1
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +1 -1
- package/tests/unit/components/FileSelector.nuxt.test.js +1 -1
- package/tests/unit/components/FileUploader.nuxt.test.js +1 -1
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +1 -1
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +1 -1
- package/tests/unit/components/Launcher.nuxt.test.js +1 -1
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +1 -1
- package/tests/unit/components/ObjectSelector.nuxt.test.js +1 -1
- package/tests/unit/components/PackagesVersions.nuxt.test.js +1 -1
- package/tests/unit/components/Step.nuxt.test.js +1 -1
- package/tests/unit/components/Stepper.nuxt.test.js +1 -1
- package/tests/unit/composables/api_fetch.nuxt.test.js +3 -3
- package/tests/unit/composables/{ProjectManager.nuxt.test.js → project_manager.nuxt.test.js} +12 -13
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +6 -6
- package/tests/unit/composables/upload_file.nuxt.test.js +2 -2
- package/tests/unit/plugins/project_load.nuxt.test.js +4 -4
- package/tests/unit/stores/{App.nuxt.test.js → app.nuxt.test.js} +1 -3
- package/tests/unit/stores/{Feedback.nuxt.test.js → feedback.nuxt.test.js} +8 -5
- package/tests/unit/stores/{Geode.nuxt.test.js → geode.nuxt.test.js} +3 -3
- package/tests/unit/stores/{Infra.nuxt.test.js → infra.nuxt.test.js} +2 -2
- package/tests/unit/stores/{Lambda.nuxt.test.js → lambda.nuxt.test.js} +2 -2
- package/tests/unit/stores/{Treeview.nuxt.test.js → treeview.nuxt.test.js} +2 -2
- package/tests/unit/stores/{Viewer.nuxt.test.js → viewer.nuxt.test.js} +1 -1
- package/tests/unit/utils/recaptcha.nuxt.test.js +11 -7
- package/tests/unit/utils/validate_schema.nuxt.test.js +1 -1
- package/tests/utils.js +1 -0
- package/tests/vitest.config.js +12 -4
- package/vuetify_config.js +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelBlocksCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelBlocksCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,11 +13,9 @@ export function useModelBlocksVisibilityStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelBlocksCommonStyle = useModelBlocksCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelBlockVisibility(id, block_id) {
|
|
18
17
|
return modelBlocksCommonStyle.modelBlockStyle(id, block_id).visibility
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
function saveModelBlockVisibility(id, block_id, visibility) {
|
|
22
20
|
modelBlocksCommonStyle.modelBlockStyle(id, block_id).visibility = visibility
|
|
23
21
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelCornersCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelCornersCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,15 +13,12 @@ export function useModelCornersColorStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelCornersCommonStyle = useModelCornersCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelCornerColor(id, corner_id) {
|
|
18
17
|
return modelCornersCommonStyle.modelCornerStyle(id, corner_id).color
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
function saveModelCornerColor(id, corner_id, color) {
|
|
22
20
|
modelCornersCommonStyle.modelCornerStyle(id, corner_id).color = color
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
async function setModelCornersColor(id, corner_ids, color) {
|
|
26
23
|
if (!corner_ids || corner_ids.length === 0) {
|
|
27
24
|
return
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// Local imports
|
|
2
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
2
3
|
import { useModelCornersColorStyle } from "./color"
|
|
3
4
|
import { useModelCornersCommonStyle } from "./common"
|
|
4
5
|
import { useModelCornersVisibilityStyle } from "./visibility"
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
async function setModelCornersDefaultStyle(_id) {
|
|
8
|
+
// Placeholder for oxlint
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
export function useModelCornersStyle() {
|
|
8
12
|
const dataStore = useDataStore()
|
|
@@ -24,8 +28,6 @@ export function useModelCornersStyle() {
|
|
|
24
28
|
])
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
async function setModelCornersDefaultStyle(id) {}
|
|
28
|
-
|
|
29
31
|
return {
|
|
30
32
|
applyModelCornersStyle,
|
|
31
33
|
setModelCornersDefaultStyle,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelCornersCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelCornersCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,16 +13,13 @@ export function useModelCornersVisibilityStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelCornersCommonStyle = useModelCornersCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelCornerVisibility(id, corner_id) {
|
|
18
17
|
return modelCornersCommonStyle.modelCornerStyle(id, corner_id).visibility
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
function saveModelCornerVisibility(id, corner_id, visibility) {
|
|
22
20
|
modelCornersCommonStyle.modelCornerStyle(id, corner_id).visibility =
|
|
23
21
|
visibility
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
async function setModelCornersVisibility(id, corner_ids, visibility) {
|
|
27
24
|
if (!corner_ids || corner_ids.length === 0) {
|
|
28
25
|
return
|
|
@@ -3,7 +3,7 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
|
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
-
import { useDataStyleStateStore } from "
|
|
6
|
+
import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state"
|
|
7
7
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
|
|
8
8
|
import { useModelBlocksStyle } from "./blocks"
|
|
9
9
|
import { useModelCornersStyle } from "./corners"
|
|
@@ -16,7 +16,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
|
16
16
|
// Local constants
|
|
17
17
|
const model_schemas = viewer_schemas.opengeodeweb_viewer.model
|
|
18
18
|
|
|
19
|
-
export
|
|
19
|
+
export function useModelStyle() {
|
|
20
20
|
const dataStore = useDataStore()
|
|
21
21
|
const dataStyleStateStore = useDataStyleStateStore()
|
|
22
22
|
const modelCornersStyleStore = useModelCornersStyle()
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelLinesCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelLinesCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,15 +13,12 @@ export function useModelLinesColorStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelLinesCommonStyle = useModelLinesCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelLineColor(id, line_id) {
|
|
18
17
|
return modelLinesCommonStyle.modelLineStyle(id, line_id).color
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
function saveModelLineColor(id, line_id, color) {
|
|
22
20
|
modelLinesCommonStyle.modelLineStyle(id, line_id).color = color
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
async function setModelLinesColor(id, line_ids, color) {
|
|
26
23
|
if (!line_ids || line_ids.length === 0) {
|
|
27
24
|
return
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// Local imports
|
|
2
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
2
3
|
import { useModelLinesColorStyle } from "./color"
|
|
3
4
|
import { useModelLinesCommonStyle } from "./common"
|
|
4
5
|
import { useModelLinesVisibilityStyle } from "./visibility"
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
async function setModelLinesDefaultStyle(_id) {
|
|
8
|
+
// Placeholder for oxlint
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
export function useModelLinesStyle() {
|
|
8
12
|
const dataStore = useDataStore()
|
|
@@ -23,8 +27,6 @@ export function useModelLinesStyle() {
|
|
|
23
27
|
])
|
|
24
28
|
}
|
|
25
29
|
|
|
26
|
-
async function setModelLinesDefaultStyle(id) {}
|
|
27
|
-
|
|
28
30
|
return {
|
|
29
31
|
applyModelLinesStyle,
|
|
30
32
|
setModelLinesDefaultStyle,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelLinesCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelLinesCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,15 +13,12 @@ export function useModelLinesVisibilityStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelLinesCommonStyle = useModelLinesCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelLineVisibility(id, line_id) {
|
|
18
17
|
return modelLinesCommonStyle.modelLineStyle(id, line_id).visibility
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
function saveModelLineVisibility(id, line_id, visibility) {
|
|
22
20
|
modelLinesCommonStyle.modelLineStyle(id, line_id).visibility = visibility
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
async function setModelLinesVisibility(id, line_ids, visibility) {
|
|
26
23
|
if (!line_ids || line_ids.length === 0) {
|
|
27
24
|
return
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelSurfacesCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelSurfacesCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,14 +13,12 @@ export function useModelSurfacesColorStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelSurfacesCommonStyle = useModelSurfacesCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelSurfaceColor(id, surface_id) {
|
|
18
17
|
return modelSurfacesCommonStyle.modelSurfaceStyle(id, surface_id).color
|
|
19
18
|
}
|
|
20
19
|
function saveModelSurfaceColor(id, surface_id, color) {
|
|
21
20
|
modelSurfacesCommonStyle.modelSurfaceStyle(id, surface_id).color = color
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
async function setModelSurfacesColor(id, surface_ids, color) {
|
|
25
23
|
if (!surface_ids || surface_ids.length === 0) {
|
|
26
24
|
return
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// Local imports
|
|
2
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
2
3
|
import { useModelSurfacesColorStyle } from "./color"
|
|
3
4
|
import { useModelSurfacesCommonStyle } from "./common"
|
|
4
5
|
import { useModelSurfacesVisibilityStyle } from "./visibility"
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
async function setModelSurfacesDefaultStyle(_id) {
|
|
8
|
+
// Placeholder for oxlint
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
export function useModelSurfacesStyle() {
|
|
8
12
|
const dataStore = useDataStore()
|
|
@@ -27,8 +31,6 @@ export function useModelSurfacesStyle() {
|
|
|
27
31
|
])
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
async function setModelSurfacesDefaultStyle(id) {}
|
|
31
|
-
|
|
32
34
|
return {
|
|
33
35
|
applyModelSurfacesStyle,
|
|
34
36
|
setModelSurfacesDefaultStyle,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useModelSurfacesCommonStyle } from "./common"
|
|
6
5
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
6
|
+
import { useModelSurfacesCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
@@ -13,7 +13,6 @@ export function useModelSurfacesVisibilityStyle() {
|
|
|
13
13
|
const dataStore = useDataStore()
|
|
14
14
|
const viewerStore = useViewerStore()
|
|
15
15
|
const modelSurfacesCommonStyle = useModelSurfacesCommonStyle()
|
|
16
|
-
|
|
17
16
|
function modelSurfaceVisibility(id, surface_id) {
|
|
18
17
|
return modelSurfacesCommonStyle.modelSurfaceStyle(id, surface_id).visibility
|
|
19
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// oxlint-disable-next-line id-length
|
|
2
2
|
import _ from "lodash"
|
|
3
3
|
import { useFeedbackStore } from "@ogw_front/stores/feedback"
|
|
4
|
-
import validate_schema from "@ogw_front/utils/validate_schema"
|
|
4
|
+
import { validate_schema } from "@ogw_front/utils/validate_schema"
|
|
5
5
|
|
|
6
6
|
const ERROR_400 = 400
|
|
7
7
|
|
|
@@ -14,14 +14,14 @@ export function api_fetch(
|
|
|
14
14
|
|
|
15
15
|
const body = params || {}
|
|
16
16
|
|
|
17
|
-
const { valid, error } = validate_schema(schema, body)
|
|
17
|
+
const { valid, error: schema_error } = validate_schema(schema, body)
|
|
18
18
|
|
|
19
19
|
if (!valid) {
|
|
20
20
|
if (process.env.NODE_ENV !== "production") {
|
|
21
|
-
console.log("Bad request",
|
|
21
|
+
console.log("Bad request", schema_error, schema, params)
|
|
22
22
|
}
|
|
23
|
-
feedbackStore.add_error(ERROR_400, schema.$id, "Bad request",
|
|
24
|
-
throw new Error(`${schema.$id}: ${
|
|
23
|
+
feedbackStore.add_error(ERROR_400, schema.$id, "Bad request", schema_error)
|
|
24
|
+
throw new Error(`${schema.$id}: ${schema_error}`)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
microservice.start_request()
|
|
@@ -74,5 +74,3 @@ export function api_fetch(
|
|
|
74
74
|
},
|
|
75
75
|
})
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
export default api_fetch
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pTimeout from "p-timeout"
|
|
2
2
|
import { useFeedbackStore } from "@ogw_front/stores/feedback"
|
|
3
|
-
import validate_schema from "@ogw_front/utils/validate_schema"
|
|
3
|
+
import { validate_schema } from "@ogw_front/utils/validate_schema"
|
|
4
4
|
|
|
5
5
|
const ERROR_400 = 400
|
|
6
6
|
|
|
@@ -16,14 +16,14 @@ export async function viewer_call(
|
|
|
16
16
|
) {
|
|
17
17
|
const feedbackStore = useFeedbackStore()
|
|
18
18
|
|
|
19
|
-
const { valid, error } = validate_schema(schema, params)
|
|
19
|
+
const { valid, error: schema_error } = validate_schema(schema, params)
|
|
20
20
|
|
|
21
21
|
if (!valid) {
|
|
22
22
|
if (process.env.NODE_ENV !== "production") {
|
|
23
|
-
console.log("Bad request",
|
|
23
|
+
console.log("Bad request", schema_error, schema, params)
|
|
24
24
|
}
|
|
25
|
-
feedbackStore.add_error(ERROR_400, schema.$id, "Bad request",
|
|
26
|
-
throw new Error(`${schema.$id}: ${
|
|
25
|
+
feedbackStore.add_error(ERROR_400, schema.$id, "Bad request", schema_error)
|
|
26
|
+
throw new Error(`${schema.$id}: ${schema_error}`)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const { client } = microservice
|
|
@@ -71,5 +71,3 @@ export async function viewer_call(
|
|
|
71
71
|
|
|
72
72
|
return await performCall()
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
export default viewer_call
|
package/nuxt.config.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import path, { dirname } from "node:path"
|
|
2
|
+
import { fileURLToPath } from "node:url"
|
|
3
|
+
|
|
4
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
5
|
+
|
|
1
6
|
export default defineNuxtConfig({
|
|
2
7
|
runtimeConfig: {
|
|
3
8
|
public: {
|
|
@@ -20,7 +25,9 @@ export default defineNuxtConfig({
|
|
|
20
25
|
},
|
|
21
26
|
|
|
22
27
|
alias: {
|
|
23
|
-
"@ogw_front":
|
|
28
|
+
"@ogw_front": path.resolve(__dirname, "app"),
|
|
29
|
+
"@ogw_internal": path.resolve(__dirname, "internal"),
|
|
30
|
+
"@ogw_tests": path.resolve(__dirname, "tests"),
|
|
24
31
|
},
|
|
25
32
|
|
|
26
33
|
// ** Global CSS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
-
"version": "10.4.1",
|
|
3
|
+
"version": "10.4.2-rc.1",
|
|
4
4
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
5
5
|
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
|
|
6
6
|
"bugs": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"build": ""
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@geode/opengeodeweb-back": "
|
|
35
|
-
"@geode/opengeodeweb-viewer": "
|
|
34
|
+
"@geode/opengeodeweb-back": "next",
|
|
35
|
+
"@geode/opengeodeweb-viewer": "next",
|
|
36
36
|
"@kitware/vtk.js": "33.3.0",
|
|
37
37
|
"@mdi/font": "7.4.47",
|
|
38
38
|
"@pinia/nuxt": "0.11.3",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Node.js imports
|
|
2
|
+
import path, { dirname } from "node:path"
|
|
2
3
|
import { WebSocket } from "ws"
|
|
3
|
-
import
|
|
4
|
+
import { fileURLToPath } from "node:url"
|
|
4
5
|
import { v4 as uuidv4 } from "uuid"
|
|
5
6
|
|
|
6
7
|
// Third party imports
|
|
@@ -16,15 +17,16 @@ import {
|
|
|
16
17
|
run_back,
|
|
17
18
|
run_viewer,
|
|
18
19
|
} from "@ogw_front/utils/local"
|
|
19
|
-
import Status from "@ogw_front/utils/status"
|
|
20
|
+
import { Status } from "@ogw_front/utils/status"
|
|
20
21
|
import { appMode } from "@ogw_front/utils/app_mode"
|
|
21
22
|
import { importFile } from "@ogw_front/utils/file_import_workflow"
|
|
22
|
-
import { setupActivePinia } from "
|
|
23
|
+
import { setupActivePinia } from "@ogw_tests/utils"
|
|
23
24
|
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
24
25
|
import { useInfraStore } from "@ogw_front/stores/infra"
|
|
25
26
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
26
27
|
|
|
27
28
|
// Local constants
|
|
29
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
28
30
|
const data_folder = path.join("tests", "integration", "data")
|
|
29
31
|
|
|
30
32
|
async function runMicroservices() {
|
|
@@ -64,11 +66,9 @@ async function runMicroservices() {
|
|
|
64
66
|
async function setupIntegrationTests(file_name, geode_object) {
|
|
65
67
|
setupActivePinia()
|
|
66
68
|
const viewerStore = useViewerStore()
|
|
67
|
-
|
|
68
69
|
const { back_port, viewer_port, project_folder_path } =
|
|
69
70
|
await runMicroservices()
|
|
70
71
|
await viewerStore.ws_connect()
|
|
71
|
-
|
|
72
72
|
const id = await importFile(file_name, geode_object)
|
|
73
73
|
expect(viewerStore.status).toBe(Status.CONNECTED)
|
|
74
74
|
console.log("end of setupIntegrationTests")
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
15
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
15
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
15
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
kill_back,
|
|
9
9
|
kill_viewer,
|
|
10
10
|
} from "@ogw_front/utils/local"
|
|
11
|
-
import Status from "@ogw_front/utils/status"
|
|
12
|
-
import { setupIntegrationTests } from "
|
|
11
|
+
import { Status } from "@ogw_front/utils/status"
|
|
12
|
+
import { setupIntegrationTests } from "@ogw_tests/integration/setup"
|
|
13
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
14
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|