Skip to content

Commit

Permalink
fix: get cfm-service version in footer not dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Aug 22, 2024
1 parent 012ae65 commit b27c39d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions webui/src/components/Dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import { useData } from "./initial-data-elements";
import { useApplianceStore } from "../Stores/ApplianceStore";
import { useHostStore } from "../Stores/HostStore";
import { useBladeStore } from "../Stores/BladeStore";
import { useServiceStore } from "../Stores/ServiceStore";
import { useBladePortStore } from "../Stores/BladePortStore";
import { VueFlow } from "@vue-flow/core";
import { useRouter } from "vue-router";
Expand All @@ -73,7 +72,6 @@ export default {
const applianceStore = useApplianceStore();
const hostStore = useHostStore();
const bladeStore = useBladeStore();
const serviceStore = useServiceStore();
const bladePortStore = useBladePortStore();
const router = useRouter();
Expand Down Expand Up @@ -176,7 +174,6 @@ export default {
// Fetch appliances/blades/hosts when component is mounted
onMounted(async () => {
await serviceStore.getServiceVersion();
await applianceStore.fetchAppliances();
await hostStore.fetchHosts();
// Ensure blade ports are fetched after appliances, this action will create the edges for dataPlane
Expand Down
7 changes: 6 additions & 1 deletion webui/src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@
</template>

<script>
import { computed } from "vue";
import { computed, onMounted } from "vue";
import packageJson from "/package.json";
import { useServiceStore } from "./Stores/ServiceStore";
export default {
setup() {
const serviceStore = useServiceStore();
const serviceVersion = computed(() => serviceStore.serviceVersion);
const uiVersion = packageJson.version;
onMounted(() => {
serviceStore.getServiceVersion();
});
return {
serviceVersion,
uiVersion,
Expand Down

0 comments on commit b27c39d

Please sign in to comment.