Skip to content

Commit 3c0b5ea

Browse files
test integration CI
1 parent 1169eaf commit 3c0b5ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+281
-193
lines changed

app/components/InfraConnected.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
</template>
44

55
<script setup>
6+
import { useInfraStore } from "@ogw_front/stores/infra"
67
const infraStore = useInfraStore()
8+
console.log("TEST", { infraStore })
79
</script>

app/components/Launcher.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<v-container class="justify">
33
<v-row align-content="center" align="center">
44
<v-col
5-
v-if="!infra_store.is_captcha_validated"
5+
v-if="!infraStore.is_captcha_validated"
66
class="align"
77
cols="12"
88
align-self="center"
99
style="z-index: 1000"
1010
>
1111
<Recaptcha :color="'secondary'" />
1212
</v-col>
13-
<v-col v-else-if="infra_store.status == Status.CREATING">
13+
<v-col v-else-if="infraStore.status == Status.CREATING">
1414
<Loading />
1515
</v-col>
1616
</v-row>
@@ -21,14 +21,15 @@
2121
import Status from "@ogw_front/utils/status.js"
2222
import Loading from "@ogw_front/components/Loading.vue"
2323
import Recaptcha from "@ogw_front/components/Recaptcha.vue"
24+
import { useInfraStore } from "@ogw_front/stores/infra"
2425
25-
const infra_store = useInfraStore()
26+
const infraStore = useInfraStore()
2627
2728
watch(
28-
() => infra_store.is_captcha_validated,
29+
() => infraStore.is_captcha_validated,
2930
(value, oldValue) => {
3031
if (value && !oldValue && import.meta.client) {
31-
infra_store.create_backend()
32+
infraStore.create_backend()
3233
}
3334
},
3435
)

app/components/Recaptcha.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
<script setup>
4242
import { appMode } from "@ogw_front/utils/app_mode.js"
43+
import { useInfraStore } from "@ogw_front/stores/infra"
4344
4445
const props = defineProps({
4546
button_label: {
@@ -53,7 +54,7 @@
5354
default: "white",
5455
},
5556
})
56-
const infra_store = useInfraStore()
57+
const infraStore = useInfraStore()
5758
const name = ref("")
5859
const email = ref("")
5960
const launch = ref(false)
@@ -76,9 +77,9 @@
7677
if (import.meta.client) {
7778
if (
7879
process.env.NODE_ENV !== "production" ||
79-
infra_store.app_mode !== appMode.CLOUD
80+
infraStore.app_mode !== appMode.CLOUD
8081
) {
81-
infra_store.$patch({ is_captcha_validated: true })
82+
infraStore.$patch({ is_captcha_validated: true })
8283
}
8384
}
8485
})
@@ -91,7 +92,7 @@
9192
launch: launch.value,
9293
},
9394
})
94-
infra_store.$patch({
95+
infraStore.$patch({
9596
is_captcha_validated: response.status === 200,
9697
})
9798
}

app/components/Wrapper.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<v-container>
33
<v-row class="flex-column">
4-
<template v-if="!infra_store.microservices_connected">
4+
<template v-if="!infraStore.microservices_connected">
55
<v-col>
66
<Launcher />
77
</v-col>
@@ -23,7 +23,9 @@
2323
import PackagesVersions from "@ogw_front/components/PackagesVersions.vue"
2424
import Stepper from "@ogw_front/components/Stepper.vue"
2525
26-
const infra_store = useInfraStore()
26+
import { useInfraStore } from "@ogw_front/stores/infra"
27+
28+
const infraStore = useInfraStore()
2729
2830
const props = defineProps({
2931
versions_schema: { type: Object, required: true },

app/composables/run_function_when_microservices_connected.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { useInfraStore } from "@ogw_front/stores/infra"
12
export function run_function_when_microservices_connected(function_to_run) {
2-
const infra_store = useInfraStore()
3-
const { microservices_connected } = storeToRefs(infra_store)
3+
const infraStore = useInfraStore()
4+
const { microservices_connected } = storeToRefs(infraStore)
45
if (microservices_connected.value) {
56
function_to_run()
67
} else {

app/plugins/auto_store_register.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ const autoStoreRegister = ({ store }) => {
1111
}
1212

1313
export default defineNuxtPlugin((nuxtApp) => {
14-
nuxtApp.$pinia.use(autoStoreRegister)
14+
const { $pinia } = nuxtApp
15+
if (!$pinia) {
16+
console.warn("Pinia instance not available.")
17+
return
18+
}
19+
20+
$pinia.use(autoStoreRegister)
1521
console.log(
1622
"[AUTOREGISTER PLUGIN] Loaded automatically from OpenGeodeWeb-Front",
1723
)

app/stores/geode.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.jso
22
import Status from "@ogw_front/utils/status.js"
33
import { appMode } from "@ogw_front/utils/app_mode.js"
44
import { api_fetch } from "../../internal/utils/api_fetch.js"
5+
import { useInfraStore } from "@ogw_front/stores/infra"
56

67
export const useGeodeStore = defineStore("geode", {
78
state: () => ({
@@ -27,13 +28,13 @@ export const useGeodeStore = defineStore("geode", {
2728
return this.default_local_port
2829
},
2930
base_url() {
30-
const infra_store = useInfraStore()
31-
let geode_url = `${this.protocol}://${infra_store.domain_name}:${this.port}`
32-
if (infra_store.app_mode == appMode.CLOUD) {
33-
if (infra_store.ID == "") {
31+
const infraStore = useInfraStore()
32+
let geode_url = `${this.protocol}://${infraStore.domain_name}:${this.port}`
33+
if (infraStore.app_mode == appMode.CLOUD) {
34+
if (infraStore.ID == "") {
3435
throw new Error("ID must not be empty in cloud mode")
3536
}
36-
geode_url += `/${infra_store.ID}/geode`
37+
geode_url += `/${infraStore.ID}/geode`
3738
}
3839
return geode_url
3940
},

app/stores/infra.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Status from "@ogw_front/utils/status.js"
22
import { appMode, getAppMode } from "@ogw_front/utils/app_mode.js"
3+
import { useInfraStore } from "@ogw_front/stores/infra"
34

45
export const useInfraStore = defineStore("infra", {
56
state: () => ({

app/stores/viewer.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json
55
import Status from "@ogw_front/utils/status.js"
66
import { appMode } from "@ogw_front/utils/app_mode.js"
77
import { viewer_call } from "../../internal/utils/viewer_call.js"
8+
import { useInfraStore } from "@ogw_front/stores/infra"
89

910
export const useViewerStore = defineStore("viewer", {
1011
state: () => ({
@@ -35,13 +36,13 @@ export const useViewerStore = defineStore("viewer", {
3536
return this.default_local_port
3637
},
3738
base_url() {
38-
const infra_store = useInfraStore()
39-
let viewer_url = `${this.protocol}://${infra_store.domain_name}:${this.port}`
40-
if (infra_store.app_mode == appMode.CLOUD) {
41-
if (infra_store.ID == "") {
39+
const infraStore = useInfraStore()
40+
let viewer_url = `${this.protocol}://${infraStore.domain_name}:${this.port}`
41+
if (infraStore.app_mode == appMode.CLOUD) {
42+
if (infraStore.ID == "") {
4243
throw new Error("ID must not be empty in cloud mode")
4344
}
44-
viewer_url += `/${infra_store.ID}/viewer`
45+
viewer_url += `/${infraStore.ID}/viewer`
4546
}
4647
viewer_url += "/ws"
4748
return viewer_url
@@ -106,8 +107,9 @@ export const useViewerStore = defineStore("viewer", {
106107
})
107108

108109
// Connect
109-
const { connectImageStream } =
110-
await import("@kitware/vtk.js/Rendering/Misc/RemoteView")
110+
const { connectImageStream } = await import(
111+
"@kitware/vtk.js/Rendering/Misc/RemoteView"
112+
)
111113
const viewerStore = this
112114
return new Promise((resolve, reject) => {
113115
clientToConnect

internal/stores/mesh/cells.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// Third party imports
22
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
33

4+
import { useDataStyleStore } from "../data.js"
5+
import { useViewerStore } from "../viewer.js"
6+
47
// Local constants
58
const mesh_cells_schemas = viewer_schemas.opengeodeweb_viewer.mesh.cells
69
export function useMeshCellsStyle() {
710
const dataStyleStore = useDataStyleStore()
11+
const viewerStore = useViewerStore()
812

913
function meshCellsStyle(id) {
1014
return dataStyleStore.getStyle(id).cells
@@ -15,7 +19,6 @@ export function useMeshCellsStyle() {
1519
}
1620
function setMeshCellsVisibility(id, visibility) {
1721
const cells_style = meshCellsStyle(id)
18-
const viewerStore = useViewerStore()
1922
return viewerStore.request(
2023
mesh_cells_schemas.visibility,
2124
{ id, visibility },
@@ -37,7 +40,6 @@ export function useMeshCellsStyle() {
3740
}
3841
function setMeshCellsColor(id, color) {
3942
const coloring_style = meshCellsStyle(id).coloring
40-
const viewerStore = useViewerStore()
4143
return viewerStore.request(
4244
mesh_cells_schemas.color,
4345
{ id, color },
@@ -59,7 +61,6 @@ export function useMeshCellsStyle() {
5961
}
6062
function setMeshCellsTextures(id, textures) {
6163
const coloring_style = meshCellsStyle(id).coloring
62-
const viewerStore = useViewerStore()
6364
return viewerStore.request(
6465
mesh_cells_schemas.apply_textures,
6566
{ id, textures },
@@ -78,7 +79,6 @@ export function useMeshCellsStyle() {
7879

7980
function setMeshCellsVertexAttribute(id, vertex_attribute) {
8081
const coloring_style = meshCellsStyle(id).coloring
81-
const viewerStore = useViewerStore()
8282
return viewerStore.request(
8383
mesh_cells_schemas.vertex_attribute,
8484
{ id, ...vertex_attribute },
@@ -100,7 +100,6 @@ export function useMeshCellsStyle() {
100100
}
101101
function setMeshCellsCellAttribute(id, cell_attribute) {
102102
const coloring_style = meshCellsStyle(id).coloring
103-
const viewerStore = useViewerStore()
104103
return viewerStore.request(
105104
mesh_cells_schemas.cell_attribute,
106105
{ id, ...cell_attribute },

0 commit comments

Comments
 (0)