diff --git a/internal/httpd/webadmin.go b/internal/httpd/webadmin.go
index 96898060..d250072b 100644
--- a/internal/httpd/webadmin.go
+++ b/internal/httpd/webadmin.go
@@ -100,7 +100,6 @@ const (
templateSetup = "adminsetup.html"
pageEventRulesTitle = "Event rules"
pageEventActionsTitle = "Event actions"
- pageEventsTitle = "Logs"
defaultQueryLimit = 1000
inversePatternType = "inverse"
)
@@ -509,7 +508,7 @@ func loadAdminTemplates(templatesPath string) {
filepath.Join(templatesPath, templateAdminDir, templateRole),
}
eventsPaths := []string{
- filepath.Join(templatesPath, templateCommonDir, templateCommonCSS),
+ filepath.Join(templatesPath, templateCommonDir, templateCommonBase),
filepath.Join(templatesPath, templateAdminDir, templateBase),
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)
data := eventsPage{
- basePage: s.getBasePageData(pageEventsTitle, webEventsPath, r),
+ basePage: s.getBasePageData(util.I18nEventsTitle, webEventsPath, r),
FsEventsSearchURL: webEventsFsSearchPath,
ProviderEventsSearchURL: webEventsProviderSearchPath,
LogEventsSearchURL: webEventsLogSearchPath,
diff --git a/internal/util/i18n.go b/internal/util/i18n.go
index b0c8865a..aa793169 100644
--- a/internal/util/i18n.go
+++ b/internal/util/i18n.go
@@ -67,6 +67,7 @@ const (
I18nAddIPListTitle = "title.add_ip_list"
I18nUpdateIPListTitle = "title.update_ip_list"
I18nDefenderTitle = "title.defender"
+ I18nEventsTitle = "title.logs"
I18nStatusTitle = "status.desc"
I18nErrorSetupInstallCode = "setup.install_code_mismatch"
I18nInvalidAuth = "general.invalid_auth_request"
diff --git a/static/locales/en/translation.json b/static/locales/en/translation.json
index 5b4c273e..3285ea84 100644
--- a/static/locales/en/translation.json
+++ b/static/locales/en/translation.json
@@ -119,6 +119,7 @@
"confirm_logout": "Are you sure you want to sign out?",
"wait": "Please wait...",
"ok": "OK",
+ "failed": "Failed",
"cancel": "No, back",
"submit": "Save",
"back": "Back",
@@ -241,7 +242,8 @@
"port": "Port",
"domain": "Domain",
"test": "Test",
- "get": "Get"
+ "get": "Get",
+ "export": "Export"
},
"fs": {
"view_file": "View file \"{{- path}}\"",
@@ -834,5 +836,33 @@
"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",
"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"
}
}
\ No newline at end of file
diff --git a/static/locales/it/translation.json b/static/locales/it/translation.json
index f421cb77..33458802 100644
--- a/static/locales/it/translation.json
+++ b/static/locales/it/translation.json
@@ -119,6 +119,7 @@
"confirm_logout": "Sei sicuro di volerti disconnettere?",
"wait": "Attendere prego...",
"ok": "OK",
+ "failed": "Fallito",
"cancel": "No, indietro",
"submit": "Salva",
"back": "Indietro",
@@ -241,7 +242,8 @@
"port": "Porta",
"domain": "Dominio",
"test": "Test",
- "get": "Ottieni"
+ "get": "Ottieni",
+ "export": "Esporta"
},
"fs": {
"view_file": "Visualizza file \"{{- path}}\"",
@@ -834,5 +836,33 @@
"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",
"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"
}
}
\ No newline at end of file
diff --git a/static/vendor/humanize-duration/humanize-duration.min.js b/static/vendor/humanize-duration/humanize-duration.min.js
new file mode 100644
index 00000000..a5eca79b
--- /dev/null
+++ b/static/vendor/humanize-duration/humanize-duration.min.js
@@ -0,0 +1 @@
+!function(){var n=t(function(n){return 1===n?"χρόνος":"χρόνια"},function(n){return 1===n?"μήνας":"μήνες"},function(n){return 1===n?"εβδομάδα":"εβδομάδες"},function(n){return 1===n?"μέρα":"μέρες"},function(n){return 1===n?"ώρα":"ώρες"},function(n){return 1===n?"λεπτό":"λεπτά"},function(n){return 1===n?"δευτερόλεπτο":"δευτερόλεπτα"},function(n){return(1===n?"χιλιοστό":"χιλιοστά")+" του δευτερολέπτου"},","),f={af:t("jaar",function(n){return"maand"+(1===n?"":"e")},function(n){return 1===n?"week":"weke"},function(n){return 1===n?"dag":"dae"},function(n){return 1===n?"uur":"ure"},function(n){return 1===n?"minuut":"minute"},function(n){return"sekonde"+(1===n?"":"s")},function(n){return"millisekonde"+(1===n?"":"s")},","),ar:a(t(function(n){return["سنة","سنتان","سنوات"][u(n)]},function(n){return["شهر","شهران","أشهر"][u(n)]},function(n){return["أسبوع","أسبوعين","أسابيع"][u(n)]},function(n){return["يوم","يومين","أيام"][u(n)]},function(n){return["ساعة","ساعتين","ساعات"][u(n)]},function(n){return["دقيقة","دقيقتان","دقائق"][u(n)]},function(n){return["ثانية","ثانيتان","ثواني"][u(n)]},function(n){return["جزء من الثانية","جزآن من الثانية","أجزاء من الثانية"][u(n)]},","),{delimiter:" ﻭ ",_digitReplacements:["۰","١","٢","٣","٤","٥","٦","٧","٨","٩"]}),bg:t(function(n){return["години","година","години"][e(n)]},function(n){return["месеца","месец","месеца"][e(n)]},function(n){return["седмици","седмица","седмици"][e(n)]},function(n){return["дни","ден","дни"][e(n)]},function(n){return["часа","час","часа"][e(n)]},function(n){return["минути","минута","минути"][e(n)]},function(n){return["секунди","секунда","секунди"][e(n)]},function(n){return["милисекунди","милисекунда","милисекунди"][e(n)]},","),bn:t("বছর","মাস","সপ্তাহ","দিন","ঘন্টা","মিনিট","সেকেন্ড","মিলিসেকেন্ড"),ca:t(function(n){return"any"+(1===n?"":"s")},function(n){return"mes"+(1===n?"":"os")},function(n){return"setman"+(1===n?"a":"es")},function(n){return"di"+(1===n?"a":"es")},function(n){return"hor"+(1===n?"a":"es")},function(n){return"minut"+(1===n?"":"s")},function(n){return"segon"+(1===n?"":"s")},function(n){return"milisegon"+(1===n?"":"s")},","),ckb:t("ساڵ","مانگ","هەفتە","ڕۆژ","کاژێر","خولەک","چرکە","میلی چرکە","."),cs:t(function(n){return["rok","roku","roky","let"][i(n)]},function(n){return["měsíc","měsíce","měsíce","měsíců"][i(n)]},function(n){return["týden","týdne","týdny","týdnů"][i(n)]},function(n){return["den","dne","dny","dní"][i(n)]},function(n){return["hodina","hodiny","hodiny","hodin"][i(n)]},function(n){return["minuta","minuty","minuty","minut"][i(n)]},function(n){return["sekunda","sekundy","sekundy","sekund"][i(n)]},function(n){return["milisekunda","milisekundy","milisekundy","milisekund"][i(n)]},","),cy:t("flwyddyn","mis","wythnos","diwrnod","awr","munud","eiliad","milieiliad"),da:t("år",function(n){return"måned"+(1===n?"":"er")},function(n){return"uge"+(1===n?"":"r")},function(n){return"dag"+(1===n?"":"e")},function(n){return"time"+(1===n?"":"r")},function(n){return"minut"+(1===n?"":"ter")},function(n){return"sekund"+(1===n?"":"er")},function(n){return"millisekund"+(1===n?"":"er")},","),de:t(function(n){return"Jahr"+(1===n?"":"e")},function(n){return"Monat"+(1===n?"":"e")},function(n){return"Woche"+(1===n?"":"n")},function(n){return"Tag"+(1===n?"":"e")},function(n){return"Stunde"+(1===n?"":"n")},function(n){return"Minute"+(1===n?"":"n")},function(n){return"Sekunde"+(1===n?"":"n")},function(n){return"Millisekunde"+(1===n?"":"n")},","),el:n,en:t(function(n){return"year"+(1===n?"":"s")},function(n){return"month"+(1===n?"":"s")},function(n){return"week"+(1===n?"":"s")},function(n){return"day"+(1===n?"":"s")},function(n){return"hour"+(1===n?"":"s")},function(n){return"minute"+(1===n?"":"s")},function(n){return"second"+(1===n?"":"s")},function(n){return"millisecond"+(1===n?"":"s")}),eo:t(function(n){return"jaro"+(1===n?"":"j")},function(n){return"monato"+(1===n?"":"j")},function(n){return"semajno"+(1===n?"":"j")},function(n){return"tago"+(1===n?"":"j")},function(n){return"horo"+(1===n?"":"j")},function(n){return"minuto"+(1===n?"":"j")},function(n){return"sekundo"+(1===n?"":"j")},function(n){return"milisekundo"+(1===n?"":"j")},","),es:t(function(n){return"año"+(1===n?"":"s")},function(n){return"mes"+(1===n?"":"es")},function(n){return"semana"+(1===n?"":"s")},function(n){return"día"+(1===n?"":"s")},function(n){return"hora"+(1===n?"":"s")},function(n){return"minuto"+(1===n?"":"s")},function(n){return"segundo"+(1===n?"":"s")},function(n){return"milisegundo"+(1===n?"":"s")},","),et:t(function(n){return"aasta"+(1===n?"":"t")},function(n){return"kuu"+(1===n?"":"d")},function(n){return"nädal"+(1===n?"":"at")},function(n){return"päev"+(1===n?"":"a")},function(n){return"tund"+(1===n?"":"i")},function(n){return"minut"+(1===n?"":"it")},function(n){return"sekund"+(1===n?"":"it")},function(n){return"millisekund"+(1===n?"":"it")},","),eu:t("urte","hilabete","aste","egun","ordu","minutu","segundo","milisegundo",","),fa:t("سال","ماه","هفته","روز","ساعت","دقیقه","ثانیه","میلی ثانیه"),fi:t(function(n){return 1===n?"vuosi":"vuotta"},function(n){return 1===n?"kuukausi":"kuukautta"},function(n){return"viikko"+(1===n?"":"a")},function(n){return"päivä"+(1===n?"":"ä")},function(n){return"tunti"+(1===n?"":"a")},function(n){return"minuutti"+(1===n?"":"a")},function(n){return"sekunti"+(1===n?"":"a")},function(n){return"millisekunti"+(1===n?"":"a")},","),fo:t("ár",function(n){return 1===n?"mánaður":"mánaðir"},function(n){return 1===n?"vika":"vikur"},function(n){return 1===n?"dagur":"dagar"},function(n){return 1===n?"tími":"tímar"},function(n){return 1===n?"minuttur":"minuttir"},"sekund","millisekund",","),fr:t(function(n){return"an"+(2<=n?"s":"")},"mois",function(n){return"semaine"+(2<=n?"s":"")},function(n){return"jour"+(2<=n?"s":"")},function(n){return"heure"+(2<=n?"s":"")},function(n){return"minute"+(2<=n?"s":"")},function(n){return"seconde"+(2<=n?"s":"")},function(n){return"milliseconde"+(2<=n?"s":"")},","),gr:n,he:t(function(n){return 1===n?"שנה":"שנים"},function(n){return 1===n?"חודש":"חודשים"},function(n){return 1===n?"שבוע":"שבועות"},function(n){return 1===n?"יום":"ימים"},function(n){return 1===n?"שעה":"שעות"},function(n){return 1===n?"דקה":"דקות"},function(n){return 1===n?"שניה":"שניות"},function(n){return 1===n?"מילישנייה":"מילישניות"}),hr:t(function(n){return n%10==2||n%10==3||n%10==4?"godine":"godina"},function(n){return 1===n?"mjesec":2===n||3===n||4===n?"mjeseca":"mjeseci"},function(n){return n%10==1&&11!==n?"tjedan":"tjedna"},function(n){return 1===n?"dan":"dana"},function(n){return 1===n?"sat":2===n||3===n||4===n?"sata":"sati"},function(n){var t=n%10;return 2!=t&&3!=t&&4!=t||!(n<10||14