diff --git a/web/.eslintrc.js b/web/.eslintrc.js index 4e84b1f..8f105df 100644 --- a/web/.eslintrc.js +++ b/web/.eslintrc.js @@ -9,7 +9,7 @@ module.exports = { parser: 'vue-eslint-parser', parserOptions: { // parser: 'babel-eslint', - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { 'jsx': true diff --git a/web/src/store/index.js b/web/src/store/index.js index 84fb1e4..7000824 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -29,13 +29,24 @@ const useStore = defineStore({ sessionStorage.clear('token') this.$patch({ token: null }) }, - async getHostList() { + async getMainData() { const { data: groupList } = await $api.getGroupList() const { data: hostList } = await $api.getHostList() + // const { data: sshList } = await $api.getSshList() // console.log('hostList:', hostList) // console.log('groupList:', groupList) this.$patch({ hostList, groupList }) }, + async getHostList() { + const { data: hostList } = await $api.getHostList() + // console.log('hostList:', hostList) + this.$patch({ hostList }) + }, + async getGroupList() { + const { data: groupList } = await $api.getGroupList() + // console.log('groupList:', groupList) + this.$patch({ groupList }) + }, getHostPing() { setTimeout(() => { this.hostList.forEach((item) => { diff --git a/web/src/views/group/index.vue b/web/src/views/group/index.vue index 4ecf255..cb93a86 100644 --- a/web/src/views/group/index.vue +++ b/web/src/views/group/index.vue @@ -122,13 +122,12 @@ + + \ No newline at end of file diff --git a/web/src/views/terminal/index.vue b/web/src/views/terminal/index.vue index 6c13026..123be66 100644 --- a/web/src/views/terminal/index.vue +++ b/web/src/views/terminal/index.vue @@ -1,264 +1,53 @@ - - \ No newline at end of file