PageSourceSearch

https://olympus.exatom.io/js/6446.460e61d7.js

js exatom.io collected 2026-09-24 20:05:21 UTC 10,727 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkappwork_vue_starter"]=self["webpackChunkappwork_vue_starter"]||[]).push([[6446],{46446:function(t,e,s){s.d(e,{A:function(){return d}});var a=function(){var t=this,e=t._self._c;return e("div",[-1!==t.endpoint.indexOf("/clients/")||-1!==t.endpoint.indexOf("/users/")?e("div",{staticClass:"d-flex justify-content-between mb-3"},[e("div",[t.subjects.length>1?e("div",[e("span",{staticClass:"text-primary font-weight-bolder text-uppercase small"},[t._v("Filter: ")]),e("b-form-checkbox-group",{staticClass:"d-inline-block",attrs:{id:"subjects",name:"subjects",options:t.subjects,buttons:""},model:{value:t.selectedSubjects,callback:function(e){t.selectedSubjects=e},expression:"selectedSubjects"}})],1):t._e()]),t._v(" "),e("div",{staticClass:"text-right",staticStyle:{"min-width":"150px"}},[e("label",{attrs:{for:"fullWebsiteLog",role:"button"}},[t._v("Show full audit log (forms/tooltips/etc)")]),t._v(" "),e("label",{staticClass:"switcher switcher-sm switcher-success ml-1 mr-0"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.fullWebsiteLog,expression:"fullWebsiteLog"}],staticClass:"switcher-input",attrs:{type:"checkbox",id:"fullWebsiteLog"},domProps:{checked:Array.isArray(t.fullWebsiteLog)?t._i(t.fullWebsiteLog,null)>-1:t.fullWebsiteLog},on:{change:function(e){var s=t.fullWebsiteLog,a=e.target,l=!!a.checked;if(Array.isArray(s)){var i=null,n=t._i(s,i);a.checked?n<0&&(t.fullWebsiteLog=s.concat([i])):n>-1&&(t.fullWebsiteLog=s.slice(0,n).concat(s.slice(n+1)))}else t.fullWebsiteLog=l}}}),t._v(" "),t._m(0)])])]):t._e(),t._v(" "),t.loading?e("div",{staticClass:"small text-secondary text-center mb-3"},[t._v("\n    Loading...\n  ")]):t.logs.length?t._e():e("div",{staticClass:"text-secondary text-center mb-3"},[t._v("\n    No audit logs found.\n    "),t._m(1)]),t._v(" "),t._l(t.filteredLogs,function(s,a){return e("div",{key:s.updated_at,staticClass:"card card-body",class:{"mb-3":a!==t.logs.length-1}},[e("div",{staticClass:"mb-3"},[e("span",{staticClass:"material-symbols-outlined text-primary filled",staticStyle:{"vertical-align":"sub"}},[t._v("user_attributes")]),t._v(" "),e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip"}],attrs:{title:t._f("datetime")(s.updated_at)}},[t._v(t._s(t._f("dateRelative")(s.updated_at)))]),t._v("\n      by "),e("a",{attrs:{href:`mailto:${s.user.email}`}},[t._v(t._s(s.user.name))]),t._v(" "),s.client_hash?[t._v("\n        for "),e("a",{attrs:{href:`/administration/websites/${s.client_hash}`}},[t._v(t._s(t.$root.getClient(s.client_hash)?.name??s.client_hash))])]:t._e()],2),t._v(" "),t._l(s.changes,function(a,l){return e("div",{key:a.id,staticClass:"card card-body d-block",class:{"mb-3":l!==s.changes.length-1}},[e("div",{staticClass:"d-flex justify-content-between"},[e("div",{staticClass:"font-weight-bold text-uppercase mb-1",class:{"text-danger":"remove"===a.action,"text-warning":"modify"===a.action,"text-primary":!["remove","modify"].includes(a.action)}},[t._v("\n          "+t._s(t.displayTitle(a.title))+"\n        ")]),t._v(" "),e("span",{staticClass:"text-monospace ordinalPosition unselectable text-tiny",staticStyle:{position:"relative",right:"unset",height:"fit-content"}},[t._v("#"+t._s(a.id))])]),t._v(" "),e("ul",{staticClass:"m-0 pl-4"},t._l(t.changeToTextArray(a),function(s,l){return e("li",{key:`${a.id}_${l}`},["modify"===a.action?[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(s.key))]),t._v(":\n            "),"template"===s.key.toLowerCase()?[e("code-diff",{attrs:{language:"html",maxHeight:"300px",context:"2",filename:"old",newFilename:"new","old-string":s.from,"new-string":s.to,"output-format":"side-by-side"}})]:["status"===s.key.toLowerCase()?[e("badge-component",{staticClass:"small inline",staticStyle:{"vertical-align":"text-bottom"},model:{value:s.from,callback:function(e){t.$set(s,"from",e)},expression:"c.from"}}),t._v(" "),t._m(2,!0)]:t.isHexColor(s.from)?[e("div",{style:`display: inline-block; width: 18px; height: 18px; vertical-align: text-top; border-radius: 2px; background-color: ${s.from}`}),s.from?e("code",{staticClass:"inline"},[t._v(t._s(s.from))]):e("code",{staticClass:"inline text-secondary"},[t._v("not set")]),t._v(" "),t._m(3,!0)]:s.from!==s.to||"redacted"===s.from?[s.from?e("code",{staticClass:"inline"},[t._v(t._s(s.from))]):e("code",{staticClass:"inline text-secondary"},[t._v("not set")]),t._v(" "),t._m(4,!0)]:t._e(),t._v(" "),"status"===s.key.toLowerCase()?[e("badge-component",{staticClass:"small inline",staticStyle:{"vertical-align":"text-bottom"},model:{value:s.to,callback:function(e){t.$set(s,"to",e)},expression:"c.to"}})]:t.isHexColor(s.to)?[e("div",{style:`display: inline-block; width: 18px; height: 18px; vertical-align: text-top; border-radius: 2px; background-color: ${s.to}`}),s.to?e("code",{staticClass:"inline"},[t._v(t._s(s.to))]):e("code",{staticClass:"inline text-secondary"},[t._v("not set")])]:[s.to?e("code",{staticClass:"inline"},[t._v(t._s(s.to))]):e("code",{staticClass:"inline text-secondary"},[t._v("not set")])]]]:[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(s.key))]),t._v(":\n            "),"template"===s.key.toLowerCase()?[e("code-diff",{attrs:{language:"html",maxHeight:"300px","new-string":s.to}})]:["status"===s.key.toLowerCase()?[e("badge-component",{staticClass:"small inline",staticStyle:{"vertical-align":"text-bottom"},model:{value:s.to,callback:function(e){t.$set(s,"to",e)},expression:"c.to"}})]:t.isHexColor(s.to)?[e("div",{style:`display: inline-block; width: 18px; height: 18px; vertical-align: text-top; border-radius: 2px; background-color: ${s.to}`}),e("code",{staticClass:"inline"},[t._v(t._s(s.to))])]:[e("code",{staticClass:"inline"},[t._v(t._s(s.to))])]]]],2)}),0)])})],2)})],2)},l=[function(){var t=this,e=t._self._c;return e("span",{staticClass:"switcher-indicator"},[e("span",{staticClass:"switcher-yes"}),e("span",{staticClass:"switcher-no"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"small mt-1"},[t._v("Everything sound-and-safe "),e("span",{staticClass:"material-symbols-outlined",staticStyle:{"font-size":"14px","vertical-align":"top"}},[t._v("encrypted")])])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"small font-weight-bold"},[e("span",{staticClass:"material-icons md-14 arrow-east"},[t._v("east")])])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"small font-weight-bold"},[e("span",{staticClass:"material-icons md-14 arrow-east"},[t._v("east")])])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"small font-weight-bold"},[e("span",{staticClass:"material-icons md-14 arrow-east"},[t._v("east")])])}],i=(s(44114),s(18111),s(22489),s(7588),s(61701),s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698),s(64979),s(71678),s(14603),s(47566),s(98721),s(5635)),n={name:"AuditLog",components:{BadgeComponent:i.A},props:{endpoint:{type:String,required:!0},labelReplacement:{type:String,default:null}},data(){return{loading:!0,logs:null,fullWebsiteLog:!1,subjectFilter:null}},computed:{finalEndpoint(){let t=new URL("https://foo.bar"+this.endpoint);return this.fullWebsiteLog?t.searchParams.set("full","true"):t.searchParams.delete("full"),t.toString().replace("https://foo.bar","")},subjects(){if(!this.logs?.length)return[];const t=new Set;for(const e of this.logs)for(const s of e.changes)t.add(s.subject);return Array.from(t).sort((t,e)=>t>e)},selectedSubjects:{get(){return this.subjectFilter?this.subjectFilter:this.subjects},set(t){this.subjectFilter=t}},filteredLogs(){if(!this.subjectFilter?.length)return this.logs;const t=structuredClone(this.logs).map(t=>{const e=t.changes.filter(t=>this.subjectFilter.includes(t.subject));if(e.length)return t.changes=e,t}
1).filter(Boolean);return t}},methods:{displayTitle(t){return t&&this.labelReplacement?t.replace(/smart tooltip/gi,this.labelReplacement):t},keyMapper(t){const e=t.replaceAll(/[_]/gi," ");return e.charAt(0).toUpperCase()+e.slice(1)},changeToTextArray(t){if(!t||!t.fromRaw||!t.toRaw)return[];const e=[];return["modify","add","clone","assign","login","logout"].includes(t.action)?Object.entries(t.toRaw).forEach(s=>{const a=s[0],l=s[1];if(["modify"].includes(t.action))e.push({key:this.keyMapper(a),from:t.fromRaw[a],to:l});else{if(null===l||"string"===typeof l&&!l.trim().length)return;e.push({key:this.keyMapper(a),to:l})}}):["remove","unassign"].includes(t.action)&&Object.entries(t.fromRaw).forEach(t=>{const s=t[0],a=t[1];null===a||"string"===typeof a&&!a.trim().length||e.push({key:this.keyMapper(s),to:a})}),e},isHexColor(t){return/^#(?:[0-9a-fA-F]{3,4}){1,2}$/.test(t)},async reload(){this.loading=!0;let t=(await this.$api.get(this.finalEndpoint,this.$root.client?.client_hash)).data;this.loading=!1,this.logs=t,this.subjectFilter=null}},watch:{fullWebsiteLog:{immediate:!0,async handler(){await this.reload()}}}},o=n,r=s(81656),c=(0,r.A)(o,a,l,!1,null,"0b0f53f0",null),d=c.exports},5635:function(t,e,s){s.d(e,{A:function(){return c}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"d-inline-block"},[t.toggleModel&&["ACTIVE","INACTIVE","SCHEDULED"].includes(t.status)?e("span",{staticClass:"badge cursor-pointer unselectable",class:t.colors[t.cleanStatus],attrs:{title:"Double-click to toggle the status"},on:{dblclick:t.toggleStatus}},[t._v(t._s(t.cleanStatus))]):e("span",{staticClass:"badge unselectable",class:t.colors[t.status]},[t._v(t._s(t.cleanStatus))])])},l=[],i={name:"Badge",components:{},props:{value:{},toggleModel:{type:String,default:null},toggleModelHash:{type:String,default:null},label:{type:String,default:null},clientHash:{type:String,default:null},colors:{type:Object,default:function(){return{DRAFT:"badge-dark",ACTIVE:"badge-success",ARCHIVED:"badge-dark",INACTIVE:"badge-danger",NODATA:"badge-danger",CONVERSION:"badge-success",EVENT:"badge-primary",GENERIC:"badge-default",AUDIENCE:"badge-dark",SCHEDULED:"badge-yellow",ENDED:"badge-dark",FUTURE:"badge-success",IN_TRIAL:"badge-success",NON_RENEWING:"badge-danger",PAUSED:"badge-danger",CANCELLED:"badge-danger",PENDING:"badge-yellow",RUNNING:"badge-primary",COMPLETED:"badge-success",ERROR:"badge-danger"}}}},data(){return{status:this.value}},computed:{cleanStatus(){return(this.label??this.status).replaceAll("_"," ")}},async mounted(){this.status=this.status?this.status.toUpperCase():this.status},methods:{async toggleStatus(){const t=await this.$root.toggleStatus(this.toggleModel,this.toggleModelHash,this.status,this.clientHash);t?this.status=t:console.log("BadgeComponent: no status returned, not changing the status",t),this.$emit("input",t)}},watch:{value(){this.status=this.value.toUpperCase()}}},n=i,o=s(81656),r=(0,o.A)(n,a,l,!1,null,null,null),c=r.exports}}]);
2//# sourceMappingURL=6446.460e61d7.js.map

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.