diff --git a/client/pages/adminpage/logger.js b/client/pages/adminpage/logger.js index a17da1d1..b3fd2941 100644 --- a/client/pages/adminpage/logger.js +++ b/client/pages/adminpage/logger.js @@ -13,7 +13,7 @@ export function LogPage({ isSaving = nop }) {

Logging

-

Auditing

+

Activity Report

); @@ -167,7 +167,7 @@ function AuditComponent() { loading ? (
) : ( -
+
) } diff --git a/client/pages/adminpage/logger.scss b/client/pages/adminpage/logger.scss index 825aee24..ad807c37 100644 --- a/client/pages/adminpage/logger.scss +++ b/client/pages/adminpage/logger.scss @@ -19,6 +19,9 @@ padding: 10px 0 10px 10px; } th { opacity: 0.6; } + + tbody { font-size: 0.95rem; } + thead { text-transform: capitalize; } } .component_icon { height: 50px; margin-top: 20px; } diff --git a/server/model/audit.go b/server/model/audit.go index c5874c83..76733254 100644 --- a/server/model/audit.go +++ b/server/model/audit.go @@ -8,207 +8,67 @@ func init() { Hooks.Register.AuditEngine(SimpleAudit{}) } -var ( - AuditForm Form = Form{ - Form: []Form{ - Form{ - Title: "search", - Elmnts: []FormElement{ - FormElement{ - Name: "date from", - Type: "datetime", - }, - FormElement{ - Name: "date to", - Type: "datetime", - }, - FormElement{ - Name: "path", - Type: "text", - }, - FormElement{ - Name: "action", - Type: "select", - Opts: []string{"", "rename", "list", "download", "create_folder", "remove", "move", "save_file", "create_file"}, - }, - FormElement{ - Name: "backend", - Type: "text", - }, - FormElement{ - Name: "session", - Type: "text", - }, - FormElement{ - Name: "share", - Type: "text", - }, +var AuditForm Form = Form{ + Form: []Form{ + Form{ + Title: "search", + Elmnts: []FormElement{ + FormElement{ + Name: "date from", + Type: "datetime", + }, + FormElement{ + Name: "date to", + Type: "datetime", + }, + FormElement{ + Name: "action", + Type: "select", + Opts: []string{"", "rename", "list", "download", "create_folder", "remove", "move", "save_file", "create_file"}, + }, + FormElement{ + Name: "path", + Type: "text", + }, + FormElement{ + Name: "backend", + Type: "text", + }, + FormElement{ + Name: "session", + Type: "text", + }, + FormElement{ + Name: "share", + Type: "text", + }, + FormElement{ + Name: "user", + Type: "text", + }, + FormElement{ + Name: "target", + Type: "text", }, }, }, - } - MOCKRESULT string = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateTimeTypeActionPathSessionShare
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
2022/08/3108:40:01ftprename/test/test.txtfdsfdslfkdslfknull
` -) + }, +} type SimpleAudit struct{} func (this SimpleAudit) Query(searchParams map[string]string) (AuditQueryResult, error) { - response := "" - if len(searchParams) > 0 { - response = ` - -
- You need to install an audit plugin to use this -
` - } return AuditQueryResult{ - Form: &AuditForm, - RenderHTML: response, + Form: &AuditForm, + RenderHTML: ` +
+ You need to install an audit plugin to use this +
`, }, nil }