From 276006b6578cccb2ed83a0e330ca1b5a5447a9df Mon Sep 17 00:00:00 2001 From: bwcx_jzy Date: Sat, 12 Feb 2022 15:32:30 +0800 Subject: [PATCH] fix --- .../io/jpom/common/BaseServerController.java | 8 +-- web-vue/src/pages/node/list.vue | 69 ++++++++++++++----- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/modules/server/src/main/java/io/jpom/common/BaseServerController.java b/modules/server/src/main/java/io/jpom/common/BaseServerController.java index 323437fb0..3058058df 100644 --- a/modules/server/src/main/java/io/jpom/common/BaseServerController.java +++ b/modules/server/src/main/java/io/jpom/common/BaseServerController.java @@ -104,7 +104,9 @@ public abstract class BaseServerController extends BaseJpomController { } protected UserModel getUser() { - return getUserByThreadLocal(); + UserModel userByThreadLocal = getUserByThreadLocal(); + Assert.notNull(userByThreadLocal, ServerConfigBean.AUTHORIZE_TIME_OUT_CODE + StrUtil.EMPTY); + return userByThreadLocal; } /** @@ -113,9 +115,7 @@ public abstract class BaseServerController extends BaseJpomController { * @return 用户 */ public static UserModel getUserByThreadLocal() { - UserModel userModel = USER_MODEL_THREAD_LOCAL.get(); - Assert.notNull(userModel, ServerConfigBean.AUTHORIZE_TIME_OUT_CODE + StrUtil.EMPTY); - return userModel; + return USER_MODEL_THREAD_LOCAL.get(); } public static void removeAll() { diff --git a/web-vue/src/pages/node/list.vue b/web-vue/src/pages/node/list.vue index c8c0d0680..ee5e284bc 100644 --- a/web-vue/src/pages/node/list.vue +++ b/web-vue/src/pages/node/list.vue @@ -6,6 +6,7 @@ :columns="columns" :data-source="list" bordered + size="middle" rowKey="id" @expand="expand" :pagination="this.listQuery.total / this.listQuery.limit > 1 ? (this, pagination) : false" @@ -45,29 +46,53 @@ - - - {{ text }} + + + + + {{ record.protocol }}://{{ text }} - + - + + + {{ text }} @@ -123,6 +159,7 @@ + @@ -388,9 +425,9 @@ export default { // { title: "节点 ID", dataIndex: "id", sorter: true, key: "id", ellipsis: true, scopedSlots: { customRender: "id" } }, { title: "节点名称", dataIndex: "name", sorter: true, key: "name", ellipsis: true, scopedSlots: { customRender: "name" } }, - { title: "节点协议", dataIndex: "protocol", sorter: true, key: "protocol", width: 100, ellipsis: true, scopedSlots: { customRender: "protocol" } }, + // { title: "节点协议", dataIndex: "protocol", sorter: true, key: "protocol", width: 100, ellipsis: true, scopedSlots: { customRender: "protocol" } }, { title: "节点地址", dataIndex: "url", sorter: true, key: "url", ellipsis: true, scopedSlots: { customRender: "url" } }, - { title: "账号", dataIndex: "loginName", sorter: true, key: "loginName", ellipsis: true, scopedSlots: { customRender: "loginName" } }, + { title: "账号", dataIndex: "loginName", sorter: true, width: 150, key: "loginName", ellipsis: true, scopedSlots: { customRender: "loginName" } }, // { title: "监控周期", dataIndex: "cycle", sorter: true, key: "cycle", ellipsis: true, scopedSlots: { customRender: "cycle" } }, { title: "超时时间", dataIndex: "timeOut", sorter: true, key: "timeOut", width: 100, ellipsis: true }, { @@ -403,7 +440,7 @@ export default { }, width: 170, }, - { title: "操作", dataIndex: "operation", key: "operation", width: 270, scopedSlots: { customRender: "operation" }, align: "left" }, + { title: "操作", dataIndex: "operation", key: "operation", width: 210, scopedSlots: { customRender: "operation" }, align: "center" }, ], childColumns: [ { title: "系统名", dataIndex: "osName", key: "osName", width: 100, ellipsis: true, scopedSlots: { customRender: "osName" } },