(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43cb68c8"],{"0011":function(t,e,a){},"033e":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-toolbar",{attrs:{flat:""}},[a("v-toolbar-title",[a("translate",[t._v("Audit trail")])],1)],1),a("audit-trail-list")],1)},o=[],i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-card",{staticClass:"mt-6"},[a("v-toolbar",{attrs:{flat:""}},[a("v-spacer"),a("v-text-field",{attrs:{"prepend-inner-icon":"mdi-magnify",placeholder:t._f("translate")("Search"),filled:"",outlined:"",dense:"","hide-details":""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),a("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.logs,search:t.search,options:t.options,"server-items-length":t.total},on:{"update:options":function(e){t.options=e}},scopedSlots:t._u([{key:"item.level",fn:function(e){var s=e.item;return[a("v-chip",{attrs:{color:t.getLevelColor(s.level),"text-color":"white",small:""}},[t._v(" "+t._s(s.level)+" ")])]}}])})],1)},r=[],n=(a("ac1f"),a("841c"),a("62ed")),l={data:function(){return{logs:[],headers:[{text:this.$gettext("Date"),value:"date_created"},{text:this.$gettext("Level"),value:"level"},{text:this.$gettext("Logger"),value:"logger"},{text:this.$gettext("Message"),value:"message"}],loading:!0,options:{},search:"",total:0}},methods:{getLevelColor:function(t){return"INFO"===t?"primary":"WARNING"===t?"orange":"CRITICAL"===t||"ERROR"===t?"red":""},fetchLogs:function(){var t,e=this;this.options.sortBy.length&&(t=(this.options.sortDesc[0]?"-":"")+this.options.sortBy[0]);var a={ordering:t,page:this.options.page,page_size:this.options.itemsPerPage,search:this.search};this.loading=!0,n["a"].getAuditTrail(a).then((function(t){e.logs=t.data.results,e.total=t.data.count,e.loading=!1}))}},watch:{options:{handler:function(){this.fetchLogs()},deep:!0},search:function(t){this.fetchLogs()}}},c=l,u=a("2877"),d=a("6544"),f=a.n(d),h=a("b0af"),g=a("cc20"),p=a("8fea"),v=a("2fa4"),m=a("8654"),b=a("71d9"),x=Object(u["a"])(c,i,r,!1,null,null,null),_=x.exports;f()(x,{VCard:h["a"],VChip:g["a"],VDataTable:p["a"],VSpacer:v["a"],VTextField:m["a"],VToolbar:b["a"]});var T={components:{AuditTrailList:_}},L=T,w=(a("76fc"),a("2a7f")),C=Object(u["a"])(L,s,o,!1,null,"34cff6f8",null);e["default"]=C.exports;f()(C,{VToolbar:b["a"],VToolbarTitle:w["a"]})},"2fa4":function(t,e,a){"use strict";a("20f6");var s=a("80d2");e["a"]=Object(s["j"])("spacer","div","v-spacer")},"62ed":function(t,e,a){"use strict";var s=a("3ffe"),o="logs";e["a"]={getAuditTrail:function(t){return s["a"].get("/".concat(o,"/audit-trail/"),{params:t})},getMessages:function(t){return s["a"].get("/".concat(o,"/messages/"),{params:t})}}},"76fc":function(t,e,a){"use strict";a("0011")}}]);
//# sourceMappingURL=chunk-43cb68c8.93417efd.js.map