@geode/opengeodeweb-front 10.30.1 → 10.30.2-rc.2

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.
@@ -255,7 +255,12 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
255
255
  />
256
256
  </OptionsSection>
257
257
 
258
- <OptionsSection v-if="blockId" title="Component Options" class="mt-4">
258
+ <OptionsSection
259
+ v-if="blockId"
260
+ title="Component Options"
261
+ class="mt-4"
262
+ data-testid="modelComponentOptions"
263
+ >
259
264
  <VisibilitySwitch v-model="blockVisibility" />
260
265
  <ViewerOptionsColoringTypeSelector
261
266
  :id="modelId"
@@ -172,7 +172,12 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
172
172
  />
173
173
  </OptionsSection>
174
174
 
175
- <OptionsSection v-if="cornerId" title="Component Options" class="mt-4">
175
+ <OptionsSection
176
+ v-if="cornerId"
177
+ title="Component Options"
178
+ class="mt-4"
179
+ data-testid="modelComponentOptions"
180
+ >
176
181
  <VisibilitySwitch v-model="cornerVisibility" />
177
182
  <ViewerOptionsColoringTypeSelector
178
183
  :id="modelId"
@@ -251,7 +251,12 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
251
251
  />
252
252
  </OptionsSection>
253
253
 
254
- <OptionsSection v-if="lineId" title="Component Options" class="mt-4">
254
+ <OptionsSection
255
+ v-if="lineId"
256
+ title="Component Options"
257
+ class="mt-4"
258
+ data-testid="modelComponentOptions"
259
+ >
255
260
  <VisibilitySwitch v-model="lineVisibility" />
256
261
  <ViewerOptionsColoringTypeSelector
257
262
  :id="modelId"
@@ -259,7 +259,12 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
259
259
  />
260
260
  </OptionsSection>
261
261
 
262
- <OptionsSection v-if="surfaceId" title="Component Options" class="mt-4">
262
+ <OptionsSection
263
+ v-if="surfaceId"
264
+ title="Component Options"
265
+ class="mt-4"
266
+ data-testid="modelComponentOptions"
267
+ >
263
268
  <VisibilitySwitch v-model="surfaceVisibility" />
264
269
  <ViewerOptionsColoringTypeSelector
265
270
  :id="modelId"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.30.1",
3
+ "version": "10.30.2-rc.2",
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": {
@@ -34,8 +34,8 @@
34
34
  "build": ""
35
35
  },
36
36
  "dependencies": {
37
- "@geode/opengeodeweb-back": "latest",
38
- "@geode/opengeodeweb-viewer": "latest",
37
+ "@geode/opengeodeweb-back": "next",
38
+ "@geode/opengeodeweb-viewer": "next",
39
39
  "@google-cloud/run": "3.2.0",
40
40
  "@kitware/vtk.js": "33.3.0",
41
41
  "@mdi/font": "7.4.47",
@@ -62,7 +62,6 @@
62
62
  "sanitize-filename": "1.6.3",
63
63
  "sass": "1.87.0",
64
64
  "semver": "7.7.1",
65
- "unstorage": "1.17.5",
66
65
  "uuid": "11.1.0",
67
66
  "vuetify": "3.12.5",
68
67
  "vuetify-nuxt-module": "0.18.7",
@@ -0,0 +1,19 @@
1
+ // Third party imports
2
+ import { createError, defineEventHandler } from "h3";
3
+
4
+ // Local imports
5
+ import { getIsAppReady } from "@geode/opengeodeweb-front/server/utils/server_config.js";
6
+
7
+ export default defineEventHandler(async () => {
8
+ try {
9
+ const isReady = await getIsAppReady();
10
+ console.log(`IS_APP_READY is ${isReady}`);
11
+ return { statusCode: 200, isReady };
12
+ } catch (error) {
13
+ console.log(error);
14
+ throw createError({
15
+ statusCode: error.statusCode,
16
+ statusMessage: error.statusMessage ?? error.message,
17
+ });
18
+ }
19
+ });
@@ -0,0 +1,25 @@
1
+ // Third party imports
2
+ import { createError, defineEventHandler, readBody } from "h3";
3
+
4
+ // Local imports
5
+ import { setIsAppReady } from "@geode/opengeodeweb-front/server/utils/server_config.js";
6
+
7
+ export default defineEventHandler(async (event) => {
8
+ try {
9
+ const { isReady } = await readBody(event);
10
+ if (!isReady) {
11
+ throw createError({ statusCode: 400, statusMessage: "isReady is required" });
12
+ }
13
+
14
+ await setIsAppReady(isReady);
15
+ console.log(`Updated IS_APP_READY to ${isReady}`);
16
+
17
+ return { statusCode: 200, isReady };
18
+ } catch (error) {
19
+ console.log(error);
20
+ throw createError({
21
+ statusCode: error.statusCode,
22
+ statusMessage: error.statusMessage ?? error.message,
23
+ });
24
+ }
25
+ });
@@ -1,32 +1,37 @@
1
- import { createStorage, prefixStorage } from "unstorage";
2
-
3
- const storage = createStorage();
4
- const config = prefixStorage(storage, "config");
1
+ const storage = new Map();
5
2
 
6
3
  function getAppBaseUrl() {
7
- return config.getItem("APP_BASE_URL");
4
+ return storage.get("APP_BASE_URL");
8
5
  }
9
6
  function setAppBaseUrl(baseUrl) {
10
- return config.setItem("APP_BASE_URL", baseUrl);
7
+ return storage.set("APP_BASE_URL", baseUrl);
11
8
  }
12
9
  function getBackBaseUrl() {
13
- return config.getItem("BACK_BASE_URL");
10
+ return storage.get("BACK_BASE_URL");
14
11
  }
15
12
  function setBackBaseUrl(baseUrl) {
16
- return config.setItem("BACK_BASE_URL", baseUrl);
13
+ return storage.set("BACK_BASE_URL", baseUrl);
17
14
  }
18
15
  function getViewerBaseUrl() {
19
- return config.getItem("VIEWER_BASE_URL");
16
+ return storage.get("VIEWER_BASE_URL");
20
17
  }
21
18
  function setViewerBaseUrl(baseUrl) {
22
- return config.setItem("VIEWER_BASE_URL", baseUrl);
19
+ return storage.set("VIEWER_BASE_URL", baseUrl);
20
+ }
21
+ function getIsAppReady() {
22
+ return storage.get("IS_APP_READY") ?? false;
23
+ }
24
+ function setIsAppReady(isAppReady) {
25
+ return storage.set("IS_APP_READY", isAppReady);
23
26
  }
24
27
 
25
28
  export {
26
29
  getAppBaseUrl,
27
- setAppBaseUrl,
28
30
  getBackBaseUrl,
31
+ getIsAppReady,
29
32
  getViewerBaseUrl,
33
+ setAppBaseUrl,
30
34
  setBackBaseUrl,
35
+ setIsAppReady,
31
36
  setViewerBaseUrl,
32
37
  };
package/shared/scripts.js CHANGED
@@ -53,4 +53,20 @@ function setViewerBaseUrl(appBaseUrl, viewerBaseUrl) {
53
53
  return fetchSchema({ schema, params, baseURL: appBaseUrl });
54
54
  }
55
55
 
56
- export { setAppBaseUrl, setBackBaseUrl, setViewerBaseUrl };
56
+ function setIsAppReady(appBaseUrl, isReady) {
57
+ console.log("[API] setIsAppReady", isReady);
58
+ const schema = {
59
+ $id: "/api/microservice/app/set_is_app_ready",
60
+ methods: ["POST"],
61
+ type: "object",
62
+ properties: {
63
+ isReady: { type: "boolean" },
64
+ },
65
+ required: ["isReady"],
66
+ additionalProperties: false,
67
+ };
68
+ const params = { isReady };
69
+ return fetchSchema({ schema, params, baseURL: appBaseUrl });
70
+ }
71
+
72
+ export { setAppBaseUrl, setBackBaseUrl, setIsAppReady, setViewerBaseUrl };