@geode/opengeodeweb-front 6.2.1 → 6.3.0
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/.github/workflows/CD.yml +6 -0
- package/assets/geode_objects.js +46 -46
- package/assets/img/geode_objects/{section.svg → Section.svg} +1 -1
- package/components/Carousel.vue +1 -5
- package/components/CrsSelector.vue +6 -4
- package/components/ExtensionSelector.vue +78 -77
- package/components/FileSelector.vue +6 -7
- package/components/FileUploader.vue +7 -6
- package/components/MissingFilesSelector.vue +25 -23
- package/components/ObjectSelector.vue +24 -18
- package/components/PackagesVersions.vue +24 -23
- package/components/Wrapper.vue +1 -8
- package/composables/api_fetch.js +8 -10
- package/composables/runFunctionIfCloudRunning.js +1 -2
- package/composables/upload_file.js +4 -1
- package/nuxt.config.js +29 -1
- package/package.json +30 -14
- package/stores/cloud.js +19 -8
- package/stores/geode.js +7 -5
- package/test/components/CrsSelector.nuxt.test.js +54 -0
- package/test/components/ErrorsBanner.nuxt.test.js +46 -0
- package/test/components/ErrorsSnackers.nuxt.test.js +37 -0
- package/test/components/ExtensionSelector.nuxt.test.js +52 -0
- package/test/components/FileSelector.nuxt.test.js +60 -0
- package/test/components/FileUploader.nuxt.test.js +50 -0
- package/test/components/Launcher.nuxt.test.js +34 -0
- package/test/components/MissingFilesSelector.nuxt.test.js +67 -0
- package/test/components/ObjectSelector.nuxt.test.js +49 -0
- package/test/components/PackagesVersions.nuxt.test.js +45 -0
- package/test/components/Step.nuxt.test.js +58 -0
- package/test/components/Stepper.nuxt.test.js +58 -0
- package/test/components/Wrapper.nuxt.test.js +58 -0
- package/test/composables/api_fetch.nuxt.test.js +89 -0
- package/test/composables/runFunctionIfCloudRunning.nuxt.test.js +30 -0
- package/test/composables/upload_file.nuxt.test.js +51 -0
- package/test/stores/Cloud.nuxt.test.js +48 -0
- package/test/stores/Errors.test.js +36 -0
- package/test/stores/Geode.test.js +60 -0
- package/vitest.config.js +13 -0
- package/vuetify_config.js +22 -0
- package/assets/img/geode_objects/regular_grid.svg +0 -107
- package/assets/img/logos/LOGOMOSART-PME.png +0 -0
- package/assets/img/logos/logo-avenia.svg +0 -182
- package/assets/img/logos/logo_BSC.png +0 -0
- package/assets/img/logos/logo_DHI.png +0 -0
- package/assets/img/logos/logo_GSC.png +0 -0
- package/assets/img/logos/logo_NAOS.png +0 -0
- package/assets/img/logos/logo_UL.png +0 -0
- package/assets/img/logos/logo_arxitek.png +0 -0
- package/assets/img/logos/logo_banquiz.png +0 -0
- package/assets/img/logos/logo_cnrs.jpg +0 -0
- package/assets/img/logos/logo_earth_quick.jpg +0 -0
- package/assets/img/logos/logo_enerex.png +0 -0
- package/assets/img/logos/logo_geoliens.png +0 -0
- package/assets/img/logos/logo_georessources.jpg +0 -0
- package/assets/img/logos/logo_helioparc.svg +0 -182
- package/assets/img/logos/logo_pole_avenia.png +0 -0
- package/assets/img/logos/logo_region.png +0 -0
- package/assets/img/logos/logo_ring.png +0 -0
- package/assets/img/logos/logo_totalenergies.png +0 -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/components/Header.vue +0 -39
- /package/assets/img/geode_objects/{cross_section.svg → CrossSection.svg} +0 -0
- /package/assets/img/geode_objects/{edged_curve2d.svg → EdgedCurve2D.svg} +0 -0
- /package/assets/img/geode_objects/{edged_curve3d.svg → EdgedCurve3D.svg} +0 -0
- /package/assets/img/geode_objects/{edged_curve.svg → Graph.svg} +0 -0
- /package/assets/img/geode_objects/{hybrid_solid.svg → HybridSolid3D.svg} +0 -0
- /package/assets/img/geode_objects/{light_regular_grid2d.svg → LightRegularGrid2D.svg} +0 -0
- /package/assets/img/geode_objects/{light_regular_grid3d.svg → LightRegularGrid3D.svg} +0 -0
- /package/assets/img/geode_objects/{point_set2d.svg → PointSet2D.svg} +0 -0
- /package/assets/img/geode_objects/{point_set3d.svg → PointSet3D.svg} +0 -0
- /package/assets/img/geode_objects/{polygonal_surface2d.svg → PolygonalSurface2D.svg} +0 -0
- /package/assets/img/geode_objects/{polygonal_surface3d.svg → PolygonalSurface3D.svg} +0 -0
- /package/assets/img/geode_objects/{polyhedral_solid.svg → PolyhedralSolid3D.svg} +0 -0
- /package/assets/img/geode_objects/{raster_image2d.svg → RasterImage2D.svg} +0 -0
- /package/assets/img/geode_objects/{raster_image3d.svg → RasterImage3D.svg} +0 -0
- /package/assets/img/geode_objects/{regular_grid2d.svg → RegularGrid2D.svg} +0 -0
- /package/assets/img/geode_objects/{regular_grid3d.svg → RegularGrid3D.svg} +0 -0
- /package/assets/img/geode_objects/{structural_model.svg → StructuralModel.svg} +0 -0
- /package/assets/img/geode_objects/{tetrahedral_solid.svg → TetrahedralSolid3D.svg} +0 -0
- /package/assets/img/geode_objects/{triangulated_surface2d.svg → TriangulatedSurface2D.svg} +0 -0
- /package/assets/img/geode_objects/{triangulated_surface3d.svg → TriangulatedSurface3D.svg} +0 -0
- /package/assets/img/geode_objects/{vertex_set.svg → VertexSet.svg} +0 -0
package/.github/workflows/CD.yml
CHANGED
|
@@ -7,6 +7,12 @@ jobs:
|
|
|
7
7
|
build:
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
|
+
- name: Checkout
|
|
11
|
+
uses: actions/checkout@v3
|
|
12
|
+
- name: Unit tests
|
|
13
|
+
run: |
|
|
14
|
+
npm install
|
|
15
|
+
npm run test
|
|
10
16
|
- uses: actions/checkout@v3
|
|
11
17
|
- name: Semantic Release
|
|
12
18
|
uses: cycjimmy/semantic-release-action@v3
|
package/assets/geode_objects.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
1
|
+
import BRep from "@/assets/img/geode_objects/BRep.svg"
|
|
2
|
+
import CrossSection from "@/assets/img/geode_objects/CrossSection.svg"
|
|
3
|
+
import EdgedCurve2D from "@/assets/img/geode_objects/EdgedCurve2D.svg"
|
|
4
|
+
import EdgedCurve3D from "@/assets/img/geode_objects/EdgedCurve3D.svg"
|
|
5
|
+
import Graph from "@/assets/img/geode_objects/Graph.svg"
|
|
6
|
+
import HybridSolid3D from "@/assets/img/geode_objects/HybridSolid3D.svg"
|
|
7
|
+
import LightRegularGrid2D from "@/assets/img/geode_objects/LightRegularGrid2D.svg"
|
|
8
|
+
import LightRegularGrid3D from "@/assets/img/geode_objects/LightRegularGrid3D.svg"
|
|
9
|
+
import PointSet2D from "@/assets/img/geode_objects/PointSet2D.svg"
|
|
10
|
+
import PointSet3D from "@/assets/img/geode_objects/PointSet3D.svg"
|
|
11
|
+
import PolygonalSurface2D from "@/assets/img/geode_objects/PolygonalSurface2D.svg"
|
|
12
|
+
import PolygonalSurface3D from "@/assets/img/geode_objects/PolygonalSurface3D.svg"
|
|
13
|
+
import PolyhedralSolid3D from "@/assets/img/geode_objects/PolyhedralSolid3D.svg"
|
|
14
|
+
import RasterImage2D from "@/assets/img/geode_objects/RasterImage2D.svg"
|
|
15
|
+
import RasterImage3D from "@/assets/img/geode_objects/RasterImage3D.svg"
|
|
16
|
+
import RegularGrid2D from "@/assets/img/geode_objects/RegularGrid2D.svg"
|
|
17
|
+
import RegularGrid3D from "@/assets/img/geode_objects/RegularGrid3D.svg"
|
|
18
|
+
import Section from "@/assets/img/geode_objects/Section.svg"
|
|
19
|
+
import StructuralModel from "@/assets/img/geode_objects/StructuralModel.svg"
|
|
20
|
+
import TetrahedralSolid3D from "@/assets/img/geode_objects/TetrahedralSolid3D.svg"
|
|
21
|
+
import TriangulatedSurface2D from "@/assets/img/geode_objects/TriangulatedSurface2D.svg"
|
|
22
|
+
import TriangulatedSurface3D from "@/assets/img/geode_objects/TriangulatedSurface3D.svg"
|
|
23
|
+
import VertexSet from "@/assets/img/geode_objects/VertexSet.svg"
|
|
24
24
|
|
|
25
25
|
const geode_objects = {
|
|
26
26
|
BRep: {
|
|
27
27
|
tooltip: "BRep",
|
|
28
|
-
image:
|
|
28
|
+
image: BRep,
|
|
29
29
|
},
|
|
30
30
|
CrossSection: {
|
|
31
31
|
tooltip: "CrossSection",
|
|
32
|
-
image:
|
|
32
|
+
image: CrossSection,
|
|
33
33
|
},
|
|
34
34
|
EdgedCurve2D: {
|
|
35
35
|
tooltip: "EdgedCurve2D",
|
|
36
|
-
image:
|
|
36
|
+
image: EdgedCurve2D,
|
|
37
37
|
},
|
|
38
38
|
EdgedCurve3D: {
|
|
39
39
|
tooltip: "EdgedCurve3D",
|
|
40
|
-
image:
|
|
40
|
+
image: EdgedCurve3D,
|
|
41
41
|
},
|
|
42
42
|
Graph: {
|
|
43
43
|
tooltip: "Graph",
|
|
44
|
-
image:
|
|
44
|
+
image: Graph,
|
|
45
45
|
},
|
|
46
46
|
HybridSolid3D: {
|
|
47
47
|
tooltip: "HybridSolid3D",
|
|
48
|
-
image:
|
|
48
|
+
image: HybridSolid3D,
|
|
49
49
|
},
|
|
50
50
|
LightRegularGrid2D: {
|
|
51
51
|
tooltip: "LightRegularGrid2D",
|
|
52
|
-
image:
|
|
52
|
+
image: LightRegularGrid2D,
|
|
53
53
|
},
|
|
54
54
|
LightRegularGrid3D: {
|
|
55
55
|
tooltip: "LightRegularGrid3D",
|
|
56
|
-
image:
|
|
56
|
+
image: LightRegularGrid3D,
|
|
57
57
|
},
|
|
58
58
|
PointSet2D: {
|
|
59
59
|
tooltip: "PointSet2D",
|
|
60
|
-
image:
|
|
60
|
+
image: PointSet2D,
|
|
61
61
|
},
|
|
62
62
|
PointSet3D: {
|
|
63
63
|
tooltip: "PointSet3D",
|
|
64
|
-
image:
|
|
64
|
+
image: PointSet3D,
|
|
65
65
|
},
|
|
66
66
|
PolygonalSurface2D: {
|
|
67
67
|
tooltip: "PolygonalSurface2D",
|
|
68
|
-
image:
|
|
68
|
+
image: PolygonalSurface2D,
|
|
69
69
|
},
|
|
70
70
|
PolygonalSurface3D: {
|
|
71
71
|
tooltip: "PolygonalSurface3D",
|
|
72
|
-
image:
|
|
72
|
+
image: PolygonalSurface3D,
|
|
73
73
|
},
|
|
74
74
|
PolyhedralSolid3D: {
|
|
75
75
|
tooltip: "PolyhedralSolid3D",
|
|
76
|
-
image:
|
|
76
|
+
image: PolyhedralSolid3D,
|
|
77
77
|
},
|
|
78
78
|
RasterImage2D: {
|
|
79
79
|
tooltip: "RasterImage2D",
|
|
80
|
-
image:
|
|
80
|
+
image: RasterImage2D,
|
|
81
81
|
},
|
|
82
82
|
RasterImage3D: {
|
|
83
83
|
tooltip: "RasterImage3D",
|
|
84
|
-
image:
|
|
84
|
+
image: RasterImage3D,
|
|
85
85
|
},
|
|
86
86
|
RegularGrid2D: {
|
|
87
87
|
tooltip: "RegularGrid2D",
|
|
88
|
-
image:
|
|
88
|
+
image: RegularGrid2D,
|
|
89
89
|
},
|
|
90
90
|
RegularGrid3D: {
|
|
91
91
|
tooltip: "RegularGrid3D",
|
|
92
|
-
image:
|
|
92
|
+
image: RegularGrid3D,
|
|
93
93
|
},
|
|
94
94
|
Section: {
|
|
95
95
|
tooltip: "Section",
|
|
96
|
-
image:
|
|
96
|
+
image: Section,
|
|
97
97
|
},
|
|
98
98
|
StructuralModel: {
|
|
99
99
|
tooltip: "StructuralModel",
|
|
100
|
-
image:
|
|
100
|
+
image: StructuralModel,
|
|
101
101
|
},
|
|
102
102
|
TetrahedralSolid3D: {
|
|
103
103
|
tooltip: "TetrahedralSolid3D",
|
|
104
|
-
image:
|
|
104
|
+
image: TetrahedralSolid3D,
|
|
105
105
|
},
|
|
106
106
|
TriangulatedSurface2D: {
|
|
107
107
|
tooltip: "TriangulatedSurface2D",
|
|
108
|
-
image:
|
|
108
|
+
image: TriangulatedSurface2D,
|
|
109
109
|
},
|
|
110
110
|
TriangulatedSurface3D: {
|
|
111
111
|
tooltip: "TriangulatedSurface3D",
|
|
112
|
-
image:
|
|
112
|
+
image: TriangulatedSurface3D,
|
|
113
113
|
},
|
|
114
114
|
VertexSet: {
|
|
115
115
|
tooltip: "VertexSet",
|
|
116
|
-
image:
|
|
116
|
+
image: VertexSet,
|
|
117
117
|
},
|
|
118
118
|
}
|
|
119
119
|
|
package/components/Carousel.vue
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
items: { type: Array, required: true },
|
|
28
28
|
})
|
|
29
29
|
|
|
30
|
-
const { name } =
|
|
30
|
+
const { name } = useDisplay()
|
|
31
31
|
const nb_items_to_display = ref(3)
|
|
32
32
|
watch(
|
|
33
33
|
name,
|
|
@@ -60,10 +60,6 @@
|
|
|
60
60
|
transition: 1000,
|
|
61
61
|
wrapAround: true,
|
|
62
62
|
})
|
|
63
|
-
|
|
64
|
-
onMounted(() => {
|
|
65
|
-
console.log(carrousel_settings)
|
|
66
|
-
})
|
|
67
63
|
</script>
|
|
68
64
|
|
|
69
65
|
<style scoped>
|
|
@@ -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",
|
|
@@ -64,11 +66,13 @@
|
|
|
64
66
|
async function get_crs_table() {
|
|
65
67
|
const params = { input_geode_object }
|
|
66
68
|
toggle_loading()
|
|
69
|
+
console.log("get_crs_table")
|
|
67
70
|
await api_fetch(
|
|
68
71
|
{ schema, params },
|
|
69
72
|
{
|
|
70
73
|
response_function: (response) => {
|
|
71
74
|
crs_list.value = response._data.crs_list
|
|
75
|
+
console.log("crs_list", response._data.crs_list)
|
|
72
76
|
},
|
|
73
77
|
},
|
|
74
78
|
)
|
|
@@ -86,7 +90,5 @@
|
|
|
86
90
|
{ title: "Name", align: "end", key: "name" },
|
|
87
91
|
]
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
get_crs_table()
|
|
91
|
-
})
|
|
93
|
+
await get_crs_table()
|
|
92
94
|
</script>
|
|
@@ -1,62 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FetchingData v-if="loading" />
|
|
3
|
-
<v-row
|
|
4
|
-
v-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<v-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
location="bottom"
|
|
3
|
+
<v-row v-else class="justify-left">
|
|
4
|
+
<v-col
|
|
5
|
+
v-for="(
|
|
6
|
+
output_extensions, output_geode_object
|
|
7
|
+
) in geode_objects_and_output_extensions"
|
|
8
|
+
:key="output_geode_object"
|
|
9
|
+
class="justify-left"
|
|
10
|
+
>
|
|
11
|
+
<v-card class="card ma-2 pa-2" width="100%">
|
|
12
|
+
<v-tooltip
|
|
13
|
+
:text="`Export as a ${output_geode_object}`"
|
|
14
|
+
location="bottom"
|
|
15
|
+
>
|
|
16
|
+
<template v-slot:activator="{ props }">
|
|
17
|
+
<v-card-title v-bind="props">
|
|
18
|
+
{{ output_geode_object }}
|
|
19
|
+
</v-card-title>
|
|
20
|
+
</template>
|
|
21
|
+
</v-tooltip>
|
|
22
|
+
<v-card-text>
|
|
23
|
+
<v-row>
|
|
24
|
+
<v-col
|
|
25
|
+
v-for="(extension, output_extension) in output_extensions"
|
|
26
|
+
:key="output_extension"
|
|
27
|
+
cols="auto"
|
|
28
|
+
class="pa-0"
|
|
30
29
|
>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
<v-tooltip
|
|
31
|
+
:disabled="extension.is_saveable"
|
|
32
|
+
text="Data not saveable with this file extension"
|
|
33
|
+
location="bottom"
|
|
34
|
+
>
|
|
35
|
+
<template v-slot:activator="{ props }">
|
|
36
|
+
<span v-bind="props">
|
|
37
|
+
<v-card
|
|
38
|
+
class="card ma-2"
|
|
39
|
+
:color="extension.is_saveable ? 'primary' : 'grey'"
|
|
40
|
+
hover
|
|
41
|
+
@click="
|
|
42
|
+
set_variables(output_geode_object, output_extension)
|
|
43
|
+
"
|
|
44
|
+
:disabled="!extension.is_saveable"
|
|
45
|
+
>
|
|
46
|
+
<v-card-title align="center">
|
|
47
|
+
{{ output_extension }}
|
|
48
|
+
</v-card-title>
|
|
49
|
+
</v-card>
|
|
50
|
+
</span>
|
|
51
|
+
</template>
|
|
52
|
+
</v-tooltip>
|
|
53
|
+
</v-col>
|
|
54
|
+
</v-row>
|
|
55
|
+
</v-card-text>
|
|
56
|
+
</v-card>
|
|
57
|
+
</v-col>
|
|
53
58
|
</v-row>
|
|
54
59
|
</template>
|
|
55
60
|
|
|
56
61
|
<script setup>
|
|
57
|
-
import
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
63
|
+
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions
|
|
60
64
|
const emit = defineEmits([
|
|
61
65
|
"update_values",
|
|
62
66
|
"increment_step",
|
|
@@ -75,7 +79,7 @@
|
|
|
75
79
|
|
|
76
80
|
async function get_output_file_extensions() {
|
|
77
81
|
toggle_loading()
|
|
78
|
-
geode_objects_and_output_extensions.
|
|
82
|
+
geode_objects_and_output_extensions.value = {}
|
|
79
83
|
var promise_array = []
|
|
80
84
|
for (const filename of filenames) {
|
|
81
85
|
const params = { input_geode_object, filename }
|
|
@@ -87,26 +91,7 @@
|
|
|
87
91
|
reject()
|
|
88
92
|
},
|
|
89
93
|
response_function: (response) => {
|
|
90
|
-
|
|
91
|
-
if (_.isEmpty(geode_objects_and_output_extensions.value)) {
|
|
92
|
-
geode_objects_and_output_extensions.value = data
|
|
93
|
-
} else {
|
|
94
|
-
for (const [geode_object, geode_object_value] of Object.entries(
|
|
95
|
-
data,
|
|
96
|
-
)) {
|
|
97
|
-
for (const [
|
|
98
|
-
output_extension,
|
|
99
|
-
output_extension_value,
|
|
100
|
-
] of Object.entries(geode_object_value)) {
|
|
101
|
-
if (!output_extension_value["is_saveable"]) {
|
|
102
|
-
geode_objects_and_output_extensions.value[geode_object][
|
|
103
|
-
output_extension
|
|
104
|
-
]["is_saveable"] = false
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
resolve()
|
|
94
|
+
resolve(response._data.geode_objects_and_output_extensions)
|
|
110
95
|
},
|
|
111
96
|
response_error_function: () => {
|
|
112
97
|
reject()
|
|
@@ -116,7 +101,25 @@
|
|
|
116
101
|
})
|
|
117
102
|
promise_array.push(promise)
|
|
118
103
|
}
|
|
119
|
-
await Promise.all(promise_array)
|
|
104
|
+
const values = await Promise.all(promise_array)
|
|
105
|
+
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))]
|
|
106
|
+
const common_keys = all_keys.filter(
|
|
107
|
+
(i) => !values.some((j) => !Object.keys(j).includes(i)),
|
|
108
|
+
)
|
|
109
|
+
var final_object = {}
|
|
110
|
+
for (const key of common_keys) {
|
|
111
|
+
final_object[key] = {}
|
|
112
|
+
for (const value of values) {
|
|
113
|
+
for (const extension of Object.keys(value[key])) {
|
|
114
|
+
if (value[key][extension].is_saveable == false) {
|
|
115
|
+
final_object[key][extension] = { is_saveable: false }
|
|
116
|
+
} else {
|
|
117
|
+
final_object[key][extension] = { is_saveable: true }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
geode_objects_and_output_extensions.value = final_object
|
|
120
123
|
toggle_loading()
|
|
121
124
|
}
|
|
122
125
|
|
|
@@ -131,7 +134,5 @@
|
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
|
|
135
|
-
get_output_file_extensions()
|
|
136
|
-
})
|
|
137
|
+
await get_output_file_extensions()
|
|
137
138
|
</script>
|
|
@@ -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",
|
|
@@ -19,10 +20,9 @@
|
|
|
19
20
|
const props = defineProps({
|
|
20
21
|
multiple: { type: Boolean, required: true },
|
|
21
22
|
key: { type: String, required: false, default: "" },
|
|
22
|
-
route: { type: String, required: false, default: "" },
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const { multiple, key
|
|
25
|
+
const { multiple, key } = props
|
|
26
26
|
|
|
27
27
|
const accept = ref("")
|
|
28
28
|
const loading = ref(false)
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
)
|
|
52
52
|
toggle_loading()
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})
|
|
54
|
+
|
|
55
|
+
await get_allowed_files()
|
|
57
56
|
</script>
|
|
@@ -18,27 +18,28 @@
|
|
|
18
18
|
<v-row>
|
|
19
19
|
<v-col cols="auto">
|
|
20
20
|
<v-btn
|
|
21
|
-
@click="upload_files
|
|
21
|
+
@click="upload_files"
|
|
22
22
|
color="primary"
|
|
23
23
|
:disabled="!files.length && !files_uploaded"
|
|
24
24
|
:loading="loading"
|
|
25
25
|
class="pa-2"
|
|
26
|
-
|
|
27
|
-
Upload file(s)</v-btn
|
|
26
|
+
>Upload file(s)</v-btn
|
|
28
27
|
>
|
|
29
28
|
</v-col>
|
|
30
29
|
</v-row>
|
|
31
30
|
</template>
|
|
32
31
|
|
|
33
32
|
<script setup>
|
|
33
|
+
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
34
|
+
const schema = schemas.opengeodeweb_back.upload_file
|
|
35
|
+
|
|
34
36
|
const emit = defineEmits(["files_uploaded", "decrement_step"])
|
|
35
37
|
|
|
36
38
|
const props = defineProps({
|
|
37
39
|
multiple: { type: Boolean, required: true },
|
|
38
40
|
accept: { type: String, required: true },
|
|
39
|
-
route: { type: String, required: true },
|
|
40
41
|
})
|
|
41
|
-
const { multiple, accept
|
|
42
|
+
const { multiple, accept } = toRefs(props)
|
|
42
43
|
|
|
43
44
|
const label = multiple ? "Please select file(s)" : "Please select a file"
|
|
44
45
|
const files = ref([])
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
for (const file of files.value) {
|
|
54
55
|
const promise = new Promise((resolve, reject) => {
|
|
55
56
|
upload_file(
|
|
56
|
-
{ route, file },
|
|
57
|
+
{ route: schema.$id, file },
|
|
57
58
|
{
|
|
58
59
|
request_error_function: () => {
|
|
59
60
|
reject()
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
<v-row>
|
|
27
27
|
<v-col cols="12">
|
|
28
28
|
<FileUploader
|
|
29
|
-
v-bind="{ multiple, accept
|
|
30
|
-
@files_uploaded="
|
|
29
|
+
v-bind="{ multiple, accept }"
|
|
30
|
+
@files_uploaded="files_uploaded_event"
|
|
31
31
|
/>
|
|
32
32
|
</v-col>
|
|
33
33
|
</v-row>
|
|
@@ -36,14 +36,16 @@
|
|
|
36
36
|
v-if="!mandatory_files.length && additional_files.length"
|
|
37
37
|
cols="auto"
|
|
38
38
|
>
|
|
39
|
-
<v-btn @click="
|
|
39
|
+
<v-btn @click="emit('increment_step')" color="warning">Skip step</v-btn>
|
|
40
40
|
</v-col>
|
|
41
41
|
</v-row>
|
|
42
42
|
</v-container>
|
|
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)
|
|
@@ -67,7 +68,8 @@
|
|
|
67
68
|
const additional_files = ref([])
|
|
68
69
|
const toggle_loading = useToggle(loading)
|
|
69
70
|
|
|
70
|
-
function
|
|
71
|
+
function files_uploaded_event(value) {
|
|
72
|
+
console.log("update_values")
|
|
71
73
|
emit("update_values", { additional_files: value })
|
|
72
74
|
missing_files()
|
|
73
75
|
}
|
|
@@ -89,18 +91,7 @@
|
|
|
89
91
|
reject()
|
|
90
92
|
},
|
|
91
93
|
response_function: (response) => {
|
|
92
|
-
|
|
93
|
-
? true
|
|
94
|
-
: has_missing_files.value
|
|
95
|
-
mandatory_files.value = [].concat(
|
|
96
|
-
mandatory_files.value,
|
|
97
|
-
response._data.mandatory_files,
|
|
98
|
-
)
|
|
99
|
-
additional_files.value = [].concat(
|
|
100
|
-
additional_files.value,
|
|
101
|
-
response._data.additional_files,
|
|
102
|
-
)
|
|
103
|
-
resolve()
|
|
94
|
+
resolve(response._data)
|
|
104
95
|
},
|
|
105
96
|
response_error_function: () => {
|
|
106
97
|
reject()
|
|
@@ -110,7 +101,20 @@
|
|
|
110
101
|
})
|
|
111
102
|
promise_array.push(promise)
|
|
112
103
|
}
|
|
113
|
-
await Promise.all(promise_array)
|
|
104
|
+
const values = await Promise.all(promise_array)
|
|
105
|
+
for (const value of values) {
|
|
106
|
+
has_missing_files.value = value.has_missing_files
|
|
107
|
+
? true
|
|
108
|
+
: has_missing_files.value
|
|
109
|
+
mandatory_files.value = [].concat(
|
|
110
|
+
mandatory_files.value,
|
|
111
|
+
value.mandatory_files,
|
|
112
|
+
)
|
|
113
|
+
additional_files.value = [].concat(
|
|
114
|
+
additional_files.value,
|
|
115
|
+
value.additional_files,
|
|
116
|
+
)
|
|
117
|
+
}
|
|
114
118
|
if (!has_missing_files.value) {
|
|
115
119
|
emit("increment_step")
|
|
116
120
|
} else {
|
|
@@ -122,7 +126,5 @@
|
|
|
122
126
|
toggle_loading()
|
|
123
127
|
}
|
|
124
128
|
|
|
125
|
-
|
|
126
|
-
missing_files()
|
|
127
|
-
})
|
|
129
|
+
await missing_files()
|
|
128
130
|
</script>
|