diff --git a/apps/admin/app/dashboard/server/node-table.tsx b/apps/admin/app/dashboard/server/node-table.tsx
index bcd8f74..1fad62d 100644
--- a/apps/admin/app/dashboard/server/node-table.tsx
+++ b/apps/admin/app/dashboard/server/node-table.tsx
@@ -107,6 +107,25 @@ export default function NodeTable() {
);
},
},
+
+ {
+ accessorKey: 'last',
+ header: t('status'),
+ cell: ({ row }) => {
+ const { last } = row.original;
+
+ return last ? (
+ <>
+ {t('normal')}
+
+ {t('onlineCount')}: {last.count}
+
+ >
+ ) : (
+ {t('abnormal')}
+ );
+ },
+ },
{
accessorKey: 'name',
header: t('name'),
diff --git a/apps/admin/locales/en-US/server.json b/apps/admin/locales/en-US/server.json
index 7556461..fec1052 100644
--- a/apps/admin/locales/en-US/server.json
+++ b/apps/admin/locales/en-US/server.json
@@ -24,6 +24,7 @@
"updatedAt": "Updated At"
},
"node": {
+ "abnormal": "Abnormal",
"actions": "Actions",
"address": "Address",
"all": "All",
@@ -94,6 +95,8 @@
"name": "Name",
"node": "Node",
"nodeGroup": "Node Group",
+ "normal": "Normal",
+ "onlineCount": "Online users",
"rate": "Rate",
"relay": "Relay",
"serverAddr": "Server IP",
diff --git a/apps/admin/locales/zh-CN/server.json b/apps/admin/locales/zh-CN/server.json
index 367f93b..4fb7997 100644
--- a/apps/admin/locales/zh-CN/server.json
+++ b/apps/admin/locales/zh-CN/server.json
@@ -24,6 +24,7 @@
"updatedAt": "更新时间"
},
"node": {
+ "abnormal": "异常",
"actions": "操作",
"address": "地址",
"all": "全部",
@@ -94,6 +95,8 @@
"name": "名称",
"node": "节点",
"nodeGroup": "节点组",
+ "normal": "正常",
+ "onlineCount": "在线人数",
"rate": "速率",
"relay": "中继",
"serverAddr": "服务器IP",
diff --git a/apps/admin/services/admin/typings.d.ts b/apps/admin/services/admin/typings.d.ts
index 13d05a1..df17607 100644
--- a/apps/admin/services/admin/typings.d.ts
+++ b/apps/admin/services/admin/typings.d.ts
@@ -555,6 +555,11 @@ declare namespace API {
enable: boolean;
};
+ type Push = {
+ push_at: number;
+ count: number;
+ };
+
type Response = {
/** 状态码 */
code?: number;
@@ -579,6 +584,7 @@ declare namespace API {
shadowsocks?: Shadowsocks;
created_at: number;
updated_at: number;
+ last: Push;
};
type ServerGroup = {
diff --git a/apps/admin/services/common/common.ts b/apps/admin/services/common/common.ts
index e836b7a..e138af7 100644
--- a/apps/admin/services/common/common.ts
+++ b/apps/admin/services/common/common.ts
@@ -21,3 +21,11 @@ export async function getGlobalConfig(options?: { [key: string]: any }) {
...(options || {}),
});
}
+
+/** Get Tos Content GET /v1/common/site/tos */
+export async function getTos(options?: { [key: string]: any }) {
+ return request('/v1/common/site/tos', {
+ method: 'GET',
+ ...(options || {}),
+ });
+}
diff --git a/apps/admin/services/common/typings.d.ts b/apps/admin/services/common/typings.d.ts
index ed7bf4c..826480f 100644
--- a/apps/admin/services/common/typings.d.ts
+++ b/apps/admin/services/common/typings.d.ts
@@ -25,6 +25,10 @@ declare namespace API {
subscribe: SubscribeConfig;
};
+ type GetTosResponse = {
+ tos_content: string;
+ };
+
type InviteConfig = {
forced_invite: boolean;
};