@geode/opengeodeweb-front 6.3.0-rc.1 → 7.0.0-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/components/CrsSelector.vue +3 -1
- package/components/Errors/Banner.vue +7 -7
- package/components/Errors/Snackers.vue +3 -3
- package/components/ExtensionSelector.vue +2 -2
- package/components/FileSelector.vue +6 -6
- package/components/FileUploader.vue +8 -5
- package/components/Launcher.vue +4 -4
- package/components/MissingFilesSelector.vue +5 -4
- package/components/ObjectSelector.vue +6 -4
- package/components/Recaptcha.vue +2 -2
- package/components/RemoteRenderingView.vue +9 -7
- package/components/ViewToolbar.vue +6 -3
- package/composables/api_fetch.js +8 -8
- package/composables/viewer_call.js +71 -0
- package/package.json +25 -24
- package/scripts/generate_geode_objects.js +24 -0
- package/stores/cloud.js +2 -4
- package/stores/viewer.js +88 -142
- package/test/components/CrsSelector.nuxt.test.js +9 -7
- package/test/components/ExtensionSelector.nuxt.test.js +7 -6
- package/test/components/FileSelector.nuxt.test.js +10 -8
- package/test/components/FileUploader.nuxt.test.js +13 -5
- package/test/components/MissingFilesSelector.nuxt.test.js +8 -8
- package/test/components/ObjectSelector.nuxt.test.js +7 -8
- package/test/components/PackagesVersions.nuxt.test.js +2 -4
- package/test/composables/api_fetch.nuxt.test.js +23 -53
- package/test/composables/runFunctionIfCloudRunning.nuxt.test.js +4 -4
- package/test/composables/upload_file.nuxt.test.js +23 -35
- package/test/stores/Cloud.nuxt.test.js +4 -4
- package/test/stores/Viewer.nuxt.test.js +38 -0
- package/test/utils/validate_schema.nuxt.test.js +36 -0
- package/utils/schemas.json +164 -0
- package/utils/validate_schema.js +13 -0
- package/assets/schemas/CrsSelector.json +0 -12
- package/assets/schemas/ExtensionSelector.json +0 -15
- package/assets/schemas/FileSelector.json +0 -12
- package/assets/schemas/MissingFilesSelector.json +0 -15
- package/assets/schemas/ObjectSelector.json +0 -15
- package/stores/websocket.js +0 -110
- package/utils/index.js +0 -5
- package/utils/vtk.js +0 -26
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script setup>
|
|
27
|
-
import
|
|
27
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
28
|
+
const schema = schemas.opengeodeweb_back.geographic_coordinate_systems
|
|
29
|
+
|
|
28
30
|
const emit = defineEmits([
|
|
29
31
|
"update_values",
|
|
30
32
|
"increment_step",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
position="fixed"
|
|
7
7
|
>
|
|
8
8
|
<v-row>
|
|
9
|
-
<v-col cols="auto" class="white
|
|
9
|
+
<v-col cols="auto" class="text-white text-center">
|
|
10
10
|
<v-tooltip location="end">
|
|
11
11
|
<span>
|
|
12
12
|
We turn off our server automatically after 5 minutes of inactivity
|
|
@@ -18,22 +18,22 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
</v-tooltip>
|
|
20
20
|
</v-col>
|
|
21
|
-
<v-col cols="auto" class="text-white font-weight-bold"
|
|
22
|
-
|
|
21
|
+
<v-col cols="auto" class="text-white font-weight-bold">
|
|
22
|
+
Server timed out due to inactivity, please reload this page or click
|
|
23
23
|
here:
|
|
24
24
|
</v-col>
|
|
25
|
-
<v-col
|
|
26
|
-
<v-btn
|
|
25
|
+
<v-col class="align-items" cols="auto">
|
|
26
|
+
<v-btn color="grey" density="compact" @click="reload()"> Reload </v-btn>
|
|
27
27
|
</v-col>
|
|
28
28
|
<v-spacer />
|
|
29
29
|
<v-col cols="auto">
|
|
30
30
|
<v-btn
|
|
31
31
|
icon
|
|
32
|
-
flat
|
|
32
|
+
variant="flat"
|
|
33
33
|
size="20"
|
|
34
|
-
@click="errors_store.delete_server_error()"
|
|
35
34
|
color="grey"
|
|
36
35
|
class=".align-center"
|
|
36
|
+
@click="errors_store.delete_server_error()"
|
|
37
37
|
>
|
|
38
38
|
<v-icon icon="mdi-close" size="20" color="white" />
|
|
39
39
|
</v-btn>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-snackbar
|
|
3
|
-
:style="{ 'margin-bottom': calc_margin(index) }"
|
|
4
3
|
v-for="(error, index) in errors"
|
|
5
4
|
:key="index"
|
|
6
5
|
v-model="show"
|
|
6
|
+
:style="{ 'margin-bottom': calc_margin(index) }"
|
|
7
7
|
color="error"
|
|
8
8
|
location="bottom right"
|
|
9
9
|
transition="slide-x-reverse-transition"
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
<v-col cols="auto">
|
|
43
43
|
<v-btn
|
|
44
44
|
icon
|
|
45
|
-
flat
|
|
45
|
+
variant="flat"
|
|
46
46
|
size="20"
|
|
47
|
-
@click="errors_store.delete_error(index)"
|
|
48
47
|
color="error"
|
|
48
|
+
@click="errors_store.delete_error(index)"
|
|
49
49
|
>
|
|
50
50
|
<v-icon icon="mdi-close" size="20" color="white" />
|
|
51
51
|
</v-btn>
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script setup>
|
|
62
|
-
import
|
|
63
|
-
|
|
62
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
63
|
+
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions
|
|
64
64
|
const emit = defineEmits([
|
|
65
65
|
"update_values",
|
|
66
66
|
"increment_step",
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
<FetchingData v-if="loading" />
|
|
3
3
|
<FileUploader
|
|
4
4
|
v-else
|
|
5
|
-
v-bind="{ multiple, accept
|
|
5
|
+
v-bind="{ multiple, accept }"
|
|
6
6
|
@files_uploaded="files_uploaded_event"
|
|
7
7
|
/>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script setup>
|
|
11
|
-
import
|
|
11
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
12
12
|
|
|
13
|
+
const schema = schemas.opengeodeweb_back.allowed_files
|
|
13
14
|
const emit = defineEmits([
|
|
14
15
|
"update_values",
|
|
15
16
|
"increment_step",
|
|
@@ -18,11 +19,10 @@
|
|
|
18
19
|
|
|
19
20
|
const props = defineProps({
|
|
20
21
|
multiple: { type: Boolean, required: true },
|
|
21
|
-
|
|
22
|
-
route: { type: String, required: false, default: "" },
|
|
22
|
+
supported_feature: { type: String, required: false, default: null },
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const { multiple,
|
|
25
|
+
const { multiple, supported_feature } = props
|
|
26
26
|
|
|
27
27
|
const accept = ref("")
|
|
28
28
|
const loading = ref(false)
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
async function get_allowed_files() {
|
|
40
40
|
toggle_loading()
|
|
41
|
-
const params = {
|
|
41
|
+
const params = { supported_feature }
|
|
42
42
|
await api_fetch(
|
|
43
43
|
{ schema, params },
|
|
44
44
|
{
|
|
@@ -18,26 +18,29 @@
|
|
|
18
18
|
<v-row>
|
|
19
19
|
<v-col cols="auto">
|
|
20
20
|
<v-btn
|
|
21
|
-
@click="upload_files"
|
|
22
21
|
color="primary"
|
|
23
22
|
:disabled="!files.length && !files_uploaded"
|
|
24
23
|
:loading="loading"
|
|
25
24
|
class="pa-2"
|
|
26
|
-
|
|
25
|
+
@click="upload_files"
|
|
27
26
|
>
|
|
27
|
+
Upload file(s)
|
|
28
|
+
</v-btn>
|
|
28
29
|
</v-col>
|
|
29
30
|
</v-row>
|
|
30
31
|
</template>
|
|
31
32
|
|
|
32
33
|
<script setup>
|
|
34
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
35
|
+
const schema = schemas.opengeodeweb_back.upload_file
|
|
36
|
+
|
|
33
37
|
const emit = defineEmits(["files_uploaded", "decrement_step"])
|
|
34
38
|
|
|
35
39
|
const props = defineProps({
|
|
36
40
|
multiple: { type: Boolean, required: true },
|
|
37
41
|
accept: { type: String, required: true },
|
|
38
|
-
route: { type: String, required: true },
|
|
39
42
|
})
|
|
40
|
-
const { multiple, accept
|
|
43
|
+
const { multiple, accept } = toRefs(props)
|
|
41
44
|
|
|
42
45
|
const label = multiple ? "Please select file(s)" : "Please select a file"
|
|
43
46
|
const files = ref([])
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
for (const file of files.value) {
|
|
53
56
|
const promise = new Promise((resolve, reject) => {
|
|
54
57
|
upload_file(
|
|
55
|
-
{ route, file },
|
|
58
|
+
{ route: schema.$id, file },
|
|
56
59
|
{
|
|
57
60
|
request_error_function: () => {
|
|
58
61
|
reject()
|
package/components/Launcher.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-container
|
|
2
|
+
<v-container class="justify">
|
|
3
3
|
<v-row align-content="center" align="center">
|
|
4
4
|
<v-col
|
|
5
5
|
v-if="!is_captcha_validated"
|
|
6
|
+
class="align"
|
|
6
7
|
cols="12"
|
|
7
8
|
align-self="center"
|
|
8
|
-
align="center"
|
|
9
9
|
>
|
|
10
10
|
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
|
|
11
11
|
<Recaptcha :site_key="site_key" />
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script setup>
|
|
21
|
-
const
|
|
21
|
+
const viewer_store = use_viewer_store()
|
|
22
22
|
const cloud_store = use_cloud_store()
|
|
23
23
|
const { is_captcha_validated, is_connexion_launched, is_running } =
|
|
24
24
|
storeToRefs(cloud_store)
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
watch(is_captcha_validated, async (value) => {
|
|
29
29
|
if (value === true && process.client) {
|
|
30
30
|
await cloud_store.create_connexion()
|
|
31
|
-
await
|
|
31
|
+
await viewer_store.ws_connect()
|
|
32
32
|
}
|
|
33
33
|
})
|
|
34
34
|
</script>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<v-row>
|
|
27
27
|
<v-col cols="12">
|
|
28
28
|
<FileUploader
|
|
29
|
-
v-bind="{ multiple, accept
|
|
29
|
+
v-bind="{ multiple, accept }"
|
|
30
30
|
@files_uploaded="files_uploaded_event"
|
|
31
31
|
/>
|
|
32
32
|
</v-col>
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
45
|
<script setup>
|
|
46
|
-
import
|
|
46
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
47
|
+
|
|
48
|
+
const schema = schemas.opengeodeweb_back.missing_files
|
|
47
49
|
|
|
48
50
|
const emit = defineEmits([
|
|
49
51
|
"update_values",
|
|
@@ -55,10 +57,9 @@
|
|
|
55
57
|
multiple: { type: Boolean, required: true },
|
|
56
58
|
input_geode_object: { type: String, required: true },
|
|
57
59
|
filenames: { type: Array, required: true },
|
|
58
|
-
route: { type: String, required: true },
|
|
59
60
|
})
|
|
60
61
|
|
|
61
|
-
const { multiple, input_geode_object, filenames
|
|
62
|
+
const { multiple, input_geode_object, filenames } = props
|
|
62
63
|
|
|
63
64
|
const accept = ref("")
|
|
64
65
|
const loading = ref(false)
|
|
@@ -50,15 +50,17 @@
|
|
|
50
50
|
|
|
51
51
|
<script setup>
|
|
52
52
|
import geode_objects from "@/assets/geode_objects"
|
|
53
|
-
import
|
|
53
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
54
|
+
|
|
55
|
+
const schema = schemas.opengeodeweb_back.allowed_objects
|
|
54
56
|
|
|
55
57
|
const emit = defineEmits(["update_values", "increment_step"])
|
|
56
58
|
|
|
57
59
|
const props = defineProps({
|
|
58
60
|
filenames: { type: Array, required: true },
|
|
59
|
-
|
|
61
|
+
supported_feature: { type: String, required: false, default: null },
|
|
60
62
|
})
|
|
61
|
-
const { filenames,
|
|
63
|
+
const { filenames, supported_feature } = props
|
|
62
64
|
|
|
63
65
|
const loading = ref(false)
|
|
64
66
|
const allowed_objects = ref({})
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
allowed_objects.value = {}
|
|
70
72
|
var promise_array = []
|
|
71
73
|
for (const filename of filenames) {
|
|
72
|
-
const params = { filename,
|
|
74
|
+
const params = { filename, supported_feature }
|
|
73
75
|
const promise = new Promise((resolve, reject) => {
|
|
74
76
|
api_fetch(
|
|
75
77
|
{ schema, params },
|
package/components/Recaptcha.vue
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<vue-recaptcha
|
|
4
4
|
ref="recaptcha"
|
|
5
5
|
sitekey="6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC"
|
|
6
|
-
:
|
|
6
|
+
:load-recaptcha-script="true"
|
|
7
|
+
align-self="center"
|
|
7
8
|
@expired="is_captcha_validated = false"
|
|
8
9
|
@verify="submit_recaptcha"
|
|
9
|
-
align-self="center"
|
|
10
10
|
/>
|
|
11
11
|
</ClientOnly>
|
|
12
12
|
</template>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<div style="position: relative; width: 100%; height: 100%">
|
|
4
4
|
<view-toolbar />
|
|
5
5
|
<v-col
|
|
6
|
+
ref="viewer"
|
|
6
7
|
style="
|
|
7
8
|
overflow: hidden;
|
|
8
9
|
position: relative;
|
|
@@ -10,12 +11,10 @@
|
|
|
10
11
|
height: 100%;
|
|
11
12
|
width: 100%;
|
|
12
13
|
"
|
|
13
|
-
|
|
14
|
+
class="pa-0"
|
|
14
15
|
@click="get_x_y"
|
|
15
16
|
@keydown.esc="app_store.toggle_picking_mode(false)"
|
|
16
|
-
|
|
17
|
-
>
|
|
18
|
-
</v-col>
|
|
17
|
+
/>
|
|
19
18
|
</div>
|
|
20
19
|
</ClientOnly>
|
|
21
20
|
</template>
|
|
@@ -23,16 +22,19 @@
|
|
|
23
22
|
<script setup>
|
|
24
23
|
import vtkRemoteView from "@kitware/vtk.js/Rendering/Misc/RemoteView"
|
|
25
24
|
import { useElementSize } from "@vueuse/core"
|
|
25
|
+
import schemas from "@/utils/schemas.json"
|
|
26
26
|
|
|
27
27
|
const viewer_store = use_viewer_store()
|
|
28
|
-
const { picking_mode } = storeToRefs(viewer_store)
|
|
29
|
-
const websocket_store = use_websocket_store()
|
|
30
|
-
const { client, is_running } = storeToRefs(websocket_store)
|
|
28
|
+
const { client, is_running, picking_mode } = storeToRefs(viewer_store)
|
|
31
29
|
|
|
32
30
|
function get_x_y(event) {
|
|
33
31
|
if (picking_mode.value === true) {
|
|
34
32
|
const { offsetX, offsetY } = event
|
|
35
33
|
viewer_store.set_picked_point(offsetX, offsetY)
|
|
34
|
+
viewer_call({
|
|
35
|
+
schema: schemas.opengeodeweb_viewer.set_picked_point,
|
|
36
|
+
params: { offsetX, offsetY },
|
|
37
|
+
})
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
Reset camera
|
|
6
6
|
<template #activator="{ props }">
|
|
7
7
|
<v-btn
|
|
8
|
-
@click.stop="reset_camera"
|
|
9
8
|
density="comfortable"
|
|
10
9
|
v-bind="props"
|
|
11
10
|
icon
|
|
11
|
+
@click.stop="reset_camera"
|
|
12
12
|
>
|
|
13
13
|
<v-icon size="32"> mdi-cube-scan </v-icon>
|
|
14
14
|
</v-btn>
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup>
|
|
22
|
-
|
|
22
|
+
import schemas from "@/utils/schemas.json"
|
|
23
|
+
|
|
23
24
|
function reset_camera() {
|
|
24
|
-
|
|
25
|
+
viewer_call({
|
|
26
|
+
schema: schemas.opengeodeweb_viewer.reset_camera,
|
|
27
|
+
})
|
|
25
28
|
}
|
|
26
29
|
</script>
|
|
27
30
|
|
package/composables/api_fetch.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Ajv from "ajv"
|
|
2
1
|
import _ from "lodash"
|
|
3
2
|
|
|
4
3
|
export function api_fetch(
|
|
@@ -10,23 +9,24 @@ export function api_fetch(
|
|
|
10
9
|
|
|
11
10
|
const body = params || {}
|
|
12
11
|
|
|
13
|
-
const
|
|
12
|
+
const { valid, error } = validate_schema(schema, body)
|
|
14
13
|
|
|
15
|
-
ajv.addKeyword("method")
|
|
16
|
-
ajv.addKeyword("max_retry")
|
|
17
|
-
const valid = ajv.validate(schema, body)
|
|
18
14
|
if (!valid) {
|
|
19
15
|
errors_store.add_error({
|
|
20
16
|
code: 400,
|
|
21
17
|
route: schema.$id,
|
|
22
18
|
name: "Bad request",
|
|
23
|
-
description:
|
|
19
|
+
description: error,
|
|
24
20
|
})
|
|
25
|
-
throw new Error(schema.$id.concat(": ",
|
|
21
|
+
throw new Error(schema.$id.concat(": ", error))
|
|
26
22
|
}
|
|
23
|
+
|
|
27
24
|
geode_store.start_request()
|
|
28
25
|
|
|
29
|
-
const
|
|
26
|
+
const method = schema.methods.filter((m) => m !== "OPTIONS")[0]
|
|
27
|
+
const request_options = {
|
|
28
|
+
method: method,
|
|
29
|
+
}
|
|
30
30
|
if (!_.isEmpty(body)) {
|
|
31
31
|
request_options.body = body
|
|
32
32
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _ from "lodash"
|
|
2
|
+
|
|
3
|
+
export function viewer_call(
|
|
4
|
+
{ schema, params = {} },
|
|
5
|
+
{ request_error_function, response_function, response_error_function } = {},
|
|
6
|
+
) {
|
|
7
|
+
const errors_store = use_errors_store()
|
|
8
|
+
const viewer_store = use_viewer_store()
|
|
9
|
+
|
|
10
|
+
const { valid, error } = validate_schema(schema, params)
|
|
11
|
+
|
|
12
|
+
if (!valid) {
|
|
13
|
+
errors_store.add_error({
|
|
14
|
+
code: 400,
|
|
15
|
+
route: schema.route,
|
|
16
|
+
name: "Bad request",
|
|
17
|
+
description: error,
|
|
18
|
+
})
|
|
19
|
+
throw new Error(schema.route.concat(": ", error))
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const client = viewer_store.client
|
|
23
|
+
|
|
24
|
+
if (!_.isEmpty(schema.properties)) {
|
|
25
|
+
params = [params]
|
|
26
|
+
} else {
|
|
27
|
+
params = []
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let promise = new Promise((resolve, reject) => {
|
|
31
|
+
if (client) {
|
|
32
|
+
viewer_store.start_request()
|
|
33
|
+
client
|
|
34
|
+
.getConnection()
|
|
35
|
+
.getSession()
|
|
36
|
+
.call(schema.rpc, params)
|
|
37
|
+
.then(
|
|
38
|
+
(value) => {
|
|
39
|
+
if (response_function) {
|
|
40
|
+
response_function(value)
|
|
41
|
+
}
|
|
42
|
+
resolve()
|
|
43
|
+
},
|
|
44
|
+
(reason) => {
|
|
45
|
+
if (request_error_function) {
|
|
46
|
+
request_error_function(reason)
|
|
47
|
+
}
|
|
48
|
+
reject()
|
|
49
|
+
},
|
|
50
|
+
)
|
|
51
|
+
.catch((error) => {
|
|
52
|
+
errors_store.add_error({
|
|
53
|
+
code: error.code,
|
|
54
|
+
route: schema.route,
|
|
55
|
+
name: error.message,
|
|
56
|
+
description: error.message,
|
|
57
|
+
})
|
|
58
|
+
if (response_error_function) {
|
|
59
|
+
response_error_function(error)
|
|
60
|
+
}
|
|
61
|
+
reject()
|
|
62
|
+
})
|
|
63
|
+
.finally(() => {
|
|
64
|
+
viewer_store.stop_request()
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
return promise
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default viewer_call
|
package/package.json
CHANGED
|
@@ -3,55 +3,56 @@
|
|
|
3
3
|
"scripts": {
|
|
4
4
|
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
|
|
5
5
|
"test": "vitest",
|
|
6
|
-
"coverage": "vitest run --coverage"
|
|
6
|
+
"coverage": "vitest run --coverage",
|
|
7
|
+
"geode_objects": "node scripts/generate_geode_objects.js && prettier ./assets/geode_objects.js --write"
|
|
7
8
|
},
|
|
8
9
|
"devDependencies": {
|
|
9
10
|
"@nuxt/test-utils": "^3.11.0",
|
|
10
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
11
|
-
"@vitest/coverage-v8": "^1.
|
|
11
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
12
|
+
"@vitest/coverage-v8": "^1.3.1",
|
|
12
13
|
"@vue/test-utils": "^2.4.4",
|
|
13
|
-
"eslint": "^8.
|
|
14
|
+
"eslint": "^8.57.0",
|
|
14
15
|
"eslint-plugin-import": "^2.29.1",
|
|
15
16
|
"eslint-plugin-nuxt": "^4.0.0",
|
|
16
17
|
"eslint-plugin-prettier": "^5.1.3",
|
|
17
18
|
"eslint-plugin-prettier-vue": "^5.0.0",
|
|
18
|
-
"eslint-plugin-vue": "^9.
|
|
19
|
+
"eslint-plugin-vue": "^9.22.0",
|
|
19
20
|
"eslint-plugin-vuetify": "^2.1.1",
|
|
20
|
-
"happy-dom": "^13.
|
|
21
|
+
"happy-dom": "^13.6.2",
|
|
21
22
|
"jsdom": "^24.0.0",
|
|
22
|
-
"nuxt": "^3.10.
|
|
23
|
-
"playwright-core": "^1.
|
|
24
|
-
"prettier": "3.2.
|
|
23
|
+
"nuxt": "^3.10.3",
|
|
24
|
+
"playwright-core": "^1.42.0",
|
|
25
|
+
"prettier": "3.2.5",
|
|
25
26
|
"resize-observer-polyfill": "^1.5.1",
|
|
26
|
-
"vite": "^5.
|
|
27
|
-
"vite-plugin-vuetify": "^2.0.
|
|
28
|
-
"vitest": "^1.
|
|
29
|
-
"vitest-environment-nuxt": "^1.0.0"
|
|
27
|
+
"vite": "^5.1.4",
|
|
28
|
+
"vite-plugin-vuetify": "^2.0.2",
|
|
29
|
+
"vitest": "^1.3.1",
|
|
30
|
+
"vitest-environment-nuxt": "^1.0.0",
|
|
31
|
+
"wslink": "^1.12.4"
|
|
30
32
|
},
|
|
31
33
|
"overrides": {
|
|
32
34
|
"vue": "latest"
|
|
33
35
|
},
|
|
34
36
|
"description": "OpenSource Vue/Vuetify framework for web applications",
|
|
35
37
|
"type": "module",
|
|
36
|
-
"version": "
|
|
38
|
+
"version": "7.0.0-rc.1",
|
|
37
39
|
"main": "./nuxt.config.js",
|
|
38
40
|
"dependencies": {
|
|
39
|
-
"@
|
|
41
|
+
"@geode/opengeodeweb-back": "4.0.0",
|
|
42
|
+
"@kitware/vtk.js": "^29.7.3",
|
|
40
43
|
"@mdi/font": "^7.4.47",
|
|
41
44
|
"@pinia/nuxt": "^0.5.1",
|
|
42
|
-
"@types/node": "^20.11.
|
|
43
|
-
"@vueuse/components": "^10.
|
|
44
|
-
"@vueuse/core": "^10.
|
|
45
|
-
"@vueuse/nuxt": "^10.
|
|
45
|
+
"@types/node": "^20.11.22",
|
|
46
|
+
"@vueuse/components": "^10.9.0",
|
|
47
|
+
"@vueuse/core": "^10.9.0",
|
|
48
|
+
"@vueuse/nuxt": "^10.9.0",
|
|
46
49
|
"ajv": "^8.12.0",
|
|
47
|
-
"lodash": "^4.17.21",
|
|
48
50
|
"pinia": "^2.1.7",
|
|
49
|
-
"sass": "^1.
|
|
50
|
-
"semver": "^7.
|
|
51
|
+
"sass": "^1.71.1",
|
|
52
|
+
"semver": "^7.6.0",
|
|
51
53
|
"vue-recaptcha": "^2.0.3",
|
|
52
54
|
"vue3-carousel": "^0.3.1",
|
|
53
|
-
"vuetify": "^3.5.
|
|
54
|
-
"wslink": "^1.12.4"
|
|
55
|
+
"vuetify": "^3.5.6"
|
|
55
56
|
},
|
|
56
57
|
"repository": {
|
|
57
58
|
"type": "git",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as path from "path"
|
|
2
|
+
import * as fs from "fs"
|
|
3
|
+
import * as process from "process"
|
|
4
|
+
|
|
5
|
+
const output_file = path.join(process.cwd(), "assets/geode_objects.js")
|
|
6
|
+
|
|
7
|
+
if (fs.existsSync(output_file)) {
|
|
8
|
+
fs.unlinkSync(output_file)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var files = fs.readdirSync("assets/img/geode_objects/")
|
|
12
|
+
var imports = ""
|
|
13
|
+
var geode_objects = "const geode_objects = {"
|
|
14
|
+
|
|
15
|
+
for (const file of files) {
|
|
16
|
+
const geode_object = file.replace(".svg", "")
|
|
17
|
+
imports +=
|
|
18
|
+
`import ${geode_object} from "@/assets/img/geode_objects/${file}"` + "\n"
|
|
19
|
+
geode_objects += `${geode_object}:{\n tooltip: "${geode_object}",\n image: ${geode_object},\n},\n`
|
|
20
|
+
}
|
|
21
|
+
geode_objects += "}\n\n export default geode_objects"
|
|
22
|
+
fs.writeFileSync(output_file, imports + "\n" + geode_objects)
|
|
23
|
+
|
|
24
|
+
console.log("Fichier JS créé avec succès :", output_file)
|
package/stores/cloud.js
CHANGED
|
@@ -16,10 +16,10 @@ export const use_cloud_store = defineStore("cloud", {
|
|
|
16
16
|
return api_url
|
|
17
17
|
},
|
|
18
18
|
is_running: () => {
|
|
19
|
-
return use_geode_store().is_running &&
|
|
19
|
+
return use_geode_store().is_running && use_viewer_store().is_running
|
|
20
20
|
},
|
|
21
21
|
is_busy: () => {
|
|
22
|
-
return use_geode_store().is_busy ||
|
|
22
|
+
return use_geode_store().is_busy || use_viewer_store().is_busy
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
actions: {
|
|
@@ -60,13 +60,11 @@ export const use_cloud_store = defineStore("cloud", {
|
|
|
60
60
|
method: "POST",
|
|
61
61
|
})
|
|
62
62
|
if (data.value !== null) {
|
|
63
|
-
console.log("DATA", data)
|
|
64
63
|
this.ID = data.value.ID
|
|
65
64
|
localStorage.setItem("ID", data.value.ID)
|
|
66
65
|
geode_store.$patch({ is_running: true })
|
|
67
66
|
return geode_store.ping_task()
|
|
68
67
|
} else {
|
|
69
|
-
console.log("error : ", error)
|
|
70
68
|
errors_store.server_error = true
|
|
71
69
|
}
|
|
72
70
|
},
|