Skip to content

Commit 81186c3

Browse files
Merge pull request #83 from Geode-solutions/feat/improve_imports
Feat/improve imports
2 parents 1cc25c8 + 9a6a33a commit 81186c3

File tree

14 files changed

+94
-116
lines changed

14 files changed

+94
-116
lines changed

components/CrsSelector.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@
6666
async function get_crs_table() {
6767
const params = { input_geode_object }
6868
toggle_loading()
69-
console.log("get_crs_table")
7069
await api_fetch(
7170
{ schema, params },
7271
{
7372
response_function: (response) => {
7473
crs_list.value = response._data.crs_list
75-
console.log("crs_list", response._data.crs_list)
7674
},
7775
},
7876
)

components/FileSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
2020
const props = defineProps({
2121
multiple: { type: Boolean, required: true },
22-
key: { type: String, required: false, default: "" },
22+
supported_feature: { type: String, required: false, default: null },
2323
})
2424
25-
const { multiple, key } = props
25+
const { multiple, supported_feature } = props
2626
2727
const accept = ref("")
2828
const loading = ref(false)
@@ -38,7 +38,7 @@
3838
3939
async function get_allowed_files() {
4040
toggle_loading()
41-
const params = { key }
41+
const params = { supported_feature }
4242
await api_fetch(
4343
{ schema, params },
4444
{

components/MissingFilesSelector.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
const toggle_loading = useToggle(loading)
7070
7171
function files_uploaded_event(value) {
72-
console.log("update_values")
7372
emit("update_values", { additional_files: value })
7473
missing_files()
7574
}

components/ObjectSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
5959
const props = defineProps({
6060
filenames: { type: Array, required: true },
61-
key: { type: String, required: false, default: null },
61+
supported_feature: { type: String, required: false, default: null },
6262
})
63-
const { filenames, key } = props
63+
const { filenames, supported_feature } = props
6464
6565
const loading = ref(false)
6666
const allowed_objects = ref({})
@@ -71,7 +71,7 @@
7171
allowed_objects.value = {}
7272
var promise_array = []
7373
for (const filename of filenames) {
74-
const params = { filename, key }
74+
const params = { filename, supported_feature }
7575
const promise = new Promise((resolve, reject) => {
7676
api_fetch(
7777
{ schema, params },

composables/viewer_call.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export function viewer_call(
44
{ schema, params = {} },
55
{ request_error_function, response_function, response_error_function } = {},
66
) {
7-
console.log("viewer_call", schema.route, params)
87
const errors_store = use_errors_store()
98
const viewer_store = use_viewer_store()
109

@@ -38,26 +37,23 @@ export function viewer_call(
3837
.then(
3938
(value) => {
4039
if (response_function) {
41-
console.log("response_function", value)
4240
response_function(value)
4341
}
4442
resolve()
4543
},
4644
(reason) => {
4745
if (request_error_function) {
48-
console.log("request_error_function", reason)
4946
request_error_function(reason)
5047
}
5148
reject()
5249
},
5350
)
5451
.catch((error) => {
55-
console.log("error : ", error)
5652
errors_store.add_error({
5753
code: error.code,
5854
route: schema.route,
59-
name: error.data.message,
60-
description: error.data.exception,
55+
name: error.message,
56+
description: error.message,
6157
})
6258
if (response_error_function) {
6359
response_error_function(error)

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
"happy-dom": "^13.6.2",
2222
"jsdom": "^24.0.0",
2323
"nuxt": "^3.10.3",
24-
"playwright-core": "^1.41.2",
24+
"playwright-core": "^1.42.0",
2525
"prettier": "3.2.5",
2626
"resize-observer-polyfill": "^1.5.1",
2727
"vite": "^5.1.4",
28-
"vite-plugin-vuetify": "^2.0.1",
28+
"vite-plugin-vuetify": "^2.0.2",
2929
"vitest": "^1.3.1",
3030
"vitest-environment-nuxt": "^1.0.0",
3131
"wslink": "^1.12.4"
@@ -38,14 +38,14 @@
3838
"version": "0.0.0-semantically-released",
3939
"main": "./nuxt.config.js",
4040
"dependencies": {
41-
"@geode/opengeodeweb-back": "3.3.2",
42-
"@kitware/vtk.js": "^29.7.2",
41+
"@geode/opengeodeweb-back": "4.0.0",
42+
"@kitware/vtk.js": "^29.7.3",
4343
"@mdi/font": "^7.4.47",
4444
"@pinia/nuxt": "^0.5.1",
45-
"@types/node": "^20.11.20",
46-
"@vueuse/components": "^10.8.0",
47-
"@vueuse/core": "^10.8.0",
48-
"@vueuse/nuxt": "^10.8.0",
45+
"@types/node": "^20.11.22",
46+
"@vueuse/components": "^10.9.0",
47+
"@vueuse/core": "^10.9.0",
48+
"@vueuse/nuxt": "^10.9.0",
4949
"ajv": "^8.12.0",
5050
"pinia": "^2.1.7",
5151
"sass": "^1.71.1",

stores/cloud.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@ export const use_cloud_store = defineStore("cloud", {
6060
method: "POST",
6161
})
6262
if (data.value !== null) {
63-
console.log("DATA", data)
6463
this.ID = data.value.ID
6564
localStorage.setItem("ID", data.value.ID)
6665
geode_store.$patch({ is_running: true })
6766
return geode_store.ping_task()
6867
} else {
69-
console.log("error : ", error)
7068
errors_store.server_error = true
7169
}
7270
},

stores/viewer.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -43,63 +43,63 @@ export const use_viewer_store = defineStore("viewer", {
4343
this.picking_mode = false
4444
},
4545
ws_connect() {
46-
const config = { application: "Viewer" }
47-
config.sessionURL = this.base_url
46+
if (process.env.NODE_ENV != "test") {
47+
const config = { application: "Viewer" }
48+
config.sessionURL = this.base_url
4849

49-
const { client } = this
50-
if (this.is_running && client.isConnected()) {
51-
client.disconnect(-1)
52-
this.is_running = false
53-
}
54-
let clientToConnect = client
55-
if (_.isEmpty(clientToConnect)) {
56-
clientToConnect = vtkWSLinkClient.newInstance()
57-
}
50+
const { client } = this
51+
if (this.is_running && client.isConnected()) {
52+
client.disconnect(-1)
53+
this.is_running = false
54+
}
55+
let clientToConnect = client
56+
if (_.isEmpty(clientToConnect)) {
57+
clientToConnect = vtkWSLinkClient.newInstance()
58+
}
5859

59-
// Connect to busy store
60-
clientToConnect.onBusyChange((count) => {
61-
this.buzy = count
62-
})
63-
clientToConnect.beginBusy()
60+
// Connect to busy store
61+
clientToConnect.onBusyChange((count) => {
62+
this.buzy = count
63+
})
64+
clientToConnect.beginBusy()
6465

65-
// Error
66-
clientToConnect.onConnectionError((httpReq) => {
67-
const message =
68-
(httpReq && httpReq.response && httpReq.response.error) ||
69-
`Connection error`
70-
console.error(message)
71-
console.log(httpReq)
72-
})
66+
// Error
67+
clientToConnect.onConnectionError((httpReq) => {
68+
const message =
69+
(httpReq && httpReq.response && httpReq.response.error) ||
70+
`Connection error`
71+
console.error(message)
72+
})
7373

74-
// Close
75-
clientToConnect.onConnectionClose((httpReq) => {
76-
const message =
77-
(httpReq && httpReq.response && httpReq.response.error) ||
78-
`Connection close`
79-
console.error(message)
80-
console.log(httpReq)
81-
})
74+
// Close
75+
clientToConnect.onConnectionClose((httpReq) => {
76+
const message =
77+
(httpReq && httpReq.response && httpReq.response.error) ||
78+
`Connection close`
79+
console.error(message)
80+
})
8281

83-
// Connect
84-
clientToConnect
85-
.connect(config)
86-
.then((validClient) => {
87-
connectImageStream(validClient.getConnection().getSession())
88-
this.client = validClient
89-
clientToConnect.endBusy()
82+
// Connect
83+
clientToConnect
84+
.connect(config)
85+
.then((validClient) => {
86+
connectImageStream(validClient.getConnection().getSession())
87+
this.client = validClient
88+
clientToConnect.endBusy()
9089

91-
// Now that the client is ready let's setup the server for us
92-
viewer_call({
93-
schema: schemas.opengeodeweb_viewer.create_visualization,
90+
// Now that the client is ready let's setup the server for us
91+
viewer_call({
92+
schema: schemas.opengeodeweb_viewer.create_visualization,
93+
})
94+
viewer_call({
95+
schema: schemas.opengeodeweb_viewer.reset,
96+
})
97+
this.is_running = true
9498
})
95-
viewer_call({
96-
schema: schemas.opengeodeweb_viewer.reset,
99+
.catch((error) => {
100+
console.error(error)
97101
})
98-
this.is_running = true
99-
})
100-
.catch((error) => {
101-
console.error(error)
102-
})
102+
}
103103
},
104104
start_request() {
105105
this.request_counter++

test/components/CrsSelector.nuxt.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ describe("CrsSelector.vue", async () => {
4343
const td = await wrapper.find("td")
4444
await wrapper.vm.$nextTick()
4545
const input = await td.find("input")
46-
console.log("toto", input)
4746
await input.trigger("click")
4847
expect(wrapper.emitted()).toHaveProperty("update_values")
4948
expect(wrapper.emitted().update_values).toHaveLength(1)

test/components/FileSelector.nuxt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe("FileSelector.vue", async () => {
3333
global: {
3434
plugins: [vuetify],
3535
},
36-
props: { multiple: false, key: "test", route: "/upload" },
36+
props: { multiple: false, supported_feature: "test" },
3737
})
3838

3939
const file_uploader = wrapper.findComponent(FileUploader)

0 commit comments

Comments
 (0)