@geode/opengeodeweb-front 10.6.0 → 10.6.1-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.
@@ -6,6 +6,8 @@ import vtkWSLinkClient, {
6
6
  import _ from "lodash"
7
7
  // oxlint-disable-next-line no-unassigned-import
8
8
  import "@kitware/vtk.js/Rendering/OpenGL/Profiles/Geometry"
9
+ import SmartConnect from "wslink/src/SmartConnect"
10
+ import { connectImageStream } from "@kitware/vtk.js/Rendering/Misc/RemoteView"
9
11
  import schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
10
12
  import { useRuntimeConfig } from "nuxt/app"
11
13
 
@@ -22,6 +24,7 @@ const request_timeout = MS_PER_SECOND * SECONDS_PER_REQUEST
22
24
 
23
25
  export const useViewerStore = defineStore(
24
26
  "viewer",
27
+ // oxlint-disable-next-line max-lines-per-function max-statements
25
28
  () => {
26
29
  const infraStore = useInfraStore()
27
30
  const default_local_port = ref("1234")
@@ -76,7 +79,7 @@ export const useViewerStore = defineStore(
76
79
  picking_mode.value = false
77
80
  }
78
81
 
79
- async function ws_connect() {
82
+ function ws_connect() {
80
83
  if (status.value === Status.CONNECTED) {
81
84
  return
82
85
  }
@@ -87,46 +90,31 @@ export const useViewerStore = defineStore(
87
90
  try {
88
91
  console.log("VIEWER LOCK GRANTED !", lock)
89
92
  status.value = Status.CONNECTING
90
- const { default: SmartConnect } =
91
- await import("wslink/src/SmartConnect")
92
93
  vtkWSLinkClient.setSmartConnectClass(SmartConnect)
93
94
 
94
- const config_obj = { application: "Viewer" }
95
- config_obj.sessionURL = base_url.value
96
-
97
- if (status.value === Status.CONNECTED && client.value.isConnected()) {
98
- client.value.disconnect(-1)
99
- status.value = Status.NOT_CONNECTED
100
- }
101
- let clientToConnect = client.value
102
- if (_.isEmpty(clientToConnect)) {
103
- clientToConnect = newInstance()
95
+ if (_.isEmpty(client.value)) {
96
+ client.value = newInstance()
104
97
  }
105
98
 
106
- // Connect to busy store
107
- clientToConnect.onBusyChange((count) => {
99
+ client.value.onBusyChange((count) => {
108
100
  buzy.value = count
109
101
  })
110
- clientToConnect.beginBusy()
111
-
112
- // Error
113
- clientToConnect.onConnectionError((httpReq) => {
102
+ client.value.onConnectionError((httpReq) => {
114
103
  const message = httpReq?.response?.error || `Connection error`
115
104
  console.error(message)
116
105
  })
117
-
118
- // Close
119
- clientToConnect.onConnectionClose((httpReq) => {
106
+ client.value.onConnectionClose((httpReq) => {
120
107
  const message = httpReq?.response?.error || `Connection close`
121
108
  console.error(message)
122
109
  })
123
110
 
124
- // Connect
125
- const { connectImageStream } =
126
- await import("@kitware/vtk.js/Rendering/Misc/RemoteView")
127
- client.value = await clientToConnect.connect(config_obj)
111
+ client.value.beginBusy()
112
+ await client.value.connect({
113
+ application: "Viewer",
114
+ sessionURL: base_url.value,
115
+ })
128
116
  connectImageStream(client.value.getConnection().getSession())
129
- clientToConnect.endBusy()
117
+ client.value.endBusy()
130
118
  await request(
131
119
  schemas.opengeodeweb_viewer.viewer.reset_visualization,
132
120
  {},
@@ -135,7 +123,7 @@ export const useViewerStore = defineStore(
135
123
  )
136
124
  status.value = Status.CONNECTED
137
125
  } catch (error) {
138
- console.error("error", error)
126
+ console.error("ws_connect error", error)
139
127
  status.value = Status.NOT_CONNECTED
140
128
  throw error
141
129
  }
@@ -214,7 +202,7 @@ export const useViewerStore = defineStore(
214
202
  "[VIEWER] Request completed:",
215
203
  schema.$id,
216
204
  "in",
217
- (Date.now() - start) / 1_000,
205
+ (Date.now() - start) / MS_PER_SECOND,
218
206
  "s",
219
207
  )
220
208
  if (callbacks.response_function) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.6.0",
3
+ "version": "10.6.1-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,15 +31,15 @@
31
31
  "build": ""
32
32
  },
33
33
  "dependencies": {
34
- "@geode/opengeodeweb-back": "latest",
35
- "@geode/opengeodeweb-viewer": "latest",
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",
39
39
  "@types/node": "22.15.3",
40
40
  "@vueuse/components": "13.1.0",
41
41
  "@vueuse/nuxt": "13.1.0",
42
- "@vueuse/rxjs": "^14.1.0",
42
+ "@vueuse/rxjs": "14.1.0",
43
43
  "ajv": "8.17.1",
44
44
  "busboy": "1.6.0",
45
45
  "conf": "15.1.0",