- {{ notice.level || 'info' }}
+ {{ notice.level
+ || 'info' }}
{{ notice.title }}
{{ notice.content }}
diff --git a/web/src/layouts/MainLayout.vue b/web/src/layouts/MainLayout.vue
index 4839326..dea567b 100644
--- a/web/src/layouts/MainLayout.vue
+++ b/web/src/layouts/MainLayout.vue
@@ -62,7 +62,7 @@ const navItems = [
{ to: '/languages', icon: Globe, label: '语言依赖', exact: true },
{ to: '/terminal', icon: Terminal, label: '终端命令', exact: true },
{ to: '/notify', icon: Bell, label: '消息推送', exact: true },
- { to: '/loginlogs', icon: KeyRound, label: '登录日志', exact: true },
+ { to: '/logs', icon: KeyRound, label: '消息日志', exact: true },
{ to: '/settings', icon: Settings, label: '系统设置', exact: true },
]
diff --git a/web/src/router/index.ts b/web/src/router/index.ts
index d41ae04..2a4a195 100644
--- a/web/src/router/index.ts
+++ b/web/src/router/index.ts
@@ -45,7 +45,7 @@ const router = createRouter({
{ path: 'languages', name: 'languages', component: () => import('@/views/languages/Languages.vue') },
{ path: 'agents', name: 'agents', component: () => import('@/views/agents/Agents.vue') },
{ path: 'history', name: 'history', component: () => import('@/views/history/History.vue') },
- { path: 'loginlogs', name: 'loginlogs', component: () => import('@/views/loginlogs/LoginLogs.vue') },
+ { path: 'logs', name: 'logs', component: () => import('@/views/loginlogs/LoginLogs.vue') },
{ path: 'terminal', name: 'terminal', component: () => import('@/views/terminal/Terminal.vue') },
{ path: 'notify', name: 'notify', component: () => import('@/views/notify/Notify.vue') },
{ path: 'settings', name: 'settings', component: () => import('@/views/settings/Settings.vue') }
diff --git a/web/src/views/loginlogs/LoginLogs.vue b/web/src/views/loginlogs/LoginLogs.vue
index e3da2a2..700017a 100644
--- a/web/src/views/loginlogs/LoginLogs.vue
+++ b/web/src/views/loginlogs/LoginLogs.vue
@@ -1,194 +1,42 @@
-
-
-
-
-
-
+
+
+
+
消息日志
+
+ {{ activeTab === 'system' ? '查看系统重要运行事件' :
+ activeTab === 'push' ? '查看消息推送历史记录' : '查看系统用户登录记录' }}
+
-
+
+ 系统事件
+ 推送日志
+ 登录日志
+
-
-
-
-
- 用户名
- IP 地址
- 状态
- User Agent
- 时间
-
-
-
-
- 暂无登录日志
-
-
- {{ log.username }}
- {{ log.ip }}
-
-
-
-
-
-
- {{ log.created_at }}
-
-
-
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
diff --git a/web/src/views/loginlogs/tabs/LoginLogTab.vue b/web/src/views/loginlogs/tabs/LoginLogTab.vue
new file mode 100644
index 0000000..3f7b8cc
--- /dev/null
+++ b/web/src/views/loginlogs/tabs/LoginLogTab.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+ 用户名
+ IP 地址
+ 状态
+ User Agent
+ 时间
+
+
+
+
+ 暂无登录日志
+
+
+ {{ log.username
+ }}
+ {{ log.ip }}
+
+
+
+
+
+
+ {{ log.created_at
+ }}
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/views/loginlogs/tabs/SystemEventTab.vue b/web/src/views/loginlogs/tabs/SystemEventTab.vue
new file mode 100644
index 0000000..fdccb64
--- /dev/null
+++ b/web/src/views/loginlogs/tabs/SystemEventTab.vue
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 级别
+ 事件标题
+ 详情内容
+ 发生时间
+
+
+
+
+ 暂无系统事件
+
+
+
+
+
+ {{
+ log.title }}
+
+ {{ log.content || '-' }}
+
+
+ {{ formatDate(log.created_at) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/views/notify/Notify.vue b/web/src/views/notify/Notify.vue
index fab21c1..9255330 100644
--- a/web/src/views/notify/Notify.vue
+++ b/web/src/views/notify/Notify.vue
@@ -17,7 +17,6 @@ import ChannelList from './components/ChannelList.vue'
import EventBinding from './components/EventBinding.vue'
import ApiUsage from './components/ApiUsage.vue'
import ChannelDialog from './components/ChannelDialog.vue'
-import PushLog from './components/PushLog.vue'
const activeTab = ref('channels')
@@ -323,11 +322,10 @@ onMounted(() => {
消息推送
配置通知渠道,绑定系统事件实现自动推送
-
- 渠道管理
- 事件绑定
- 推送日志
- 脚本调用
+
+ 渠道管理
+ 事件绑定
+ 脚本调用
@@ -349,10 +347,7 @@ onMounted(() => {
@generate-token="generateApiToken" @copy-token="copyApiToken" @copy-example="copyApiExample" />
-
-
-
-
+
diff --git a/web/src/views/notify/components/PushLog.vue b/web/src/views/notify/components/PushLog.vue
index 2b5a79a..e36d59f 100644
--- a/web/src/views/notify/components/PushLog.vue
+++ b/web/src/views/notify/components/PushLog.vue
@@ -167,7 +167,8 @@ function onDialogClose(open: boolean) {