@geode/opengeodeweb-front 6.2.1-rc.1 → 6.3.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/.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 +1 -3
- package/components/ExtensionSelector.vue +76 -75
- package/components/FileSelector.vue +2 -3
- package/components/FileUploader.vue +2 -3
- package/components/MissingFilesSelector.vue +19 -19
- package/components/ObjectSelector.vue +21 -17
- package/components/PackagesVersions.vue +24 -23
- package/components/Wrapper.vue +1 -8
- package/composables/api_fetch.js +2 -7
- package/composables/runFunctionIfCloudRunning.js +1 -2
- package/composables/upload_file.js +4 -1
- package/nuxt.config.js +29 -1
- package/package.json +29 -13
- package/stores/cloud.js +19 -8
- package/stores/geode.js +7 -5
- package/test/components/CrsSelector.nuxt.test.js +51 -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 +51 -0
- package/test/components/FileSelector.nuxt.test.js +58 -0
- package/test/components/FileUploader.nuxt.test.js +42 -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 +50 -0
- package/test/components/PackagesVersions.nuxt.test.js +47 -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 +119 -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/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>
|
|
@@ -1,60 +1,64 @@
|
|
|
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 _ from "lodash"
|
|
58
62
|
import schema from "@/assets/schemas/ExtensionSelector.json"
|
|
59
63
|
|
|
60
64
|
const emit = defineEmits([
|
|
@@ -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>
|
|
@@ -18,13 +18,12 @@
|
|
|
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>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<v-col cols="12">
|
|
28
28
|
<FileUploader
|
|
29
29
|
v-bind="{ multiple, accept, route }"
|
|
30
|
-
@files_uploaded="
|
|
30
|
+
@files_uploaded="files_uploaded_event"
|
|
31
31
|
/>
|
|
32
32
|
</v-col>
|
|
33
33
|
</v-row>
|
|
@@ -36,7 +36,7 @@
|
|
|
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>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
const additional_files = ref([])
|
|
68
68
|
const toggle_loading = useToggle(loading)
|
|
69
69
|
|
|
70
|
-
function
|
|
70
|
+
function files_uploaded_event(value) {
|
|
71
71
|
emit("update_values", { additional_files: value })
|
|
72
72
|
missing_files()
|
|
73
73
|
}
|
|
@@ -89,18 +89,7 @@
|
|
|
89
89
|
reject()
|
|
90
90
|
},
|
|
91
91
|
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()
|
|
92
|
+
resolve(response._data)
|
|
104
93
|
},
|
|
105
94
|
response_error_function: () => {
|
|
106
95
|
reject()
|
|
@@ -110,7 +99,20 @@
|
|
|
110
99
|
})
|
|
111
100
|
promise_array.push(promise)
|
|
112
101
|
}
|
|
113
|
-
await Promise.all(promise_array)
|
|
102
|
+
const values = await Promise.all(promise_array)
|
|
103
|
+
for (const value of values) {
|
|
104
|
+
has_missing_files.value = value.has_missing_files
|
|
105
|
+
? true
|
|
106
|
+
: has_missing_files.value
|
|
107
|
+
mandatory_files.value = [].concat(
|
|
108
|
+
mandatory_files.value,
|
|
109
|
+
value.mandatory_files,
|
|
110
|
+
)
|
|
111
|
+
additional_files.value = [].concat(
|
|
112
|
+
additional_files.value,
|
|
113
|
+
value.additional_files,
|
|
114
|
+
)
|
|
115
|
+
}
|
|
114
116
|
if (!has_missing_files.value) {
|
|
115
117
|
emit("increment_step")
|
|
116
118
|
} else {
|
|
@@ -122,7 +124,5 @@
|
|
|
122
124
|
toggle_loading()
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
|
|
126
|
-
missing_files()
|
|
127
|
-
})
|
|
127
|
+
await missing_files()
|
|
128
128
|
</script>
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
<v-row v-else-if="Object.keys(allowed_objects).length" class="justify-left">
|
|
4
4
|
<v-col v-for="(value, key) in allowed_objects" :key="key" cols="2" md="2">
|
|
5
5
|
<v-tooltip
|
|
6
|
-
:disabled="value.is_saveable"
|
|
7
6
|
:text="
|
|
8
7
|
value['is_loadable']
|
|
9
8
|
? geode_objects[key].tooltip
|
|
@@ -18,13 +17,13 @@
|
|
|
18
17
|
class="card ma-2"
|
|
19
18
|
hover
|
|
20
19
|
rounded
|
|
20
|
+
@click="set_geode_object(key)"
|
|
21
21
|
:disabled="!value['is_loadable']"
|
|
22
22
|
:elevation="value['is_loadable'] ? 5 : 3"
|
|
23
23
|
>
|
|
24
24
|
<v-img
|
|
25
25
|
:src="geode_objects[key].image"
|
|
26
26
|
cover
|
|
27
|
-
@click="set_geode_object(key)"
|
|
28
27
|
:class="!value['is_loadable'] ? 'disabled' : ''"
|
|
29
28
|
/>
|
|
30
29
|
</v-card>
|
|
@@ -50,7 +49,6 @@
|
|
|
50
49
|
</template>
|
|
51
50
|
|
|
52
51
|
<script setup>
|
|
53
|
-
import { toRaw } from "vue"
|
|
54
52
|
import geode_objects from "@/assets/geode_objects"
|
|
55
53
|
import schema from "@/assets/schemas/ObjectSelector.json"
|
|
56
54
|
|
|
@@ -60,7 +58,6 @@
|
|
|
60
58
|
filenames: { type: Array, required: true },
|
|
61
59
|
key: { type: String, required: false, default: null },
|
|
62
60
|
})
|
|
63
|
-
|
|
64
61
|
const { filenames, key } = props
|
|
65
62
|
|
|
66
63
|
const loading = ref(false)
|
|
@@ -69,7 +66,7 @@
|
|
|
69
66
|
|
|
70
67
|
async function get_allowed_objects() {
|
|
71
68
|
toggle_loading()
|
|
72
|
-
allowed_objects.value =
|
|
69
|
+
allowed_objects.value = {}
|
|
73
70
|
var promise_array = []
|
|
74
71
|
for (const filename of filenames) {
|
|
75
72
|
const params = { filename, key }
|
|
@@ -81,14 +78,7 @@
|
|
|
81
78
|
reject()
|
|
82
79
|
},
|
|
83
80
|
response_function: (response) => {
|
|
84
|
-
|
|
85
|
-
allowed_objects.value = response._data.allowed_objects
|
|
86
|
-
} else {
|
|
87
|
-
allowed_objects.value = toRaw(allowed_objects.value).filter(
|
|
88
|
-
(value) => response._data.allowed_objects.includes(value),
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
resolve()
|
|
81
|
+
resolve(response._data.allowed_objects)
|
|
92
82
|
},
|
|
93
83
|
response_error_function: () => {
|
|
94
84
|
reject()
|
|
@@ -98,7 +88,23 @@
|
|
|
98
88
|
})
|
|
99
89
|
promise_array.push(promise)
|
|
100
90
|
}
|
|
101
|
-
await Promise.all(promise_array)
|
|
91
|
+
const values = await Promise.all(promise_array)
|
|
92
|
+
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))]
|
|
93
|
+
const common_keys = all_keys.filter(
|
|
94
|
+
(i) => !values.some((j) => !Object.keys(j).includes(i)),
|
|
95
|
+
)
|
|
96
|
+
var final_object = {}
|
|
97
|
+
for (const key of common_keys) {
|
|
98
|
+
for (const value of values) {
|
|
99
|
+
if (value[key].is_loadable == false) {
|
|
100
|
+
final_object[key] = { is_loadable: false }
|
|
101
|
+
} else {
|
|
102
|
+
final_object[key] = { is_loadable: true }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
allowed_objects.value = final_object
|
|
102
108
|
toggle_loading()
|
|
103
109
|
}
|
|
104
110
|
|
|
@@ -109,9 +115,7 @@
|
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
get_allowed_objects()
|
|
114
|
-
})
|
|
118
|
+
await get_allowed_objects()
|
|
115
119
|
</script>
|
|
116
120
|
|
|
117
121
|
<style scoped>
|
|
@@ -29,32 +29,33 @@
|
|
|
29
29
|
|
|
30
30
|
const packages_versions = ref([])
|
|
31
31
|
|
|
32
|
-
function get_packages_versions() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
async function get_packages_versions() {
|
|
33
|
+
const array_promise = []
|
|
34
|
+
|
|
35
|
+
const promise = new Promise((resolve, reject) => {
|
|
36
|
+
api_fetch(
|
|
37
|
+
{ schema },
|
|
38
|
+
{
|
|
39
|
+
request_error_function: () => {
|
|
40
|
+
reject()
|
|
41
|
+
},
|
|
42
|
+
response_function: (response) => {
|
|
43
|
+
packages_versions.value = response._data.versions
|
|
44
|
+
resolve()
|
|
45
|
+
},
|
|
46
|
+
response_error_function: () => {
|
|
47
|
+
reject()
|
|
48
|
+
},
|
|
38
49
|
},
|
|
39
|
-
|
|
40
|
-
)
|
|
50
|
+
)
|
|
51
|
+
})
|
|
52
|
+
array_promise.push(promise)
|
|
53
|
+
await Promise.all(array_promise)
|
|
41
54
|
}
|
|
42
55
|
|
|
43
|
-
watch(is_running, (
|
|
44
|
-
|
|
45
|
-
get_packages_versions()
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
onMounted(() => {
|
|
50
|
-
if (is_running.value) {
|
|
51
|
-
get_packages_versions()
|
|
52
|
-
}
|
|
56
|
+
watch(is_running, () => {
|
|
57
|
+
get_packages_versions()
|
|
53
58
|
})
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
if (is_running.value === true) {
|
|
57
|
-
get_packages_versions()
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
+
await get_packages_versions()
|
|
60
61
|
</script>
|