diff --git a/object/record.go b/object/record.go index 8d40b16c..199a5b74 100644 --- a/object/record.go +++ b/object/record.go @@ -31,6 +31,7 @@ type Record struct { Organization string `xorm:"varchar(100)" json:"organization"` ClientIp string `xorm:"varchar(100)" json:"clientIp"` User string `xorm:"varchar(100)" json:"user"` + Method string `xorm:"varchar(100)" json:"method"` RequestUri string `xorm:"varchar(1000)" json:"requestUri"` Action string `xorm:"varchar(1000)" json:"action"` @@ -45,8 +46,9 @@ func NewRecord(ctx *context.Context) *Record { Name: util.GenerateId(), CreatedTime: util.GetCurrentTime(), ClientIp: ip, - RequestUri: ctx.Request.RequestURI, User: "", + Method: ctx.Request.Method, + RequestUri: ctx.Request.RequestURI, Action: action, IsTriggered: false, } diff --git a/web/src/RecordListPage.js b/web/src/RecordListPage.js index 12bdff17..61f246a0 100644 --- a/web/src/RecordListPage.js +++ b/web/src/RecordListPage.js @@ -129,6 +129,13 @@ class RecordListPage extends React.Component { ) } }, + { + title: i18next.t("general:Method"), + dataIndex: 'method', + key: 'method', + width: '100px', + sorter: (a, b) => a.method.localeCompare(b.method), + }, { title: i18next.t("general:Request URI"), dataIndex: 'requestUri', diff --git a/web/src/locales/de/data.json b/web/src/locales/de/data.json index c1c97f42..c8fe8583 100644 --- a/web/src/locales/de/data.json +++ b/web/src/locales/de/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "Avatar to show to others", "Back Home": "Back Home", "Captcha": "Captcha", - "Client ip": "Client ip", + "Client IP": "Client IP", "Created time": "Created time", "Default avatar": "Default avatar", "Default avatar - Tooltip": "default avatar", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "Unique string-style identifier", "Home": "Home", "Home - Tooltip": "Application homepage", + "ID": "ID", "ID - Tooltip": "random string", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs - Tooltip", "Logo - Tooltip": "App's image tag", + "Master password": "Master password", + "Master password - Tooltip": "Master password - Tooltip", + "Method": "Method", "Name": "Name", "Name - Tooltip": "Unique string-style identifier", "OAuth providers": "OAuth providers", @@ -106,7 +110,7 @@ "Providers": "Providers", "Providers - Tooltip": "List of third-party applications that can be used to log in", "Records": "Records", - "Request uri": "Request uri", + "Request URI": "Request URI", "Resources": "Resources", "Save": "Save", "Scope": "Scope", @@ -127,9 +131,9 @@ "User containers": "User containers", "User type": "User type", "User type - Tooltip": "Permission role owned by the user", - "Username": "Username", "Users": "Users", "Users under all organizations": "Users under all organizations", + "Webhooks": "Webhooks", "{total} in total": "{total} in total" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "Is Triggered" + }, "resource": { "Application": "Application", "Copy Link": "Copy Link", @@ -339,5 +346,14 @@ "Unlink": "Unlink", "Upload a photo": "Upload a photo", "input password": "input password" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type - Tooltip", + "Edit Webhook": "Edit Webhook", + "Events": "Events", + "Events - Tooltip": "Events - Tooltip", + "URL": "URL", + "URL - Tooltip": "URL - Tooltip" } } \ No newline at end of file diff --git a/web/src/locales/en/data.json b/web/src/locales/en/data.json index aa8a4542..ab49350b 100644 --- a/web/src/locales/en/data.json +++ b/web/src/locales/en/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "Avatar - Tooltip", "Back Home": "Back Home", "Captcha": "Captcha", - "Client ip": "Client ip", + "Client IP": "Client IP", "Created time": "Created time", "Default avatar": "Default avatar", "Default avatar - Tooltip": "Default avatar - Tooltip", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "Forget URL - Tooltip", "Home": "Home", "Home - Tooltip": "Home - Tooltip", + "ID": "ID", "ID - Tooltip": "ID - Tooltip", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs - Tooltip", "Logo - Tooltip": "Logo - Tooltip", + "Master password": "Master password", + "Master password - Tooltip": "Master password - Tooltip", + "Method": "Method", "Name": "Name", "Name - Tooltip": "Name - Tooltip", "OAuth providers": "OAuth providers", @@ -106,7 +110,7 @@ "Providers": "Providers", "Providers - Tooltip": "Providers - Tooltip", "Records": "Records", - "Request uri": "Request uri", + "Request URI": "Request URI", "Resources": "Resources", "Save": "Save", "Scope": "Scope", @@ -127,9 +131,9 @@ "User containers": "User containers", "User type": "User type", "User type - Tooltip": "User type - Tooltip", - "Username": "Username", "Users": "Users", "Users under all organizations": "Users under all organizations", + "Webhooks": "Webhooks", "{total} in total": "{total} in total" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "Is Triggered" + }, "resource": { "Application": "Application", "Copy Link": "Copy Link", @@ -339,5 +346,14 @@ "Unlink": "Unlink", "Upload a photo": "Upload a photo", "input password": "input password" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type - Tooltip", + "Edit Webhook": "Edit Webhook", + "Events": "Events", + "Events - Tooltip": "Events - Tooltip", + "URL": "URL", + "URL - Tooltip": "URL - Tooltip" } } \ No newline at end of file diff --git a/web/src/locales/fr/data.json b/web/src/locales/fr/data.json index c1c97f42..c8fe8583 100644 --- a/web/src/locales/fr/data.json +++ b/web/src/locales/fr/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "Avatar to show to others", "Back Home": "Back Home", "Captcha": "Captcha", - "Client ip": "Client ip", + "Client IP": "Client IP", "Created time": "Created time", "Default avatar": "Default avatar", "Default avatar - Tooltip": "default avatar", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "Unique string-style identifier", "Home": "Home", "Home - Tooltip": "Application homepage", + "ID": "ID", "ID - Tooltip": "random string", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs - Tooltip", "Logo - Tooltip": "App's image tag", + "Master password": "Master password", + "Master password - Tooltip": "Master password - Tooltip", + "Method": "Method", "Name": "Name", "Name - Tooltip": "Unique string-style identifier", "OAuth providers": "OAuth providers", @@ -106,7 +110,7 @@ "Providers": "Providers", "Providers - Tooltip": "List of third-party applications that can be used to log in", "Records": "Records", - "Request uri": "Request uri", + "Request URI": "Request URI", "Resources": "Resources", "Save": "Save", "Scope": "Scope", @@ -127,9 +131,9 @@ "User containers": "User containers", "User type": "User type", "User type - Tooltip": "Permission role owned by the user", - "Username": "Username", "Users": "Users", "Users under all organizations": "Users under all organizations", + "Webhooks": "Webhooks", "{total} in total": "{total} in total" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "Is Triggered" + }, "resource": { "Application": "Application", "Copy Link": "Copy Link", @@ -339,5 +346,14 @@ "Unlink": "Unlink", "Upload a photo": "Upload a photo", "input password": "input password" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type - Tooltip", + "Edit Webhook": "Edit Webhook", + "Events": "Events", + "Events - Tooltip": "Events - Tooltip", + "URL": "URL", + "URL - Tooltip": "URL - Tooltip" } } \ No newline at end of file diff --git a/web/src/locales/ja/data.json b/web/src/locales/ja/data.json index c1c97f42..c8fe8583 100644 --- a/web/src/locales/ja/data.json +++ b/web/src/locales/ja/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "Avatar to show to others", "Back Home": "Back Home", "Captcha": "Captcha", - "Client ip": "Client ip", + "Client IP": "Client IP", "Created time": "Created time", "Default avatar": "Default avatar", "Default avatar - Tooltip": "default avatar", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "Unique string-style identifier", "Home": "Home", "Home - Tooltip": "Application homepage", + "ID": "ID", "ID - Tooltip": "random string", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs - Tooltip", "Logo - Tooltip": "App's image tag", + "Master password": "Master password", + "Master password - Tooltip": "Master password - Tooltip", + "Method": "Method", "Name": "Name", "Name - Tooltip": "Unique string-style identifier", "OAuth providers": "OAuth providers", @@ -106,7 +110,7 @@ "Providers": "Providers", "Providers - Tooltip": "List of third-party applications that can be used to log in", "Records": "Records", - "Request uri": "Request uri", + "Request URI": "Request URI", "Resources": "Resources", "Save": "Save", "Scope": "Scope", @@ -127,9 +131,9 @@ "User containers": "User containers", "User type": "User type", "User type - Tooltip": "Permission role owned by the user", - "Username": "Username", "Users": "Users", "Users under all organizations": "Users under all organizations", + "Webhooks": "Webhooks", "{total} in total": "{total} in total" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "Is Triggered" + }, "resource": { "Application": "Application", "Copy Link": "Copy Link", @@ -339,5 +346,14 @@ "Unlink": "Unlink", "Upload a photo": "Upload a photo", "input password": "input password" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type - Tooltip", + "Edit Webhook": "Edit Webhook", + "Events": "Events", + "Events - Tooltip": "Events - Tooltip", + "URL": "URL", + "URL - Tooltip": "URL - Tooltip" } } \ No newline at end of file diff --git a/web/src/locales/ko/data.json b/web/src/locales/ko/data.json index c1c97f42..c8fe8583 100644 --- a/web/src/locales/ko/data.json +++ b/web/src/locales/ko/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "Avatar to show to others", "Back Home": "Back Home", "Captcha": "Captcha", - "Client ip": "Client ip", + "Client IP": "Client IP", "Created time": "Created time", "Default avatar": "Default avatar", "Default avatar - Tooltip": "default avatar", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "Unique string-style identifier", "Home": "Home", "Home - Tooltip": "Application homepage", + "ID": "ID", "ID - Tooltip": "random string", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs - Tooltip", "Logo - Tooltip": "App's image tag", + "Master password": "Master password", + "Master password - Tooltip": "Master password - Tooltip", + "Method": "Method", "Name": "Name", "Name - Tooltip": "Unique string-style identifier", "OAuth providers": "OAuth providers", @@ -106,7 +110,7 @@ "Providers": "Providers", "Providers - Tooltip": "List of third-party applications that can be used to log in", "Records": "Records", - "Request uri": "Request uri", + "Request URI": "Request URI", "Resources": "Resources", "Save": "Save", "Scope": "Scope", @@ -127,9 +131,9 @@ "User containers": "User containers", "User type": "User type", "User type - Tooltip": "Permission role owned by the user", - "Username": "Username", "Users": "Users", "Users under all organizations": "Users under all organizations", + "Webhooks": "Webhooks", "{total} in total": "{total} in total" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "Is Triggered" + }, "resource": { "Application": "Application", "Copy Link": "Copy Link", @@ -339,5 +346,14 @@ "Unlink": "Unlink", "Upload a photo": "Upload a photo", "input password": "input password" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type - Tooltip", + "Edit Webhook": "Edit Webhook", + "Events": "Events", + "Events - Tooltip": "Events - Tooltip", + "URL": "URL", + "URL - Tooltip": "URL - Tooltip" } } \ No newline at end of file diff --git a/web/src/locales/ru/data.json b/web/src/locales/ru/data.json index c1c97f42..c8fe8583 100644 --- a/web/src/locales/ru/data.json +++ b/web/src/locales/ru/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "Avatar to show to others", "Back Home": "Back Home", "Captcha": "Captcha", - "Client ip": "Client ip", + "Client IP": "Client IP", "Created time": "Created time", "Default avatar": "Default avatar", "Default avatar - Tooltip": "default avatar", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "Unique string-style identifier", "Home": "Home", "Home - Tooltip": "Application homepage", + "ID": "ID", "ID - Tooltip": "random string", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs - Tooltip", "Logo - Tooltip": "App's image tag", + "Master password": "Master password", + "Master password - Tooltip": "Master password - Tooltip", + "Method": "Method", "Name": "Name", "Name - Tooltip": "Unique string-style identifier", "OAuth providers": "OAuth providers", @@ -106,7 +110,7 @@ "Providers": "Providers", "Providers - Tooltip": "List of third-party applications that can be used to log in", "Records": "Records", - "Request uri": "Request uri", + "Request URI": "Request URI", "Resources": "Resources", "Save": "Save", "Scope": "Scope", @@ -127,9 +131,9 @@ "User containers": "User containers", "User type": "User type", "User type - Tooltip": "Permission role owned by the user", - "Username": "Username", "Users": "Users", "Users under all organizations": "Users under all organizations", + "Webhooks": "Webhooks", "{total} in total": "{total} in total" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "Is Triggered" + }, "resource": { "Application": "Application", "Copy Link": "Copy Link", @@ -339,5 +346,14 @@ "Unlink": "Unlink", "Upload a photo": "Upload a photo", "input password": "input password" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type - Tooltip", + "Edit Webhook": "Edit Webhook", + "Events": "Events", + "Events - Tooltip": "Events - Tooltip", + "URL": "URL", + "URL - Tooltip": "URL - Tooltip" } } \ No newline at end of file diff --git a/web/src/locales/zh/data.json b/web/src/locales/zh/data.json index d1d3f31f..7e5eaa22 100644 --- a/web/src/locales/zh/data.json +++ b/web/src/locales/zh/data.json @@ -60,7 +60,7 @@ "Avatar - Tooltip": "向其他人展示的头像", "Back Home": "返回到首页", "Captcha": "人机验证码", - "Client ip": "客户端地址", + "Client IP": "客户端IP", "Created time": "创建时间", "Default avatar": "默认头像", "Default avatar - Tooltip": "默认头像", @@ -79,10 +79,14 @@ "Forget URL - Tooltip": "忘记密码URL", "Home": "首页", "Home - Tooltip": "应用的首页", + "ID": "ID", "ID - Tooltip": "唯一的随机字符串", "LDAPs": "LDAPs", "LDAPs - Tooltip": "LDAPs", "Logo - Tooltip": "应用程序向外展示的图标", + "Master password": "万能密码", + "Master password - Tooltip": "可用来登录该组织下的所有用户,方便管理员以该用户身份登录,以解决技术问题", + "Method": "方法", "Name": "名称", "Name - Tooltip": "唯一的、字符串式的ID", "OAuth providers": "OAuth提供方", @@ -106,7 +110,7 @@ "Providers": "提供商", "Providers - Tooltip": "第三方登录需要配置的提供方", "Records": "日志", - "Request uri": "请求地址", + "Request URI": "请求URI", "Resources": "资源", "Save": "保存", "Scope": "范围", @@ -127,9 +131,9 @@ "User containers": "用户容器", "User type": "用户类型", "User type - Tooltip": "具有不同权限的用户角色", - "Username": "用户名", "Users": "用户", "Users under all organizations": "所有组织里的用户", + "Webhooks": "Webhooks", "{total} in total": "{total} 总计" }, "ldap": { @@ -244,6 +248,9 @@ "rule": "rule", "visible": "visible" }, + "record": { + "Is Triggered": "已触发" + }, "resource": { "Application": "应用", "Copy Link": "复制链接", @@ -339,5 +346,14 @@ "Unlink": "解绑", "Upload a photo": "上传头像", "input password": "输入密码" + }, + "webhook": { + "Content type": "Content type", + "Content type - Tooltip": "Content type", + "Edit Webhook": "修改Webhook", + "Events": "事件", + "Events - Tooltip": "事件", + "URL": "URL", + "URL - Tooltip": "URL" } } \ No newline at end of file