@sava-info-systems/api-maker-with-extensions 1.6.0 → 1.8.0
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.
- package/.env +1 -0
- package/README.md +1 -1
- package/dist/1025.js +1 -1
- package/dist/1097.js +1 -0
- package/dist/148.js +1 -1
- package/dist/1558.js +1 -1
- package/dist/1678.js +1 -1
- package/dist/1928.js +1 -1
- package/dist/2295.js +1 -1
- package/dist/2473.js +1 -1
- package/dist/2714.js +1 -1
- package/dist/2735.js +1 -0
- package/dist/3139.js +1 -1
- package/dist/4181.js +1 -1
- package/dist/4186.js +1 -1
- package/dist/4211.js +1 -1
- package/dist/485.js +1 -1
- package/dist/4895.js +1 -1
- package/dist/5249.js +1 -0
- package/dist/5334.js +1 -1
- package/dist/5421.js +1 -1
- package/dist/5679.js +1 -1
- package/dist/5765.js +1 -0
- package/dist/6236.js +1 -1
- package/dist/6393.js +1 -1
- package/dist/6401.js +1 -1
- package/dist/7368.js +1 -1
- package/dist/7436.js +1 -1
- package/dist/7470.js +1 -1
- package/dist/7975.js +1 -1
- package/dist/7977.js +1 -0
- package/dist/7987.js +1 -1
- package/dist/8125.js +1 -1
- package/dist/8266.js +1 -1
- package/dist/8296.js +1 -1
- package/dist/885.js +1 -1
- package/dist/9243.js +1 -1
- package/dist/9939.js +1 -1
- package/dist/assets/images/icons/api-group.svg +10 -9
- package/dist/assets/images/icons/api-user.svg +9 -6
- package/dist/assets/images/icons/comparator.svg +13 -4
- package/dist/assets/images/icons/custom.svg +5 -8
- package/dist/assets/images/icons/database.svg +28 -11
- package/dist/assets/images/icons/db-m.svg +9 -27
- package/dist/assets/images/icons/dev.svg +10 -6
- package/dist/assets/images/icons/diagram.svg +27 -6
- package/dist/assets/images/icons/event.svg +16 -0
- package/dist/assets/images/icons/film-movies-icon.svg +3 -13
- package/dist/assets/images/icons/finder.svg +9 -6
- package/dist/assets/images/icons/i18n.svg +10 -8
- package/dist/assets/images/icons/increment.svg +4 -3
- package/dist/assets/images/icons/license.svg +6 -0
- package/dist/assets/images/icons/log-profile.svg +20 -6
- package/dist/assets/images/icons/log.svg +14 -6
- package/dist/assets/images/icons/masters.svg +14 -0
- package/dist/assets/images/icons/native-process-logs.svg +13 -0
- package/dist/assets/images/icons/nodes.svg +4 -2
- package/dist/assets/images/icons/notes.svg +11 -18
- package/dist/assets/images/icons/process_initializers.svg +19 -12
- package/dist/assets/images/icons/redis.svg +17 -6
- package/dist/assets/images/icons/sandbox.svg +10 -3
- package/dist/assets/images/icons/schedulers.svg +7 -11
- package/dist/assets/images/icons/secret.svg +12 -6
- package/dist/assets/images/icons/systems.svg +7 -8
- package/dist/assets/images/icons/testing.svg +11 -3
- package/dist/assets/images/icons/third-party.svg +16 -6
- package/dist/assets/images/icons/typescript.svg +7 -6
- package/dist/assets/images/icons/ui-maker.svg +11 -0
- package/dist/assets/images/icons/utility.svg +18 -6
- package/dist/assets/images/icons/vulnerability.svg +19 -11
- package/dist/assets/images/icons/web.svg +3 -9
- package/dist/assets/schema-types/InterfaceProps.ts +32 -0
- package/dist/assets/schema-types/types.ts +1444 -136
- package/dist/assets/styles/out/styles.css +1 -1
- package/dist/assets/styles/out/styles.css.map +1 -1
- package/dist/assets/styles/styles.scss +9 -3
- package/dist/common.js +1 -1
- package/dist/main.js +1 -1
- package/dist/primeicons.eot +0 -0
- package/dist/primeicons.svg +62 -9
- package/dist/primeicons.ttf +0 -0
- package/dist/primeicons.woff +0 -0
- package/dist/primeicons.woff2 +0 -0
- package/dist/styles.css +1 -1
- package/license.txt +2 -1
- package/local.env +1 -0
- package/main.js +1 -1
- package/package.json +7 -4
- package/sandbox/assets/schema-types/types.js +257 -18
- package/sandbox/package.json +1 -0
- package/sandbox/sandbox.js +1 -1
- package/src/assets/schema-types/types.ts +1444 -136
- package/src/public/dist-db-masters/3rdpartylicenses.txt +1 -1
- package/src/public/dist-db-masters/browser/assets/data/mime_types.json +819 -0
- package/src/public/dist-db-masters/browser/assets/iframe_test.html +34 -1
- package/src/public/dist-db-masters/browser/assets/themes/arya-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/arya-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/arya-orange/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/arya-purple/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-amber/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-blue/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-cyan/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-green/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-indigo/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-lime/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-noir/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-pink/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-purple/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-teal/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-amber/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-blue/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-cyan/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-green/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-indigo/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-lime/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-noir/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-pink/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-purple/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-teal/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-dark-blue/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-dark-purple/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-light-blue/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-light-purple/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/fluent-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-blue/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-indigo/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-purple/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-teal/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-blue/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-indigo/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-purple/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-teal/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/luna-amber/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/luna-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/luna-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/luna-pink/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/md-dark-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/md-dark-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/md-light-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/md-light-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-dark-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-dark-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-light-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-light-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mira/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nano/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nova/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nova-accent/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nova-alt/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/rhea/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-orange/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-purple/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/soho-dark/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/soho-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/tailwind-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-orange/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-purple/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/viva-dark/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/viva-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/index.html +2 -0
- package/src/public/dist-db-masters/browser/main.js +58 -62
- package/src/public/dist-db-masters/browser/polyfills.js +2 -2
- package/dist/1464.js +0 -1
- package/dist/1840.js +0 -1
- package/dist/2443.js +0 -1
- package/dist/9208.js +0 -1
- package/dist/assets/images/icons/event.png +0 -0
- package/dist/assets/images/icons/license.png +0 -0
- package/dist/assets/images/icons/masters.png +0 -0
package/dist/8266.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8266],{8266:(dt,M,n)=>{n.r(M),n.d(M,{DatabasesMigrationM:()=>et});var m=n(7664),x=n(8176),D=n(3726),t=n(4946),o=n(5861),d=n(6990),p=n(3157),h=n(328),g=n(6212),b=n(1162),Z=n(5085),w=n(921),T=n(602),A=n(7240),C=n(9961),E=n(2189),P=n(5852),_=n(7414),R=n(2915),I=n(3835),k=n(3429),v=n(5219),U=n(6814),f=n(5431),F=n(7680),L=n(3259),N=n(6522);const Y=["databasesMigrationFormC"];function J(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.playAll())}),t._UZ(1,"i",20),t.qZA()}}function O(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.markAll())}),t._UZ(1,"i",22),t.qZA()}}function Q(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.edit())}),t._UZ(1,"i",24),t.qZA()}}function G(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.clone())}),t._UZ(1,"i",26),t.qZA()}}function H(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.removePermanent())}),t._UZ(1,"i",28),t.qZA()}}function K(s,c){1&s&&(t.TgZ(0,"th",32),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function B(s,c){if(1&s&&(t.TgZ(0,"tr"),t.YNc(1,K,2,0,"th",29),t._UZ(2,"th",30),t.TgZ(3,"th",31),t._uU(4,"Order"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Label"),t.qZA(),t._UZ(9,"th",31)(10,"th",31),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.showCheckbox)}}function j(s,c){if(1&s&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",41),t.qZA()),2&s){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function $(s,c){1&s&&t._UZ(0,"i",42)}const W=function(){return["/api-info/api-testing/testing"]},q=function(s,c,e){return{at_category:s,at_user:c,at_api:e}};function z(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"tr",33),t.YNc(1,j,2,2,"td",34),t.TgZ(2,"td"),t.YNc(3,$,1,0,"i",35),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td")(11,"div",36)(12,"button",37),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.playSingle(r))}),t._UZ(13,"i",38),t.qZA()()(),t.TgZ(14,"td")(15,"div",36)(16,"a",39),t.NdJ("click",function(a){return a.stopPropagation()}),t._UZ(17,"i",40),t.qZA()()()()}if(2&s){const e=c.$implicit,i=t.oxw();t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",i.showCheckbox),t.xp6(2),t.Q6J("ngIf",e.isScriptExecutedCalculated),t.xp6(2),t.Oqu(e.order),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Oqu(e.label),t.xp6(7),t.Q6J("routerLink",t.DdM(8,W))("queryParams",t.kEZ(9,q,i.EAPICategory.MIGRATION_SCRIPT,i.authCS.getUserId(),e._id))}}function X(s,c){1&s&&t._UZ(0,"p-progressSpinner",43)}let y=(()=>{class s{dbMigrationS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:h.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=w.dN;gridKey=b.iH._id;EAPICategory=Z.R;selectedRows=[];databasesMigrationFormC;constructor(e,i,a,r,l,u,it,at,st,nt,ot,rt,ct,lt){this.dbMigrationS=e,this.generalS=i,this.notificationS=a,this.navigationCS=r,this.authCS=l,this.constantsS=u,this.eventCenterS=it,this.router=at,this.userS=st,this.instanceS=nt,this.ns=ot,this.cs=rt,this.confirmationService=ct,this.cd=lt}ngOnInit(){var e=this;return(0,o.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var i=(0,o.Z)(function*(a){(a.action===p.F.SAVED||a.action===p.F.UPDATED)&&(e.databasesMigrationFormC.hideModal(),yield e.loadGridData())});return function(a){return i.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Database Migration")})()}loadGridData(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0;const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data;i.executedMigrationScripts=i.executedMigrationScripts||{};const a={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};e.showAll&&delete a.find.active;const r=yield e.dbMigrationS.query(a).toPromise();r&&(e.selectedRows=[],e.rows=r.data,e.rowsMap=d.keyBy(e.rows,b.iH._id));for(const u of e.rows)u.isScriptExecutedCalculated=i.executedMigrationScripts[u.name];let l=e.navigationCS.getQueryParam(g.p.am_db_migration);l&&!e.rowsMap[l]&&e.rows.length&&(l=e.rows[0]._id),e.rowsMap[l]?yield e.fillData():e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(d.max(d.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.databasesMigrationFormC.showModal()}markAll(){var e=this;return(0,o.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.markAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){yield e.markAsExecuted()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}markAsExecuted(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data,a={};for(let r=0;r<e.selectedRows.length;r++)a.executedMigrationScripts=i.executedMigrationScripts,a.executedMigrationScripts[e.selectedRows[r].name]=!0;yield e.userS.put(e.authCS.gUser._id,a,{select:b.iH._id}).toPromise(),e.ns.showSuccess("Database migration scripts marked successfully."),yield e.loadGridData()}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to mark database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playAll(){var e=this;return(0,o.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.playAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){yield e.playAllOriginal()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}playAllOriginal(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{(yield e.instanceS.executeDataMigrationScript(e.selectedRows))&&(e.ns.showSuccess("Database migration scripts executed successfully."),yield e.loadGridData())}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to execute database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playSingle(e){var i=this;return(0,o.Z)(function*(){try{i.confirmationService.confirm({message:i.cs.dbMigration.playConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,o.Z)(function*(){yield i.playSingleOriginal(e)}),function(){return a.apply(this,arguments)})})}catch(a){i.ns.showErrorFromResponse(a.error,i.cs.dbMigration.playError)}var a})()}playSingleOriginal(e){var i=this;return(0,o.Z)(function*(){i.loading.grid=!0,i.cd.detectChanges();try{(yield i.instanceS.executeDataMigrationScript(e._id))&&(i.ns.showSuccess("Database migration script executed successfully."),yield i.loadGridData())}catch(a){i.ns.showErrorFromResponse(a.error||a,"Unable to execute database migration script.")}i.loading.grid=!1,i.cd.detectChanges()})()}edit(){this.data.formData=this.rowsMap[d.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.databasesMigrationFormC.showModal()}clone(){var e=this;return(0,o.Z)(function*(){try{if(!e.selectedRows[0]||!e.rowsMap[d.map(e.selectedRows,"_id")[0]])return;const i=e.rowsMap[d.map(e.selectedRows,"_id")[0]]._id,a=(yield e.dbMigrationS.getById(i).toPromise()).data;delete a._id,a.name=`${a.name}-clone`,a.label=`${a.label} Clone`,a.order=(d.max(d.map(e.rows,"order"))||0)+1,(yield e.dbMigrationS.post(a).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.dbMigration.cloneError)}})()}removePermanent(){var e=this;return(0,o.Z)(function*(){var i;e.confirmationService.confirm({message:e.cs.dbMigration.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){for(const a of e.selectedRows)yield e.hardDelete(a._id);e.ns.showSuccess(e.cs.dbMigration.removePermanent),yield e.loadGridData()}),function(){return i.apply(this,arguments)})})})()}hardDelete(e){var i=this;return(0,o.Z)(function*(){yield i.dbMigrationS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.dbMigration.selectedDbMigration.next(void 0)}resetThisUrl(){var e=this;return(0,o.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.navigationCS.setQueryParam(g.p.am_db_migration,null)})()}itemSelected(){var e=this;return(0,o.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,o.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(g.p.am_db_migration,""),void e.eventCenterS.dbMigration.selectedDbMigration.next(null);const i=e.selectedRows[0];i?(yield e.navigationCS.setQueryParam(g.p.am_db_migration,i._id),e.eventCenterS.dbMigration.selectedDbMigration.next(i)):yield e.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickDBMigration(){this.selectedRows.length&&this.edit()}static \u0275fac=function(i){return new(i||s)(t.Y36(T.j),t.Y36(A.b),t.Y36(C.W),t.Y36(E.S),t.Y36(P.D),t.Y36(_.L),t.Y36(R.u),t.Y36(m.F0),t.Y36(I.K),t.Y36(k.E),t.Y36(C.W),t.Y36(_.L),t.Y36(v.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:s,selectors:[["app-databases-migration-list"]],viewQuery:function(i,a){if(1&i&&t.Gf(Y,5),2&i){let r;t.iGM(r=t.CRH())&&(a.databasesMigrationFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:21,vars:13,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/db-m.svg","alt","Database Migration",1,"fa-fw","mr-1",2,"width","27px"],["href","https://docs.apimaker.dev/v1/docs/features/database-migration.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Execute Selected Migration",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Mark as executed",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["databasesMigrationFormC",""],["tooltipPosition","left","pTooltip","Execute Selected Migration",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check-double","text-warning"],["tooltipPosition","left","pTooltip","Mark as executed",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-solid","fa-marker","text-warning"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","30px"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],["pTooltip","Script Executed","class","fas fa-solid fa-check fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"text-center"],["tooltipPosition","left","pTooltip","Execute script",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-check","text-success"],["href","javascript:","pTooltip","Test API","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[3,"value","pSelectableRow"],["pTooltip","Script Executed",1,"fas","fa-solid","fa-check","fa-fw","align-middle","text-success","text-v-small","pr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Database Migration"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,J,2,0,"span",5),t.YNc(8,O,2,0,"span",6),t.TgZ(9,"span",7),t.NdJ("click",function(){return a.add()}),t._UZ(10,"i",8),t.qZA(),t.YNc(11,Q,2,0,"span",9),t.YNc(12,G,2,0,"span",10),t.YNc(13,H,2,0,"span",11),t.qZA(),t.TgZ(14,"div",12)(15,"p-table",13),t.NdJ("selectionChange",function(l){return a.selectedRows=l})("selectionChange",function(){return a.itemSelected()})("dblclick",function(){return a.dblClickDBMigration()}),t.YNc(16,B,11,1,"ng-template",14),t.YNc(17,z,18,13,"ng-template",15),t.qZA(),t.YNc(18,X,1,0,"p-progressSpinner",16),t.qZA()(),t._UZ(19,"app-databases-migration-form",17,18)),2&i&&(t.xp6(7),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(3),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),t.xp6(3),t.Q6J("ngIf",a.loading.grid),t.xp6(1),t.Q6J("data",a.data))},dependencies:[m.rH,U.O5,f.iA,v.jx,f.Ei,f.UA,f.Mo,F.G,L.u,N.i],encapsulation:2,changeDetection:0})}return s})(),S=(()=>{class s{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||s)};static \u0275cmp=t.Xpm({type:s,selectors:[["app-databases-migration-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0),t._UZ(1,"app-databases-migration-list"),t.qZA())},dependencies:[y],encapsulation:2})}return s})();var V=n(7975);const tt=[{path:"main",component:S,canActivate:[D.P]}];let et=(()=>{class s{static \u0275fac=function(i){return new(i||s)};static \u0275mod=t.oAB({type:s});static \u0275inj=t.cJS({imports:[m.Bz.forChild(tt),x.u,V.d]})}return s})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8266],{8266:(dt,M,n)=>{n.r(M),n.d(M,{DatabasesMigrationM:()=>et});var m=n(7664),x=n(8176),D=n(3726),t=n(4946),o=n(5861),d=n(6990),p=n(3157),h=n(328),g=n(6212),b=n(1162),Z=n(5085),w=n(921),T=n(602),A=n(7240),C=n(9961),E=n(2189),P=n(5852),_=n(7414),R=n(2915),I=n(3835),k=n(3429),v=n(5219),U=n(6814),f=n(5431),F=n(7680),L=n(3259),N=n(6522);const Y=["databasesMigrationFormC"];function J(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.playAll())}),t._UZ(1,"i",20),t.qZA()}}function O(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.markAll())}),t._UZ(1,"i",22),t.qZA()}}function Q(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.edit())}),t._UZ(1,"i",24),t.qZA()}}function G(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.clone())}),t._UZ(1,"i",26),t.qZA()}}function H(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.removePermanent())}),t._UZ(1,"i",28),t.qZA()}}function K(s,c){1&s&&(t.TgZ(0,"th",32),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function B(s,c){if(1&s&&(t.TgZ(0,"tr"),t.YNc(1,K,2,0,"th",29),t._UZ(2,"th",30),t.TgZ(3,"th",31),t._uU(4,"Order"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Label"),t.qZA(),t._UZ(9,"th",31)(10,"th",31),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.showCheckbox)}}function j(s,c){if(1&s&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",41),t.qZA()),2&s){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function $(s,c){1&s&&t._UZ(0,"i",42)}const W=function(){return["/api-info/api-testing/testing"]},q=function(s,c,e){return{at_category:s,at_user:c,at_api:e}};function z(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"tr",33),t.YNc(1,j,2,2,"td",34),t.TgZ(2,"td"),t.YNc(3,$,1,0,"i",35),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td")(11,"div",36)(12,"button",37),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.playSingle(r))}),t._UZ(13,"i",38),t.qZA()()(),t.TgZ(14,"td")(15,"div",36)(16,"a",39),t.NdJ("click",function(a){return a.stopPropagation()}),t._UZ(17,"i",40),t.qZA()()()()}if(2&s){const e=c.$implicit,i=t.oxw();t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",i.showCheckbox),t.xp6(2),t.Q6J("ngIf",e.isScriptExecutedCalculated),t.xp6(2),t.Oqu(e.order),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Oqu(e.label),t.xp6(7),t.Q6J("routerLink",t.DdM(8,W))("queryParams",t.kEZ(9,q,i.EAPICategory.MIGRATION_SCRIPT,i.authCS.getUserId(),e._id))}}function X(s,c){1&s&&t._UZ(0,"p-progressSpinner",43)}let y=(()=>{class s{dbMigrationS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:h.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=w.dN;gridKey=b.iH._id;EAPICategory=Z.R;selectedRows=[];databasesMigrationFormC;constructor(e,i,a,r,l,u,it,at,st,nt,ot,rt,ct,lt){this.dbMigrationS=e,this.generalS=i,this.notificationS=a,this.navigationCS=r,this.authCS=l,this.constantsS=u,this.eventCenterS=it,this.router=at,this.userS=st,this.instanceS=nt,this.ns=ot,this.cs=rt,this.confirmationService=ct,this.cd=lt}ngOnInit(){var e=this;return(0,o.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var i=(0,o.Z)(function*(a){(a.action===p.F.SAVED||a.action===p.F.UPDATED)&&(e.databasesMigrationFormC.hideModal(),yield e.loadGridData())});return function(a){return i.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Database Migration")})()}loadGridData(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0;const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data;i.executedMigrationScripts=i.executedMigrationScripts||{};const a={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};e.showAll&&delete a.find.active;const r=yield e.dbMigrationS.query(a).toPromise();r&&(e.selectedRows=[],e.rows=r.data,e.rowsMap=d.keyBy(e.rows,b.iH._id));for(const u of e.rows)u.isScriptExecutedCalculated=i.executedMigrationScripts[u.name];let l=e.navigationCS.getQueryParam(g.p.am_db_migration);l&&!e.rowsMap[l]&&e.rows.length&&(l=e.rows[0]._id),e.rowsMap[l]?yield e.fillData():e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(d.max(d.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.databasesMigrationFormC.showModal()}markAll(){var e=this;return(0,o.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.markAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){yield e.markAsExecuted()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}markAsExecuted(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data,a={};for(let r=0;r<e.selectedRows.length;r++)a.executedMigrationScripts=i.executedMigrationScripts,a.executedMigrationScripts[e.selectedRows[r].name]=!0;yield e.userS.put(e.authCS.gUser._id,a,{select:b.iH._id}).toPromise(),e.ns.showSuccess("Database migration scripts marked successfully."),yield e.loadGridData()}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to mark database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playAll(){var e=this;return(0,o.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.playAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){yield e.playAllOriginal()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}playAllOriginal(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{(yield e.instanceS.executeDataMigrationScript(e.selectedRows))&&(e.ns.showSuccess("Database migration scripts executed successfully."),yield e.loadGridData())}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to execute database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playSingle(e){var i=this;return(0,o.Z)(function*(){try{i.confirmationService.confirm({message:i.cs.dbMigration.playConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,o.Z)(function*(){yield i.playSingleOriginal(e)}),function(){return a.apply(this,arguments)})})}catch(a){i.ns.showErrorFromResponse(a.error,i.cs.dbMigration.playError)}var a})()}playSingleOriginal(e){var i=this;return(0,o.Z)(function*(){i.loading.grid=!0,i.cd.detectChanges();try{(yield i.instanceS.executeDataMigrationScript(e._id))&&(i.ns.showSuccess("Database migration script executed successfully."),yield i.loadGridData())}catch(a){i.ns.showErrorFromResponse(a.error||a,"Unable to execute database migration script.")}i.loading.grid=!1,i.cd.detectChanges()})()}edit(){this.data.formData=this.rowsMap[d.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.databasesMigrationFormC.showModal()}clone(){var e=this;return(0,o.Z)(function*(){try{if(!e.selectedRows[0]||!e.rowsMap[d.map(e.selectedRows,"_id")[0]])return;const i=e.rowsMap[d.map(e.selectedRows,"_id")[0]]._id,a=(yield e.dbMigrationS.getById(i).toPromise()).data;delete a._id,a.name=`${a.name}-clone`,a.label=`${a.label} Clone`,a.order=(d.max(d.map(e.rows,"order"))||0)+1,(yield e.dbMigrationS.post(a).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.dbMigration.cloneError)}})()}removePermanent(){var e=this;return(0,o.Z)(function*(){var i;e.confirmationService.confirm({message:e.cs.dbMigration.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){for(const a of e.selectedRows)yield e.hardDelete(a._id);e.ns.showSuccess(e.cs.dbMigration.removePermanent),yield e.loadGridData()}),function(){return i.apply(this,arguments)})})})()}hardDelete(e){var i=this;return(0,o.Z)(function*(){yield i.dbMigrationS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.dbMigration.selectedDbMigration.next(void 0)}resetThisUrl(){var e=this;return(0,o.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.navigationCS.setQueryParam(g.p.am_db_migration,null)})()}itemSelected(){var e=this;return(0,o.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,o.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(g.p.am_db_migration,""),void e.eventCenterS.dbMigration.selectedDbMigration.next(null);const i=e.selectedRows[0];i?(yield e.navigationCS.setQueryParam(g.p.am_db_migration,i._id),e.eventCenterS.dbMigration.selectedDbMigration.next(i)):yield e.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickDBMigration(){this.selectedRows.length&&this.edit()}static \u0275fac=function(i){return new(i||s)(t.Y36(T.j),t.Y36(A.b),t.Y36(C.W),t.Y36(E.S),t.Y36(P.D),t.Y36(_.L),t.Y36(R.u),t.Y36(m.F0),t.Y36(I.K),t.Y36(k.E),t.Y36(C.W),t.Y36(_.L),t.Y36(v.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:s,selectors:[["app-databases-migration-list"]],viewQuery:function(i,a){if(1&i&&t.Gf(Y,5),2&i){let r;t.iGM(r=t.CRH())&&(a.databasesMigrationFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:21,vars:13,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/db-m.svg","alt","Database Migration",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/features/database-migration.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Execute Selected Migration",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Mark as executed",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["databasesMigrationFormC",""],["tooltipPosition","left","pTooltip","Execute Selected Migration",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check-double","text-warning"],["tooltipPosition","left","pTooltip","Mark as executed",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-solid","fa-marker","text-warning"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","30px"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],["pTooltip","Script Executed","class","fas fa-solid fa-check fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"text-center"],["tooltipPosition","left","pTooltip","Execute script",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-check","text-success"],["href","javascript:","pTooltip","Test API","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[3,"value","pSelectableRow"],["pTooltip","Script Executed",1,"fas","fa-solid","fa-check","fa-fw","align-middle","text-success","text-v-small","pr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Database Migration"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,J,2,0,"span",5),t.YNc(8,O,2,0,"span",6),t.TgZ(9,"span",7),t.NdJ("click",function(){return a.add()}),t._UZ(10,"i",8),t.qZA(),t.YNc(11,Q,2,0,"span",9),t.YNc(12,G,2,0,"span",10),t.YNc(13,H,2,0,"span",11),t.qZA(),t.TgZ(14,"div",12)(15,"p-table",13),t.NdJ("selectionChange",function(l){return a.selectedRows=l})("selectionChange",function(){return a.itemSelected()})("dblclick",function(){return a.dblClickDBMigration()}),t.YNc(16,B,11,1,"ng-template",14),t.YNc(17,z,18,13,"ng-template",15),t.qZA(),t.YNc(18,X,1,0,"p-progressSpinner",16),t.qZA()(),t._UZ(19,"app-databases-migration-form",17,18)),2&i&&(t.xp6(7),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(3),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),t.xp6(3),t.Q6J("ngIf",a.loading.grid),t.xp6(1),t.Q6J("data",a.data))},dependencies:[m.rH,U.O5,f.iA,v.jx,f.Ei,f.UA,f.Mo,F.G,L.u,N.i],encapsulation:2,changeDetection:0})}return s})(),S=(()=>{class s{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||s)};static \u0275cmp=t.Xpm({type:s,selectors:[["app-databases-migration-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0),t._UZ(1,"app-databases-migration-list"),t.qZA())},dependencies:[y],encapsulation:2})}return s})();var V=n(7975);const tt=[{path:"main",component:S,canActivate:[D.P]}];let et=(()=>{class s{static \u0275fac=function(i){return new(i||s)};static \u0275mod=t.oAB({type:s});static \u0275inj=t.cJS({imports:[m.Bz.forChild(tt),x.u,V.d]})}return s})()}}]);
|
package/dist/8296.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{8296:(Ft,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Nt});var O=d(7664),J=d(8176),Q=d(3726),B=d(1025),u=d(5861),e=d(4946),r=d(6990),T=d(6925),N=d(3157),E=d(328),p=d(1162),c=d(5085),F=d(819),H=d(5852),Y=d(6018),D=d(7240),G=d(3429),K=d(7629),L=d(2915),V=d(1042),j=d(7145),W=d(262),X=d(1429),Z=d(5219),b=d(7414),M=d(95),_=d(6814),x=d(5431),q=d(7680),R=d(3259),z=d(1532),ee=d(2169),w=d(9961),te=d(2660),ie=d(5043),se=d(3885),ae=d(559),ne=d(6937),le=d(356),oe=d(9329),re=d(7595),de=d(3824),pe=d(8651),ce=d(6607),ue=d(5305),ge=d(2726);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(w.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 v=d(7672),ye=d(2304),Ce=d(756);function Ae(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 Te(a,o){if(1&a&&(e.TgZ(0,"tr",43)(1,"td")(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 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",43)(1,"td")(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 Ie=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},U=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let Se=(()=>{class a{ec;notificationS;generalCS;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){this.ec=t,this.notificationS=i,this.generalCS=s,this.logS=n,this.cd=l,this.monacoS=g,this.constantsS=h}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(v.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(v.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.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(w.W),e.Y36(D.b),e.Y36(F.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:141,vars:50,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"],[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"]],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.TgZ(44,"tr")(45,"td"),e._uU(46,"Name"),e.qZA(),e.TgZ(47,"td"),e._uU(48," :"),e.qZA(),e.TgZ(49,"td",19),e._uU(50),e.qZA()(),e.TgZ(51,"tr")(52,"td"),e._uU(53,"Time"),e.qZA(),e.TgZ(54,"td"),e._uU(55," :"),e.qZA(),e.TgZ(56,"td",19),e._uU(57),e.qZA()(),e.TgZ(58,"tr")(59,"td"),e._uU(60,"Status"),e.qZA(),e.TgZ(61,"td"),e._uU(62," :"),e.qZA(),e.TgZ(63,"td",19)(64,"span",21),e._uU(65),e.qZA()()(),e.TgZ(66,"tr")(67,"td"),e._uU(68,"Status Code"),e.qZA(),e.TgZ(69,"td"),e._uU(70," :"),e.qZA(),e.TgZ(71,"td",19)(72,"span",21),e._uU(73),e.qZA()()()()(),e.TgZ(74,"div",22),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(75,"span",23),e._uU(76,"Request Header "),e.qZA(),e.TgZ(77,"div",24),e._UZ(78,"i",25),e.qZA(),e.TgZ(79,"div",24),e._UZ(80,"i",26),e.qZA()(),e.TgZ(81,"div",27)(82,"p-table",28),e.YNc(83,Ae,5,0,"ng-template",29),e.YNc(84,Te,7,3,"ng-template",30),e.qZA()(),e.TgZ(85,"div",31),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(86,"span",23),e._uU(87,"Request Query params "),e.qZA(),e.TgZ(88,"div",24),e._UZ(89,"i",25),e.qZA(),e.TgZ(90,"div",24),e._UZ(91,"i",26),e.qZA()(),e.TgZ(92,"div",27)(93,"div",32)(94,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(95,"div",34),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(96,"span",23),e._uU(97,"Request Body "),e.qZA(),e.TgZ(98,"div",24),e._UZ(99,"i",25),e.qZA(),e.TgZ(100,"div",24),e._UZ(101,"i",26),e.qZA()(),e.TgZ(102,"div",27)(103,"div",32)(104,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(105,"div",35),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(106,"span",23),e._uU(107,"Response Header "),e.qZA(),e.TgZ(108,"div",24),e._UZ(109,"i",25),e.qZA(),e.TgZ(110,"div",24),e._UZ(111,"i",26),e.qZA()(),e.TgZ(112,"div",27)(113,"p-table",28),e.YNc(114,Ze,5,0,"ng-template",29),e.YNc(115,xe,7,3,"ng-template",30),e.qZA()(),e.TgZ(116,"div",36),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(117,"span",23),e._uU(118,"Response Body "),e.qZA(),e.TgZ(119,"div",24),e._UZ(120,"i",25),e.qZA(),e.TgZ(121,"div",24),e._UZ(122,"i",26),e.qZA()(),e.TgZ(123,"div",27)(124,"div",32)(125,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(126,"div",37),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(127,"span",38),e._uU(128,"Logs "),e.qZA(),e.TgZ(129,"div",24),e._UZ(130,"i",25),e.qZA(),e.TgZ(131,"div",24),e._UZ(132,"i",26),e.qZA()(),e.TgZ(133,"div",27)(134,"div",32)(135,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(136,"div",39)(137,"button",40),e._UZ(138,"i",41),e._uU(139," Cancel"),e.qZA()(),e._UZ(140,"p-progressSpinner",42),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(41,Ie,(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(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.createdAt),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(46,U):e.DdM(47,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(48,U):e.DdM(49,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,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,R.u],encapsulation:2})}return a})();const Le=["logFilterPanelLayoutModelC"],be=["logDetailsLayoutModelC"];function qe(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 Pe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function Ne(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 Ee(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Ne,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Fe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function De(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 Me(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Re(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function we(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 Ue(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,we,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function ke(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Oe(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 Je(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function Qe(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Be(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 He(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Be,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ye(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 $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ge(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 Ke(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ge,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function Ve(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function je(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 We(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,je,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function Xe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function ze(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 et(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ze,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function tt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function it(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 st(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,it,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function at(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function nt(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 lt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,nt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function ot(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function rt(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 dt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,rt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function pt(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 f=function(a){return{"selected-row":a}},ct=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},ut=function(){return{color:"#26b47f"}},gt=function(){return{color:"#ed4b48"}};function mt(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,f,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,f,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,f,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,ct,(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,ut):e.DdM(27,gt))("ngClass",e.VKq(28,f,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,f,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,f,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const _t=function(){return[50,200,500]};function ht(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,Pe,2,0,"div",24),e.YNc(22,Ee,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Fe,2,0,"div",24),e.YNc(25,Me,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Re,2,0,"div",24),e.YNc(28,Ue,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,ke,2,0,"div",24),e.YNc(31,Je,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,Qe,3,0,"td",26),e.YNc(36,He,2,1,"td",27),e.YNc(37,$e,2,1,"td",27),e.YNc(38,Ke,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,Ve,2,0,"div",24),e.YNc(44,We,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,Xe,2,0,"div",24),e.YNc(50,et,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,tt,2,0,"div",24),e.YNc(56,st,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,at,2,0,"div",24),e.YNc(62,lt,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,ot,2,0,"div",24),e.YNc(68,dt,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,pt,13,0,"ng-template",46),e.YNc(92,mt,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,_t))("value",t.responseData)}}function vt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function ft(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,qe,4,1,"div",5),e.YNc(2,ht,93,36,"div",0),e.YNc(3,vt,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 yt=(()=>{class a{logS;authCS;socketS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;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,A,y,m,I,S,C,Et){this.logS=t,this.authCS=i,this.socketS=s,this.generalS=n,this.instanceS=l,this.functionS=g,this.eventCenterS=h,this.schedulerS=A,this.amEventS=y,this.webSocketEventsS=m,this.dataProviderS=I,this.confirmationService=S,this.constantsS=C,this.cd=Et,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.socketS.events.logCreated.subscribe(i=>{this.doChangesInLogObject(i,!0),this.responseData.unshift(i)})),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,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")),C={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(C.tpApiBundleName={$in:m}),r.isEmpty(I)||(C.apiVersion={$in:I}),r.isEmpty(S)||(C.tpApiName={$in:S}),t.$or.push(C)}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 A={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(A):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const y={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(y):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 A=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,y=r.keyBy(A,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)y[m]&&i.wsEvents.push(y[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}};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).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).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("DD-MM-YYYY hh:mm:ss A"),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=t.instanceName+" \u2192 "+t.databaseName+" \u2192 "+t.collectionName+" \u2192 "+t.instanceApiName: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.instanceIds)}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(F.e),e.Y36(H.D),e.Y36(Y.z),e.Y36(D.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(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(Le,5),e.Gf(be,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",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,ft,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:[M.JJ,M.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,R.u,z.f,ee.A,fe,Se],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Ct=d(2443),At=d(1678),Tt=d(4211),Zt=d(1434),xt=d(4186),It=d(9208),St=d(2777),Lt=d(7705),bt=d(1558),qt=d(8125);const Pt=[{path:"main",component:yt,canActivate:[Q.P]}];let Nt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[O.Bz.forChild(Pt),J.u,Ct.ApiTestingM,At.DashboardM,Tt.DbCellM,Zt.B,xt.SystemApiM,It.FunctionManM,St.u,Lt.L,bt.SchedulerManM,qt.AmEventsM,B.WebSocketEventsM]})}return a})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{8296:(Ft,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Nt});var O=d(7664),J=d(8176),Q=d(3726),B=d(1025),u=d(5861),e=d(4946),r=d(6990),T=d(6925),N=d(3157),E=d(328),p=d(1162),c=d(5085),F=d(819),H=d(5852),Y=d(6018),D=d(7240),G=d(3429),K=d(7629),L=d(2915),V=d(1042),j=d(7145),W=d(262),X=d(1429),Z=d(5219),b=d(7414),M=d(95),_=d(6814),x=d(5431),q=d(7680),R=d(3259),z=d(1532),ee=d(2169),w=d(9961),te=d(2660),ie=d(5043),se=d(3885),ae=d(559),ne=d(6937),le=d(356),oe=d(9329),re=d(7595),de=d(3824),pe=d(8651),ce=d(6607),ue=d(5305),ge=d(2726);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(w.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 v=d(7672),ye=d(2304),Ce=d(756);function Ae(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 Te(a,o){if(1&a&&(e.TgZ(0,"tr",43)(1,"td",44)(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 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",43)(1,"td",44)(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 Ie=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},U=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let Se=(()=>{class a{ec;notificationS;generalCS;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){this.ec=t,this.notificationS=i,this.generalCS=s,this.logS=n,this.cd=l,this.monacoS=g,this.constantsS=h}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(v.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(v.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(v.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(w.W),e.Y36(D.b),e.Y36(F.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:141,vars:50,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"],[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.TgZ(44,"tr")(45,"td"),e._uU(46,"Name"),e.qZA(),e.TgZ(47,"td"),e._uU(48," :"),e.qZA(),e.TgZ(49,"td",19),e._uU(50),e.qZA()(),e.TgZ(51,"tr")(52,"td"),e._uU(53,"Time"),e.qZA(),e.TgZ(54,"td"),e._uU(55," :"),e.qZA(),e.TgZ(56,"td",19),e._uU(57),e.qZA()(),e.TgZ(58,"tr")(59,"td"),e._uU(60,"Status"),e.qZA(),e.TgZ(61,"td"),e._uU(62," :"),e.qZA(),e.TgZ(63,"td",19)(64,"span",21),e._uU(65),e.qZA()()(),e.TgZ(66,"tr")(67,"td"),e._uU(68,"Status Code"),e.qZA(),e.TgZ(69,"td"),e._uU(70," :"),e.qZA(),e.TgZ(71,"td",19)(72,"span",21),e._uU(73),e.qZA()()()()(),e.TgZ(74,"div",22),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(75,"span",23),e._uU(76,"Request Header "),e.qZA(),e.TgZ(77,"div",24),e._UZ(78,"i",25),e.qZA(),e.TgZ(79,"div",24),e._UZ(80,"i",26),e.qZA()(),e.TgZ(81,"div",27)(82,"p-table",28),e.YNc(83,Ae,5,0,"ng-template",29),e.YNc(84,Te,7,3,"ng-template",30),e.qZA()(),e.TgZ(85,"div",31),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(86,"span",23),e._uU(87,"Request Query params "),e.qZA(),e.TgZ(88,"div",24),e._UZ(89,"i",25),e.qZA(),e.TgZ(90,"div",24),e._UZ(91,"i",26),e.qZA()(),e.TgZ(92,"div",27)(93,"div",32)(94,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(95,"div",34),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(96,"span",23),e._uU(97,"Request Body "),e.qZA(),e.TgZ(98,"div",24),e._UZ(99,"i",25),e.qZA(),e.TgZ(100,"div",24),e._UZ(101,"i",26),e.qZA()(),e.TgZ(102,"div",27)(103,"div",32)(104,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(105,"div",35),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(106,"span",23),e._uU(107,"Response Header "),e.qZA(),e.TgZ(108,"div",24),e._UZ(109,"i",25),e.qZA(),e.TgZ(110,"div",24),e._UZ(111,"i",26),e.qZA()(),e.TgZ(112,"div",27)(113,"p-table",28),e.YNc(114,Ze,5,0,"ng-template",29),e.YNc(115,xe,7,3,"ng-template",30),e.qZA()(),e.TgZ(116,"div",36),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(117,"span",23),e._uU(118,"Response Body "),e.qZA(),e.TgZ(119,"div",24),e._UZ(120,"i",25),e.qZA(),e.TgZ(121,"div",24),e._UZ(122,"i",26),e.qZA()(),e.TgZ(123,"div",27)(124,"div",32)(125,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(126,"div",37),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(127,"span",38),e._uU(128,"Logs "),e.qZA(),e.TgZ(129,"div",24),e._UZ(130,"i",25),e.qZA(),e.TgZ(131,"div",24),e._UZ(132,"i",26),e.qZA()(),e.TgZ(133,"div",27)(134,"div",32)(135,"app-monaco-editor",33),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(136,"div",39)(137,"button",40),e._UZ(138,"i",41),e._uU(139," Cancel"),e.qZA()(),e._UZ(140,"p-progressSpinner",42),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(41,Ie,(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(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.createdAt),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(46,U):e.DdM(47,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(48,U):e.DdM(49,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,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,R.u],encapsulation:2})}return a})();const Le=["logFilterPanelLayoutModelC"],be=["logDetailsLayoutModelC"];function qe(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 Pe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function Ne(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 Ee(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Ne,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Fe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function De(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 Me(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Re(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function we(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 Ue(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,we,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function ke(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Oe(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 Je(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function Qe(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Be(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 He(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Be,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ye(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 $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ge(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 Ke(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ge,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function Ve(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function je(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 We(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,je,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function Xe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function ze(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 et(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ze,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function tt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function it(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 st(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,it,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function at(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function nt(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 lt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,nt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function ot(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function rt(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 dt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,rt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function pt(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 f=function(a){return{"selected-row":a}},ct=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},ut=function(){return{color:"#26b47f"}},gt=function(){return{color:"#ed4b48"}};function mt(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,f,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,f,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,f,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,ct,(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,ut):e.DdM(27,gt))("ngClass",e.VKq(28,f,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,f,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,f,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const _t=function(){return[50,200,500]};function ht(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,Pe,2,0,"div",24),e.YNc(22,Ee,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Fe,2,0,"div",24),e.YNc(25,Me,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Re,2,0,"div",24),e.YNc(28,Ue,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,ke,2,0,"div",24),e.YNc(31,Je,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,Qe,3,0,"td",26),e.YNc(36,He,2,1,"td",27),e.YNc(37,$e,2,1,"td",27),e.YNc(38,Ke,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,Ve,2,0,"div",24),e.YNc(44,We,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,Xe,2,0,"div",24),e.YNc(50,et,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,tt,2,0,"div",24),e.YNc(56,st,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,at,2,0,"div",24),e.YNc(62,lt,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,ot,2,0,"div",24),e.YNc(68,dt,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,pt,13,0,"ng-template",46),e.YNc(92,mt,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,_t))("value",t.responseData)}}function vt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function ft(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,qe,4,1,"div",5),e.YNc(2,ht,93,36,"div",0),e.YNc(3,vt,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 yt=(()=>{class a{logS;authCS;socketS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;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,A,y,m,I,S,C,Et){this.logS=t,this.authCS=i,this.socketS=s,this.generalS=n,this.instanceS=l,this.functionS=g,this.eventCenterS=h,this.schedulerS=A,this.amEventS=y,this.webSocketEventsS=m,this.dataProviderS=I,this.confirmationService=S,this.constantsS=C,this.cd=Et,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.socketS.events.logCreated.subscribe(i=>{this.doChangesInLogObject(i,!0),this.responseData.unshift(i)})),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,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")),C={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(C.tpApiBundleName={$in:m}),r.isEmpty(I)||(C.apiVersion={$in:I}),r.isEmpty(S)||(C.tpApiName={$in:S}),t.$or.push(C)}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 A={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(A):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const y={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(y):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 A=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,y=r.keyBy(A,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)y[m]&&i.wsEvents.push(y[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).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).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("DD-MM-YYYY hh:mm:ss A"),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=t.instanceName+" \u2192 "+t.databaseName+" \u2192 "+t.collectionName+" \u2192 "+t.instanceApiName: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.instanceIds)}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(F.e),e.Y36(H.D),e.Y36(Y.z),e.Y36(D.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(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(Le,5),e.Gf(be,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",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,ft,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:[M.JJ,M.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,R.u,z.f,ee.A,fe,Se],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Ct=d(5249),At=d(1678),Tt=d(4211),Zt=d(1434),xt=d(4186),It=d(5765),St=d(2777),Lt=d(7705),bt=d(1558),qt=d(8125);const Pt=[{path:"main",component:yt,canActivate:[Q.P]}];let Nt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[O.Bz.forChild(Pt),J.u,Ct.ApiTestingM,At.DashboardM,Tt.DbCellM,Zt.B,xt.SystemApiM,It.FunctionManM,St.u,Lt.L,bt.SchedulerManM,qt.AmEventsM,B.WebSocketEventsM]})}return a})()}}]);
|