Community Interfaces
@@ -346,15 +346,13 @@ import Utils from "../../js/Utils";
export default {
name: 'InterfacesPage',
- props: {
- config: Object,
- },
data() {
return {
tab: "interfaces",
isEditingInterface: false,
+ config: null,
interfaces: {},
interfaceStats: {},
@@ -413,6 +411,7 @@ export default {
},
mounted() {
+ this.getConfig();
this.loadInterfaces();
this.updateInterfaceStats();
this.loadComports();
@@ -432,6 +431,15 @@ export default {
onIFACSignatureClick: function(ifacSignature) {
DialogUtils.alert(ifacSignature);
},
+ async getConfig() {
+ try {
+ const response = await window.axios.get(`/api/v1/config`);
+ this.config = response.data.config;
+ } catch(e) {
+ // do nothing if failed to load config
+ console.log(e);
+ }
+ },
async loadInterfaces() {
try {
diff --git a/src/frontend/main.js b/src/frontend/main.js
index d5a70f5..a2dbfa7 100644
--- a/src/frontend/main.js
+++ b/src/frontend/main.js
@@ -5,6 +5,7 @@ import App from './components/App.vue';
import AboutPage from "./components/about/AboutPage.vue";
import SettingsPage from "./components/settings/SettingsPage.vue";
import NetworkVisualiserPage from "./components/network/NetworkVisualiserPage.vue";
+import InterfacesPage from "./components/interfaces/InterfacesPage.vue";
const router = createRouter({
history: createWebHashHistory(),
@@ -12,6 +13,7 @@ const router = createRouter({
{ path: '/' },
{ path: '/about', name: "about", component: AboutPage },
{ path: '/settings', name: "settings", component: SettingsPage },
+ { path: '/interfaces', name: "interfaces", component: InterfacesPage },
{ path: '/network-visualiser', name: "network-visualiser", component: NetworkVisualiserPage },
],
})