@sava-info-systems/api-maker-with-extensions 1.20.0 → 1.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/1097.f259891962623e63.js +1 -0
  2. package/dist/1678.ed1e4a269e0f42bc.js +1 -0
  3. package/dist/292.a9b9c6aef70ca8b4.js +1 -0
  4. package/dist/3139.b15465b9cea3b772.js +1 -0
  5. package/dist/3664.4a1dd7f16f8b57fb.js +1 -0
  6. package/dist/{4211.0399a499eefacb52.js → 4211.188f84c688ab656f.js} +1 -1
  7. package/dist/{7368.7d91d2ce7677e72a.js → 7368.fa9ed2cea7c284b8.js} +1 -1
  8. package/dist/{8296.b204438fa5439b1e.js → 8296.e4e3f60f70779a30.js} +1 -1
  9. package/dist/9575.30ac91b65602c0ca.js +1 -0
  10. package/dist/common.912ad7a22e5de63a.js +1 -0
  11. package/dist/index.html +1 -1
  12. package/dist/main.71d23d87fc0a83a2.js +1 -0
  13. package/dist/runtime.3e2c700389e48f46.js +1 -0
  14. package/main.js +1 -1
  15. package/package.json +4 -4
  16. package/sandbox/Dockerfile +1 -0
  17. package/sandbox/package.json +1 -4
  18. package/sandbox/sandbox.js +1 -1
  19. package/src/public/dist-db-masters/browser/assets/data/mime_types.json +1 -0
  20. package/src/public/dist-db-masters/browser/index.html +1 -1
  21. package/src/public/dist-db-masters/browser/main-LWHKTSAI.js +139 -0
  22. package/src/public/dist-db-masters/browser/main-TKPYMFGX.js +139 -0
  23. package/src/tools/local-client.js +1 -1
  24. package/dist/1097.51fa3413ab19b10c.js +0 -1
  25. package/dist/1617.ae52a2c64a228ace.js +0 -1
  26. package/dist/1678.d009ae459b731b2d.js +0 -1
  27. package/dist/3139.8a9b45f6545e48f4.js +0 -1
  28. package/dist/3664.79889ff090d64b8d.js +0 -1
  29. package/dist/5249.eb35e8578584cad0.js +0 -1
  30. package/dist/6925.e2366878306cf7f7.js +0 -1
  31. package/dist/8374.e72fc8226673c9d9.js +0 -1
  32. package/dist/8682.07ee1b8ac649ed4c.js +0 -1
  33. package/dist/9575.50120082195b31cc.js +0 -1
  34. package/dist/common.c4550210be4e415f.js +0 -1
  35. package/dist/main.d1a56ffd3d6266b9.js +0 -1
  36. package/dist/runtime.bb2a9060f1f8cb8e.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7368],{67368:(xe,S,s)=>{s.r(S),s.d(S,{SandboxSettingsM:()=>fe});var O=s(77664),D=s(63726),y=s(17017),M=s(75249),r=s(15861),e=s(94946),u=s(6990),v=s(33157),c=s(90328),k=s(51162),h=s(20553),I=s(54371),x=s(95852),b=s(33835),w=s(25405),Z=s(99961),p=s(85219),T=s(27414),U=s(62304),N=s(24977),P=s(53429),E=s(81344),J=s(77240),g=s(60095),_=s(96814),R=s(38147),G=s(91861),q=s(756),f=s(95431),K=s(97680),C=s(14844),A=s(33259),Y=s(32660);function F(a,l){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th",28),e._uU(4,"Action"),e.qZA()())}function H(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",31)(1,"button",32),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.editAllowedOrigin(n,o))}),e._UZ(2,"i",33),e.qZA(),e.TgZ(3,"button",34),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.removeAllowedOrigin(n,o))}),e._UZ(4,"i",35),e.qZA()()}}function L(a,l){if(1&a&&(e.TgZ(0,"tr",29)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,H,5,0,"div",30),e.qZA()()),2&a){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",!t.isReadOnly)}}function Q(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.save())}),e._UZ(1,"i",37),e.TgZ(2,"span"),e._uU(3,"Save"),e.qZA()()}}let V=(()=>{class a{authCS;userS;eventCenterCS;notificationS;cs;confirmationService;modalId="idAllowedOriginModal";subscriptions=[];allowedOriginsGridData=[];saveSettings=new e.vpe;gridKeyAllowedOrigins="name";allowedOriginModel={domainName:"",domainNameBak:""};exampleOrigin=location.origin;allowedOriginData={mode:c.D.ADD};EFormMode=c.D;selectedRowsUI=[];constructor(t,i,n,o,d,m){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.cs=d,this.confirmationService=m}ngOnInit(){}save(){var t=this;return(0,r.Z)(function*(){if(t.allowedOriginData.mode===c.D.ADD)t.allowedOriginsGridData.push({name:t.allowedOriginModel.domainName});else{const i=t.allowedOriginsGridData.findIndex(n=>n.name===t.allowedOriginModel.domainNameBak);t.allowedOriginsGridData[i].name=t.allowedOriginModel.domainName}t.allowedOriginsGridData=u.uniqBy(t.allowedOriginsGridData,"name"),t.saveSettings.emit(),t.hideAllowedOriginModal()})()}showAllowedOriginModal(){$("#idAllowedOriginModal").modal("show")}hideAllowedOriginModal(){$("#idAllowedOriginModal").modal("hide")}addAllowedOrigin(){var t=this;return(0,r.Z)(function*(){t.allowedOriginModel.domainNameBak=t.allowedOriginModel.domainName="",t.allowedOriginData.mode=c.D.ADD,t.showAllowedOriginModal()})()}editAllowedOrigin(t,i){var n=this;return(0,r.Z)(function*(){n.allowedOriginModel.domainNameBak=n.allowedOriginModel.domainName=i.name,n.allowedOriginData.mode=c.D.EDIT,n.showAllowedOriginModal()})()}doubleClick(){this.editAllowedOrigin(null,this.selectedRowsUI[0]).then()}removeAllowedOrigin(t,i){var n=this;return(0,r.Z)(function*(){var o;n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentAllowedOriginConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,r.Z)(function*(){yield n.removeAO(t,i)}),function(){return o.apply(this,arguments)})})})()}removeAO(t,i){var n=this;return(0,r.Z)(function*(){const o=n.allowedOriginsGridData.findIndex(d=>d.name===i.name);n.allowedOriginsGridData.splice(o,1),n.saveSettings.emit()})()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.Y36(x.D),e.Y36(b.K),e.Y36(w.M),e.Y36(Z.W),e.Y36(T.L),e.Y36(p.YP))};static \u0275cmp=e.Xpm({type:a,selectors:[["allowed-origin-c"]],inputs:{allowedOriginsGridData:["allowedOrigins","allowedOriginsGridData"]},outputs:{saveSettings:"saveSettings"},decls:37,vars:10,consts:[[1,"card","shadow-sm","mt-2","mr-1","mb-5",2,"height","384px"],[1,"card-header"],[1,"fas","fa-link","text-yellow","fa-fw","mr-1"],["pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","350px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["aria-hidden","true","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",3,"id"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","mt-3","mb-0"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["name","name","spellcheck","false","type","text","placeholder","Please provide domain name",1,"form-control","form-control-sm",3,"ngModel","blur","ngModelChange"],[1,"form-group","row"],[1,"col-form-label","col-form-label-sm","text-info","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"click",4,"ngIf"],[2,"width","100px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"text-center"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"]],template:function(i,n){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Allowed Origins"),e.qZA(),e.TgZ(5,"span",3),e.NdJ("click",function(){return n.addAllowedOrigin()}),e._UZ(6,"i",4),e.qZA()(),e.TgZ(7,"div",5)(8,"p-table",6),e.NdJ("selectionChange",function(d){return n.selectedRowsUI=d})("dblclick",function(){return n.doubleClick()}),e.YNc(9,F,5,0,"ng-template",7),e.YNc(10,L,5,3,"ng-template",8),e.qZA()()(),e.TgZ(11,"div",9)(12,"div",10)(13,"div",11)(14,"div",12)(15,"span"),e._UZ(16,"i",13),e._uU(17," Allowed Origins"),e.qZA(),e.TgZ(18,"button",14)(19,"span",15),e._UZ(20,"i",16),e.qZA()()(),e.TgZ(21,"div",17)(22,"div",18)(23,"label",19),e._uU(24,"Domain name"),e.qZA(),e.TgZ(25,"div",20)(26,"input",21),e.NdJ("blur",function(){return n.allowedOriginModel.domainName=n.allowedOriginModel.domainName.toLowerCase()})("ngModelChange",function(d){return n.allowedOriginModel.domainName=d}),e.qZA()()(),e.TgZ(27,"div",22),e._UZ(28,"label",19),e.TgZ(29,"div",20)(30,"label",23),e._uU(31),e.qZA()()()(),e.TgZ(32,"div",24)(33,"button",25),e._UZ(34,"i",26),e._uU(35," Close"),e.qZA(),e.YNc(36,Q,4,0,"button",27),e.qZA()()()()),2&i&&(e.xp6(8),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRowsUI)("dataKey",n.gridKeyAllowedOrigins)("scrollable",!0)("value",n.allowedOriginsGridData),e.xp6(3),e.s9C("id",n.modalId),e.xp6(15),e.Q6J("ngModel",n.allowedOriginModel.domainName),e.xp6(5),e.hij("(Ex: ",n.exampleOrigin,")"),e.xp6(5),e.Q6J("ngIf",n.allowedOriginData.mode!==n.EFormMode.VIEW))},dependencies:[g.Fj,g.JJ,g.On,_.O5,Y.y,f.iA,p.jx,f.Ei,A.u],encapsulation:2})}return a})();const B=["addNpmLibC"],j=["allowedOriginC"],W=["SandboxSettingsPkgVersionsModalC"];function z(a,l){1&a&&(e.TgZ(0,"tr"),e._UZ(1,"th",49)(2,"th",50),e.TgZ(3,"th",51),e._uU(4,"Version"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Name"),e.qZA(),e.TgZ(7,"th",52),e._uU(8,"Sub Dependencies"),e.qZA(),e.TgZ(9,"th",53),e._uU(10,"Third Party API"),e.qZA(),e.TgZ(11,"th",54),e._uU(12,"Default"),e.qZA(),e.TgZ(13,"th",55),e._uU(14,"Action"),e.qZA()())}function X(a,l){1&a&&e._UZ(0,"i",64)}function ee(a,l){1&a&&e._UZ(0,"i",65)}function te(a,l){if(1&a&&(e.TgZ(0,"div",67),e._uU(1),e.qZA()),2&a){const t=l.$implicit;e.xp6(1),e.AsE("",t.name," @",t.version,"")}}function ne(a,l){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,te,2,2,"div",66),e.qZA()),2&a){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.dependencies)}}function ie(a,l){1&a&&e._UZ(0,"i",68)}function ae(a,l){1&a&&e._UZ(0,"i",68)}function oe(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",61)(1,"button",69),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.editData(n,o))}),e._UZ(2,"i",70),e.qZA(),e.TgZ(3,"button",71),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.removePermanentDialog(n,o))}),e._UZ(4,"i",72),e.qZA()()}}function se(a,l){if(1&a&&(e.TgZ(0,"tr",56)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,X,1,0,"i",57),e.YNc(5,ee,1,0,"i",58),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td")(11,"div",59),e.YNc(12,ne,2,1,"div",60),e.qZA()(),e.TgZ(13,"td",61),e.YNc(14,ie,1,0,"i",62),e.qZA(),e.TgZ(15,"td",61),e.YNc(16,ae,1,0,"i",62),e.qZA(),e.TgZ(17,"td"),e.YNc(18,oe,5,0,"div",63),e.qZA()()),2&a){const t=l.$implicit,i=l.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(2),e.Oqu(t.version),e.xp6(2),e.Oqu(t.name),e.xp6(3),e.Q6J("ngForOf",t.subDependencies),e.xp6(2),e.Q6J("ngIf",t.isThirdPartyApi),e.xp6(2),e.Q6J("ngIf",t.isDefault),e.xp6(2),e.Q6J("ngIf",!t.isReadOnly)}}function le(a,l){1&a&&(e.TgZ(0,"tr"),e._UZ(1,"th",49),e.TgZ(2,"th",51),e._uU(3,"Version"),e.qZA(),e.TgZ(4,"th"),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"th",73),e._uU(7,"Third Party API"),e.qZA(),e.TgZ(8,"th",51),e._uU(9,"Default"),e.qZA()())}function de(a,l){1&a&&e._UZ(0,"i",68)}function re(a,l){1&a&&e._UZ(0,"i",68)}function ce(a,l){if(1&a&&(e.TgZ(0,"tr",56)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e.YNc(8,de,1,0,"i",62),e.qZA(),e.TgZ(9,"td"),e.YNc(10,re,1,0,"i",62),e.qZA()()),2&a){const t=l.$implicit,i=l.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.version),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",t.isThirdPartyApi),e.xp6(2),e.Q6J("ngIf",t.isDefault)}}function ge(a,l){1&a&&e._UZ(0,"p-progressSpinner",74)}function me(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"button",7),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.loadGridData())}),e._UZ(3,"i",8),e._uU(4," Refresh "),e.qZA(),e.TgZ(5,"button",9),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.saveSettings(n.EFormMode.EDIT))}),e._UZ(6,"i",10),e._uU(7," Save "),e.qZA()(),e.TgZ(8,"div",11)(9,"div",12)(10,"span"),e._UZ(11,"i",13),e._uU(12," Settings"),e.qZA()(),e.TgZ(13,"div",14)(14,"div",15)(15,"div",16)(16,"label",17),e._uU(17,"Sandbox Count"),e.qZA(),e.TgZ(18,"input",18),e.NdJ("ngModelChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.settings.sandbox.sandboxCountOverrideAdmin=n)}),e.qZA(),e.TgZ(19,"div",19)(20,"span",20)(21,"span"),e._uU(22,"1 CPU core will have one process and one process will have these many sandbox."),e.qZA(),e._UZ(23,"br"),e.TgZ(24,"span"),e._uU(25,"Ideally it should be 1-2."),e.qZA()()()(),e.TgZ(26,"div",21)(27,"label",17),e._uU(28,"Automatic Sandbox Restart In Seconds"),e.qZA(),e.TgZ(29,"input",22),e.NdJ("ngModelChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.settings.sandbox.automaticSandboxRestartInSeconds=n)}),e.qZA(),e.TgZ(30,"div",19)(31,"span",20)(32,"span",23),e._uU(33,"All sandbox will be restarted automatically after these many seconds across all servers, without failing any request."),e.qZA(),e._UZ(34,"br"),e.qZA()()()()()(),e.TgZ(35,"div",11)(36,"div",12)(37,"span"),e._UZ(38,"i",24),e._uU(39," Sandbox Dependencies"),e.qZA(),e.TgZ(40,"div",25)(41,"a",26),e._UZ(42,"img",27),e.qZA()(),e.TgZ(43,"span",28),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showLibraryModel())}),e._UZ(44,"i",29),e.qZA()(),e.TgZ(45,"div",30)(46,"p-tabView",31)(47,"p-tabPanel",32)(48,"p-table",33),e.NdJ("selectionChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRowsUI=n)})("dblclick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.summaryTableDoubleClick())}),e.YNc(49,z,15,0,"ng-template",34),e.YNc(50,se,19,10,"ng-template",35),e.qZA()(),e.TgZ(51,"p-tabPanel",36)(52,"p-table",37),e.NdJ("selectionChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRowsPackageJson=n)}),e.YNc(53,le,10,0,"ng-template",34),e.YNc(54,ce,11,6,"ng-template",35),e.qZA()()(),e.YNc(55,ge,1,0,"p-progressSpinner",38),e.qZA()(),e.TgZ(56,"div",11)(57,"div",12)(58,"span"),e._UZ(59,"i",39),e._uU(60," Docker File"),e.qZA(),e.TgZ(61,"span",40),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.resetDockerfileToDefault())}),e._UZ(62,"i",41),e.qZA(),e.TgZ(63,"span",42),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showDockerImageBuildLogs())}),e._UZ(64,"i",43),e.qZA()(),e.TgZ(65,"div",44)(66,"app-monaco-editor",45),e.NdJ("editorGenerated",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.editorGenerated(n))}),e.qZA()()(),e.TgZ(67,"allowed-origin-c",46,47),e.NdJ("saveSettings",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.saveSettings(n.EFormMode.EDIT))}),e.qZA(),e.TgZ(69,"div",48),e._uU(70,"\xa0"),e.qZA()()}if(2&a){const t=e.oxw();e.xp6(18),e.Q6J("ngModel",t.settings.sandbox.sandboxCountOverrideAdmin),e.xp6(11),e.Q6J("ngModel",t.settings.sandbox.automaticSandboxRestartInSeconds),e.xp6(19),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsUI)("dataKey",t.gridKey)("scrollable",!0)("value",t.packageSummary),e.xp6(4),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsPackageJson)("dataKey",t.gridKey)("scrollable",!0)("value",t.finalPackageJson),e.xp6(3),e.Q6J("ngIf",t.loading.form),e.xp6(11),e.Q6J("editorOptions",t.editorOptionsDocker),e.xp6(1),e.Q6J("allowedOrigins",t.settings.allowedOrigins)}}const pe=[{path:"main",component:(()=>{class a{authCS;userS;eventCenterCS;notificationS;confirmationService;cs;monacoS;tpStoreApiVersionS;instanceS;feStoreCS;generalCS;STORE_BE_HOST_PORT=h.N.STORE_BE_HOST_PORT;BE_HOST_PORT=h.N.BE_HOST_PORT;subscriptions=[];data={mode:c.D.ADD,eventChannel:new e.vpe,formData:void 0};packageSummary=[];selectedRowsUI=[];gridKey="rowId";counter;EFormMode=c.D;finalPackageJson=[];selectedRowsPackageJson=[];showAll=!1;loading={form:!1};settings;tpNpmPackageAndVersion={};tpApiVersionIdMap;tpApiBundleIdMap;editorDocker;editorOptionsDocker={readOnly:!1,language:"dockerfile",contextmenu:!0};addNpmLibC;allowedOriginC;SandboxSettingsPkgVersionsModalC;constructor(t,i,n,o,d,m,ue,_e,Se,ve,he){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.confirmationService=d,this.cs=m,this.monacoS=ue,this.tpStoreApiVersionS=_e,this.instanceS=Se,this.feStoreCS=ve,this.generalCS=he}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.subscriptions.push(t.eventCenterCS.sandboxDep.subscribe(i=>{if(t.data.mode===c.D.ADD){for(const n of t.packageSummary)if(n.name===i.name&&n.isDefault)return void t.notificationS.showError("You can not override default package.");t.packageSummary.unshift(i),t.rowIdSet(),t.notificationS.showSuccess(t.cs.amUserSandboxDepSetting.addSuccess),t.addNpmLibC.hideModal()}})),yield t.loadGridData(),t.generalCS.setNewTitle("API Maker - Sandbox Settings")})()}loadGridData(){var t=this;return(0,r.Z)(function*(){const i=yield t.userS.getAdminSettings(t.authCS.getUserId()).toPromise();t.settings=i.data||{},t.packageSummary=t.settings.sandbox.dependenciesUI.nodeJS,t.finalPackageJson=t.settings.sandbox.dependencies.nodeJS;const n=t.settings.allowedOrigins||[];t.settings.sandbox&&(t.settings.sandbox.automaticSandboxRestartInSeconds=t.settings.sandbox.automaticSandboxRestartInSeconds||null),n.sort(),t.settings.allowedOrigins=u.map(n,o=>({name:o})),t.rowIdSet();for(const o of t.finalPackageJson)o.rowId=(t.counter++).toString();t.generalCS.setValueInEditor(t,"editorDocker",t.settings.dockerFile||"")})()}editorGenerated(t){var i=this;return(0,r.Z)(function*(){i.editorDocker=t,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(t,n=>{i.saveSettings()})})()}rowIdSet(){this.counter=1;for(const t of this.packageSummary)t.rowId=(this.counter++).toString()}showLibraryModel(){this.data.formData=void 0,this.data.mode=c.D.ADD,this.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_ADD_MODE}),this.addNpmLibC.showModal()}saveSettings(t){var i=this;return(0,r.Z)(function*(){try{const n=i.authCS.getUserId();if(i?.settings?.sandbox?.sandboxCountOverrideAdmin>5)return void i.notificationS.showError("More than 5 sandbox are not allowed.");const o={settings:{sandbox:{sandboxCountOverrideAdmin:i.settings.sandbox.sandboxCountOverrideAdmin,automaticSandboxRestartInSeconds:i.settings.sandbox.automaticSandboxRestartInSeconds||null,dependencies:{nodeJS:i.packageSummary.filter(m=>!m.isReadOnly&&!m.isThirdPartyApi&&!m.isDefault)}},dockerFile:i.editorDocker.getValue(),allowedOrigins:u.map(i.allowedOriginC.allowedOriginsGridData,"name").sort()}};(yield i.userS.put(n,o,{select:k.iH._id}).toPromise())&&(t===c.D.EDIT?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.editSuccess):"DELETE"===t?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.removePermanent):t||i.notificationS.showSuccess("Success")),i.loadGridData().then()}catch(n){i.loading.form=!1,i.notificationS.showErrorFromResponse(n.error||n,"Unable to save settings.")}})()}removePermanentDialog(t,i){var n=this;return(0,r.Z)(function*(){var o;t.stopPropagation(),t.preventDefault(),n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,r.Z)(function*(){yield n.removePermanent(i)}),function(){return o.apply(this,arguments)})})})()}removePermanent(t){var i=this;return(0,r.Z)(function*(){i.packageSummary.splice(i.packageSummary.indexOf(t),1),i.saveSettings("DELETE").then()})()}loadDependenciesAndSchemas(){var t=this;return(0,r.Z)(function*(){const{tpNpmPackageAndVersion:i,tpApiBundleIdMap:n,tpApiVersionIdMap:o}=(yield t.instanceS.getInstalledPackagesAndSchemas().toPromise()).data;t.tpNpmPackageAndVersion=i,t.tpApiBundleIdMap=n,t.tpApiVersionIdMap=o})()}commonPackageAddRemoveTasks(){var t=this;return(0,r.Z)(function*(){yield t.loadDependenciesAndSchemas()})()}editData(t,i){var n=this;return(0,r.Z)(function*(){t?.stopPropagation(),t?.preventDefault(),n.data.formData=i,n.data.mode=c.D.EDIT,n.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_EDIT_MODE}),yield n.SandboxSettingsPkgVersionsModalC.showPkgVersions(i.name)})()}hideNpmLibModel(){this.addNpmLibC.hideModal()}resetDockerfileToDefault(){var t=this;return(0,r.Z)(function*(){try{const i=yield t.feStoreCS.geDefaultDockerfile(t.BE_HOST_PORT);t.editorDocker.setValue(i.data)}catch(i){t.notificationS.showErrorFromResponse(i.error||i,"Unable to reset docker file.")}})()}showDockerImageBuildLogs(){var t=this;return(0,r.Z)(function*(){const i=t.eventCenterCS.headerC,n=i.systemLogsModelC.systemLogsListC.filterOptions.find(o=>o.value===I.g.DOCKER_IMAGE_BUILD_LOGS);i.showSystemLogsModal(n)})()}summaryTableDoubleClick(){var t=this;setTimeout((0,r.Z)(function*(){if(t.selectedRowsUI[0]){let i;for(const n of t.packageSummary)n[t.gridKey]===t.selectedRowsUI[0].rowId&&(i=n);i&&!i.isReadOnly&&(yield t.editData(null,i))}}),100)}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.Y36(x.D),e.Y36(b.K),e.Y36(w.M),e.Y36(Z.W),e.Y36(p.YP),e.Y36(T.L),e.Y36(U.b),e.Y36(N.f),e.Y36(P.E),e.Y36(E.e),e.Y36(J.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-sandbox-settings-c"]],viewQuery:function(i,n){if(1&i&&(e.Gf(B,5),e.Gf(j,5),e.Gf(W,5)),2&i){let o;e.iGM(o=e.CRH())&&(n.addNpmLibC=o.first),e.iGM(o=e.CRH())&&(n.allowedOriginC=o.first),e.iGM(o=e.CRH())&&(n.SandboxSettingsPkgVersionsModalC=o.first)}},decls:6,vars:9,consts:[["class","pt-1 pl-5 pr-5 full-body overflow-auto",4,"ngIf"],[3,"data","pkgVersionModal","modalId","hostAndPort"],["addNpmLibC",""],[3,"modalId","hostAndPort","data","dependencies","saveUpdateSandboxDep","hideLibraryModelEventEmitter","installed"],["pkgVersionsModalC","","SandboxSettingsPkgVersionsModalC",""],[1,"pt-1","pl-5","pr-5","full-body","overflow-auto"],[1,"cursor-pointer","text-right","mr-1"],[1,"btn","btn-primary","btn-sm","mt-1","mr-1",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw","cursor-pointer"],[1,"btn","btn-success","btn-sm","mt-1",3,"click"],[1,"fas","fa-save","fa-fw","cursor-pointer"],[1,"card","shadow-sm","mt-2","mr-1"],[1,"card-header"],[1,"fas","fa-cog","text-danger","fa-fw","mr-1"],[1,"card-body","p-3","overflow-hidden"],[1,"container"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["name","Setting","type","number","placeholder","Please provide value",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"col-6","pr-0"],[1,"small","text-info"],[1,"row","mt-3"],["name","automaticSandboxRestartInSeconds","type","number","placeholder","Automatic sandbox restart in seconds",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2","d-inline-block"],[1,"fas","fa-box","text-warning","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/settings/sandboxSettings.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-2","overflow-hidden"],[1,"w-100"],["header","Summary"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["header","Final package.json"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fab","fa-docker","fa-fw","mr-1","text-info"],["tooltipPosition","left","pTooltip","Reset dockerfile to default",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-undo","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","View logs of docker image build",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-water","text-info","fa-fw"],[1,"card-body","p-1","overflow-hidden",2,"height","400px"],[3,"editorOptions","editorGenerated"],[3,"allowedOrigins","saveSettings"],["allowedOriginC",""],[1,"mb-5"],[2,"width","55px"],[2,"width","40px"],[2,"width","100px"],[2,"width","200px"],[1,"text-center",2,"width","150px"],[1,"text-center",2,"width","100px"],[1,"text-center",2,"width","130px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],[1,"small"],[4,"ngFor","ngForOf"],[1,"text-center"],["class","fas fa-check fa-fw text-success pt-1",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],["class","pl-3",4,"ngFor","ngForOf"],[1,"pl-3"],[1,"fas","fa-check","fa-fw","text-success","pt-1"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],[2,"width","150px"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){if(1&i&&(e.YNc(0,me,71,17,"div",0),e._UZ(1,"find-npm-package",1,2),e.TgZ(3,"app-sandbox-settings-pkg-versions-modal",3,4),e.NdJ("saveUpdateSandboxDep",function(d){return n.saveSettings(d)})("hideLibraryModelEventEmitter",function(){return n.hideNpmLibModel()})("installed",function(){return n.commonPackageAddRemoveTasks()}),e.qZA()),2&i){const o=e.MAs(4);e.Q6J("ngIf",n.settings),e.xp6(1),e.Q6J("data",n.data)("pkgVersionModal",o)("modalId","idAddNpmSandboxSettings")("hostAndPort",n.STORE_BE_HOST_PORT),e.xp6(2),e.Q6J("modalId","idAddNpmSandboxSettingsEdit")("hostAndPort",n.STORE_BE_HOST_PORT)("data",n.data)("dependencies",n.tpNpmPackageAndVersion)}},dependencies:[g.Fj,g.wV,g.JJ,g.On,_.sg,_.O5,R.K,G.S,q.O,f.iA,p.jx,f.Ei,K.G,C.xf,C.x4,A.u,V],encapsulation:2})}return a})(),canActivate:[D.P]}];let fe=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[O.Bz.forChild(pe),y.u,M.ApiTestingM]})}return a})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7368],{67368:(xe,S,s)=>{s.r(S),s.d(S,{SandboxSettingsM:()=>fe});var O=s(77664),D=s(63726),y=s(17017),M=s(70292),r=s(15861),e=s(94946),u=s(6990),v=s(33157),c=s(90328),k=s(51162),h=s(20553),I=s(54371),x=s(95852),b=s(33835),w=s(25405),Z=s(99961),p=s(85219),T=s(27414),U=s(62304),N=s(24977),P=s(53429),E=s(81344),J=s(77240),g=s(60095),_=s(96814),R=s(38147),G=s(91861),q=s(756),f=s(95431),K=s(97680),C=s(14844),A=s(33259),Y=s(32660);function F(a,l){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th",28),e._uU(4,"Action"),e.qZA()())}function H(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",31)(1,"button",32),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.editAllowedOrigin(n,o))}),e._UZ(2,"i",33),e.qZA(),e.TgZ(3,"button",34),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.removeAllowedOrigin(n,o))}),e._UZ(4,"i",35),e.qZA()()}}function L(a,l){if(1&a&&(e.TgZ(0,"tr",29)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,H,5,0,"div",30),e.qZA()()),2&a){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",!t.isReadOnly)}}function Q(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.save())}),e._UZ(1,"i",37),e.TgZ(2,"span"),e._uU(3,"Save"),e.qZA()()}}let V=(()=>{class a{authCS;userS;eventCenterCS;notificationS;cs;confirmationService;modalId="idAllowedOriginModal";subscriptions=[];allowedOriginsGridData=[];saveSettings=new e.vpe;gridKeyAllowedOrigins="name";allowedOriginModel={domainName:"",domainNameBak:""};exampleOrigin=location.origin;allowedOriginData={mode:c.D.ADD};EFormMode=c.D;selectedRowsUI=[];constructor(t,i,n,o,d,m){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.cs=d,this.confirmationService=m}ngOnInit(){}save(){var t=this;return(0,r.Z)(function*(){if(t.allowedOriginData.mode===c.D.ADD)t.allowedOriginsGridData.push({name:t.allowedOriginModel.domainName});else{const i=t.allowedOriginsGridData.findIndex(n=>n.name===t.allowedOriginModel.domainNameBak);t.allowedOriginsGridData[i].name=t.allowedOriginModel.domainName}t.allowedOriginsGridData=u.uniqBy(t.allowedOriginsGridData,"name"),t.saveSettings.emit(),t.hideAllowedOriginModal()})()}showAllowedOriginModal(){$("#idAllowedOriginModal").modal("show")}hideAllowedOriginModal(){$("#idAllowedOriginModal").modal("hide")}addAllowedOrigin(){var t=this;return(0,r.Z)(function*(){t.allowedOriginModel.domainNameBak=t.allowedOriginModel.domainName="",t.allowedOriginData.mode=c.D.ADD,t.showAllowedOriginModal()})()}editAllowedOrigin(t,i){var n=this;return(0,r.Z)(function*(){n.allowedOriginModel.domainNameBak=n.allowedOriginModel.domainName=i.name,n.allowedOriginData.mode=c.D.EDIT,n.showAllowedOriginModal()})()}doubleClick(){this.editAllowedOrigin(null,this.selectedRowsUI[0]).then()}removeAllowedOrigin(t,i){var n=this;return(0,r.Z)(function*(){var o;n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentAllowedOriginConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,r.Z)(function*(){yield n.removeAO(t,i)}),function(){return o.apply(this,arguments)})})})()}removeAO(t,i){var n=this;return(0,r.Z)(function*(){const o=n.allowedOriginsGridData.findIndex(d=>d.name===i.name);n.allowedOriginsGridData.splice(o,1),n.saveSettings.emit()})()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.Y36(x.D),e.Y36(b.K),e.Y36(w.M),e.Y36(Z.W),e.Y36(T.L),e.Y36(p.YP))};static \u0275cmp=e.Xpm({type:a,selectors:[["allowed-origin-c"]],inputs:{allowedOriginsGridData:["allowedOrigins","allowedOriginsGridData"]},outputs:{saveSettings:"saveSettings"},decls:37,vars:10,consts:[[1,"card","shadow-sm","mt-2","mr-1","mb-5",2,"height","384px"],[1,"card-header"],[1,"fas","fa-link","text-yellow","fa-fw","mr-1"],["pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","350px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["aria-hidden","true","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",3,"id"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","mt-3","mb-0"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["name","name","spellcheck","false","type","text","placeholder","Please provide domain name",1,"form-control","form-control-sm",3,"ngModel","blur","ngModelChange"],[1,"form-group","row"],[1,"col-form-label","col-form-label-sm","text-info","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"click",4,"ngIf"],[2,"width","100px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"text-center"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"]],template:function(i,n){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Allowed Origins"),e.qZA(),e.TgZ(5,"span",3),e.NdJ("click",function(){return n.addAllowedOrigin()}),e._UZ(6,"i",4),e.qZA()(),e.TgZ(7,"div",5)(8,"p-table",6),e.NdJ("selectionChange",function(d){return n.selectedRowsUI=d})("dblclick",function(){return n.doubleClick()}),e.YNc(9,F,5,0,"ng-template",7),e.YNc(10,L,5,3,"ng-template",8),e.qZA()()(),e.TgZ(11,"div",9)(12,"div",10)(13,"div",11)(14,"div",12)(15,"span"),e._UZ(16,"i",13),e._uU(17," Allowed Origins"),e.qZA(),e.TgZ(18,"button",14)(19,"span",15),e._UZ(20,"i",16),e.qZA()()(),e.TgZ(21,"div",17)(22,"div",18)(23,"label",19),e._uU(24,"Domain name"),e.qZA(),e.TgZ(25,"div",20)(26,"input",21),e.NdJ("blur",function(){return n.allowedOriginModel.domainName=n.allowedOriginModel.domainName.toLowerCase()})("ngModelChange",function(d){return n.allowedOriginModel.domainName=d}),e.qZA()()(),e.TgZ(27,"div",22),e._UZ(28,"label",19),e.TgZ(29,"div",20)(30,"label",23),e._uU(31),e.qZA()()()(),e.TgZ(32,"div",24)(33,"button",25),e._UZ(34,"i",26),e._uU(35," Close"),e.qZA(),e.YNc(36,Q,4,0,"button",27),e.qZA()()()()),2&i&&(e.xp6(8),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRowsUI)("dataKey",n.gridKeyAllowedOrigins)("scrollable",!0)("value",n.allowedOriginsGridData),e.xp6(3),e.s9C("id",n.modalId),e.xp6(15),e.Q6J("ngModel",n.allowedOriginModel.domainName),e.xp6(5),e.hij("(Ex: ",n.exampleOrigin,")"),e.xp6(5),e.Q6J("ngIf",n.allowedOriginData.mode!==n.EFormMode.VIEW))},dependencies:[g.Fj,g.JJ,g.On,_.O5,Y.y,f.iA,p.jx,f.Ei,A.u],encapsulation:2})}return a})();const B=["addNpmLibC"],j=["allowedOriginC"],W=["SandboxSettingsPkgVersionsModalC"];function z(a,l){1&a&&(e.TgZ(0,"tr"),e._UZ(1,"th",49)(2,"th",50),e.TgZ(3,"th",51),e._uU(4,"Version"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Name"),e.qZA(),e.TgZ(7,"th",52),e._uU(8,"Sub Dependencies"),e.qZA(),e.TgZ(9,"th",53),e._uU(10,"Third Party API"),e.qZA(),e.TgZ(11,"th",54),e._uU(12,"Default"),e.qZA(),e.TgZ(13,"th",55),e._uU(14,"Action"),e.qZA()())}function X(a,l){1&a&&e._UZ(0,"i",64)}function ee(a,l){1&a&&e._UZ(0,"i",65)}function te(a,l){if(1&a&&(e.TgZ(0,"div",67),e._uU(1),e.qZA()),2&a){const t=l.$implicit;e.xp6(1),e.AsE("",t.name," @",t.version,"")}}function ne(a,l){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,te,2,2,"div",66),e.qZA()),2&a){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.dependencies)}}function ie(a,l){1&a&&e._UZ(0,"i",68)}function ae(a,l){1&a&&e._UZ(0,"i",68)}function oe(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",61)(1,"button",69),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.editData(n,o))}),e._UZ(2,"i",70),e.qZA(),e.TgZ(3,"button",71),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.removePermanentDialog(n,o))}),e._UZ(4,"i",72),e.qZA()()}}function se(a,l){if(1&a&&(e.TgZ(0,"tr",56)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,X,1,0,"i",57),e.YNc(5,ee,1,0,"i",58),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td")(11,"div",59),e.YNc(12,ne,2,1,"div",60),e.qZA()(),e.TgZ(13,"td",61),e.YNc(14,ie,1,0,"i",62),e.qZA(),e.TgZ(15,"td",61),e.YNc(16,ae,1,0,"i",62),e.qZA(),e.TgZ(17,"td"),e.YNc(18,oe,5,0,"div",63),e.qZA()()),2&a){const t=l.$implicit,i=l.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(2),e.Oqu(t.version),e.xp6(2),e.Oqu(t.name),e.xp6(3),e.Q6J("ngForOf",t.subDependencies),e.xp6(2),e.Q6J("ngIf",t.isThirdPartyApi),e.xp6(2),e.Q6J("ngIf",t.isDefault),e.xp6(2),e.Q6J("ngIf",!t.isReadOnly)}}function le(a,l){1&a&&(e.TgZ(0,"tr"),e._UZ(1,"th",49),e.TgZ(2,"th",51),e._uU(3,"Version"),e.qZA(),e.TgZ(4,"th"),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"th",73),e._uU(7,"Third Party API"),e.qZA(),e.TgZ(8,"th",51),e._uU(9,"Default"),e.qZA()())}function de(a,l){1&a&&e._UZ(0,"i",68)}function re(a,l){1&a&&e._UZ(0,"i",68)}function ce(a,l){if(1&a&&(e.TgZ(0,"tr",56)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e.YNc(8,de,1,0,"i",62),e.qZA(),e.TgZ(9,"td"),e.YNc(10,re,1,0,"i",62),e.qZA()()),2&a){const t=l.$implicit,i=l.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.version),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",t.isThirdPartyApi),e.xp6(2),e.Q6J("ngIf",t.isDefault)}}function ge(a,l){1&a&&e._UZ(0,"p-progressSpinner",74)}function me(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"button",7),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.loadGridData())}),e._UZ(3,"i",8),e._uU(4," Refresh "),e.qZA(),e.TgZ(5,"button",9),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.saveSettings(n.EFormMode.EDIT))}),e._UZ(6,"i",10),e._uU(7," Save "),e.qZA()(),e.TgZ(8,"div",11)(9,"div",12)(10,"span"),e._UZ(11,"i",13),e._uU(12," Settings"),e.qZA()(),e.TgZ(13,"div",14)(14,"div",15)(15,"div",16)(16,"label",17),e._uU(17,"Sandbox Count"),e.qZA(),e.TgZ(18,"input",18),e.NdJ("ngModelChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.settings.sandbox.sandboxCountOverrideAdmin=n)}),e.qZA(),e.TgZ(19,"div",19)(20,"span",20)(21,"span"),e._uU(22,"1 CPU core will have one process and one process will have these many sandbox."),e.qZA(),e._UZ(23,"br"),e.TgZ(24,"span"),e._uU(25,"Ideally it should be 1-2."),e.qZA()()()(),e.TgZ(26,"div",21)(27,"label",17),e._uU(28,"Automatic Sandbox Restart In Seconds"),e.qZA(),e.TgZ(29,"input",22),e.NdJ("ngModelChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.settings.sandbox.automaticSandboxRestartInSeconds=n)}),e.qZA(),e.TgZ(30,"div",19)(31,"span",20)(32,"span",23),e._uU(33,"All sandbox will be restarted automatically after these many seconds across all servers, without failing any request."),e.qZA(),e._UZ(34,"br"),e.qZA()()()()()(),e.TgZ(35,"div",11)(36,"div",12)(37,"span"),e._UZ(38,"i",24),e._uU(39," Sandbox Dependencies"),e.qZA(),e.TgZ(40,"div",25)(41,"a",26),e._UZ(42,"img",27),e.qZA()(),e.TgZ(43,"span",28),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showLibraryModel())}),e._UZ(44,"i",29),e.qZA()(),e.TgZ(45,"div",30)(46,"p-tabView",31)(47,"p-tabPanel",32)(48,"p-table",33),e.NdJ("selectionChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRowsUI=n)})("dblclick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.summaryTableDoubleClick())}),e.YNc(49,z,15,0,"ng-template",34),e.YNc(50,se,19,10,"ng-template",35),e.qZA()(),e.TgZ(51,"p-tabPanel",36)(52,"p-table",37),e.NdJ("selectionChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRowsPackageJson=n)}),e.YNc(53,le,10,0,"ng-template",34),e.YNc(54,ce,11,6,"ng-template",35),e.qZA()()(),e.YNc(55,ge,1,0,"p-progressSpinner",38),e.qZA()(),e.TgZ(56,"div",11)(57,"div",12)(58,"span"),e._UZ(59,"i",39),e._uU(60," Docker File"),e.qZA(),e.TgZ(61,"span",40),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.resetDockerfileToDefault())}),e._UZ(62,"i",41),e.qZA(),e.TgZ(63,"span",42),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showDockerImageBuildLogs())}),e._UZ(64,"i",43),e.qZA()(),e.TgZ(65,"div",44)(66,"app-monaco-editor",45),e.NdJ("editorGenerated",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.editorGenerated(n))}),e.qZA()()(),e.TgZ(67,"allowed-origin-c",46,47),e.NdJ("saveSettings",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.saveSettings(n.EFormMode.EDIT))}),e.qZA(),e.TgZ(69,"div",48),e._uU(70,"\xa0"),e.qZA()()}if(2&a){const t=e.oxw();e.xp6(18),e.Q6J("ngModel",t.settings.sandbox.sandboxCountOverrideAdmin),e.xp6(11),e.Q6J("ngModel",t.settings.sandbox.automaticSandboxRestartInSeconds),e.xp6(19),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsUI)("dataKey",t.gridKey)("scrollable",!0)("value",t.packageSummary),e.xp6(4),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsPackageJson)("dataKey",t.gridKey)("scrollable",!0)("value",t.finalPackageJson),e.xp6(3),e.Q6J("ngIf",t.loading.form),e.xp6(11),e.Q6J("editorOptions",t.editorOptionsDocker),e.xp6(1),e.Q6J("allowedOrigins",t.settings.allowedOrigins)}}const pe=[{path:"main",component:(()=>{class a{authCS;userS;eventCenterCS;notificationS;confirmationService;cs;monacoS;tpStoreApiVersionS;instanceS;feStoreCS;generalCS;STORE_BE_HOST_PORT=h.N.STORE_BE_HOST_PORT;BE_HOST_PORT=h.N.BE_HOST_PORT;subscriptions=[];data={mode:c.D.ADD,eventChannel:new e.vpe,formData:void 0};packageSummary=[];selectedRowsUI=[];gridKey="rowId";counter;EFormMode=c.D;finalPackageJson=[];selectedRowsPackageJson=[];showAll=!1;loading={form:!1};settings;tpNpmPackageAndVersion={};tpApiVersionIdMap;tpApiBundleIdMap;editorDocker;editorOptionsDocker={readOnly:!1,language:"dockerfile",contextmenu:!0};addNpmLibC;allowedOriginC;SandboxSettingsPkgVersionsModalC;constructor(t,i,n,o,d,m,ue,_e,Se,ve,he){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.confirmationService=d,this.cs=m,this.monacoS=ue,this.tpStoreApiVersionS=_e,this.instanceS=Se,this.feStoreCS=ve,this.generalCS=he}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.subscriptions.push(t.eventCenterCS.sandboxDep.subscribe(i=>{if(t.data.mode===c.D.ADD){for(const n of t.packageSummary)if(n.name===i.name&&n.isDefault)return void t.notificationS.showError("You can not override default package.");t.packageSummary.unshift(i),t.rowIdSet(),t.notificationS.showSuccess(t.cs.amUserSandboxDepSetting.addSuccess),t.addNpmLibC.hideModal()}})),yield t.loadGridData(),t.generalCS.setNewTitle("API Maker - Sandbox Settings")})()}loadGridData(){var t=this;return(0,r.Z)(function*(){const i=yield t.userS.getAdminSettings(t.authCS.getUserId()).toPromise();t.settings=i.data||{},t.packageSummary=t.settings.sandbox.dependenciesUI.nodeJS,t.finalPackageJson=t.settings.sandbox.dependencies.nodeJS;const n=t.settings.allowedOrigins||[];t.settings.sandbox&&(t.settings.sandbox.automaticSandboxRestartInSeconds=t.settings.sandbox.automaticSandboxRestartInSeconds||null),n.sort(),t.settings.allowedOrigins=u.map(n,o=>({name:o})),t.rowIdSet();for(const o of t.finalPackageJson)o.rowId=(t.counter++).toString();t.generalCS.setValueInEditor(t,"editorDocker",t.settings.dockerFile||"")})()}editorGenerated(t){var i=this;return(0,r.Z)(function*(){i.editorDocker=t,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(t,n=>{i.saveSettings()})})()}rowIdSet(){this.counter=1;for(const t of this.packageSummary)t.rowId=(this.counter++).toString()}showLibraryModel(){this.data.formData=void 0,this.data.mode=c.D.ADD,this.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_ADD_MODE}),this.addNpmLibC.showModal()}saveSettings(t){var i=this;return(0,r.Z)(function*(){try{const n=i.authCS.getUserId();if(i?.settings?.sandbox?.sandboxCountOverrideAdmin>5)return void i.notificationS.showError("More than 5 sandbox are not allowed.");const o={settings:{sandbox:{sandboxCountOverrideAdmin:i.settings.sandbox.sandboxCountOverrideAdmin,automaticSandboxRestartInSeconds:i.settings.sandbox.automaticSandboxRestartInSeconds||null,dependencies:{nodeJS:i.packageSummary.filter(m=>!m.isReadOnly&&!m.isThirdPartyApi&&!m.isDefault)}},dockerFile:i.editorDocker.getValue(),allowedOrigins:u.map(i.allowedOriginC.allowedOriginsGridData,"name").sort()}};(yield i.userS.put(n,o,{select:k.iH._id}).toPromise())&&(t===c.D.EDIT?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.editSuccess):"DELETE"===t?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.removePermanent):t||i.notificationS.showSuccess("Success")),i.loadGridData().then()}catch(n){i.loading.form=!1,i.notificationS.showErrorFromResponse(n.error||n,"Unable to save settings.")}})()}removePermanentDialog(t,i){var n=this;return(0,r.Z)(function*(){var o;t.stopPropagation(),t.preventDefault(),n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,r.Z)(function*(){yield n.removePermanent(i)}),function(){return o.apply(this,arguments)})})})()}removePermanent(t){var i=this;return(0,r.Z)(function*(){i.packageSummary.splice(i.packageSummary.indexOf(t),1),i.saveSettings("DELETE").then()})()}loadDependenciesAndSchemas(){var t=this;return(0,r.Z)(function*(){const{tpNpmPackageAndVersion:i,tpApiBundleIdMap:n,tpApiVersionIdMap:o}=(yield t.instanceS.getInstalledPackagesAndSchemas().toPromise()).data;t.tpNpmPackageAndVersion=i,t.tpApiBundleIdMap=n,t.tpApiVersionIdMap=o})()}commonPackageAddRemoveTasks(){var t=this;return(0,r.Z)(function*(){yield t.loadDependenciesAndSchemas()})()}editData(t,i){var n=this;return(0,r.Z)(function*(){t?.stopPropagation(),t?.preventDefault(),n.data.formData=i,n.data.mode=c.D.EDIT,n.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_EDIT_MODE}),yield n.SandboxSettingsPkgVersionsModalC.showPkgVersions(i.name)})()}hideNpmLibModel(){this.addNpmLibC.hideModal()}resetDockerfileToDefault(){var t=this;return(0,r.Z)(function*(){try{const i=yield t.feStoreCS.geDefaultDockerfile(t.BE_HOST_PORT);t.editorDocker.setValue(i.data)}catch(i){t.notificationS.showErrorFromResponse(i.error||i,"Unable to reset docker file.")}})()}showDockerImageBuildLogs(){var t=this;return(0,r.Z)(function*(){const i=t.eventCenterCS.headerC,n=i.systemLogsModelC.systemLogsListC.filterOptions.find(o=>o.value===I.g.DOCKER_IMAGE_BUILD_LOGS);i.showSystemLogsModal(n)})()}summaryTableDoubleClick(){var t=this;setTimeout((0,r.Z)(function*(){if(t.selectedRowsUI[0]){let i;for(const n of t.packageSummary)n[t.gridKey]===t.selectedRowsUI[0].rowId&&(i=n);i&&!i.isReadOnly&&(yield t.editData(null,i))}}),100)}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.Y36(x.D),e.Y36(b.K),e.Y36(w.M),e.Y36(Z.W),e.Y36(p.YP),e.Y36(T.L),e.Y36(U.b),e.Y36(N.f),e.Y36(P.E),e.Y36(E.e),e.Y36(J.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-sandbox-settings-c"]],viewQuery:function(i,n){if(1&i&&(e.Gf(B,5),e.Gf(j,5),e.Gf(W,5)),2&i){let o;e.iGM(o=e.CRH())&&(n.addNpmLibC=o.first),e.iGM(o=e.CRH())&&(n.allowedOriginC=o.first),e.iGM(o=e.CRH())&&(n.SandboxSettingsPkgVersionsModalC=o.first)}},decls:6,vars:9,consts:[["class","pt-1 pl-5 pr-5 full-body overflow-auto",4,"ngIf"],[3,"data","pkgVersionModal","modalId","hostAndPort"],["addNpmLibC",""],[3,"modalId","hostAndPort","data","dependencies","saveUpdateSandboxDep","hideLibraryModelEventEmitter","installed"],["pkgVersionsModalC","","SandboxSettingsPkgVersionsModalC",""],[1,"pt-1","pl-5","pr-5","full-body","overflow-auto"],[1,"cursor-pointer","text-right","mr-1"],[1,"btn","btn-primary","btn-sm","mt-1","mr-1",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw","cursor-pointer"],[1,"btn","btn-success","btn-sm","mt-1",3,"click"],[1,"fas","fa-save","fa-fw","cursor-pointer"],[1,"card","shadow-sm","mt-2","mr-1"],[1,"card-header"],[1,"fas","fa-cog","text-danger","fa-fw","mr-1"],[1,"card-body","p-3","overflow-hidden"],[1,"container"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["name","Setting","type","number","placeholder","Please provide value",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"col-6","pr-0"],[1,"small","text-info"],[1,"row","mt-3"],["name","automaticSandboxRestartInSeconds","type","number","placeholder","Automatic sandbox restart in seconds",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2","d-inline-block"],[1,"fas","fa-box","text-warning","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/settings/sandboxSettings.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-2","overflow-hidden"],[1,"w-100"],["header","Summary"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["header","Final package.json"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fab","fa-docker","fa-fw","mr-1","text-info"],["tooltipPosition","left","pTooltip","Reset dockerfile to default",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-undo","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","View logs of docker image build",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-water","text-info","fa-fw"],[1,"card-body","p-1","overflow-hidden",2,"height","400px"],[3,"editorOptions","editorGenerated"],[3,"allowedOrigins","saveSettings"],["allowedOriginC",""],[1,"mb-5"],[2,"width","55px"],[2,"width","40px"],[2,"width","100px"],[2,"width","200px"],[1,"text-center",2,"width","150px"],[1,"text-center",2,"width","100px"],[1,"text-center",2,"width","130px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],[1,"small"],[4,"ngFor","ngForOf"],[1,"text-center"],["class","fas fa-check fa-fw text-success pt-1",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],["class","pl-3",4,"ngFor","ngForOf"],[1,"pl-3"],[1,"fas","fa-check","fa-fw","text-success","pt-1"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],[2,"width","150px"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){if(1&i&&(e.YNc(0,me,71,17,"div",0),e._UZ(1,"find-npm-package",1,2),e.TgZ(3,"app-sandbox-settings-pkg-versions-modal",3,4),e.NdJ("saveUpdateSandboxDep",function(d){return n.saveSettings(d)})("hideLibraryModelEventEmitter",function(){return n.hideNpmLibModel()})("installed",function(){return n.commonPackageAddRemoveTasks()}),e.qZA()),2&i){const o=e.MAs(4);e.Q6J("ngIf",n.settings),e.xp6(1),e.Q6J("data",n.data)("pkgVersionModal",o)("modalId","idAddNpmSandboxSettings")("hostAndPort",n.STORE_BE_HOST_PORT),e.xp6(2),e.Q6J("modalId","idAddNpmSandboxSettingsEdit")("hostAndPort",n.STORE_BE_HOST_PORT)("data",n.data)("dependencies",n.tpNpmPackageAndVersion)}},dependencies:[g.Fj,g.wV,g.JJ,g.On,_.sg,_.O5,R.K,G.S,q.O,f.iA,p.jx,f.Ei,K.G,C.xf,C.x4,A.u,V],encapsulation:2})}return a})(),canActivate:[D.P]}];let fe=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[O.Bz.forChild(pe),y.u,M.ApiTestingM]})}return a})()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{48296:(Mt,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Dt});var J=d(77664),Q=d(17017),B=d(63726),H=d(81025),u=d(15861),e=d(94946),r=d(6990),T=d(96925),N=d(33157),E=d(90328),p=d(51162),c=d(45085),D=d(70819),Y=d(95852),F=d(77240),G=d(53429),K=d(67629),L=d(32915),V=d(31042),j=d(67145),W=d(10262),X=d(81429),Z=d(85219),b=d(27414),M=d(90204),R=d(60095),_=d(96814),x=d(95431),q=d(97680),w=d(33259),z=d(51532),ee=d(42169),U=d(99961),te=d(32660),ie=d(55043),se=d(63885),ae=d(559),ne=d(86937),le=d(40356),oe=d(79329),re=d(37595),de=d(53824),pe=d(58651),ce=d(86607),ue=d(5305),ge=d(72726);function me(a,o){1&a&&(e.TgZ(0,"div",38),e._UZ(1,"app-w-instances",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function _e(a,o){1&a&&(e.TgZ(0,"div",40),e._UZ(1,"app-w-databases",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e._UZ(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let fe=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.R;loading={form:!1};constructor(t,i,s){this.eventCenterS=t,this.notificationS=i,this.constantsS=s}ngOnInit(){}showModal(){$("#idFilterPanelInLogsTableForm").modal("show")}hideModal(){$("#idFilterPanelInLogsTableForm").modal("hide")}applyFilter(){const t={};t.supportedAPIs=this.eventCenterS.filterInLog.supportedAPIs.value,t.customApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.functions.value),t.systemApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.systemApis.value),t.eventsApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.eventsApis.value),t.schedulersApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.schedulersApis.value),t.webSocketEvents=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.webSocketApis.value),t.thirdPartyApis=this.eventCenterS.filterInLog.thirdPartyAPIs.value,t.queryParams={},t.apisRegex=this.eventCenterS.filterInLog.apisRegex,this.setDataInObjectFromEventCenter(t),this.data.eventChannel.emit({action:N.F.APPLY_FILTER,data:t}),this.notificationS.showSuccess("Success.")}setDataInObjectFromEventCenter(t){t.queryParams.instanceIds=this.eventCenterS.filterInLog.instanceIds.value,t.queryParams.databaseIds=this.eventCenterS.filterInLog.databaseIds.value,t.queryParams.databaseNames=this.eventCenterS.filterInLog.databaseNames.value,t.queryParams.collectionIds=this.eventCenterS.filterInLog.collectionIds.value,t.queryParams.collectionNames=this.eventCenterS.filterInLog.collectionNames.value,t.queryParams.supportedApiIds=this.eventCenterS.filterInLog.supportedApiIds.value,t.queryParams.supportedApiNames=this.eventCenterS.filterInLog.supportedApiNames.value,t.queryParams.functions=this.eventCenterS.filterInLog.functionIds.value,t.queryParams.systemApis=this.eventCenterS.filterInLog.systemApiIds.value,t.queryParams.eventIds=this.eventCenterS.filterInLog.eventIds.value,t.queryParams.schedulersIds=this.eventCenterS.filterInLog.schedulersIds.value,t.queryParams.webSocketIds=this.eventCenterS.filterInLog.webSocketIds.value,this.setThirdPartyApiIds(t)}setThirdPartyApiIds(t){const i=this.eventCenterS.filterInLog.thirdPartyApiIds.value,s=[];for(const n of i)n.length>=24&&s.push(n);t.queryParams.thirdPartyApis=s}getPermissionMapFunctions(t){const i={};for(const s of t||[])i[s._id]=!0;return i}ngOnDestroy(){this.eventCenterS.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-filter-panel-layout-model"]],inputs:{data:"data"},decls:52,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFilterPanelInLogsTableForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content",2,"max-height","calc(100vh - 58px)"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-categories"],[1,"vertical-height-max"],[3,"isFilterLogTable","typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"v-div","w-ins-apis"],[1,"vertical-height-max",2,"width","500px"],[3,"isLPM","isFilterLogTable","treeViewId"],[1,"v-div","w-third-party"],[1,"vertical-height-tp-api"],[3,"isFilterLogTable","isLPM","IsDependentOnGroup"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","isFilterLogTable","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","isFilterLogTable","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","showCheckbox","IsReadOnly","isFilterLogTable","isLPM"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-filter","text-yellow","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"vertical-height-instances","w-100"],[1,"w-100",3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6,"Filter "),e.qZA(),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e._UZ(14,"app-w-api-categories",12),e.qZA()(),e.TgZ(15,"div",13)(16,"p-splitter",14),e.YNc(17,me,2,3,"ng-template",15),e.YNc(18,_e,2,3,"ng-template",15),e.qZA()(),e.TgZ(19,"div",16)(20,"div",11),e._UZ(21,"app-w-collections",17),e.qZA()(),e.TgZ(22,"div",18)(23,"div",19),e._UZ(24,"app-w-supported-api",20),e.qZA()(),e.TgZ(25,"div",21)(26,"div",22),e._UZ(27,"app-w-supported-tp-api",23),e.qZA()(),e.TgZ(28,"div",24)(29,"div",11),e._UZ(30,"app-custom-api-grid",25),e.qZA()(),e.TgZ(31,"div",26)(32,"div",11),e._UZ(33,"app-system-api-w",25),e.qZA()(),e.TgZ(34,"div",27)(35,"div",11),e._UZ(36,"app-events-grid",25),e.qZA()(),e.TgZ(37,"div",28)(38,"div",11),e._UZ(39,"app-scheduler-man-w",29),e.qZA()(),e.TgZ(40,"div",30)(41,"div",11),e._UZ(42,"app-web-socket-events-grid",31),e.qZA()()()(),e.TgZ(43,"div",32)(44,"button",33),e._UZ(45,"i",34),e._uU(46," Cancel"),e.qZA(),e.TgZ(47,"button",35),e.NdJ("click",function(){return s.applyFilter()}),e._UZ(48,"i",36),e.TgZ(49,"span"),e._uU(50,"Apply Filter"),e.qZA()()(),e.YNc(51,he,1,0,"p-progressSpinner",37),e.qZA()()()),2&i&&(e.xp6(14),e.Q6J("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(53,ve)),e.xp6(3),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(9),e.Q6J("ngIf",s.loading.form))},dependencies:[_.O5,te.y,Z.jx,q.G,ie.q,se.f,ae.O,ne.n,le.T,oe.X,re.G,de.d,pe.A,ce.V,ue.N,ge.x],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 410px)}.vertical-height-max[_ngcontent-%COMP%], .vertical-height-tp-api[_ngcontent-%COMP%]{height:calc(100vh - 154px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 158px);float:left}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:25rem}.w-collection[_ngcontent-%COMP%]{width:28rem}.w-ins-apis[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%], .w-events[_ngcontent-%COMP%], .w-schedulers[_ngcontent-%COMP%]{width:calc(100vw - 24.5rem)}"]})}return a})();var f=d(27672),ye=d(62304),Ce=d(756),Ae=d(84066);function Te(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2,"Tenant Username"),e.qZA(),e.TgZ(3,"td"),e._uU(4," :"),e.qZA(),e.TgZ(5,"td",19),e._uU(6),e.qZA()()),2&a){const t=e.oxw();e.xp6(6),e.Oqu(null==t.inputData?null:t.inputData.tenantUsername)}}function Ze(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function xe(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}function Ie(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function Se(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}const Le=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},O=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let be=(()=>{class a{ec;notificationS;generalCS;constantsCS;logS;cd;monacoS;constantsS;EAPICategory=c.R;loading={form:!1};selectedRowData;reqHeaders=[];resHeaders=[];inputData;editorReqQueryParams;editorOptionReqQueryParams={readOnly:!1,language:"json",contextmenu:!1};editorReqBody;editorOptionReqBody={readOnly:!1,language:"json",contextmenu:!1};editorResBody;editorOptionResBody={readOnly:!1,language:"json",contextmenu:!1};editorLogs;editorOptionLogs={readOnly:!1,language:"text",contextmenu:!1};reqHeaderCollapse;reqQueryParamsCollapse;reqBodyCollapse;resHeaderCollapse;resQueryParamsCollapse;resBodyCollapse;logsBodyCollapse;ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.constantsCS=n,this.logS=l,this.cd=g,this.monacoS=h,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.Z)(function*(){try{if(i.inputData=t[0],!i.inputData)return;yield i.getLogByID(i.inputData._id),i.collapseAll(),$("#idLogDetailsLayoutModal").modal("show")}catch(s){console.log(s)}})()}getLogByID(t){var i=this;return(0,u.Z)(function*(){const s=(yield i.logS.getById(t).toPromise()).data;if(i.inputData=Object.assign({},i.inputData,s),s){s.pathVariables=JSON.parse(s.pathVariables||"{}"),s.meta&&(s.executionTime=s.meta?.executionTime),s.createdAt=moment(s.createdAt).format("DD-MM-YYYY hh:mm:ss A"),s.updatedAt=moment(s.updatedAt).format("DD-MM-YYYY hh:mm:ss A");for(const l of i.getKeys(s.pathVariables))s[l]=s.pathVariables[l];for(const l of s.apiErrors||[])for(const g of i.getKeys(l))s[g]=l[g];delete s.pathVariables,delete s.apiErrors,delete s.meta,delete s._id,delete s.user,delete s.instance,delete s.apiUser}if(i.selectedRowData=s,i.reqHeaders=i.selectedRowData?.reqHeaders?Object.entries(i.selectedRowData.reqHeaders):[],i.generalCS.setValueInEditor(i,"editorReqQueryParams",i.selectedRowData.queryParams||""),i.generalCS.setValueInEditor(i,"editorReqBody",i.selectedRowData.reqPayload||""),i.selectedRowData.resHeaders){i.resHeaders=Object.entries(i.selectedRowData.resHeaders);const l=i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE].indexOf(f.g7.JSON)>=0)&&(n=JSON.stringify(i.selectedRowData.resPayload)),i.generalCS.setValueInEditor(i,"editorResBody",n||""),i.generalCS.setValueInEditor(i,"editorLogs",i.selectedRowData.logs||""),i.cd.detectChanges()})()}setResponseBodyLanguage(t){var i=this;return(0,u.Z)(function*(){t.indexOf(f.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.TEXT)>=0&&(i.editorOptionResBody.language="plaintext",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language))})()}getKeys(t){return t?Object.keys(t):[]}requestHeaderClick(){this.reqHeaderCollapse=!this.reqHeaderCollapse}requestQueryParamsClick(){void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),this.reqQueryParamsCollapse=!this.reqQueryParamsCollapse}requestBodyClick(){void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),this.reqBodyCollapse=!this.reqBodyCollapse}responseHeaderClick(){this.resHeaderCollapse=!this.resHeaderCollapse}responseBodyClick(){void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),this.resBodyCollapse=!this.resBodyCollapse}logsBodyClick(){void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.logsBodyCollapse=!this.logsBodyCollapse}expandAll(){this.reqHeaderCollapse=!0,this.reqQueryParamsCollapse=!0,this.reqBodyCollapse=!0,this.resHeaderCollapse=!0,this.resQueryParamsCollapse=!0,this.resBodyCollapse=!0,this.logsBodyCollapse=!0,void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.cd.detectChanges()}collapseAll(){this.reqHeaderCollapse=!1,this.reqQueryParamsCollapse=!1,this.reqBodyCollapse=!1,this.resHeaderCollapse=!1,this.resQueryParamsCollapse=!1,this.resBodyCollapse=!1,this.logsBodyCollapse=!1,this.cd.detectChanges()}ngOnDestroy(){this.ec.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(F.b),e.Y36(M.s),e.Y36(D.e),e.Y36(e.sBO),e.Y36(ye.b),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-details-layout-model"]],decls:143,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogDetailsLayoutModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[2,"margin-top","1px"],[1,"fas","fa-info-circle","text-success","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Expand",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","text-danger","fas","fa-expand-alt",3,"click"],["pTooltip","Collapse",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","fas","fa-compress-alt",3,"click"],[1,"modal-body","p-4",2,"overflow-y","scroll"],[1,""],[1,"table","table-hover","table-striped","table-bordered","table-sm"],[2,"width","150px"],[2,"width","10px"],[1,"pl-2"],[3,"ngClass"],[4,"ngIf"],[3,"ngStyle"],["id","reqHeader",1,"cursor-pointer","logs-collapse-div",3,"click"],[2,"margin-left","10px"],[1,"float-right","mr-2",3,"hidden"],[1,"fas","fa-caret-down"],[1,"fas","fa-caret-up"],[1,"mt-1",2,"background","#373b3d","border-radius","10px",3,"hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["id","reqQueryParams",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"overflow-auto",2,"height","300px !important"],[3,"editorOptions","editorGenerated"],["id","reqBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resHeader",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","logsBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"ml-2"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",3,"hidden"],[3,"pSelectableRow"],[2,"white-space","nowrap"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._UZ(5,"i",5),e._uU(6,"Detail view "),e.qZA(),e.TgZ(7,"div",6)(8,"button",7)(9,"span",8),e._UZ(10,"i",9),e.qZA()(),e.TgZ(11,"span",10)(12,"i",11),e.NdJ("click",function(){return s.expandAll()}),e.qZA()(),e.TgZ(13,"span",12)(14,"i",13),e.NdJ("click",function(){return s.collapseAll()}),e.qZA()()()(),e.TgZ(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e._UZ(19,"col",17)(20,"col",18)(21,"col"),e.qZA(),e.TgZ(22,"tr")(23,"td"),e._uU(24,"URL"),e.qZA(),e.TgZ(25,"td"),e._uU(26," :"),e.qZA(),e.TgZ(27,"td",19),e._uU(28),e.qZA()(),e.TgZ(29,"tr")(30,"td"),e._uU(31,"Method"),e.qZA(),e.TgZ(32,"td"),e._uU(33," :"),e.qZA(),e.TgZ(34,"td",19)(35,"span",20),e._uU(36),e.qZA()()(),e.TgZ(37,"tr")(38,"td"),e._uU(39,"Type"),e.qZA(),e.TgZ(40,"td"),e._uU(41," :"),e.qZA(),e.TgZ(42,"td",19),e._uU(43),e.qZA()(),e.YNc(44,Te,7,1,"tr",21),e.TgZ(45,"tr")(46,"td"),e._uU(47,"Name"),e.qZA(),e.TgZ(48,"td"),e._uU(49," :"),e.qZA(),e.TgZ(50,"td",19),e._uU(51),e.qZA()(),e.TgZ(52,"tr")(53,"td"),e._uU(54,"Time"),e.qZA(),e.TgZ(55,"td"),e._uU(56," :"),e.qZA(),e.TgZ(57,"td",19),e._uU(58),e.ALo(59,"moment"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"Status"),e.qZA(),e.TgZ(63,"td"),e._uU(64," :"),e.qZA(),e.TgZ(65,"td",19)(66,"span",22),e._uU(67),e.qZA()()(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"Status Code"),e.qZA(),e.TgZ(71,"td"),e._uU(72," :"),e.qZA(),e.TgZ(73,"td",19)(74,"span",22),e._uU(75),e.qZA()()()()(),e.TgZ(76,"div",23),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(77,"span",24),e._uU(78,"Request Header "),e.qZA(),e.TgZ(79,"div",25),e._UZ(80,"i",26),e.qZA(),e.TgZ(81,"div",25),e._UZ(82,"i",27),e.qZA()(),e.TgZ(83,"div",28)(84,"p-table",29),e.YNc(85,Ze,5,0,"ng-template",30),e.YNc(86,xe,7,3,"ng-template",31),e.qZA()(),e.TgZ(87,"div",32),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(88,"span",24),e._uU(89,"Request Query params "),e.qZA(),e.TgZ(90,"div",25),e._UZ(91,"i",26),e.qZA(),e.TgZ(92,"div",25),e._UZ(93,"i",27),e.qZA()(),e.TgZ(94,"div",28)(95,"div",33)(96,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(97,"div",35),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(98,"span",24),e._uU(99,"Request Body "),e.qZA(),e.TgZ(100,"div",25),e._UZ(101,"i",26),e.qZA(),e.TgZ(102,"div",25),e._UZ(103,"i",27),e.qZA()(),e.TgZ(104,"div",28)(105,"div",33)(106,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(107,"div",36),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(108,"span",24),e._uU(109,"Response Header "),e.qZA(),e.TgZ(110,"div",25),e._UZ(111,"i",26),e.qZA(),e.TgZ(112,"div",25),e._UZ(113,"i",27),e.qZA()(),e.TgZ(114,"div",28)(115,"p-table",29),e.YNc(116,Ie,5,0,"ng-template",30),e.YNc(117,Se,7,3,"ng-template",31),e.qZA()(),e.TgZ(118,"div",37),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(119,"span",24),e._uU(120,"Response Body "),e.qZA(),e.TgZ(121,"div",25),e._UZ(122,"i",26),e.qZA(),e.TgZ(123,"div",25),e._UZ(124,"i",27),e.qZA()(),e.TgZ(125,"div",28)(126,"div",33)(127,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(128,"div",38),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(129,"span",39),e._uU(130,"Logs "),e.qZA(),e.TgZ(131,"div",25),e._UZ(132,"i",26),e.qZA(),e.TgZ(133,"div",25),e._UZ(134,"i",27),e.qZA()(),e.TgZ(135,"div",28)(136,"div",33)(137,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(138,"div",40)(139,"button",41),e._UZ(140,"i",42),e._uU(141," Cancel"),e.qZA()(),e._UZ(142,"p-progressSpinner",43),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(45,Le,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.GET,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.PUT,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.POST,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.category),e.xp6(1),e.Q6J("ngIf",null==s.inputData?null:s.inputData.tenantUsername),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(e.xi3(59,42,null==s.inputData?null:s.inputData.createdAt,s.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS)),e.xp6(8),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(50,O):e.DdM(51,k)),e.xp6(1),e.Oqu(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(52,O):e.DdM(53,k)),e.xp6(1),e.Oqu(null==s.inputData?null:s.inputData.statusCode),e.xp6(4),e.Q6J("hidden",s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.xp6(6),e.Q6J("hidden",s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqQueryParams),e.xp6(4),e.Q6J("hidden",s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqBody),e.xp6(4),e.Q6J("hidden",s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.xp6(6),e.Q6J("hidden",s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionResBody),e.xp6(4),e.Q6J("hidden",s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionLogs),e.xp6(5),e.Q6J("hidden",!s.loading.form))},dependencies:[_.mk,_.O5,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,w.u,Ae.d],encapsulation:2})}return a})();const qe=["logFilterPanelLayoutModelC"],Pe=["logDetailsLayoutModelC"];function Ne(a,o){if(1&a&&(e.TgZ(0,"div",7)(1,"span",8)(2,"h4",9),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function Ee(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function De(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",50)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.instanceClickData([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Fe(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Me(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function Re(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeDbClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.db," ")}}function we(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Re,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Ue(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function Oe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeCollectionClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ke(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function Je(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Qe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeApiClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Be(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Qe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function He(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Ye(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_1"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ge(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_2"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function Ke(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ge,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ve(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_3"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function je(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ve,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function We(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function Xe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.customApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ze(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Xe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function et(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function tt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.systemsApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function it(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,tt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function st(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function at(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.amEventsClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function nt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,at,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function lt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function ot(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.schedulersClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function rt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ot,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function dt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function pt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.wsEventClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameUI," ")}}function ct(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,pt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function ut(a,o){1&a&&(e.TgZ(0,"tr")(1,"th",59),e._uU(2,"Index"),e.qZA(),e.TgZ(3,"th",60),e._uU(4,"Date & Time"),e.qZA(),e.TgZ(5,"th",61),e._uU(6,"Method"),e.qZA(),e.TgZ(7,"th",62),e._uU(8,"Status"),e.qZA(),e.TgZ(9,"th",60),e._uU(10,"API Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"API Name"),e.qZA()())}const y=function(a){return{"selected-row":a}},gt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},mt=function(){return{color:"#26b47f"}},_t=function(){return{color:"#ed4b48"}};function ht(a,o){if(1&a&&(e.TgZ(0,"tr",63)(1,"td")(2,"div",64),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"div",65),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",65)(9,"span",66),e._uU(10),e.qZA()()(),e.TgZ(11,"td")(12,"div",67),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"div",65),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"div",65),e._uU(19),e.qZA()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.oxw(3);e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,y,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,gt,(null==t?null:t.requestMethod)===s.ERequestMethod.GET,(null==t?null:t.requestMethod)===s.ERequestMethod.PUT,(null==t?null:t.requestMethod)===s.ERequestMethod.POST,(null==t?null:t.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij("",null==t?null:t.requestMethod," "),e.xp6(2),e.Q6J("ngStyle",t.success?e.DdM(26,mt):e.DdM(27,_t))("ngClass",e.VKq(28,y,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const vt=function(){return[50,200,500]};function ft(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e._UZ(4,"i",12),e._uU(5," Log Table Summary"),e.qZA(),e.TgZ(6,"div",13)(7,"a",14),e._UZ(8,"img",15),e.qZA()(),e.TgZ(9,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.loadGridData(!1))}),e._UZ(10,"i",17),e._uU(11," Apply "),e.qZA(),e.TgZ(12,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(13,"i",19),e.qZA()(),e.TgZ(14,"div",20)(15,"table",21)(16,"tbody")(17,"tr")(18,"td",22),e._uU(19," Instances"),e.qZA(),e.TgZ(20,"td",23),e.YNc(21,Ee,2,0,"div",24),e.YNc(22,Fe,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Me,2,0,"div",24),e.YNc(25,we,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Ue,2,0,"div",24),e.YNc(28,ke,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,Je,2,0,"div",24),e.YNc(31,Be,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,He,3,0,"td",26),e.YNc(36,$e,2,1,"td",27),e.YNc(37,Ke,2,1,"td",27),e.YNc(38,je,2,1,"td",28),e.qZA(),e.TgZ(39,"tr")(40,"td",22),e._uU(41," Custom APIs"),e.qZA(),e.TgZ(42,"td",29),e.YNc(43,We,2,0,"div",24),e.YNc(44,ze,2,1,"div",25),e.qZA()(),e.TgZ(45,"tr")(46,"td",22),e._uU(47," System APIs"),e.qZA(),e.TgZ(48,"td",29),e.YNc(49,et,2,0,"div",24),e.YNc(50,it,2,1,"div",25),e.qZA()(),e.TgZ(51,"tr")(52,"td",22),e._uU(53," Events"),e.qZA(),e.TgZ(54,"td",29),e.YNc(55,st,2,0,"div",24),e.YNc(56,nt,2,1,"div",25),e.qZA()(),e.TgZ(57,"tr")(58,"td",22),e._uU(59," Schedulers"),e.qZA(),e.TgZ(60,"td",29),e.YNc(61,lt,2,0,"div",24),e.YNc(62,rt,2,1,"div",25),e.qZA()(),e.TgZ(63,"tr")(64,"td",22),e._uU(65," WebSocket Events"),e.qZA(),e.TgZ(66,"td",29),e.YNc(67,dt,2,0,"div",24),e.YNc(68,ct,2,1,"div",25),e.qZA()(),e.TgZ(69,"tr")(70,"td",30)(71,"span",31),e._uU(72,"Date"),e.qZA()(),e.TgZ(73,"td",32)(74,"p-calendar",33),e.NdJ("ngModelChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.gridFilter.rangeDates=s)}),e.qZA(),e.TgZ(75,"span",34),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearDate())}),e._UZ(76,"i",35),e.qZA()()()()()()(),e.TgZ(77,"div",36)(78,"div",11)(79,"span"),e._UZ(80,"img",37),e._uU(81," Log Table"),e.qZA(),e.TgZ(82,"span",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(83,"i",19),e.qZA(),e.TgZ(84,"span",39),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearAllLogsDialog())}),e._UZ(85,"i",40),e.qZA(),e.TgZ(86,"span",41),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.refresh())}),e._UZ(87,"i",42),e.qZA()()(),e.TgZ(88,"div",43)(89,"div",44)(90,"p-table",45),e.NdJ("selectionChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectedRows=s)})("dblclick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.dblClickLogs())}),e.YNc(91,ut,13,0,"ng-template",46),e.YNc(92,ht,20,34,"ng-template",47),e.qZA()()()()}if(2&a){const t=e.oxw(2);e.xp6(21),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstanceApis)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstanceApis||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections)),e.xp6(4),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.xp6(6),e.Q6J("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.xp6(16),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.DdM(35,vt))("value",t.responseData)}}function yt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function Ct(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,Ne,4,1,"div",5),e.YNc(2,ft,93,36,"div",0),e.YNc(3,yt,1,0,"p-progressSpinner",6),e.qZA()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.loading)}}let At=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;constantsCS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:E.D.ADD,eventChannel:new e.vpe,formData:void 0};instances;instanceIds;instanceNames;databases;databaseNames;collections;collectionNames;supportedAPIs;supportedApiNames;customApis;functionIds;customApiNames;systemsApis;systemApiIds;systemApiNames;amEvents;amEventIds;amEventNames;schedulersApis;schedulersIds;schedulersNames;wsEvents;wsEventIds;wsEventsNames;tpBundles;tpBundleMap=[];tpApiVersions;tpApiVersionMap=[];tpApis;tpApisMap=[];allTreeItemsMap={};value=new Date;range={start:null,end:null};logFilterPanelLayoutModelC;logDetailsLayoutModelC;gridFilter={queryParams:{},apisRegex:{},supportedAPIs:{}};ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v,C,m,I,S,A,Ft){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=g,this.schedulerS=h,this.amEventS=v,this.webSocketEventsS=C,this.dataProviderS=m,this.confirmationService=I,this.constantsS=S,this.constantsCS=A,this.cd=Ft,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.Z)(function*(s){if(s&&s.action===N.F.APPLY_FILTER){const n=t.gridFilter;t.gridFilter=s.data,t.gridFilter.rangeDates=n.rangeDates,yield t.loadInstances(s.data),yield t.logTableSummaryData(s.data),t.logFilterPanelLayoutModelC&&t.logFilterPanelLayoutModelC.hideModal(),yield t.loadGridData(!1)}});return function(s){return i.apply(this,arguments)}}())),this.generalS.setNewTitle("API Maker - Log Table Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.Z)(function*(){t.loading=!0;try{const i=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,!0===i.isLogsSetupDone?(t.isExternalLogsSetupDoneByRoot=!0,t.loadGridData(!1)):t.isExternalLogsSetupDoneByRoot=!1}catch{t.isExternalLogsSetupDoneByRoot=!1}t.cd.detectChanges()})()}loadGridData(t){var i=this;return(0,u.Z)(function*(){const s={find:{user:i.authCS.getUserId()},select:{createdAt:1,success:1,category:1,requestMethod:1,instanceName:1,databaseName:1,collectionName:1,instanceApiName:1,customApiName:1,systemApiName:1,eventName:1,tpApiBundleName:1,apiVersion:1,tpApiName:1,schedulerName:1,webSocketEventName:1,tenantUsername:1,url:1},sort:{_id:-1},limit:i.settings.maxRowsLimit};if(i.setDataForFilterModal(!1),i.gridFilter&&i.logFilterPanelLayoutModelC&&i.logFilterPanelLayoutModelC.setDataInObjectFromEventCenter(i.gridFilter),i.applyFilterInQuery(s.find,i.gridFilter),t){const l=i.responseData?.[0]?._id;l&&(s.find._id={$gt:l})}const n=yield i.logS.query(s).toPromise();if(t){for(const l of i.responseData)l.isNewInGrid=!1;i.responseData=[...n.data,...i.responseData];for(const l of n.data)i.doChangesInLogObject(l,!0)}else{i.responseData=n.data;for(const l of i.responseData)i.doChangesInLogObject(l,!1)}i.generalS.setNewTitle("API Maker - Log Table Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.R.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.R.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.R.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.R.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.R.INSTANCES};i?.apisRegex?.allInstances?t.$or.push(l):r.isEmpty(i?.queryParams?.instanceIds)||(l.instanceName={$in:this.instanceNames},r.isEmpty(i.queryParams.databaseNames)||(l.databaseName={$in:i.queryParams.databaseNames}),r.isEmpty(i.queryParams.collectionNames)||(l.collectionName={$in:i.queryParams.collectionNames}),r.isEmpty(i.queryParams.supportedApiNames)||(l.instanceApiName={$in:i.queryParams.supportedApiNames}),t.$or.push(l));const g={category:c.R.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(g);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const m=r.uniq(r.map(this.tpBundles,"bundleName")),I=r.uniq(r.map(this.tpApiVersions,"apiVersion")),S=r.uniq(r.map(this.tpApis,"apiName")),A={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(A.tpApiBundleName={$in:m}),r.isEmpty(I)||(A.apiVersion={$in:I}),r.isEmpty(S)||(A.tpApiName={$in:S}),t.$or.push(A)}const h={category:c.R.EVENTS};i?.apisRegex?.allEvents?t.$or.push(h):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.R.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const v={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(v):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const C={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(C):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.R.WEB_SOCKET_EVENT,webSocketEventName:{$in:this.wsEventsNames}}),i?.rangeDates?.[0]&&t.$and.push({createdAt:{$gte:i.rangeDates[0]}}),i?.rangeDates?.[1]&&t.$and.push({createdAt:{$lte:i.rangeDates[1]}}),r.isEmpty(t.$or)&&delete t.$or,r.isEmpty(t.$and)&&delete t.$and}logTableSummaryData(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.functions},select:{name:1}};i.customApis=(yield i.functionS.query(s).toPromise()).data,i.functionIds=r.map(i.customApis,p.iH._id),i.customApiNames=r.map(i.customApis,p.eb.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.iH._id);i.systemsApis=[];for(const m of t?.queryParams.systemApis)l[m]&&i.systemsApis.push(l[m]);i.systemApiIds=r.map(i.systemsApis,p.iH._id),i.systemApiNames=r.map(i.systemsApis,p.aV.name);const g={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(g).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.iH._id),i.amEventNames=r.map(i.amEvents,p.l0.name);const h={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(h).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.iH._id),i.schedulersNames=r.map(i.schedulersApis,p.qH.name);const v=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,C=r.keyBy(v,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)C[m]&&i.wsEvents.push(C[m]);i.wsEventIds=r.map(i.wsEvents,p.iH._id),i.wsEventsNames=r.map(i.wsEvents,p.of.id),i.calculateThirdPartyApiDataForUI(t)})()}calculateThirdPartyApiDataForUI(t){this.tpBundles=[],this.tpApiVersions=[],this.tpApis=[];for(const i of t.thirdPartyApis)i.level0?this.tpBundles.push(i):i.level1?this.tpApiVersions.push(i):i.level2&&this.tpApis.push(i);this.generalS.getMapOfAllItems(this.allTreeItemsMap,t.thirdPartyApis),this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApisMap=r.map(this.tpApis,p.iH._id)}loadInstances(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.instanceIds},select:{name:1},sort:{name:1}};i.instances=(yield i.instanceS.query(s).toPromise()).data,i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.Z)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.iH._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.Z)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.iH._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.Z)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.iH._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format(this.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=[[t.instanceName,t.tenantUsername].filter(s=>!!s).join("::"),t.databaseName,t.collectionName,t.instanceApiName].filter(s=>!!s).join(" \u2192 "):t.category===c.R.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.R.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.R.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.R.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.R.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=E.D.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.Z)(function*(){const s=[];for(const n of t){i.instances.splice(i.instances.indexOf(n),1);for(const l of i.databases)l.instanceId===n._id&&s.push(l)}i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),i.eventCenterS.filterInLog.instanceIds.next(i.instanceIds),i.removeDbClick(s)})()}removeDbClick(t){const i=[];for(const s of t){this.databases.splice(this.databases.indexOf(s),1);for(const n of this.collections)n.instanceName===s.instanceName&&n.databaseName===s.db&&i.push(n)}this.databaseNames=r.map(this.databases,p.iH._id),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames),this.removeCollectionClick(i)}removeCollectionClick(t){const i=[];for(const s of t){this.collections.splice(this.collections.indexOf(s),1);for(const n of this.supportedAPIs)s.instanceName&&n.databaseName===s.databaseName&&n.collectionName===s.name&&i.push(n)}this.collectionNames=r.map(this.collections,p.iH._id),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames),this.removeApiClick(i)}removeApiClick(t){for(const i of t)this.supportedAPIs.splice(this.supportedAPIs.indexOf(i),1);this.supportedApiNames=r.map(this.supportedAPIs,p.iH._id),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames),this.setRegexOnRemove()}setRegexOnRemove(){(0===this.instances.length||0===this.databases.length||0===this.collections.length||0===this.supportedAPIs.length)&&(this.gridFilter.apisRegex={})}customApisClick(t){this.customApis.splice(this.customApis.indexOf(t),1),this.functionIds=r.map(this.customApis,p.iH._id),this.customApiNames=r.map(this.customApis,p.eb.name),this.eventCenterS.filterInLog.functionIds.next(this.functionIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.iH._id),this.systemApiNames=r.map(this.systemsApis,p.aV.name),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds)}amEventsClick(t){this.amEvents.splice(this.amEvents.indexOf(t),1),this.amEventIds=r.map(this.amEvents,p.iH._id),this.amEventNames=r.map(this.amEvents,p.l0.name),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds)}schedulersClick(t){this.schedulersApis.splice(this.schedulersApis.indexOf(t),1),this.schedulersIds=r.map(this.schedulersApis,p.iH._id),this.schedulersNames=r.map(this.schedulersApis,p.qH.name),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds)}wsEventClick(t){this.wsEvents.splice(this.wsEvents.indexOf(t),1),this.wsEventIds=r.map(this.wsEvents,p.iH._id),this.wsEventsNames=r.map(this.wsEvents,p.of.id),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds)}npmPackageClickData(t,i){"L_1"===i?this.bundleAndVersionAndApiRemove(t):"L_2"===i?this.allTreeItemsMap[t._id]&&this.apiVersionClickData(this.allTreeItemsMap[t._id]):"L_3"===i&&this.allTreeItemsMap[t._id]&&this.tpApiClickData(this.allTreeItemsMap[t._id])}bundleAndVersionAndApiRemove(t){if(t.level0&&this.tpBundles.indexOf(t)>=0){for(const i of t.children||[])this.apiVersionClickData(i);this.tpBundles.splice(this.tpBundles.indexOf(t),1)}this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.apiVersionClickData(t)}apiVersionClickData(t){t.level1&&this.tpApiVersions.indexOf(t)>=0&&this.tpApiVersions.splice(this.tpApiVersions.indexOf(t),1),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApiClickData(t)}tpApiClickData(t){if(t.level1)for(const i of t.children||[])this.tpApis.indexOf(i)>=0&&this.tpApis.splice(this.tpApis.indexOf(i),1);else if(t.level0)for(const i of t.children||[])for(const s of i.children||[])this.tpApis.indexOf(s)>=0&&this.tpApis.splice(this.tpApis.indexOf(s),1);else t.level2&&this.tpApis.indexOf(t)>=0&&this.tpApis.splice(this.tpApis.indexOf(t),1);this.tpApisMap=r.map(this.tpApis,p.iH._id)}setDataForFilterModal(t){this.eventCenterS.filterInLog.instanceIds.next(this.instanceIds?this.instanceIds:[]),this.eventCenterS.filterInLog.functionIds.next(this.functionIds?this.functionIds:[]),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds?this.systemApiIds:[]),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds?this.amEventIds:[]),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds?this.schedulersIds:[]),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds?this.wsEventIds:[]),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames?this.databaseNames:[]),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames?this.collectionNames:[]),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames?this.supportedApiNames:[]);const i=[...this.tpBundleMap,...this.tpApiVersionMap,...this.tpApisMap];this.eventCenterS.filterInLog.thirdPartyApiIds.next(i.length?i:[]),t&&this.eventCenterS.filterInLog.refreshGrid.next(Math.random())}clearAllLogsDialog(){var t=this;return(0,u.Z)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.Z)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.Z)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.Z)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.iH._id;dblClickLogs(){var t=this;return(0,u.Z)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.Y36(D.e),e.Y36(Y.D),e.Y36(F.b),e.Y36(G.E),e.Y36(K.d),e.Y36(L.u),e.Y36(V.Z),e.Y36(j.l),e.Y36(W.a),e.Y36(X.B),e.Y36(Z.YP),e.Y36(b.L),e.Y36(M.s),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(qe,5),e.Gf(Pe,5)),2&i){let n;e.iGM(n=e.CRH())&&(s.logFilterPanelLayoutModelC=n.first),e.iGM(n=e.CRH())&&(s.logDetailsLayoutModelC=n.first)}},decls:5,vars:2,consts:[["class","pt-1 pl-1 pr-1",4,"ngIf"],[3,"data"],["logFilterPanelLayoutModelC",""],["logDetailsLayoutModelC",""],[1,"pt-1","pl-1","pr-1"],["class","overflow-hidden","style","height: calc(100vh - 46px);",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"overflow-hidden",2,"height","calc(100vh - 46px)"],[1,"text-center"],[1,"mt-5","pt-5"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-table.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","fa-fw","align-middle","text-success"],["tooltipPosition","left","pTooltip","Show Filter Modal",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fa","fa-filter","text-yellow","fa-fw"],[1,"card-body","p-0","overflow-auto",2,"height","278px"],[1,"table","table-striped","table-sm","mb-0"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2"],[1,"border-right"],["class","text-center text-success",4,"ngIf"],[4,"ngIf"],["colspan","4",4,"ngIf"],["class","border-right",4,"ngIf"],["colspan","2",4,"ngIf"],["colspan","4"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2","pt-2"],[1,"mt-1","d-inline-block"],["colspan","4",1,""],["appendTo","body","selectionMode","range","dateFormat","dd/mm/yy","inputId","filterDatePickerId",1,"form-control-sm",3,"ngModel","showIcon","showButtonBar","readonlyInput","ngModelChange"],["pTooltip","Clear",1,"cursor-pointer",3,"click"],[1,"fas","fa-ban","fa-fw","ml-4","align-middle","text-danger"],[1,"card","shadow-sm","h-100","mt-2"],["src","/assets/images/icons/log.svg","alt","Log Table",1,"fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Show Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Clear All Logs",1,"float-right","cursor-pointer","ml-3","text-danger",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw"],["tooltipPosition","left","pTooltip","Refresh Logs",1,"float-right","cursor-pointer","ml-3","text-success",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],[1,"overflow-hidden"],[2,"height","calc(100vh - 418px)","width","calc(100% - 2px)"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","paginator","rows","rowsPerPageOptions","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"text-center","text-success"],["class","ml-1","styleClass","bg-danger text-dark",4,"ngFor","ngForOf"],["styleClass","bg-danger text-dark",1,"ml-1"],[1,"fas","fa-times-circle","cursor-pointer",3,"click"],["class","ml-1","styleClass","bg-warning text-dark",4,"ngFor","ngForOf"],["styleClass","bg-warning text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-info text-dark",4,"ngFor","ngForOf"],["styleClass","bg-info text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-light text-dark",4,"ngFor","ngForOf"],["styleClass","bg-light text-dark",1,"ml-1"],["colspan","2"],[1,"text-center",2,"width","80px"],[2,"width","200px"],[2,"width","130px"],[2,"width","100px"],[3,"pSelectableRow"],[1,"text-center",3,"ngClass"],[1,"text-nowrap",3,"ngClass"],[1,"small","font-weight-bold","mr-3",3,"ngClass"],[1,"text-nowrap",3,"ngStyle","ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.YNc(0,Ct,4,3,"div",0),e._UZ(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Q6J("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("data",s.data))},dependencies:[R.JJ,R.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,w.u,z.f,ee.A,fe,be],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Tt=d(75249),Zt=d(1678),xt=d(64211),It=d(21434),St=d(84186),Lt=d(95765),bt=d(2777),qt=d(57705),Pt=d(31558),Nt=d(38125);const Et=[{path:"main",component:At,canActivate:[B.P]}];let Dt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[J.Bz.forChild(Et),Q.u,Tt.ApiTestingM,Zt.DashboardM,xt.DbCellM,It.B,St.SystemApiM,Lt.FunctionManM,bt.u,qt.L,Pt.SchedulerManM,Nt.AmEventsM,H.WebSocketEventsM]})}return a})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{48296:(Mt,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Dt});var J=d(77664),Q=d(17017),B=d(63726),H=d(81025),u=d(15861),e=d(94946),r=d(6990),T=d(96925),N=d(33157),E=d(90328),p=d(51162),c=d(45085),D=d(70819),Y=d(95852),F=d(77240),G=d(53429),K=d(67629),L=d(32915),V=d(31042),j=d(67145),W=d(10262),X=d(81429),Z=d(85219),b=d(27414),M=d(90204),R=d(60095),_=d(96814),x=d(95431),q=d(97680),w=d(33259),z=d(51532),ee=d(42169),U=d(99961),te=d(32660),ie=d(55043),se=d(63885),ae=d(559),ne=d(86937),le=d(40356),oe=d(79329),re=d(37595),de=d(53824),pe=d(58651),ce=d(86607),ue=d(5305),ge=d(72726);function me(a,o){1&a&&(e.TgZ(0,"div",38),e._UZ(1,"app-w-instances",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function _e(a,o){1&a&&(e.TgZ(0,"div",40),e._UZ(1,"app-w-databases",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e._UZ(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let fe=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.R;loading={form:!1};constructor(t,i,s){this.eventCenterS=t,this.notificationS=i,this.constantsS=s}ngOnInit(){}showModal(){$("#idFilterPanelInLogsTableForm").modal("show")}hideModal(){$("#idFilterPanelInLogsTableForm").modal("hide")}applyFilter(){const t={};t.supportedAPIs=this.eventCenterS.filterInLog.supportedAPIs.value,t.customApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.functions.value),t.systemApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.systemApis.value),t.eventsApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.eventsApis.value),t.schedulersApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.schedulersApis.value),t.webSocketEvents=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.webSocketApis.value),t.thirdPartyApis=this.eventCenterS.filterInLog.thirdPartyAPIs.value,t.queryParams={},t.apisRegex=this.eventCenterS.filterInLog.apisRegex,this.setDataInObjectFromEventCenter(t),this.data.eventChannel.emit({action:N.F.APPLY_FILTER,data:t}),this.notificationS.showSuccess("Success.")}setDataInObjectFromEventCenter(t){t.queryParams.instanceIds=this.eventCenterS.filterInLog.instanceIds.value,t.queryParams.databaseIds=this.eventCenterS.filterInLog.databaseIds.value,t.queryParams.databaseNames=this.eventCenterS.filterInLog.databaseNames.value,t.queryParams.collectionIds=this.eventCenterS.filterInLog.collectionIds.value,t.queryParams.collectionNames=this.eventCenterS.filterInLog.collectionNames.value,t.queryParams.supportedApiIds=this.eventCenterS.filterInLog.supportedApiIds.value,t.queryParams.supportedApiNames=this.eventCenterS.filterInLog.supportedApiNames.value,t.queryParams.functions=this.eventCenterS.filterInLog.functionIds.value,t.queryParams.systemApis=this.eventCenterS.filterInLog.systemApiIds.value,t.queryParams.eventIds=this.eventCenterS.filterInLog.eventIds.value,t.queryParams.schedulersIds=this.eventCenterS.filterInLog.schedulersIds.value,t.queryParams.webSocketIds=this.eventCenterS.filterInLog.webSocketIds.value,this.setThirdPartyApiIds(t)}setThirdPartyApiIds(t){const i=this.eventCenterS.filterInLog.thirdPartyApiIds.value,s=[];for(const n of i)n.length>=24&&s.push(n);t.queryParams.thirdPartyApis=s}getPermissionMapFunctions(t){const i={};for(const s of t||[])i[s._id]=!0;return i}ngOnDestroy(){this.eventCenterS.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-filter-panel-layout-model"]],inputs:{data:"data"},decls:52,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFilterPanelInLogsTableForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content",2,"max-height","calc(100vh - 58px)"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-categories"],[1,"vertical-height-max"],[3,"isFilterLogTable","typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"v-div","w-ins-apis"],[1,"vertical-height-max",2,"width","500px"],[3,"isLPM","isFilterLogTable","treeViewId"],[1,"v-div","w-third-party"],[1,"vertical-height-tp-api"],[3,"isFilterLogTable","isLPM","IsDependentOnGroup"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","isFilterLogTable","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","isFilterLogTable","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","showCheckbox","IsReadOnly","isFilterLogTable","isLPM"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-filter","text-yellow","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"vertical-height-instances","w-100"],[1,"w-100",3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6,"Filter "),e.qZA(),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e._UZ(14,"app-w-api-categories",12),e.qZA()(),e.TgZ(15,"div",13)(16,"p-splitter",14),e.YNc(17,me,2,3,"ng-template",15),e.YNc(18,_e,2,3,"ng-template",15),e.qZA()(),e.TgZ(19,"div",16)(20,"div",11),e._UZ(21,"app-w-collections",17),e.qZA()(),e.TgZ(22,"div",18)(23,"div",19),e._UZ(24,"app-w-supported-api",20),e.qZA()(),e.TgZ(25,"div",21)(26,"div",22),e._UZ(27,"app-w-supported-tp-api",23),e.qZA()(),e.TgZ(28,"div",24)(29,"div",11),e._UZ(30,"app-custom-api-grid",25),e.qZA()(),e.TgZ(31,"div",26)(32,"div",11),e._UZ(33,"app-system-api-w",25),e.qZA()(),e.TgZ(34,"div",27)(35,"div",11),e._UZ(36,"app-events-grid",25),e.qZA()(),e.TgZ(37,"div",28)(38,"div",11),e._UZ(39,"app-scheduler-man-w",29),e.qZA()(),e.TgZ(40,"div",30)(41,"div",11),e._UZ(42,"app-web-socket-events-grid",31),e.qZA()()()(),e.TgZ(43,"div",32)(44,"button",33),e._UZ(45,"i",34),e._uU(46," Cancel"),e.qZA(),e.TgZ(47,"button",35),e.NdJ("click",function(){return s.applyFilter()}),e._UZ(48,"i",36),e.TgZ(49,"span"),e._uU(50,"Apply Filter"),e.qZA()()(),e.YNc(51,he,1,0,"p-progressSpinner",37),e.qZA()()()),2&i&&(e.xp6(14),e.Q6J("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(53,ve)),e.xp6(3),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(9),e.Q6J("ngIf",s.loading.form))},dependencies:[_.O5,te.y,Z.jx,q.G,ie.q,se.f,ae.O,ne.n,le.T,oe.X,re.G,de.d,pe.A,ce.V,ue.N,ge.x],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 410px)}.vertical-height-max[_ngcontent-%COMP%], .vertical-height-tp-api[_ngcontent-%COMP%]{height:calc(100vh - 154px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 158px);float:left}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:25rem}.w-collection[_ngcontent-%COMP%]{width:28rem}.w-ins-apis[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%], .w-events[_ngcontent-%COMP%], .w-schedulers[_ngcontent-%COMP%]{width:calc(100vw - 24.5rem)}"]})}return a})();var f=d(27672),ye=d(62304),Ce=d(756),Ae=d(84066);function Te(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2,"Tenant Username"),e.qZA(),e.TgZ(3,"td"),e._uU(4," :"),e.qZA(),e.TgZ(5,"td",19),e._uU(6),e.qZA()()),2&a){const t=e.oxw();e.xp6(6),e.Oqu(null==t.inputData?null:t.inputData.tenantUsername)}}function Ze(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function xe(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}function Ie(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function Se(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}const Le=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},O=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let be=(()=>{class a{ec;notificationS;generalCS;constantsCS;logS;cd;monacoS;constantsS;EAPICategory=c.R;loading={form:!1};selectedRowData;reqHeaders=[];resHeaders=[];inputData;editorReqQueryParams;editorOptionReqQueryParams={readOnly:!1,language:"json",contextmenu:!1};editorReqBody;editorOptionReqBody={readOnly:!1,language:"json",contextmenu:!1};editorResBody;editorOptionResBody={readOnly:!1,language:"json",contextmenu:!1};editorLogs;editorOptionLogs={readOnly:!1,language:"text",contextmenu:!1};reqHeaderCollapse;reqQueryParamsCollapse;reqBodyCollapse;resHeaderCollapse;resQueryParamsCollapse;resBodyCollapse;logsBodyCollapse;ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.constantsCS=n,this.logS=l,this.cd=g,this.monacoS=h,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.Z)(function*(){try{if(i.inputData=t[0],!i.inputData)return;yield i.getLogByID(i.inputData._id),i.collapseAll(),$("#idLogDetailsLayoutModal").modal("show")}catch(s){console.log(s)}})()}getLogByID(t){var i=this;return(0,u.Z)(function*(){const s=(yield i.logS.getById(t).toPromise()).data;if(i.inputData=Object.assign({},i.inputData,s),s){s.pathVariables=JSON.parse(s.pathVariables||"{}"),s.meta&&(s.executionTime=s.meta?.executionTime),s.createdAt=moment(s.createdAt).format("DD-MM-YYYY hh:mm:ss A"),s.updatedAt=moment(s.updatedAt).format("DD-MM-YYYY hh:mm:ss A");for(const l of i.getKeys(s.pathVariables))s[l]=s.pathVariables[l];for(const l of s.apiErrors||[])for(const g of i.getKeys(l))s[g]=l[g];delete s.pathVariables,delete s.apiErrors,delete s.meta,delete s._id,delete s.user,delete s.instance,delete s.apiUser}if(i.selectedRowData=s,i.reqHeaders=i.selectedRowData?.reqHeaders?Object.entries(i.selectedRowData.reqHeaders):[],i.generalCS.setValueInEditor(i,"editorReqQueryParams",i.selectedRowData.queryParams||""),i.generalCS.setValueInEditor(i,"editorReqBody",i.selectedRowData.reqPayload||""),i.selectedRowData.resHeaders){i.resHeaders=Object.entries(i.selectedRowData.resHeaders);const l=i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE].indexOf(f.g7.JSON)>=0)&&(n=JSON.stringify(i.selectedRowData.resPayload)),i.generalCS.setValueInEditor(i,"editorResBody",n||""),i.generalCS.setValueInEditor(i,"editorLogs",i.selectedRowData.logs||""),i.cd.detectChanges()})()}setResponseBodyLanguage(t){var i=this;return(0,u.Z)(function*(){t.indexOf(f.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.TEXT)>=0&&(i.editorOptionResBody.language="plaintext",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language))})()}getKeys(t){return t?Object.keys(t):[]}requestHeaderClick(){this.reqHeaderCollapse=!this.reqHeaderCollapse}requestQueryParamsClick(){void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),this.reqQueryParamsCollapse=!this.reqQueryParamsCollapse}requestBodyClick(){void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),this.reqBodyCollapse=!this.reqBodyCollapse}responseHeaderClick(){this.resHeaderCollapse=!this.resHeaderCollapse}responseBodyClick(){void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),this.resBodyCollapse=!this.resBodyCollapse}logsBodyClick(){void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.logsBodyCollapse=!this.logsBodyCollapse}expandAll(){this.reqHeaderCollapse=!0,this.reqQueryParamsCollapse=!0,this.reqBodyCollapse=!0,this.resHeaderCollapse=!0,this.resQueryParamsCollapse=!0,this.resBodyCollapse=!0,this.logsBodyCollapse=!0,void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.cd.detectChanges()}collapseAll(){this.reqHeaderCollapse=!1,this.reqQueryParamsCollapse=!1,this.reqBodyCollapse=!1,this.resHeaderCollapse=!1,this.resQueryParamsCollapse=!1,this.resBodyCollapse=!1,this.logsBodyCollapse=!1,this.cd.detectChanges()}ngOnDestroy(){this.ec.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(F.b),e.Y36(M.s),e.Y36(D.e),e.Y36(e.sBO),e.Y36(ye.b),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-details-layout-model"]],decls:143,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogDetailsLayoutModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[2,"margin-top","1px"],[1,"fas","fa-info-circle","text-success","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Expand",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","text-danger","fas","fa-expand-alt",3,"click"],["pTooltip","Collapse",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","fas","fa-compress-alt",3,"click"],[1,"modal-body","p-4",2,"overflow-y","scroll"],[1,""],[1,"table","table-hover","table-striped","table-bordered","table-sm"],[2,"width","150px"],[2,"width","10px"],[1,"pl-2"],[3,"ngClass"],[4,"ngIf"],[3,"ngStyle"],["id","reqHeader",1,"cursor-pointer","logs-collapse-div",3,"click"],[2,"margin-left","10px"],[1,"float-right","mr-2",3,"hidden"],[1,"fas","fa-caret-down"],[1,"fas","fa-caret-up"],[1,"mt-1",2,"background","#373b3d","border-radius","10px",3,"hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["id","reqQueryParams",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"overflow-auto",2,"height","300px !important"],[3,"editorOptions","editorGenerated"],["id","reqBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resHeader",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","logsBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"ml-2"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",3,"hidden"],[3,"pSelectableRow"],[2,"white-space","nowrap"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._UZ(5,"i",5),e._uU(6,"Detail view "),e.qZA(),e.TgZ(7,"div",6)(8,"button",7)(9,"span",8),e._UZ(10,"i",9),e.qZA()(),e.TgZ(11,"span",10)(12,"i",11),e.NdJ("click",function(){return s.expandAll()}),e.qZA()(),e.TgZ(13,"span",12)(14,"i",13),e.NdJ("click",function(){return s.collapseAll()}),e.qZA()()()(),e.TgZ(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e._UZ(19,"col",17)(20,"col",18)(21,"col"),e.qZA(),e.TgZ(22,"tr")(23,"td"),e._uU(24,"URL"),e.qZA(),e.TgZ(25,"td"),e._uU(26," :"),e.qZA(),e.TgZ(27,"td",19),e._uU(28),e.qZA()(),e.TgZ(29,"tr")(30,"td"),e._uU(31,"Method"),e.qZA(),e.TgZ(32,"td"),e._uU(33," :"),e.qZA(),e.TgZ(34,"td",19)(35,"span",20),e._uU(36),e.qZA()()(),e.TgZ(37,"tr")(38,"td"),e._uU(39,"Type"),e.qZA(),e.TgZ(40,"td"),e._uU(41," :"),e.qZA(),e.TgZ(42,"td",19),e._uU(43),e.qZA()(),e.YNc(44,Te,7,1,"tr",21),e.TgZ(45,"tr")(46,"td"),e._uU(47,"Name"),e.qZA(),e.TgZ(48,"td"),e._uU(49," :"),e.qZA(),e.TgZ(50,"td",19),e._uU(51),e.qZA()(),e.TgZ(52,"tr")(53,"td"),e._uU(54,"Time"),e.qZA(),e.TgZ(55,"td"),e._uU(56," :"),e.qZA(),e.TgZ(57,"td",19),e._uU(58),e.ALo(59,"moment"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"Status"),e.qZA(),e.TgZ(63,"td"),e._uU(64," :"),e.qZA(),e.TgZ(65,"td",19)(66,"span",22),e._uU(67),e.qZA()()(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"Status Code"),e.qZA(),e.TgZ(71,"td"),e._uU(72," :"),e.qZA(),e.TgZ(73,"td",19)(74,"span",22),e._uU(75),e.qZA()()()()(),e.TgZ(76,"div",23),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(77,"span",24),e._uU(78,"Request Header "),e.qZA(),e.TgZ(79,"div",25),e._UZ(80,"i",26),e.qZA(),e.TgZ(81,"div",25),e._UZ(82,"i",27),e.qZA()(),e.TgZ(83,"div",28)(84,"p-table",29),e.YNc(85,Ze,5,0,"ng-template",30),e.YNc(86,xe,7,3,"ng-template",31),e.qZA()(),e.TgZ(87,"div",32),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(88,"span",24),e._uU(89,"Request Query params "),e.qZA(),e.TgZ(90,"div",25),e._UZ(91,"i",26),e.qZA(),e.TgZ(92,"div",25),e._UZ(93,"i",27),e.qZA()(),e.TgZ(94,"div",28)(95,"div",33)(96,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(97,"div",35),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(98,"span",24),e._uU(99,"Request Body "),e.qZA(),e.TgZ(100,"div",25),e._UZ(101,"i",26),e.qZA(),e.TgZ(102,"div",25),e._UZ(103,"i",27),e.qZA()(),e.TgZ(104,"div",28)(105,"div",33)(106,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(107,"div",36),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(108,"span",24),e._uU(109,"Response Header "),e.qZA(),e.TgZ(110,"div",25),e._UZ(111,"i",26),e.qZA(),e.TgZ(112,"div",25),e._UZ(113,"i",27),e.qZA()(),e.TgZ(114,"div",28)(115,"p-table",29),e.YNc(116,Ie,5,0,"ng-template",30),e.YNc(117,Se,7,3,"ng-template",31),e.qZA()(),e.TgZ(118,"div",37),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(119,"span",24),e._uU(120,"Response Body "),e.qZA(),e.TgZ(121,"div",25),e._UZ(122,"i",26),e.qZA(),e.TgZ(123,"div",25),e._UZ(124,"i",27),e.qZA()(),e.TgZ(125,"div",28)(126,"div",33)(127,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(128,"div",38),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(129,"span",39),e._uU(130,"Logs "),e.qZA(),e.TgZ(131,"div",25),e._UZ(132,"i",26),e.qZA(),e.TgZ(133,"div",25),e._UZ(134,"i",27),e.qZA()(),e.TgZ(135,"div",28)(136,"div",33)(137,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(138,"div",40)(139,"button",41),e._UZ(140,"i",42),e._uU(141," Cancel"),e.qZA()(),e._UZ(142,"p-progressSpinner",43),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(45,Le,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.GET,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.PUT,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.POST,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.category),e.xp6(1),e.Q6J("ngIf",null==s.inputData?null:s.inputData.tenantUsername),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(e.xi3(59,42,null==s.inputData?null:s.inputData.createdAt,s.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS)),e.xp6(8),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(50,O):e.DdM(51,k)),e.xp6(1),e.Oqu(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(52,O):e.DdM(53,k)),e.xp6(1),e.Oqu(null==s.inputData?null:s.inputData.statusCode),e.xp6(4),e.Q6J("hidden",s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.xp6(6),e.Q6J("hidden",s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqQueryParams),e.xp6(4),e.Q6J("hidden",s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqBody),e.xp6(4),e.Q6J("hidden",s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.xp6(6),e.Q6J("hidden",s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionResBody),e.xp6(4),e.Q6J("hidden",s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionLogs),e.xp6(5),e.Q6J("hidden",!s.loading.form))},dependencies:[_.mk,_.O5,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,w.u,Ae.d],encapsulation:2})}return a})();const qe=["logFilterPanelLayoutModelC"],Pe=["logDetailsLayoutModelC"];function Ne(a,o){if(1&a&&(e.TgZ(0,"div",7)(1,"span",8)(2,"h4",9),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function Ee(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function De(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",50)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.instanceClickData([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Fe(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Me(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function Re(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeDbClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.db," ")}}function we(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Re,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Ue(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function Oe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeCollectionClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ke(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function Je(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Qe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeApiClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Be(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Qe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function He(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Ye(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_1"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ge(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_2"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function Ke(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ge,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ve(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_3"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function je(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ve,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function We(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function Xe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.customApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ze(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Xe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function et(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function tt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.systemsApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function it(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,tt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function st(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function at(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.amEventsClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function nt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,at,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function lt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function ot(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.schedulersClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function rt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ot,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function dt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function pt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.wsEventClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameUI," ")}}function ct(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,pt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function ut(a,o){1&a&&(e.TgZ(0,"tr")(1,"th",59),e._uU(2,"Index"),e.qZA(),e.TgZ(3,"th",60),e._uU(4,"Date & Time"),e.qZA(),e.TgZ(5,"th",61),e._uU(6,"Method"),e.qZA(),e.TgZ(7,"th",62),e._uU(8,"Status"),e.qZA(),e.TgZ(9,"th",60),e._uU(10,"API Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"API Name"),e.qZA()())}const y=function(a){return{"selected-row":a}},gt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},mt=function(){return{color:"#26b47f"}},_t=function(){return{color:"#ed4b48"}};function ht(a,o){if(1&a&&(e.TgZ(0,"tr",63)(1,"td")(2,"div",64),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"div",65),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",65)(9,"span",66),e._uU(10),e.qZA()()(),e.TgZ(11,"td")(12,"div",67),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"div",65),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"div",65),e._uU(19),e.qZA()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.oxw(3);e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,y,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,gt,(null==t?null:t.requestMethod)===s.ERequestMethod.GET,(null==t?null:t.requestMethod)===s.ERequestMethod.PUT,(null==t?null:t.requestMethod)===s.ERequestMethod.POST,(null==t?null:t.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij("",null==t?null:t.requestMethod," "),e.xp6(2),e.Q6J("ngStyle",t.success?e.DdM(26,mt):e.DdM(27,_t))("ngClass",e.VKq(28,y,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const vt=function(){return[50,200,500]};function ft(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e._UZ(4,"i",12),e._uU(5," Log Table Summary"),e.qZA(),e.TgZ(6,"div",13)(7,"a",14),e._UZ(8,"img",15),e.qZA()(),e.TgZ(9,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.loadGridData(!1))}),e._UZ(10,"i",17),e._uU(11," Apply "),e.qZA(),e.TgZ(12,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(13,"i",19),e.qZA()(),e.TgZ(14,"div",20)(15,"table",21)(16,"tbody")(17,"tr")(18,"td",22),e._uU(19," Instances"),e.qZA(),e.TgZ(20,"td",23),e.YNc(21,Ee,2,0,"div",24),e.YNc(22,Fe,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Me,2,0,"div",24),e.YNc(25,we,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Ue,2,0,"div",24),e.YNc(28,ke,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,Je,2,0,"div",24),e.YNc(31,Be,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,He,3,0,"td",26),e.YNc(36,$e,2,1,"td",27),e.YNc(37,Ke,2,1,"td",27),e.YNc(38,je,2,1,"td",28),e.qZA(),e.TgZ(39,"tr")(40,"td",22),e._uU(41," Custom APIs"),e.qZA(),e.TgZ(42,"td",29),e.YNc(43,We,2,0,"div",24),e.YNc(44,ze,2,1,"div",25),e.qZA()(),e.TgZ(45,"tr")(46,"td",22),e._uU(47," System APIs"),e.qZA(),e.TgZ(48,"td",29),e.YNc(49,et,2,0,"div",24),e.YNc(50,it,2,1,"div",25),e.qZA()(),e.TgZ(51,"tr")(52,"td",22),e._uU(53," Events"),e.qZA(),e.TgZ(54,"td",29),e.YNc(55,st,2,0,"div",24),e.YNc(56,nt,2,1,"div",25),e.qZA()(),e.TgZ(57,"tr")(58,"td",22),e._uU(59," Schedulers"),e.qZA(),e.TgZ(60,"td",29),e.YNc(61,lt,2,0,"div",24),e.YNc(62,rt,2,1,"div",25),e.qZA()(),e.TgZ(63,"tr")(64,"td",22),e._uU(65," WebSocket Events"),e.qZA(),e.TgZ(66,"td",29),e.YNc(67,dt,2,0,"div",24),e.YNc(68,ct,2,1,"div",25),e.qZA()(),e.TgZ(69,"tr")(70,"td",30)(71,"span",31),e._uU(72,"Date"),e.qZA()(),e.TgZ(73,"td",32)(74,"p-calendar",33),e.NdJ("ngModelChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.gridFilter.rangeDates=s)}),e.qZA(),e.TgZ(75,"span",34),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearDate())}),e._UZ(76,"i",35),e.qZA()()()()()()(),e.TgZ(77,"div",36)(78,"div",11)(79,"span"),e._UZ(80,"img",37),e._uU(81," Log Table"),e.qZA(),e.TgZ(82,"span",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(83,"i",19),e.qZA(),e.TgZ(84,"span",39),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearAllLogsDialog())}),e._UZ(85,"i",40),e.qZA(),e.TgZ(86,"span",41),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.refresh())}),e._UZ(87,"i",42),e.qZA()()(),e.TgZ(88,"div",43)(89,"div",44)(90,"p-table",45),e.NdJ("selectionChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectedRows=s)})("dblclick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.dblClickLogs())}),e.YNc(91,ut,13,0,"ng-template",46),e.YNc(92,ht,20,34,"ng-template",47),e.qZA()()()()}if(2&a){const t=e.oxw(2);e.xp6(21),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstanceApis)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstanceApis||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections)),e.xp6(4),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.xp6(6),e.Q6J("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.xp6(16),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.DdM(35,vt))("value",t.responseData)}}function yt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function Ct(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,Ne,4,1,"div",5),e.YNc(2,ft,93,36,"div",0),e.YNc(3,yt,1,0,"p-progressSpinner",6),e.qZA()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.loading)}}let At=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;constantsCS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:E.D.ADD,eventChannel:new e.vpe,formData:void 0};instances;instanceIds;instanceNames;databases;databaseNames;collections;collectionNames;supportedAPIs;supportedApiNames;customApis;functionIds;customApiNames;systemsApis;systemApiIds;systemApiNames;amEvents;amEventIds;amEventNames;schedulersApis;schedulersIds;schedulersNames;wsEvents;wsEventIds;wsEventsNames;tpBundles;tpBundleMap=[];tpApiVersions;tpApiVersionMap=[];tpApis;tpApisMap=[];allTreeItemsMap={};value=new Date;range={start:null,end:null};logFilterPanelLayoutModelC;logDetailsLayoutModelC;gridFilter={queryParams:{},apisRegex:{},supportedAPIs:{}};ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v,C,m,I,S,A,Ft){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=g,this.schedulerS=h,this.amEventS=v,this.webSocketEventsS=C,this.dataProviderS=m,this.confirmationService=I,this.constantsS=S,this.constantsCS=A,this.cd=Ft,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.Z)(function*(s){if(s&&s.action===N.F.APPLY_FILTER){const n=t.gridFilter;t.gridFilter=s.data,t.gridFilter.rangeDates=n.rangeDates,yield t.loadInstances(s.data),yield t.logTableSummaryData(s.data),t.logFilterPanelLayoutModelC&&t.logFilterPanelLayoutModelC.hideModal(),yield t.loadGridData(!1)}});return function(s){return i.apply(this,arguments)}}())),this.generalS.setNewTitle("API Maker - Log Table Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.Z)(function*(){t.loading=!0;try{const i=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,!0===i.isLogsSetupDone?(t.isExternalLogsSetupDoneByRoot=!0,t.loadGridData(!1)):t.isExternalLogsSetupDoneByRoot=!1}catch{t.isExternalLogsSetupDoneByRoot=!1}t.cd.detectChanges()})()}loadGridData(t){var i=this;return(0,u.Z)(function*(){const s={find:{user:i.authCS.getUserId()},select:{createdAt:1,success:1,category:1,requestMethod:1,instanceName:1,databaseName:1,collectionName:1,instanceApiName:1,customApiName:1,systemApiName:1,eventName:1,tpApiBundleName:1,apiVersion:1,tpApiName:1,schedulerName:1,webSocketEventName:1,tenantUsername:1,url:1},sort:{_id:-1},limit:i.settings.maxRowsLimit};if(i.setDataForFilterModal(!1),i.gridFilter&&i.logFilterPanelLayoutModelC&&i.logFilterPanelLayoutModelC.setDataInObjectFromEventCenter(i.gridFilter),i.applyFilterInQuery(s.find,i.gridFilter),t){const l=i.responseData?.[0]?._id;l&&(s.find._id={$gt:l})}const n=yield i.logS.query(s).toPromise();if(t){for(const l of i.responseData)l.isNewInGrid=!1;i.responseData=[...n.data,...i.responseData];for(const l of n.data)i.doChangesInLogObject(l,!0)}else{i.responseData=n.data;for(const l of i.responseData)i.doChangesInLogObject(l,!1)}i.generalS.setNewTitle("API Maker - Log Table Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.R.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.R.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.R.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.R.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.R.INSTANCES};i?.apisRegex?.allInstances?t.$or.push(l):r.isEmpty(i?.queryParams?.instanceIds)||(l.instanceName={$in:this.instanceNames},r.isEmpty(i.queryParams.databaseNames)||(l.databaseName={$in:i.queryParams.databaseNames}),r.isEmpty(i.queryParams.collectionNames)||(l.collectionName={$in:i.queryParams.collectionNames}),r.isEmpty(i.queryParams.supportedApiNames)||(l.instanceApiName={$in:i.queryParams.supportedApiNames}),t.$or.push(l));const g={category:c.R.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(g);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const m=r.uniq(r.map(this.tpBundles,"bundleName")),I=r.uniq(r.map(this.tpApiVersions,"apiVersion")),S=r.uniq(r.map(this.tpApis,"apiName")),A={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(A.tpApiBundleName={$in:m}),r.isEmpty(I)||(A.apiVersion={$in:I}),r.isEmpty(S)||(A.tpApiName={$in:S}),t.$or.push(A)}const h={category:c.R.EVENTS};i?.apisRegex?.allEvents?t.$or.push(h):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.R.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const v={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(v):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const C={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(C):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.R.WEB_SOCKET_EVENT,webSocketEventName:{$in:this.wsEventsNames}}),i?.rangeDates?.[0]&&t.$and.push({createdAt:{$gte:i.rangeDates[0]}}),i?.rangeDates?.[1]&&t.$and.push({createdAt:{$lte:i.rangeDates[1]}}),r.isEmpty(t.$or)&&delete t.$or,r.isEmpty(t.$and)&&delete t.$and}logTableSummaryData(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.functions},select:{name:1}};i.customApis=(yield i.functionS.query(s).toPromise()).data,i.functionIds=r.map(i.customApis,p.iH._id),i.customApiNames=r.map(i.customApis,p.eb.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.iH._id);i.systemsApis=[];for(const m of t?.queryParams.systemApis)l[m]&&i.systemsApis.push(l[m]);i.systemApiIds=r.map(i.systemsApis,p.iH._id),i.systemApiNames=r.map(i.systemsApis,p.aV.name);const g={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(g).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.iH._id),i.amEventNames=r.map(i.amEvents,p.l0.name);const h={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(h).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.iH._id),i.schedulersNames=r.map(i.schedulersApis,p.qH.name);const v=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,C=r.keyBy(v,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)C[m]&&i.wsEvents.push(C[m]);i.wsEventIds=r.map(i.wsEvents,p.iH._id),i.wsEventsNames=r.map(i.wsEvents,p.of.id),i.calculateThirdPartyApiDataForUI(t)})()}calculateThirdPartyApiDataForUI(t){this.tpBundles=[],this.tpApiVersions=[],this.tpApis=[];for(const i of t.thirdPartyApis)i.level0?this.tpBundles.push(i):i.level1?this.tpApiVersions.push(i):i.level2&&this.tpApis.push(i);this.generalS.getMapOfAllItems(this.allTreeItemsMap,t.thirdPartyApis),this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApisMap=r.map(this.tpApis,p.iH._id)}loadInstances(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.instanceIds},select:{name:1},sort:{name:1}};i.instances=(yield i.instanceS.query(s).toPromise()).data,i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.Z)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.iH._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.Z)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.iH._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.Z)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.iH._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format(this.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=[[t.instanceName,t.tenantUsername].filter(s=>!!s).join("::"),t.databaseName,t.collectionName,t.instanceApiName].filter(s=>!!s).join(" \u2192 "):t.category===c.R.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.R.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.R.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.R.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.R.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=E.D.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.Z)(function*(){const s=[];for(const n of t){i.instances.splice(i.instances.indexOf(n),1);for(const l of i.databases)l.instanceId===n._id&&s.push(l)}i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),i.eventCenterS.filterInLog.instanceIds.next(i.instanceIds),i.removeDbClick(s)})()}removeDbClick(t){const i=[];for(const s of t){this.databases.splice(this.databases.indexOf(s),1);for(const n of this.collections)n.instanceName===s.instanceName&&n.databaseName===s.db&&i.push(n)}this.databaseNames=r.map(this.databases,p.iH._id),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames),this.removeCollectionClick(i)}removeCollectionClick(t){const i=[];for(const s of t){this.collections.splice(this.collections.indexOf(s),1);for(const n of this.supportedAPIs)s.instanceName&&n.databaseName===s.databaseName&&n.collectionName===s.name&&i.push(n)}this.collectionNames=r.map(this.collections,p.iH._id),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames),this.removeApiClick(i)}removeApiClick(t){for(const i of t)this.supportedAPIs.splice(this.supportedAPIs.indexOf(i),1);this.supportedApiNames=r.map(this.supportedAPIs,p.iH._id),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames),this.setRegexOnRemove()}setRegexOnRemove(){(0===this.instances.length||0===this.databases.length||0===this.collections.length||0===this.supportedAPIs.length)&&(this.gridFilter.apisRegex={})}customApisClick(t){this.customApis.splice(this.customApis.indexOf(t),1),this.functionIds=r.map(this.customApis,p.iH._id),this.customApiNames=r.map(this.customApis,p.eb.name),this.eventCenterS.filterInLog.functionIds.next(this.functionIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.iH._id),this.systemApiNames=r.map(this.systemsApis,p.aV.name),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds)}amEventsClick(t){this.amEvents.splice(this.amEvents.indexOf(t),1),this.amEventIds=r.map(this.amEvents,p.iH._id),this.amEventNames=r.map(this.amEvents,p.l0.name),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds)}schedulersClick(t){this.schedulersApis.splice(this.schedulersApis.indexOf(t),1),this.schedulersIds=r.map(this.schedulersApis,p.iH._id),this.schedulersNames=r.map(this.schedulersApis,p.qH.name),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds)}wsEventClick(t){this.wsEvents.splice(this.wsEvents.indexOf(t),1),this.wsEventIds=r.map(this.wsEvents,p.iH._id),this.wsEventsNames=r.map(this.wsEvents,p.of.id),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds)}npmPackageClickData(t,i){"L_1"===i?this.bundleAndVersionAndApiRemove(t):"L_2"===i?this.allTreeItemsMap[t._id]&&this.apiVersionClickData(this.allTreeItemsMap[t._id]):"L_3"===i&&this.allTreeItemsMap[t._id]&&this.tpApiClickData(this.allTreeItemsMap[t._id])}bundleAndVersionAndApiRemove(t){if(t.level0&&this.tpBundles.indexOf(t)>=0){for(const i of t.children||[])this.apiVersionClickData(i);this.tpBundles.splice(this.tpBundles.indexOf(t),1)}this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.apiVersionClickData(t)}apiVersionClickData(t){t.level1&&this.tpApiVersions.indexOf(t)>=0&&this.tpApiVersions.splice(this.tpApiVersions.indexOf(t),1),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApiClickData(t)}tpApiClickData(t){if(t.level1)for(const i of t.children||[])this.tpApis.indexOf(i)>=0&&this.tpApis.splice(this.tpApis.indexOf(i),1);else if(t.level0)for(const i of t.children||[])for(const s of i.children||[])this.tpApis.indexOf(s)>=0&&this.tpApis.splice(this.tpApis.indexOf(s),1);else t.level2&&this.tpApis.indexOf(t)>=0&&this.tpApis.splice(this.tpApis.indexOf(t),1);this.tpApisMap=r.map(this.tpApis,p.iH._id)}setDataForFilterModal(t){this.eventCenterS.filterInLog.instanceIds.next(this.instanceIds?this.instanceIds:[]),this.eventCenterS.filterInLog.functionIds.next(this.functionIds?this.functionIds:[]),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds?this.systemApiIds:[]),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds?this.amEventIds:[]),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds?this.schedulersIds:[]),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds?this.wsEventIds:[]),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames?this.databaseNames:[]),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames?this.collectionNames:[]),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames?this.supportedApiNames:[]);const i=[...this.tpBundleMap,...this.tpApiVersionMap,...this.tpApisMap];this.eventCenterS.filterInLog.thirdPartyApiIds.next(i.length?i:[]),t&&this.eventCenterS.filterInLog.refreshGrid.next(Math.random())}clearAllLogsDialog(){var t=this;return(0,u.Z)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.Z)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.Z)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.Z)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.iH._id;dblClickLogs(){var t=this;return(0,u.Z)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.Y36(D.e),e.Y36(Y.D),e.Y36(F.b),e.Y36(G.E),e.Y36(K.d),e.Y36(L.u),e.Y36(V.Z),e.Y36(j.l),e.Y36(W.a),e.Y36(X.B),e.Y36(Z.YP),e.Y36(b.L),e.Y36(M.s),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(qe,5),e.Gf(Pe,5)),2&i){let n;e.iGM(n=e.CRH())&&(s.logFilterPanelLayoutModelC=n.first),e.iGM(n=e.CRH())&&(s.logDetailsLayoutModelC=n.first)}},decls:5,vars:2,consts:[["class","pt-1 pl-1 pr-1",4,"ngIf"],[3,"data"],["logFilterPanelLayoutModelC",""],["logDetailsLayoutModelC",""],[1,"pt-1","pl-1","pr-1"],["class","overflow-hidden","style","height: calc(100vh - 46px);",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"overflow-hidden",2,"height","calc(100vh - 46px)"],[1,"text-center"],[1,"mt-5","pt-5"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-table.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","fa-fw","align-middle","text-success"],["tooltipPosition","left","pTooltip","Show Filter Modal",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fa","fa-filter","text-yellow","fa-fw"],[1,"card-body","p-0","overflow-auto",2,"height","278px"],[1,"table","table-striped","table-sm","mb-0"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2"],[1,"border-right"],["class","text-center text-success",4,"ngIf"],[4,"ngIf"],["colspan","4",4,"ngIf"],["class","border-right",4,"ngIf"],["colspan","2",4,"ngIf"],["colspan","4"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2","pt-2"],[1,"mt-1","d-inline-block"],["colspan","4",1,""],["appendTo","body","selectionMode","range","dateFormat","dd/mm/yy","inputId","filterDatePickerId",1,"form-control-sm",3,"ngModel","showIcon","showButtonBar","readonlyInput","ngModelChange"],["pTooltip","Clear",1,"cursor-pointer",3,"click"],[1,"fas","fa-ban","fa-fw","ml-4","align-middle","text-danger"],[1,"card","shadow-sm","h-100","mt-2"],["src","/assets/images/icons/log.svg","alt","Log Table",1,"fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Show Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Clear All Logs",1,"float-right","cursor-pointer","ml-3","text-danger",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw"],["tooltipPosition","left","pTooltip","Refresh Logs",1,"float-right","cursor-pointer","ml-3","text-success",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],[1,"overflow-hidden"],[2,"height","calc(100vh - 418px)","width","calc(100% - 2px)"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","paginator","rows","rowsPerPageOptions","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"text-center","text-success"],["class","ml-1","styleClass","bg-danger text-dark",4,"ngFor","ngForOf"],["styleClass","bg-danger text-dark",1,"ml-1"],[1,"fas","fa-times-circle","cursor-pointer",3,"click"],["class","ml-1","styleClass","bg-warning text-dark",4,"ngFor","ngForOf"],["styleClass","bg-warning text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-info text-dark",4,"ngFor","ngForOf"],["styleClass","bg-info text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-light text-dark",4,"ngFor","ngForOf"],["styleClass","bg-light text-dark",1,"ml-1"],["colspan","2"],[1,"text-center",2,"width","80px"],[2,"width","200px"],[2,"width","130px"],[2,"width","100px"],[3,"pSelectableRow"],[1,"text-center",3,"ngClass"],[1,"text-nowrap",3,"ngClass"],[1,"small","font-weight-bold","mr-3",3,"ngClass"],[1,"text-nowrap",3,"ngStyle","ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.YNc(0,Ct,4,3,"div",0),e._UZ(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Q6J("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("data",s.data))},dependencies:[R.JJ,R.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,w.u,z.f,ee.A,fe,be],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Tt=d(70292),Zt=d(1678),xt=d(64211),It=d(21434),St=d(84186),Lt=d(95765),bt=d(2777),qt=d(57705),Pt=d(31558),Nt=d(38125);const Et=[{path:"main",component:At,canActivate:[B.P]}];let Dt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[J.Bz.forChild(Et),Q.u,Tt.ApiTestingM,Zt.DashboardM,xt.DbCellM,It.B,St.SystemApiM,Lt.FunctionManM,bt.u,qt.L,Pt.SchedulerManM,Nt.AmEventsM,H.WebSocketEventsM]})}return a})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[9575],{9006:(m,f,n)=>{n.d(f,{G:()=>F});var p=n(15861),l=n(51162),u=n(87848),t=n(94946),d=n(53429),g=n(99961),Z=n(77240),s=n(96814),U=n(97680),c=n(14844);function T(a,o){1&a&&t._UZ(0,"i",35)}function x(a,o){1&a&&t._UZ(0,"i",50)}function A(a,o){1&a&&t._UZ(0,"i",51)}function q(a,o){1&a&&t._UZ(0,"i",35)}function h(a,o){1&a&&t._UZ(0,"i",50)}function b(a,o){1&a&&t._UZ(0,"i",51)}function O(a,o){1&a&&t._UZ(0,"i",35)}function P(a,o){1&a&&t._UZ(0,"i",50)}function v(a,o){1&a&&t._UZ(0,"i",51)}function E(a,o){if(1&a&&(t.TgZ(0,"tr")(1,"td"),t._uU(2,"Process Logs Path"),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&a){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(e.usefulEnv.logFilePath)}}function I(a,o){if(1&a&&(t.TgZ(0,"tr")(1,"td"),t._uU(2,"Logs Cleanup Interval"),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&a){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(e.usefulEnv.logs__logRemoveSchedulerInterval)}}function C(a,o){if(1&a&&(t.TgZ(0,"tr")(1,"td"),t._uU(2,"Max Logs Count To Keep In Log DB"),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&a){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(e.usefulEnv.logs__maxLogsCount.toLocaleString("en-IN"))}}function D(a,o){if(1&a&&(t.TgZ(0,"tr")(1,"td"),t._uU(2,"Redis Value Expires In"),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&a){const e=t.oxw().$implicit;t.xp6(4),t.hij("",e.usefulEnv.redisExternal__redisValueExpireInSeconds.toLocaleString("en-IN")," Seconds")}}function N(a,o){if(1&a&&(t.TgZ(0,"tr")(1,"td"),t._uU(2,"Max Chars To Cache In Redis"),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&a){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(e.usefulEnv.redisExternal__maxCharsResToCache.toLocaleString("en-IN"))}}function w(a,o){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" \u2192 ",e.databaseName,"")}}const M=function(a){return{"text-danger font-weight-bold":a}},S=function(a){return{"text-success font-weight-bold":a}};function R(a,o){if(1&a&&(t.TgZ(0,"tr")(1,"td"),t._UZ(2,"img",52),t._uU(3),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.YNc(6,w,2,1,"span",45),t.qZA(),t.TgZ(7,"td",53),t._uU(8),t.qZA(),t.TgZ(9,"td",54),t._uU(10),t.qZA(),t.TgZ(11,"td",54),t._uU(12),t.qZA()()),2&a){const e=o.$implicit,r=t.oxw(3);t.xp6(2),t.Akn("MONGO_DB"==e.type?"width:0.5rem; margin-right: 6px;":"width:1rem"),t.s9C("src",r.getInstanceIconUrl(e.type),t.LSH),t.s9C("alt",e.type),t.xp6(1),t.hij(" ",e.type," "),t.xp6(2),t.Oqu(e.instanceName),t.xp6(1),t.Q6J("ngIf",e.databaseName),t.xp6(2),t.Oqu(e.cMax),t.xp6(1),t.Q6J("ngClass",t.VKq(12,M,e.cMax===e.cShared)),t.xp6(1),t.Oqu(e.cShared),t.xp6(1),t.Q6J("ngClass",t.VKq(14,S,e.cAvailable>0)),t.xp6(1),t.Oqu(e.cAvailable)}}function y(a,o){if(1&a&&(t.TgZ(0,"p-tabPanel",10)(1,"div",1)(2,"div",11)(3,"div",12)(4,"table",13)(5,"tr",14)(6,"td",15),t._UZ(7,"i",16),t._uU(8," Worker Information"),t.qZA()(),t.TgZ(9,"tr")(10,"td",17),t._UZ(11,"i",18),t._uU(12," Is Master"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA()(),t.TgZ(15,"tr")(16,"td"),t._UZ(17,"i",19),t._uU(18," Unique Id"),t.qZA(),t.TgZ(19,"td"),t._uU(20),t.qZA()(),t.TgZ(21,"tr")(22,"td"),t._UZ(23,"i",20),t._uU(24," Total Workers"),t.qZA(),t.TgZ(25,"td"),t._uU(26),t.qZA()(),t.TgZ(27,"tr")(28,"td"),t._UZ(29,"i",21),t._uU(30," Host + Port"),t.qZA(),t.TgZ(31,"td"),t._uU(32),t.qZA()(),t.TgZ(33,"tr")(34,"td"),t._UZ(35,"i",16),t._uU(36," Sandbox Queue"),t.qZA(),t.TgZ(37,"td"),t._uU(38),t.qZA()()(),t.TgZ(39,"table",13)(40,"tr",14)(41,"td",22),t.YNc(42,T,1,0,"i",23),t.YNc(43,x,1,0,"i",24),t.YNc(44,A,1,0,"i",25),t.TgZ(45,"span"),t._uU(46,"OS Memory Information"),t.qZA()()(),t.TgZ(47,"tr")(48,"td",17),t._UZ(49,"i",26),t._uU(50," Total Memory"),t.qZA(),t.TgZ(51,"td"),t._uU(52),t.qZA()(),t.TgZ(53,"tr")(54,"td"),t._UZ(55,"i",27),t._uU(56," Free Memory"),t.qZA(),t.TgZ(57,"td",28),t._uU(58),t.qZA()()(),t.TgZ(59,"table",29)(60,"tr",14)(61,"td",22),t._UZ(62,"i",30),t._uU(63," Process Memory Information"),t.qZA()(),t.TgZ(64,"tr")(65,"td",17),t._UZ(66,"i",31),t._uU(67," Total Use (RSS)"),t.qZA(),t.TgZ(68,"td",28),t._uU(69),t.qZA()(),t.TgZ(70,"tr")(71,"td"),t._UZ(72,"i",32),t._uU(73," External"),t.qZA(),t.TgZ(74,"td"),t._uU(75),t.qZA()(),t.TgZ(76,"tr")(77,"td"),t._UZ(78,"i",33),t._uU(79," Heap Total"),t.qZA(),t.TgZ(80,"td"),t._uU(81),t.qZA()(),t.TgZ(82,"tr")(83,"td"),t._UZ(84,"i",34),t._uU(85," Heap Used"),t.qZA(),t.TgZ(86,"td"),t._uU(87),t.qZA()()()(),t.TgZ(88,"div",12)(89,"table",13)(90,"tr",14)(91,"td",22),t.YNc(92,q,1,0,"i",23),t.YNc(93,h,1,0,"i",24),t.YNc(94,b,1,0,"i",25),t._uU(95," Platform Information "),t.qZA()(),t.TgZ(96,"tr")(97,"td",17),t._UZ(98,"i",35),t._uU(99," Platform"),t.qZA(),t.TgZ(100,"td"),t.YNc(101,O,1,0,"i",23),t.YNc(102,P,1,0,"i",24),t.YNc(103,v,1,0,"i",25),t.TgZ(104,"span"),t._uU(105),t.qZA()()(),t.TgZ(106,"tr")(107,"td"),t._UZ(108,"i",36),t._uU(109," Host Name"),t.qZA(),t.TgZ(110,"td"),t._uU(111),t.qZA()(),t.TgZ(112,"tr")(113,"td"),t._UZ(114,"i",37),t._uU(115," Home Directory"),t.qZA(),t.TgZ(116,"td"),t._uU(117),t.qZA()(),t.TgZ(118,"tr")(119,"td"),t._UZ(120,"i",38),t._uU(121," Temp Directory"),t.qZA(),t.TgZ(122,"td"),t._uU(123),t.qZA()(),t.TgZ(124,"tr")(125,"td"),t._UZ(126,"i",39),t._uU(127," CPU Count"),t.qZA(),t.TgZ(128,"td"),t._uU(129),t.qZA()(),t.TgZ(130,"tr")(131,"td"),t._UZ(132,"i",39),t._uU(133," CPU Info"),t.qZA(),t.TgZ(134,"td",40),t._uU(135),t.qZA()(),t.TgZ(136,"tr")(137,"td"),t._UZ(138,"i",41),t._uU(139," Up Time"),t.qZA(),t.TgZ(140,"td"),t._uU(141),t.qZA()(),t.TgZ(142,"tr")(143,"td"),t._UZ(144,"i",42),t._uU(145," Node.js Version"),t.qZA(),t.TgZ(146,"td",40),t._uU(147),t.qZA()(),t.TgZ(148,"tr")(149,"td"),t._UZ(150,"i",42),t._uU(151," Node Options"),t.qZA(),t.TgZ(152,"td"),t._uU(153),t.qZA()()()()(),t.TgZ(154,"div",43)(155,"table",29)(156,"tr",14)(157,"td",44),t._UZ(158,"i",39),t._uU(159," Some Important Environment Variables"),t.qZA()(),t.TgZ(160,"tr")(161,"td",17),t._uU(162,"Max Memory Limit Of Sandbox Node.js Process"),t.qZA(),t.TgZ(163,"td"),t._uU(164),t.qZA()(),t.TgZ(165,"tr")(166,"td"),t._uU(167,"Env File Path"),t.qZA(),t.TgZ(168,"td"),t._uU(169),t.qZA()(),t.YNc(170,E,5,1,"tr",45),t.TgZ(171,"tr")(172,"td"),t._uU(173,"Oracle Client Path"),t.qZA(),t.TgZ(174,"td"),t._uU(175),t.qZA()(),t.TgZ(176,"tr")(177,"td"),t._uU(178,"Logging enabled"),t.qZA(),t.TgZ(179,"td"),t._uU(180),t.qZA()(),t.YNc(181,I,5,1,"tr",45),t.YNc(182,C,5,1,"tr",45),t.YNc(183,D,5,1,"tr",45),t.YNc(184,N,5,1,"tr",45),t.TgZ(185,"tr")(186,"td"),t._uU(187,"JWT Expires In"),t.qZA(),t.TgZ(188,"td"),t._uU(189),t.qZA()(),t.TgZ(190,"tr")(191,"td"),t._uU(192,"JWT Issuer"),t.qZA(),t.TgZ(193,"td"),t._uU(194),t.qZA()(),t.TgZ(195,"tr")(196,"td"),t._uU(197,"Encrypted Data Valid Till Sent By FE"),t.qZA(),t.TgZ(198,"td"),t._uU(199),t.qZA()(),t.TgZ(200,"tr")(201,"td"),t._uU(202,"Refresh Token Is Valid Till"),t.qZA(),t.TgZ(203,"td"),t._uU(204),t.qZA()(),t.TgZ(205,"tr")(206,"td"),t._uU(207,"Response Compress If Larger Than These Many Bytes"),t.qZA(),t.TgZ(208,"td"),t._uU(209),t.qZA()(),t.TgZ(210,"tr")(211,"td"),t._uU(212,"Maximum Body Size Allowed To Accept"),t.qZA(),t.TgZ(213,"td"),t._uU(214),t.qZA()(),t.TgZ(215,"tr")(216,"td"),t._uU(217,"Cron Time Zone"),t.qZA(),t.TgZ(218,"td"),t._uU(219),t.qZA()(),t.TgZ(220,"tr")(221,"td"),t._uU(222,"Store URL"),t.qZA(),t.TgZ(223,"td"),t._uU(224),t.qZA()(),t.TgZ(225,"tr")(226,"td"),t._uU(227,"Maximum Test Users For UI"),t.qZA(),t.TgZ(228,"td"),t._uU(229),t.qZA()(),t.TgZ(230,"tr")(231,"td"),t._uU(232,"Uploaded File Cleaning Scheduler Cron"),t.qZA(),t.TgZ(233,"td"),t._uU(234),t.qZA()(),t.TgZ(235,"tr")(236,"td"),t._uU(237,"Uploaded File Remove Older Than This Time"),t.qZA(),t.TgZ(238,"td"),t._uU(239),t.qZA()(),t.TgZ(240,"tr")(241,"td"),t._uU(242,"Maximum characters allowed in console.log"),t.qZA(),t.TgZ(243,"td"),t._uU(244),t.qZA()()()(),t.TgZ(245,"div",43)(246,"table",29)(247,"tr",14)(248,"td",44),t._UZ(249,"i",46),t._uU(250," DB Connections"),t.qZA()(),t.TgZ(251,"tr")(252,"td",47),t._uU(253," Type"),t.qZA(),t.TgZ(254,"td"),t._uU(255," Name"),t.qZA(),t.TgZ(256,"td",48),t._uU(257," Max"),t.qZA(),t.TgZ(258,"td",48),t._uU(259," Shared"),t.qZA(),t.TgZ(260,"td",48),t._uU(261," Available"),t.qZA()(),t.YNc(262,R,13,16,"tr",49),t.qZA()()()()),2&a){const e=o.$implicit;t.s9C("header","Worker - "+e.workerId),t.xp6(14),t.Oqu(e.isMaster),t.xp6(6),t.Oqu(e.uniqueProcessId),t.xp6(6),t.Oqu(e.totalWorkers),t.xp6(6),t.Oqu(e.beHostPort),t.xp6(6),t.Oqu(e.sandboxRequestQueueForApisSize),t.xp6(4),t.Q6J("ngIf","linux"===e.platform),t.xp6(1),t.Q6J("ngIf","darwin"===e.platform),t.xp6(1),t.Q6J("ngIf","win32"===e.platform),t.xp6(8),t.Oqu(e.totalMemory),t.xp6(6),t.Oqu(e.freeMemory),t.xp6(11),t.Oqu(e.memory.rss),t.xp6(6),t.Oqu(e.memory.externalUsage),t.xp6(6),t.Oqu(e.memory.heapTotal),t.xp6(6),t.Oqu(e.memory.heapUsed),t.xp6(5),t.Q6J("ngIf","linux"===e.platform),t.xp6(1),t.Q6J("ngIf","darwin"===e.platform),t.xp6(1),t.Q6J("ngIf","win32"===e.platform),t.xp6(7),t.Q6J("ngIf","linux"===e.platform),t.xp6(1),t.Q6J("ngIf","darwin"===e.platform),t.xp6(1),t.Q6J("ngIf","win32"===e.platform),t.xp6(2),t.Oqu(e.platform),t.xp6(6),t.Oqu(e.hostName),t.xp6(6),t.Oqu(e.homeDir),t.xp6(6),t.Oqu(e.tempDir),t.xp6(6),t.Oqu(e.countCPUs),t.xp6(6),t.Oqu(e.cpuModel),t.xp6(6),t.Oqu(e.upTime),t.xp6(6),t.Oqu(e.nodeVersion),t.xp6(6),t.Oqu(e.nodeOptions),t.xp6(11),t.hij("",e.usefulEnv.sandbox__sandboxMaxOldSpaceMB," MB"),t.xp6(5),t.Oqu(e.usefulEnv.envPath),t.xp6(1),t.Q6J("ngIf",e.usefulEnv.logs__enable),t.xp6(5),t.Oqu(e.usefulEnv.oracleClientPath),t.xp6(5),t.Oqu(e.usefulEnv.logs__enable),t.xp6(1),t.Q6J("ngIf",e.usefulEnv.logs__enable),t.xp6(1),t.Q6J("ngIf",e.usefulEnv.logs__enable),t.xp6(1),t.Q6J("ngIf",e.usefulEnv.externalResiProvided),t.xp6(1),t.Q6J("ngIf",e.usefulEnv.externalResiProvided),t.xp6(5),t.hij("",e.usefulEnv.jwtOptions__expiresIn.toLocaleString("en-IN")," Seconds"),t.xp6(5),t.Oqu(e.usefulEnv.jwtOptions__issuer),t.xp6(5),t.hij("",e.usefulEnv.feTransferDataValidityInSecondsDefault.toLocaleString("en-IN")," Seconds"),t.xp6(5),t.hij("",e.usefulEnv.refreshTokenValidForS," Seconds"),t.xp6(5),t.Oqu(e.usefulEnv.compressThreshold.toLocaleString("en-IN")),t.xp6(5),t.hij("",e.usefulEnv.bodyLimit.toLocaleString("en-IN")," Byte"),t.xp6(5),t.Oqu(e.usefulEnv.cron_job_time_zone),t.xp6(5),t.Oqu(e.usefulEnv.store_url),t.xp6(5),t.Oqu(e.usefulEnv.maximum_test_user_count.toLocaleString("en-IN")),t.xp6(5),t.Oqu(e.usefulEnv.uploadedFileCleaningSchedulerCron),t.xp6(5),t.hij("",e.usefulEnv.uploadedFileRemoveOlderThanThisTimeInSeconds.toLocaleString("en-IN")," Seconds"),t.xp6(5),t.hij("",e.usefulEnv.redisInternal__maxCharsToStoreInConsoleLogs.toLocaleString("en-IN")," Characters"),t.xp6(18),t.Q6J("ngForOf",e.dbConnections)}}function L(a,o){if(1&a&&(t.TgZ(0,"p-tabPanel",10)(1,"p-tabView"),t.YNc(2,y,263,52,"p-tabPanel",8),t.qZA()()),2&a){const e=o.$implicit;t.s9C("header",e.name),t.xp6(2),t.Q6J("ngForOf",e.value)}}function B(a,o){1&a&&t._UZ(0,"p-progressSpinner",55)}let F=(()=>{class a{instanceS;ns;generalS;iDetailedSystemInfoObject;groupHost;groupHostArr=[];loading={grid:!1};constructor(e,r,i){this.instanceS=e,this.ns=r,this.generalS=i}ngOnInit(){this.getOriginal(),this.generalS.setNewTitle("API Maker - Nodes Dashboard")}getOriginal(){var e=this;return(0,p.Z)(function*(){e.loading.grid=!0;try{e.iDetailedSystemInfoObject=(yield e.instanceS.getFullSystemInfo().toPromise()).data,e.groupHost=_.groupBy(e.iDetailedSystemInfoObject,l.GR.hostName);for(const r in e.groupHost){const i={name:r,value:e.groupHost[r]||[]};e.groupHostArr.push(i),i.value=_.orderBy(i.value||[],[Q=>Q.workerId],[l.Wc.asc])}e.groupHostArr=_.orderBy(e.groupHostArr,[r=>(r.name||"").toLowerCase()],[l.Wc.asc])}catch(r){console.log(r),e.ns.showErrorFromResponse(r.error||r,"Unable to load server information.")}e.loading.grid=!1})()}getInstanceIconUrl(e){return e===u.d.SQL_SERVER_DB?"./assets/images/svg/Microsoft_SQL_Server_DB_No_Logo.svg":e===u.d.ORACLE_DB?"./assets/images/svg/Oracle_DB_No_Logo.svg":`./assets/images/svg/${e}.svg`}static \u0275fac=function(r){return new(r||a)(t.Y36(d.E),t.Y36(g.W),t.Y36(Z.b))};static \u0275cmp=t.Xpm({type:a,selectors:[["app-dash-root-nodes"]],decls:12,vars:2,consts:[["id","about",1,"mt-3"],[1,"container"],[1,"row"],[1,"col-lg-8","mx-auto"],[1,"text-center","mb-3","mt-3"],["src","/assets/images/icons/nodes.svg","alt","Server Nodes Dashboard",1,"fa-fw","mr-1"],[1,"mt-3"],[1,"card-body","p-0","h-100","overflow-hidden"],[3,"header",4,"ngFor","ngForOf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"header"],[1,"row","mt-3"],[1,"col-lg-6","mx-auto"],[1,"table","table-hover","table-striped","table-bordered","table-sm",2,"background-color","#3F3F3F"],[1,"bg-gradient"],["colspan","2",1,"text-center","fw-bold","border",2,"background-color","#272727"],[1,"fas","fa-cubes","fa-fw"],[2,"width","40%"],[1,"fas","fa-star","fa-fw"],[1,"fas","fa-fingerprint","fa-fw"],[1,"fas","fa-hands","fa-fw"],[1,"fas","fa-network-wired","fa-fw"],["colspan","2",1,"text-center","fw-bold",2,"background-color","#272727"],["class","fab fa-linux fa-fw",4,"ngIf"],["class","fab fa-apple fa-fw",4,"ngIf"],["class","fab fa-windows fa-fw",4,"ngIf"],[1,"fas","fa-square","fa-fw"],[1,"far","fa-square","fa-fw"],[1,"text-info","fw-bold"],[1,"table","table-hover","table-striped","table-bordered","mt-3","table-sm",2,"background-color","#3F3F3F"],[1,"fas","fa-memory","fa-fw"],[1,"fas","fa-rss","fa-fw"],[1,"fas","fa-outdent","fa-fw"],[1,"far","fa-circle","fa-fw"],[1,"fas","fa-circle-notch","fa-fw"],[1,"fab","fa-linux","fa-fw"],[1,"far","fa-user","fa-fw"],[1,"fas","fa-home","fa-fw"],[1,"fas","fa-folder","fa-fw"],[1,"fas","fa-microchip","fa-fw"],[1,"text-success"],[1,"fas","fa-hourglass-start","fa-fw"],[1,"fab","fa-node-js","fa-fw"],[1,"pb-3"],["colspan","5",1,"text-center","fw-bold",2,"background-color","#272727"],[4,"ngIf"],[1,"fas","fa-database","fa-fw"],[2,"width","250px"],[1,"text-center",2,"width","70px"],[4,"ngFor","ngForOf"],[1,"fab","fa-apple","fa-fw"],[1,"fab","fa-windows","fa-fw"],[3,"src","alt"],[1,"text-center"],[1,"text-center",3,"ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,i){1&r&&(t.TgZ(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),t._UZ(5,"img",5),t._uU(6," Server Nodes Dashboard"),t.qZA()()()()(),t.TgZ(7,"section",6)(8,"div",7)(9,"p-tabView"),t.YNc(10,L,3,2,"p-tabPanel",8),t.qZA()(),t.YNc(11,B,1,0,"p-progressSpinner",9),t.qZA()),2&r&&(t.xp6(10),t.Q6J("ngForOf",i.groupHostArr),t.xp6(1),t.Q6J("ngIf",i.loading.grid))},dependencies:[s.mk,s.sg,s.O5,U.G,c.xf,c.x4],styles:["table[_ngcontent-%COMP%]{background-color:#3f3f3f}td[_ngcontent-%COMP%]{border-color:#4b4a4a!important;padding:10px}"]})}return a})()},69575:(m,f,n)=>{n.d(f,{Q:()=>Z});var p=n(77664),l=n(17017),u=n(63726),t=n(9006),d=n(94946);const g=[{path:"",component:t.G,canActivate:[u.P]}];let Z=(()=>{class s{static \u0275fac=function(T){return new(T||s)};static \u0275mod=d.oAB({type:s});static \u0275inj=d.cJS({imports:[p.Bz.forChild(g),l.u]})}return s})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8592],{19184:(C,l,n)=>{n.r(l),n.d(l,{ApiInfoM:()=>M});var s=n(77664),d=n(17017),h=n(94946);const o=[{path:"db-cell",loadChildren:()=>Promise.all([n.e(1678),n.e(4211)]).then(n.bind(n,64211)).then(t=>t.DbCellM)},{path:"third-party-api",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(4186),n.e(1025),n.e(5765),n.e(9243),n.e(6401),n.e(1928)]).then(n.bind(n,71928)).then(t=>t.TpApiM)},{path:"custom-api",loadChildren:()=>Promise.all([n.e(7987),n.e(5765)]).then(n.bind(n,95765)).then(t=>t.FunctionManM)},{path:"am-events",loadChildren:()=>n.e(8125).then(n.bind(n,38125)).then(t=>t.AmEventsM)},{path:"web-socket-events",loadChildren:()=>n.e(1025).then(n.bind(n,81025)).then(t=>t.WebSocketEventsM)},{path:"system-api",loadChildren:()=>n.e(4186).then(n.bind(n,84186)).then(t=>t.SystemApiM)},{path:"schedulers",loadChildren:()=>Promise.all([n.e(885),n.e(1558)]).then(n.bind(n,31558)).then(t=>t.SchedulerManM)},{path:"process-initializers",loadChildren:()=>Promise.all([n.e(6236),n.e(5421)]).then(n.bind(n,45421)).then(t=>t.ProcessInitializersM)},{path:"db-masters",loadChildren:()=>n.e(1097).then(n.bind(n,51097)).then(t=>t.DbMastersM)},{path:"api-testing",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(885),n.e(7470),n.e(7975),n.e(6236),n.e(292)]).then(n.bind(n,70292)).then(t=>t.ApiTestingM)},{path:"index-maker",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(4186),n.e(3664)]).then(n.bind(n,73664)).then(t=>t.ScanningPeriodsM)}];let M=(()=>{class t{static \u0275fac=function(m){return new(m||t)};static \u0275mod=h.oAB({type:t});static \u0275inj=h.cJS({imports:[s.Bz.forChild(o),d.u]})}return t})()}}]);
package/dist/index.html CHANGED
@@ -173,5 +173,5 @@
173
173
  </style>
174
174
  </noscript>
175
175
 
176
- <script src="runtime.bb2a9060f1f8cb8e.js" type="module"></script><script src="polyfills.47193e1d7d4041b5.js" type="module"></script><script src="main.d1a56ffd3d6266b9.js" type="module"></script></body>
176
+ <script src="runtime.3e2c700389e48f46.js" type="module"></script><script src="polyfills.47193e1d7d4041b5.js" type="module"></script><script src="main.71d23d87fc0a83a2.js" type="module"></script></body>
177
177
  </html>