Add object field in RecordListPage

This commit is contained in:
Yang Luo 2024-03-16 16:57:04 +08:00
parent 8302fcf805
commit cc84bd37cf
4 changed files with 15 additions and 6 deletions

2
go.mod
View File

@ -14,7 +14,7 @@ require (
github.com/casdoor/notify v0.45.0
github.com/casdoor/oss v1.6.0
github.com/casdoor/xorm-adapter/v3 v3.1.0
github.com/casvisor/casvisor-go-sdk v1.1.0
github.com/casvisor/casvisor-go-sdk v1.3.0
github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f
github.com/denisenkom/go-mssqldb v0.9.0
github.com/elazarl/go-bindata-assetfs v1.0.1 // indirect

4
go.sum
View File

@ -1093,8 +1093,8 @@ github.com/casdoor/oss v1.6.0 h1:IOWrGLJ+VO82qS796eaRnzFPPA1Sn3cotYTi7O/VIlQ=
github.com/casdoor/oss v1.6.0/go.mod h1:rJAWA0hLhtu94t6IRpotLUkXO1NWMASirywQYaGizJE=
github.com/casdoor/xorm-adapter/v3 v3.1.0 h1:NodWayRtSLVSeCvL9H3Hc61k0G17KhV9IymTCNfh3kk=
github.com/casdoor/xorm-adapter/v3 v3.1.0/go.mod h1:4WTcUw+bTgBylGHeGHzTtBvuTXRS23dtwzFLl9tsgFM=
github.com/casvisor/casvisor-go-sdk v1.1.0 h1:XRDrlDuMjXfPsNa1INLHASPHdV/vgwh1gPZ7+v9fNHk=
github.com/casvisor/casvisor-go-sdk v1.1.0/go.mod h1:frnNtH5GA0wxzAQLyZxxfL0RSsSub9GQPi2Ybe86ocE=
github.com/casvisor/casvisor-go-sdk v1.3.0 h1:HVgm2g3lWpNX2wBNidzR743QY4O5kAjLUJ9tS2juO8g=
github.com/casvisor/casvisor-go-sdk v1.3.0/go.mod h1:frnNtH5GA0wxzAQLyZxxfL0RSsSub9GQPi2Ybe86ocE=
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=

View File

@ -63,6 +63,7 @@ func NewRecord(ctx *context.Context) *casvisorsdk.Record {
Action: action,
Language: languageCode,
Object: object,
Response: "",
IsTriggered: false,
}
return &record

View File

@ -65,7 +65,7 @@ class RecordListPage extends BaseListPage {
title: i18next.t("general:Client IP"),
dataIndex: "clientIp",
key: "clientIp",
width: "150px",
width: "100px",
sorter: true,
...this.getColumnSearchProps("clientIp"),
render: (text, record, index) => {
@ -80,7 +80,7 @@ class RecordListPage extends BaseListPage {
title: i18next.t("general:Timestamp"),
dataIndex: "createdTime",
key: "createdTime",
width: "180px",
width: "150px",
sorter: true,
render: (text, record, index) => {
return Setting.getFormattedDate(text);
@ -105,7 +105,7 @@ class RecordListPage extends BaseListPage {
title: i18next.t("general:User"),
dataIndex: "user",
key: "user",
width: "120px",
width: "100px",
sorter: true,
...this.getColumnSearchProps("user"),
render: (text, record, index) => {
@ -151,6 +151,14 @@ class RecordListPage extends BaseListPage {
sorter: true,
...this.getColumnSearchProps("language"),
},
{
title: i18next.t("record:Object"),
dataIndex: "object",
key: "object",
width: "90px",
sorter: true,
...this.getColumnSearchProps("object"),
},
{
title: i18next.t("general:Action"),
dataIndex: "action",