WIP new WebAdmin: events page

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-01-28 19:38:01 +01:00
parent caa1d70aab
commit 143d4611ba
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
6 changed files with 804 additions and 602 deletions

View file

@ -100,7 +100,6 @@ const (
templateSetup = "adminsetup.html" templateSetup = "adminsetup.html"
pageEventRulesTitle = "Event rules" pageEventRulesTitle = "Event rules"
pageEventActionsTitle = "Event actions" pageEventActionsTitle = "Event actions"
pageEventsTitle = "Logs"
defaultQueryLimit = 1000 defaultQueryLimit = 1000
inversePatternType = "inverse" inversePatternType = "inverse"
) )
@ -509,7 +508,7 @@ func loadAdminTemplates(templatesPath string) {
filepath.Join(templatesPath, templateAdminDir, templateRole), filepath.Join(templatesPath, templateAdminDir, templateRole),
} }
eventsPaths := []string{ eventsPaths := []string{
filepath.Join(templatesPath, templateCommonDir, templateCommonCSS), filepath.Join(templatesPath, templateCommonDir, templateCommonBase),
filepath.Join(templatesPath, templateAdminDir, templateBase), filepath.Join(templatesPath, templateAdminDir, templateBase),
filepath.Join(templatesPath, templateAdminDir, templateEvents), filepath.Join(templatesPath, templateAdminDir, templateEvents),
} }
@ -3967,7 +3966,7 @@ func (s *httpdServer) handleWebGetEvents(w http.ResponseWriter, r *http.Request)
r.Body = http.MaxBytesReader(w, r.Body, maxRequestSize) r.Body = http.MaxBytesReader(w, r.Body, maxRequestSize)
data := eventsPage{ data := eventsPage{
basePage: s.getBasePageData(pageEventsTitle, webEventsPath, r), basePage: s.getBasePageData(util.I18nEventsTitle, webEventsPath, r),
FsEventsSearchURL: webEventsFsSearchPath, FsEventsSearchURL: webEventsFsSearchPath,
ProviderEventsSearchURL: webEventsProviderSearchPath, ProviderEventsSearchURL: webEventsProviderSearchPath,
LogEventsSearchURL: webEventsLogSearchPath, LogEventsSearchURL: webEventsLogSearchPath,

View file

@ -67,6 +67,7 @@ const (
I18nAddIPListTitle = "title.add_ip_list" I18nAddIPListTitle = "title.add_ip_list"
I18nUpdateIPListTitle = "title.update_ip_list" I18nUpdateIPListTitle = "title.update_ip_list"
I18nDefenderTitle = "title.defender" I18nDefenderTitle = "title.defender"
I18nEventsTitle = "title.logs"
I18nStatusTitle = "status.desc" I18nStatusTitle = "status.desc"
I18nErrorSetupInstallCode = "setup.install_code_mismatch" I18nErrorSetupInstallCode = "setup.install_code_mismatch"
I18nInvalidAuth = "general.invalid_auth_request" I18nInvalidAuth = "general.invalid_auth_request"

View file

@ -119,6 +119,7 @@
"confirm_logout": "Are you sure you want to sign out?", "confirm_logout": "Are you sure you want to sign out?",
"wait": "Please wait...", "wait": "Please wait...",
"ok": "OK", "ok": "OK",
"failed": "Failed",
"cancel": "No, back", "cancel": "No, back",
"submit": "Save", "submit": "Save",
"back": "Back", "back": "Back",
@ -241,7 +242,8 @@
"port": "Port", "port": "Port",
"domain": "Domain", "domain": "Domain",
"test": "Test", "test": "Test",
"get": "Get" "get": "Get",
"export": "Export"
}, },
"fs": { "fs": {
"view_file": "View file \"{{- path}}\"", "view_file": "View file \"{{- path}}\"",
@ -834,5 +836,33 @@
"sftp": { "sftp": {
"help": "From this section you can enable algorithms disabled by default. You don't need to set values already defined using env vars or config file. A service restart is required to apply changes", "help": "From this section you can enable algorithms disabled by default. You don't need to set values already defined using env vars or config file. A service restart is required to apply changes",
"host_key_algos": "Host Key Algorithms" "host_key_algos": "Host Key Algorithms"
},
"events": {
"search": "Search logs",
"fs_events": "Filesystem events",
"provider_events": "Provider events",
"other_events": "Other events",
"quota_exceeded": "Quota exceeded",
"date_range": "Date range",
"upload": "Upload",
"download": "Download",
"mkdir": "Create dir",
"rmdir": "Remove dir",
"rename": "Rename",
"delete": "Removal",
"first_upload": "First upload",
"first_download": "First download",
"ssh_cmd": "SSH command",
"add": "Addition",
"update": "Update",
"login_failed": "Login failed",
"login_missing_user": "Login with non-existent user",
"no_login_tried": "No login tried",
"algo_negotiation_failed": "Algorithm negotiation failed",
"datetime": "Date and time",
"action": "Action",
"path": "Path",
"object": "Object",
"event": "Event"
} }
} }

View file

@ -119,6 +119,7 @@
"confirm_logout": "Sei sicuro di volerti disconnettere?", "confirm_logout": "Sei sicuro di volerti disconnettere?",
"wait": "Attendere prego...", "wait": "Attendere prego...",
"ok": "OK", "ok": "OK",
"failed": "Fallito",
"cancel": "No, indietro", "cancel": "No, indietro",
"submit": "Salva", "submit": "Salva",
"back": "Indietro", "back": "Indietro",
@ -241,7 +242,8 @@
"port": "Porta", "port": "Porta",
"domain": "Dominio", "domain": "Dominio",
"test": "Test", "test": "Test",
"get": "Ottieni" "get": "Ottieni",
"export": "Esporta"
}, },
"fs": { "fs": {
"view_file": "Visualizza file \"{{- path}}\"", "view_file": "Visualizza file \"{{- path}}\"",
@ -834,5 +836,33 @@
"sftp": { "sftp": {
"help": "Da questa sezione è possibile abilitare gli algoritmi disabilitati di default. Non è necessario impostare valori già definiti utilizzando env vars o il file di configurazione. Per applicare le modifiche è necessario il riavvio del servizio", "help": "Da questa sezione è possibile abilitare gli algoritmi disabilitati di default. Non è necessario impostare valori già definiti utilizzando env vars o il file di configurazione. Per applicare le modifiche è necessario il riavvio del servizio",
"host_key_algos": "Algoritmi per chiavi host" "host_key_algos": "Algoritmi per chiavi host"
},
"events": {
"search": "Cerca eventi",
"fs_events": "Eventi filesystem",
"provider_events": "Eventi provider",
"other_events": "Altri eventi",
"quota_exceeded": "Quota superata",
"date_range": "Intervallo di date",
"upload": "Caricamento",
"download": "Download",
"mkdir": "Creazione cartella",
"rmdir": "Rimozione cartella",
"rename": "Rinomina",
"delete": "Rimozione",
"first_upload": "Primo caricamento",
"first_download": "Primo download",
"ssh_cmd": "Comando SSH",
"add": "Aggiunta",
"update": "Aggiornamento",
"login_failed": "Accesso fallito",
"login_missing_user": "Accesso con utente inesistente",
"no_login_tried": "Nessun accesso tentato",
"algo_negotiation_failed": "Negoziazione algoritmo fallita",
"datetime": "Data e ora",
"action": "Azione",
"path": "Percorso",
"object": "Oggetto",
"event": "Evento"
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff