PageSourceSearch

https://www.getgoodtix.com/assets/AuditLog-BTMb_Atc.js

js getgoodtix.com collected 2026-10-08 22:43:10 UTC 3,521 bytes, 1 lines download raw bytes

1import{V as y}from"./adminApi-DISswjOO.js";import{h as g,o as f,k as o,q as t,l as h,H as d,I as _,n as b,F as w,a9 as v,r as p,j as l,t as n}from"./carousel-17pKdu0m.js";const k={class:"max-w-6xl mx-auto px-4 sm:px-0 pb-20"},E={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-8"},A={class:"bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden"},C={class:"overflow-x-auto"},L={class:"w-full text-left text-sm min-w-[500px]"},T={class:"divide-y divide-gray-100"},D={key:0},I={class:"px-4 sm:px-6 py-3 text-gray-500 font-mono text-[10px] sm:text-xs whitespace-nowrap"},N={class:"px-4 sm:px-6 py-3"},S={class:"flex items-center gap-2"},V={class:"w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-gray-200 flex items-center justify-center text-[9px] sm:text-[10px] font-bold text-gray-600 shrink-0"},j={class:"font-medium text-gray-900 text-xs sm:text-sm truncate max-w-[80px] sm:max-w-none"},M={class:"text-[10px] sm:text-xs text-gray-400 pl-7 sm:pl-8 truncate max-w-[100px] sm:max-w-none"},B={class:"px-4 sm:px-6 py-3"},F={class:"px-4 sm:px-6 py-3 font-mono text-[10px] sm:text-xs text-gray-400 select-all truncate max-w-[60px] sm:max-w-[100px]"},H=["innerHTML"],O=g({__name:"AuditLog",setup(U){const i=p([]),r=p(!0);async function x(){r.value=!0;try{i.value=await y()}catch(e){console.error("Failed to load logs",e)}finally{r.value=!1}}function c(e){if(!e)return"-";try{const a=JSON.parse(e);return Object.entries(a).map(([s,u])=>`<span class="text-gray-400">${s}:</span> ${u}`).join(", ")}catch{return e}}function m(e){return e.startsWith("ADMIN_EVENT")?"bg-rose-100 text-rose-700":e.includes("RESCUE")?"bg-purple-100 text-purple-700":e.includes("SETTING")?"bg-orange-100 text-orange-800":e.includes("USER")||e.includes("TICKET")?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}return f(x),(e,a)=>(l(),o("div",k,[t("div",E,[a[0]||(a[0]=t("div",null,[t("h1",{class:"text-2xl font-bold text-gray-900"},"Audit Logs"),t("p",{class:"text-gray-500"}," Systemprotokoll aller administrativen Eingriffe. ")],-1)),t("button",{class:"p-2 hover:bg-gray-100 rounded text-gray-500 cursor-pointer",onClick:x},[h(_,{name:"refresh-cw",size:"sm",class:d({"animate-spin":r.value})},null,8,["class"])])]),t("div",A,[t("div",C,[t("table",L,[a[2]||(a[2]=t("thead",{class:"bg-gray-50 text-gray-500 border-b border-gray-200 font-bold uppercase text-xs tracking-wider"},[t("tr",null,[t("th",{class:"px-4 sm:px-6 py-3"},"Zeitpunkt"),t("th",{class:"px-4 sm:px-6 py-3"},"Admin"),t("th",{class:"px-4 sm:px-6 py-3"},"Action"),t("th",{class:"px-4 sm:px-6 py-3"},"Target ID"),t("th",{class:"px-4 sm:px-6 py-3"},"Details")])],-1)),t("tbody",T,[i.value.length===0&&!r.value?(l(),o("tr",D,[...a[1]||(a[1]=[t("td",{colspan:"5",class:"px-4 sm:px-6 py-12 text-center text-gray-400 italic"}," Keine Logs vorhanden. ",-1)])])):b("",!0),(l(!0),o(w,null,v(i.value,s=>(l(),o("tr",{key:s.id,class:"hover:bg-gray-50 transition-colors"},[t("td",I,n(new Date(s.createdAt).toLocaleString("de-DE")),1),t("td",N,[t("div",S,[t("div",V,n((s.admin.name||s.admin.email)[0].toUpperCase()),1),t("span",j,n(s.admin.name||"Admin"),1)]),t("div",M,n(s.admin.email),1)]),t("td",B,[t("span",{class:d(["inline-block px-1.5 py-0.5 rounded text-[10px] font-bold font-mono whitespace-nowrap",m(s.action)])},n(s.action),3)]),t("td",F,n(s.targetId||"-"),1),t("td",{class:"px-4 sm:px-6 py-3 text-gray-600 text-xs sm:text-sm max-w-[120px] sm:max-w-md truncate",innerHTML:c(s.details)},null,8,H)]))),128))])])])])]))}});export{O as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.