var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):r(t.value).then(o,a)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,r,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;r=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t];r=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-343b3b10.system.js","./p-f3cc88e3.system.js","./p-97c19fd0.system.js","./p-86f17250.system.js","./p-ebdd1444.system.js","./p-a56cdd14.system.js"],(function(t){"use strict";var e,n,i,r,s;return{setters:[function(t){e=t.r;n=t.h;i=t.H},function(t){r=t.L},function(t){s=t.T},function(){},function(){},function(){}],execute:function(){var o="";var a=t("damga_domain_logs",function(){function t(t){e(this,t);this.domains=r.init();this.logs=r.init();this.relativeTime=30;this.startDate=undefined;this.endDate=undefined}t.prototype.componentWillLoad=function(){this.endDate=new Date;this.startDate=new Date((new Date).getTime()-this.relativeTime*60*1e3);this.fetchList()};t.prototype.fetchList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.selectedDomain="api.mentornity.com";this.fetchLogs();return[2]}))}))};t.prototype.fetchLogs=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,i,r;var s=this;return __generator(this,(function(o){switch(o.label){case 0:t=this,e=t.logs,n=t.endDate,i=t.startDate;this.logs=this.logs.beforeFetch();return[4,this.apiServicesDamga.getLogs(this.selectedDomain,i,n).catch((function(t){s.logs=e.afterFetchError(t)}))];case 1:r=o.sent();if(!r)return[2];this.logs=e.afterFetch(r);return[2]}}))}))};t.prototype.render=function(){var t=this;var e=this.logs;var r=e.data||[];return n(i,{class:"-container d-flex flex-grow-1 flex-column"},n("dvn-list-view-table",{config:{fields:[{fieldId:"msg"},{fieldId:"target-response-time"},{fieldId:"method"},{fieldId:"path"},{fieldId:"status-code"},{fieldId:"time"}],columns:{msg:{width:200},"target-response-time":{width:100},method:{width:100},path:{weight:1},"status-code":{width:100},time:{width:200}}},fields:[new s("msg","Message"),new s("target-response-time","Duration"),new s("method","Method"),new s("path","Path"),new s("status-code","Status Code"),new s("time","Time")],items:r,isEndReached:e.isEndReached(),isProgressing:e.isPending,error:e.error?"Fetching list failed":undefined,onRetry:function(){return t.fetchLogs()},scrollToFit:true}))};return t}());a.style=o}}}));