Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cfm-service version in footer not dashboard #27

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading