diff --git a/.gitignore b/.gitignore index 760e647..896fa78 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.so *.dylib __debug_bin +.swp /MirageServer # Test binary, built with `go test -c` @@ -16,6 +17,7 @@ __debug_bin # Dependency directories (remove the comment below to include it) # vendor/ +/dist/dist /output /.mirage /Mirage diff --git a/.gitmodules b/.gitmodules index 1736570..2cc46c7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "dex"] path = dex url = https://github.com/MirageNetwork/dex.git +[submodule "MirageClient"] + path = MirageClient + url = https://github.com/MirageNetwork/MirageClient.git + branch = main diff --git a/MirageClient b/MirageClient new file mode 160000 index 0000000..ae9f955 --- /dev/null +++ b/MirageClient @@ -0,0 +1 @@ +Subproject commit ae9f95586f6c88f0149e42bf47c27c9f7eb87adc diff --git a/cockpit_web/package-lock.json b/cockpit_web/package-lock.json index 5033974..cf931ed 100644 --- a/cockpit_web/package-lock.json +++ b/cockpit_web/package-lock.json @@ -1,11 +1,11 @@ { - "name": "newadmin", + "name": "cockpit", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "newadmin", + "name": "cockpit", "version": "0.0.0", "dependencies": { "element-plus": "^2.3.1", diff --git a/cockpit_web/src/App.vue b/cockpit_web/src/App.vue index cd5234f..dfd21a7 100644 --- a/cockpit_web/src/App.vue +++ b/cockpit_web/src/App.vue @@ -37,6 +37,7 @@ const currentRoute = computed(() => { if (curPath.substring(0, 5) == "/navi") return "navi"; }); +const controllerVersion = ref("未知版本"); const serviceSwitch = ref(null); const serviceState = ref("stopped"); const serviceStateStr = { @@ -98,7 +99,10 @@ function getServiceState() { axios .get("/cockpit/api/service/state") .then((res) => { - serviceState.value = res.data["data"] ? "running" : "stopped"; + if (res.data["status"] == "success") { + controllerVersion.value = res.data["data"]["ctrlver"]; + serviceState.value = res.data["data"]["isRunning"] ? "running" : "stopped"; + } }) .catch((err) => { toastMsg.value = err; @@ -228,8 +232,9 @@ function doLogout() {
- diff --git a/console_web/src/Console.vue b/console_web/src/Console.vue index 3801093..af8b435 100644 --- a/console_web/src/Console.vue +++ b/console_web/src/Console.vue @@ -44,6 +44,7 @@ const currentRoute = computed(() => { }); //数据填充控制部分 +const ControllerVersion = ref("未知版本"); const SelfAccount = ref(""); const Basedomain = ref(""); const SelfName = ref(""); @@ -58,6 +59,7 @@ function getSelf() { .then(function (response) { // 处理成功情况 if (response.data["status"] == "success") { + ControllerVersion.value = response.data["data"]["ctrlver"]; SelfAccount.value = response.data["data"]["useraccount"]; Basedomain.value = response.data["data"]["basedomain"]; SelfName.value = response.data["data"]["username"]; @@ -166,6 +168,9 @@ onMounted(() => {