@sava-info-systems/api-maker-with-extensions 1.0.0-alpha → 1.6.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/README.md CHANGED
@@ -10,13 +10,13 @@
10
10
  <hr/>
11
11
 
12
12
  👉 This version is API Maker comes with additional extensions which makes software development process even more faster.<br/>
13
- 👉 You will need --extensionsLicenseKey=YOUR_KEY for installation.<br/>
13
+ 👉 You will need --extLicenseKey=YOUR_KEY for installation.<br/>
14
14
  👉 Contact us to buy license of extensions : https://apimaker.dev <br/>
15
15
  👉 Email address : contact@apimaker.dev <br/>
16
16
 
17
17
  ```shell
18
18
  # Add your key in below command
19
- curl -fsSL https://apimaker.dev/install.sh > install.sh && bash install.sh --default --version=latest --extensionsLicenseKey=YOUR_KEY
19
+ curl -fsSL https://apimaker.dev/v1/install.sh > install.sh && bash install.sh --default --version=latest --extLicenseKey=YOUR_KEY
20
20
 
21
21
  ```
22
22
 
package/dist/1840.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1840,6925,8374,8682,1617],{1840:(X,T,i)=>{i.r(T),i.d(T,{DbMastersM:()=>Et});var v=i(7664),D=i(8176),S=i(3726),t=i(4946),d=i(5861),f=i(6990),u=i(3157),h=i(328),_=i(6212),C=i(1162),Z=i(6925),M=i(553),a=i(5085),q=i(921),Y=i(9729),O=i(7240),A=i(9961),R=i(2189),tt=i(5561),B=i(5852),et=i(4795),x=i(7414),J=i(2915),L=i(3835),P=i(3429),k=i(5219),G=i(6814),N=i(5431),Q=i(7680),z=i(3259),m=i(95),j=i(9361),at=i(1601),I=i(3531),st=i(9989),ot=i(2304),nt=i(2660),it=i(5860),rt=i(756),V=i(4844),lt=i(3965),dt=i(5025);const ct=["insertCodeModalC"],mt=["monacoEditorModalC"];function ft(n,c){1&n&&(t.TgZ(0,"span"),t._UZ(1,"i",35),t._uU(2," Add Database Master"),t.qZA())}function ut(n,c){1&n&&(t.TgZ(0,"span"),t._UZ(1,"i",36),t._uU(2," View Database Master"),t.qZA())}function pt(n,c){1&n&&(t.TgZ(0,"span"),t._UZ(1,"i",37),t._uU(2," Edit Database Master"),t.qZA())}function ht(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",38)(1,"app-monaco-editor",39),t.NdJ("editorGenerated",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.editorGenerated(o))}),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("isSchemaEditor",!0)("editorOptions",e.editorOptionsDBMasters)}}function bt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.viewError())}),t._uU(1,"View error"),t.qZA()}}function gt(n,c){1&n&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function Ct(n,c){1&n&&(t.TgZ(0,"span"),t._uU(1,"Update"),t.qZA())}function _t(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",41),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.save())}),t._UZ(1,"i",42),t.YNc(2,gt,2,0,"span",4),t.YNc(3,Ct,2,0,"span",4),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("disabled",e.form.invalid),t.xp6(2),t.Q6J("ngIf",e.data.mode===e.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",e.data.mode===e.EFormMode.EDIT)}}function Dt(n,c){1&n&&t._UZ(0,"p-progressSpinner",43)}let K=(()=>{class n{fb;ns;generalS;constantsS;dbMastersS;authCS;monacoS;instanceS;eventCenterS;generalCS;navigationCS;userS;cd;data;loading={form:!1};EFormMode=h.D;form;subscriptions=[];formData;IEventData=u.F;id;BE_HOST_PORT=M.N.BE_HOST_PORT;DOCS_HOST_PORT=M.N.DOCS_HOST_PORT;instances=[];editorDBMaster;editorOptionsDBMasters={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab={};dbIdMap={};colIdMap={};formDataTemp=null;constructor(e,s,o,r,l,b,g,p,y,E,w,F,U){this.fb=e,this.ns=s,this.generalS=o,this.constantsS=r,this.dbMastersS=l,this.authCS=b,this.monacoS=g,this.instanceS=p,this.eventCenterS=y,this.generalCS=E,this.navigationCS=w,this.userS=F,this.cd=U}ngOnInit(){var e=this;return(0,d.Z)(function*(){e.createForm(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var s=(0,d.Z)(function*(o){if(o)if(e.form.enable(),o.action===u.F.OPEN_FORM_IN_EDIT_MODE)yield e.editViewLoadData(),e.cd.detectChanges();else if(o.action===u.F.OPEN_FORM_IN_VIEW_MODE)yield e.editViewLoadData(),e.form.disable(),e.cd.detectChanges();else if(o.action===u.F.OPEN_FORM_IN_ADD_MODE){e.form.reset(),e.resetDependentObjects("INSTANCE"),yield e.loadInstances();const r=yield e.instanceS.getDefaultContent(e.BE_HOST_PORT,a.R.DB_MASTERS_JSON).toPromise();e.editorOptionsDBMasters={readOnly:!1},e.generalCS.setValueInEditor(e,"editorDBMaster",r.data),e.cd.detectChanges()}});return function(o){return s.apply(this,arguments)}}()))})()}editViewLoadData(){var e=this;return(0,d.Z)(function*(){const s=yield e.dbMastersS.getById(e.data.formData._id).toPromise();e.form.reset(),e.resetDependentObjects("INSTANCE"),e.form.patchValue(s.data),e.formDataTemp=s.data,e.generalCS.setValueInEditor(e,"editorDBMaster",s.data?.dbMasterConfigCode||""),yield e.loadInstances(),e.formDataTemp=null})()}createForm(){this.form=this.fb.group({name:[null,[m.kI.required,m.kI.minLength(3),m.kI.maxLength(50),m.kI.pattern("[a-zA-Z0-9_-]*$")]],instanceName:[null,[m.kI.required]],databaseName:[null,[m.kI.required]],collectionName:[null,[m.kI.required]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idDBMastersForm").modal("show")},100)}hideModal(){$("#idDBMastersForm").modal("hide")}save(){var e=this;return(0,d.Z)(function*(){const s=e.form.getRawValue();let b;s.instanceName=s.instanceName.name,s.databaseName=s.databaseName.db,s.collectionName=s.collectionName.name,b=e.data.formData&&e.data.formData._id?(yield e.dbMastersS.getById(e.data.formData._id).toPromise()).data:{};const g=Object.assign({},b,s);g.user=e.authCS.getUserId(),g.dbMasterConfigCode=e.editorDBMaster.getValue();try{let p;e.loading.form=!0,e.lastError=void 0,e.monacoS.clearEditorDecorations(e.editorDBMaster,e.monacoDecorations),e.data.mode===h.D.ADD?p=yield e.dbMastersS.post(g).toPromise():e.data.mode===h.D.EDIT&&(p=yield e.dbMastersS.put(g._id,g,{select:C.iH._id}).toPromise()),e.ns.showSuccess(e.data.mode===h.D.ADD?e.constantsS.dbMaster.addSuccess:e.constantsS.dbMaster.editSuccess),e.data.eventChannel.emit({action:e.data.mode===h.D.ADD?u.F.SAVED:u.F.UPDATED,data:p}),e.loading.form=!1}catch(p){e.loading.form=!1,e.ns.showErrorFromResponse(p.error||p,"Unable to save database master."),e.lastError=p.error,e.tab={axiosResponse:{data:p.error}},e.monacoS.highlightErrorInMonacoEditor(e.editorDBMaster,e.tab,"MainSandbox.ts",e.monacoDecorations)}e.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=j.H.All,this.insertCodeModalC.showModal(I.b.CodeFinderResultC)}editorGenerated(e){var s=this;return(0,d.Z)(function*(){s.editorDBMaster=e,yield s.monacoS.loadSchemaEditorSettings(s.BE_HOST_PORT,s.authCS.getUserId(),null),s.monacoS.addSaveCodeKeyBinding(e,o=>{s.form.valid&&s.save()}),s.monacoS.addInsertCodeKeyBinding(e,o=>{s.generalCS.messageReceivedFor=j.H.All,s.data.mode!==h.D.VIEW&&s.insertCodeModalC.showModal(I.b.DBMastersFormC)}),s.subscriptions.push(s.generalS.messageReceived.subscribe(o=>{o.type&&o.type===st.g.TEXT_COPIED&&o.componentName===I.b.DBMastersFormC&&(s.monacoS.insertAtCursor(e,o.selectedText),s.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),at.d.json)}loadInstances(){var e=this;return(0,d.Z)(function*(){e.resetDependentObjects("INSTANCE"),e.loading.form=!0;try{const s={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,active:1,user:1}};e.tab.allInstances=(yield e.instanceS.query(s).toPromise()).data||[]}catch(s){e.ns.showErrorMessageFromErrorObject(s),e.tab.allInstances=[]}if(e.formDataTemp){const s=e.form.controls.instanceName;e.tab.instance=f.find(e.tab.allInstances,{name:e.formDataTemp.instanceName}),e.tab.instance&&s.setValue(e.tab.instance)}else e.tab.instance=e.tab.allInstances[0];yield e.loadDatabases(),e.loading.form=!1,e.cd.detectChanges()})()}loadDatabases(){var e=this;return(0,d.Z)(function*(){if(e.loading.form=!0,e.resetDependentObjects("DATABASE"),!e.tab.instance)return e.tab.allDatabases=[],void(e.tab.allCollections=[]);try{e.tab.allDatabases=((yield e.instanceS.getDatabases([e.tab.instance]).toPromise()).data||[])[0]||[],e.dbIdMap=f.keyBy(e.tab.allDatabases,C.N7.db)}catch(s){e.ns.showErrorMessageFromErrorObject(s),e.tab.allDatabases=[]}if(e.formDataTemp){const s=e.form.get("databaseName");e.tab.database=f.find(e.tab.allDatabases,{db:e.formDataTemp.databaseName}),e.tab.database&&s.patchValue(e.tab.database)}else e.tab.database=e.tab.allDatabases[0];yield e.loadCollections(),e.loading.form=!1})()}loadCollections(){var e=this;return(0,d.Z)(function*(){if(e.loading.form=!0,e.resetDependentObjects("COLLECTION"),e.tab.instance&&e.tab.database){try{e.tab.allCollections=((yield e.instanceS.getCollections([e.tab.database]).toPromise()).data||[])[0]||[],e.colIdMap=f.keyBy(e.tab.allCollections,C.GR.name)}catch(s){e.ns.showErrorMessageFromErrorObject(s),e.tab.allCollections=[]}if(e.formDataTemp){const s=e.form.get("collectionName");e.tab.collection=f.find(e.tab.allCollections,{name:e.formDataTemp.collectionName}),e.tab.collection&&s.patchValue(e.tab.collection)}else e.tab.collection=e.tab.allCollections[0];e.loading.form=!1,e.cd.detectChanges()}else e.tab.allCollections=[]})()}resetDependentObjects(e){"INSTANCE"===e?(this.tab.allInstances=this.tab.allDatabases=this.tab.allCollections=[],this.tab.instance=this.tab.database=this.tab.collection=this.tab.api=void 0):"DATABASE"===e?(this.tab.allDatabases=this.tab.allCollections=[],this.tab.database=this.tab.collection=this.tab.api=void 0):"COLLECTION"===e&&(this.tab.allCollections=[],this.tab.collection=this.tab.api=void 0)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(s){return new(s||n)(t.Y36(m.qu),t.Y36(A.W),t.Y36(O.b),t.Y36(x.L),t.Y36(Y.z),t.Y36(B.D),t.Y36(ot.b),t.Y36(P.E),t.Y36(J.u),t.Y36(O.b),t.Y36(R.S),t.Y36(L.K),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-db-masters-form"]],viewQuery:function(s,o){if(1&s&&(t.Gf(ct,5),t.Gf(mt,5)),2&s){let r;t.iGM(r=t.CRH())&&(o.insertCodeModalC=r.first),t.iGM(r=t.CRH())&&(o.viewDockerfileModelC=r.first)}},inputs:{data:"data"},decls:52,vars:20,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idDBMastersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/features/db-masters.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["optionLabel","name","filterBy","name","appendTo","body","formControlName","instanceName","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["formControlName","databaseName","optionLabel","db","filterBy","db","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["formControlName","collectionName","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,o){1&s&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,ft,3,0,"span",4),t.YNc(5,ut,3,0,"span",4),t.YNc(6,pt,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6),t.NdJ("click",function(){return o.hideModal()}),t.TgZ(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"span",9),t.NdJ("click",function(){return o.showInsertCodeModel()}),t._UZ(12,"i",10),t.qZA(),t.TgZ(13,"a",11),t._UZ(14,"img",12),t.qZA()()(),t.TgZ(15,"div",13)(16,"p-tabView")(17,"p-tabPanel",14)(18,"form",15)(19,"div",16)(20,"label",17),t._uU(21,"Name"),t.qZA(),t.TgZ(22,"div",18),t._UZ(23,"input",19),t.qZA()(),t.TgZ(24,"div",16)(25,"label",17),t._uU(26,"Instance"),t.qZA(),t.TgZ(27,"div",18)(28,"p-dropdown",20),t.NdJ("onChange",function(l){return o.tab.instance=l.value,o.loadDatabases()}),t.qZA()()(),t.TgZ(29,"div",16)(30,"label",17),t._uU(31,"Database"),t.qZA(),t.TgZ(32,"div",18)(33,"p-dropdown",21),t.NdJ("onChange",function(l){return o.tab.database=l.value,o.loadCollections()}),t.qZA()()(),t.TgZ(34,"div",16)(35,"label",17),t._uU(36,"Collection"),t.qZA(),t.TgZ(37,"div",18)(38,"p-dropdown",22),t.NdJ("onChange",function(l){return o.tab.collection=l.value}),t.qZA()()()()(),t.TgZ(39,"p-tabPanel",23),t.YNc(40,ht,2,2,"div",24),t.qZA()()(),t.TgZ(41,"div",25),t.YNc(42,bt,2,0,"a",26),t.TgZ(43,"button",27),t.NdJ("click",function(){return o.hideModal()}),t._UZ(44,"i",28),t._uU(45," Close"),t.qZA(),t.YNc(46,_t,4,3,"button",29),t.qZA(),t.YNc(47,Dt,1,0,"p-progressSpinner",30),t.qZA()()(),t._UZ(48,"app-insert-code-modal",31,32)(50,"app-monaco-editor-modal",33,34)),2&s&&(t.xp6(4),t.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",o.data.mode===o.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),t.xp6(12),t.Q6J("formGroup",o.form),t.xp6(10),t.Q6J("options",o.tab.allInstances)("filter",!0),t.xp6(5),t.Q6J("options",o.tab.allDatabases)("filter",!0),t.xp6(5),t.Q6J("options",o.tab.allCollections)("filter",!0),t.xp6(2),t.Q6J("ngIf",o.shouldLoadMonacoEditor),t.xp6(2),t.Q6J("ngIf",o.lastError),t.xp6(4),t.Q6J("ngIf",o.data.mode!==o.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",o.loading.form),t.xp6(1),t.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",o.DOCS_HOST_PORT),t.xp6(2),t.Q6J("modalId","idMonacoEditorModalDBMaster")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[m._Y,m.Fj,m.JJ,m.JL,m.sg,m.u,G.O5,nt.y,it.P,rt.O,Q.G,V.xf,V.x4,z.u,lt.Lt,dt.A],encapsulation:2,changeDetection:0})}return n})();const Mt=["DBMastersFormC"];function Tt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"span",16),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.edit())}),t._UZ(1,"i",17),t.qZA()}}function vt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"span",18),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.removePermanent())}),t._UZ(1,"i",19),t.qZA()}}function St(n,c){1&n&&(t.TgZ(0,"th",23),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function Zt(n,c){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,St,2,0,"th",20),t.TgZ(2,"th",21),t._uU(3,"Name"),t.qZA(),t.TgZ(4,"th"),t._uU(5,"Instance \u2192 Database \u2192 Collection"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Required Auth Headers"),t.qZA(),t._UZ(8,"th",22),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.showCheckbox)}}function Nt(n,c){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",29),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function Ot(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"tr",24),t.YNc(1,Nt,2,2,"td",25),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td")(9,"div",26)(10,"button",27),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.openMasterPageInNewTab(r))}),t._UZ(11,"i",28),t.qZA()()()()}if(2&n){const e=c.$implicit,s=t.oxw();t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",s.showCheckbox),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.lnq("",e.instanceName," \u2192 ",e.databaseName," \u2192 ",e.collectionName,""),t.xp6(2),t.Oqu(e.authHeadersGrid)}}function At(n,c){1&n&&t._UZ(0,"p-progressSpinner",30)}let H=(()=>{class n{dbMastersS;generalS;notificationS;navigationCS;navigationS;authCS;authS;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={};EUserType=q.dN;gridKey=C.iH._id;EAPICategory=a.R;selectedRows=[];dbMastersFormC;constructor(e,s,o,r,l,b,g,p,y,E,w,F,U,wt,Ft,Ut){this.dbMastersS=e,this.generalS=s,this.notificationS=o,this.navigationCS=r,this.navigationS=l,this.authCS=b,this.authS=g,this.constantsS=p,this.eventCenterS=y,this.router=E,this.userS=w,this.instanceS=F,this.ns=U,this.cs=wt,this.confirmationService=Ft,this.cd=Ut}ngOnInit(){var e=this;return(0,d.Z)(function*(){if(!e.authS.backendSettings.extensions)return e.navigationS.gotoDashboard();e.eventCenterS.dbMasters.selectedDBMaster.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var s=(0,d.Z)(function*(o){(o.action===u.F.SAVED||o.action===u.F.UPDATED)&&(e.dbMastersFormC.hideModal(),yield e.loadGridData())});return function(o){return s.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Database Masters")})()}loadGridData(){var e=this;return(0,d.Z)(function*(){e.loading.grid=!0;const s=yield e.dbMastersS.getDBMastersGrid({}).toPromise();if(s){e.selectedRows=[],e.rows=s.data,e.rowsMap=f.keyBy(e.rows,C.iH._id);for(const r of e.rows){const l=[];for(const b of r.authHeaders||[])l.push(b.name);r.authHeadersGrid=l.join(", ")}}let o=e.navigationCS.getQueryParam(_.p.am_db_master);o&&!e.rowsMap[o]&&e.rows.length&&(o=e.rows[0]._id),e.rowsMap[o]?yield e.fillData():e.eventCenterS.dbMasters.selectedDBMaster.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(f.max(f.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.dbMastersFormC.showModal()}edit(){this.data.formData=this.rowsMap[f.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),this.dbMastersFormC.showModal()}removePermanent(){var e=this;return(0,d.Z)(function*(){var s;e.confirmationService.confirm({message:e.cs.dbMaster.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,d.Z)(function*(){for(const o of e.selectedRows)yield e.hardDelete(o._id);e.ns.showSuccess(e.cs.dbMaster.removePermanent),yield e.loadGridData()}),function(){return s.apply(this,arguments)})})})()}hardDelete(e){var s=this;return(0,d.Z)(function*(){yield s.dbMastersS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.dbMasters.selectedDBMaster.next(void 0)}resetThisUrl(){var e=this;return(0,d.Z)(function*(){e.eventCenterS.dbMasters.selectedDBMaster.next(void 0),yield e.navigationCS.setQueryParam(_.p.am_db_master,null)})()}itemSelected(){var e=this;return(0,d.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,d.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(_.p.am_db_master,""),void e.eventCenterS.dbMasters.selectedDBMaster.next(null);const s=e.selectedRows[0];s?(yield e.navigationCS.setQueryParam(_.p.am_db_master,s._id),e.eventCenterS.dbMasters.selectedDBMaster.next(s)):yield e.resetThisUrl()})()}dblClick(){this.selectedRows.length&&this.edit()}openMasterPageInNewTab(e){const s=this.authCS.getUserPath();let o=[M.N.BE_HOST_PORT,"/dist-db-masters/browser/",`?${Z.ZF.ADMIN_PATH}=${s}&`].join("");const r=[`${Z.ZF.DB_MASTER_NAME}=${e.name}`];for(const l of e.authHeaders)r.push(`${l.name}=____actual_header_value____`);o+=r.join("&"),window.open(o,"_blank")}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}clone=f.clone;static \u0275fac=function(s){return new(s||n)(t.Y36(Y.z),t.Y36(O.b),t.Y36(A.W),t.Y36(R.S),t.Y36(tt.X),t.Y36(B.D),t.Y36(et.e),t.Y36(x.L),t.Y36(J.u),t.Y36(v.F0),t.Y36(L.K),t.Y36(P.E),t.Y36(A.W),t.Y36(x.L),t.Y36(k.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-db-masters-list"]],viewQuery:function(s,o){if(1&s&&t.Gf(Mt,5),2&s){let r;t.iGM(r=t.CRH())&&(o.dbMastersFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:18,vars:10,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/masters.png","alt","Database master image",1,"fa-fw","mr-1",2,"width","27px"],["href","https://docs.apimaker.dev/v1/docs/features/database-masters.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["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","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"],["DBMastersFormC",""],["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","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","25%"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"text-center"],["tooltipPosition","left","pTooltip","Open master page",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-external-link-alt","text-info","fa-fw"],[3,"value","pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,o){1&s&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Database Masters"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.TgZ(7,"span",5),t.NdJ("click",function(){return o.add()}),t._UZ(8,"i",6),t.qZA(),t.YNc(9,Tt,2,0,"span",7),t.YNc(10,vt,2,0,"span",8),t.qZA(),t.TgZ(11,"div",9)(12,"p-table",10),t.NdJ("selectionChange",function(l){return o.selectedRows=l})("selectionChange",function(){return o.itemSelected()})("dblclick",function(){return o.dblClick()}),t.YNc(13,Zt,9,1,"ng-template",11),t.YNc(14,Ot,12,7,"ng-template",12),t.qZA(),t.YNc(15,At,1,0,"p-progressSpinner",13),t.qZA()(),t._UZ(16,"app-db-masters-form",14,15)),2&s&&(t.xp6(9),t.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",o.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",o.selectedRows)("dataKey",o.gridKey)("scrollable",!0)("value",o.rows),t.xp6(3),t.Q6J("ngIf",o.loading.grid),t.xp6(1),t.Q6J("data",o.data))},dependencies:[G.O5,N.iA,k.jx,N.Ei,N.UA,N.Mo,Q.G,z.u,K],encapsulation:2,changeDetection:0})}return n})(),W=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=t.Xpm({type:n,selectors:[["app-db-masters-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(s,o){1&s&&(t.TgZ(0,"div",0),t._UZ(1,"app-db-masters-list"),t.qZA())},dependencies:[H],encapsulation:2})}return n})();var xt=i(4950);let It=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[D.u,xt.A]})}return n})();const yt=[{path:"main",component:W,canActivate:[S.P]}];let Et=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[v.Bz.forChild(yt),D.u,It]})}return n})()},6925:(X,T,i)=>{i.d(T,{Eg:()=>f,Yp:()=>S,ZF:()=>u,vT:()=>D});var D=function(a){return a.FORM_DATA="FORM_DATA",a.JSON="JSON",a.TEXT="TEXT",a}(D||{}),S=function(a){return a.GET="GET",a.POST="POST",a.PUT="PUT",a.DELETE="DELETE",a}(S||{}),f=function(a){return a.CONTENT_TYPE="content-type",a.ACCEPT_ENCODING="accept-encoding",a.NO_COMPRESSION_STD="x-no-compression",a.AUTHORIZATION_AM="x-am-authorization",a.AUTHORIZATION_AM_USER="x-am-user-authorization",a.AUTHORIZATION_AWS="x-aws-authorization",a.AUTHORIZATION_GOOGLE="x-google-authorization",a.AUTHORIZATION_AZURE="x-azure-authorization",a.RUN_IN_SANDBOX="x-am-run-in-sandbox",a.ORIGIN="origin",a.AUTHORIZATION="authorization",a.META="x-am-meta",a.SECRET="x-am-secret",a.CONTENT_TYPE_RESPONSE="x-am-content-type-response",a.CACHE_CONTROL="x-am-cache-control",a.CODE_HASH="x-am-code-hash",a.SANDBOX_TIMEOUT="x-am-sandbox-timeout",a.GET_ENCRYPTED_DATA="x-am-get-encrypted-data",a.ENCRYPTED_PAYLOAD="x-am-encrypted-payload",a.RESPONSE_CASE="x-am-response-case",a.RESPONSE_OBJECT_TYPE="x-am-response-object-type",a.AM_I18N="x-am-internationalization",a.DATA_SOURCE="x-am-data-source",a.TEST_HOOK="x-am-test-hook",a.TEST_EVENT="x-am-test-event",a.INTER_COMM="x-am-inter-comm",a.SEND_ONLY_OBJECTS="x-am-send-only-objects-in-stream",a.AM_REQUEST_ID="x-am-request-id",a.AM_STORE_TOKEN="x-am-store-token",a}(f||{}),u=function(a){return a.DB_MASTER_NAME="db-master-name",a.ADMIN_PATH="admin-path",a}(u||{})}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1840,6925,8374,8682,1617],{1840:(X,v,i)=>{i.r(v),i.d(v,{DbMastersM:()=>Ft});var S=i(7664),M=i(8176),Z=i(3726),t=i(4946),d=i(5861),f=i(6990),u=i(3157),h=i(328),D=i(6212),g=i(1162),N=i(6925),T=i(553),s=i(5085),q=i(921),Y=i(9729),O=i(7240),x=i(9961),R=i(2189),tt=i(5561),J=i(5852),et=i(4795),I=i(7414),B=i(2915),L=i(3835),P=i(3429),k=i(5219),Q=i(6814),A=i(5431),G=i(7680),z=i(3259),m=i(95),j=i(9361),at=i(1601),y=i(3531),st=i(9989),ot=i(2304),nt=i(2660),it=i(5860),rt=i(756),V=i(4844),lt=i(3965),dt=i(5025);const ct=["insertCodeModalC"],mt=["monacoEditorModalC"];function ft(n,c){1&n&&(t.TgZ(0,"span"),t._UZ(1,"i",35),t._uU(2," Add Database Master"),t.qZA())}function ut(n,c){1&n&&(t.TgZ(0,"span"),t._UZ(1,"i",36),t._uU(2," View Database Master"),t.qZA())}function pt(n,c){1&n&&(t.TgZ(0,"span"),t._UZ(1,"i",37),t._uU(2," Edit Database Master"),t.qZA())}function ht(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",38)(1,"app-monaco-editor",39),t.NdJ("editorGenerated",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.editorGenerated(o))}),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("isSchemaEditor",!0)("editorOptions",e.editorOptionsDBMasters)}}function bt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.viewError())}),t._uU(1,"View error"),t.qZA()}}function gt(n,c){1&n&&(t.TgZ(0,"span"),t._uU(1,"Update"),t.qZA())}function _t(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",41),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.save(!1))}),t._UZ(1,"i",42),t.YNc(2,gt,2,0,"span",4),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("disabled",e.form.invalid),t.xp6(2),t.Q6J("ngIf",e.data.mode===e.EFormMode.EDIT)}}function Ct(n,c){1&n&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function Dt(n,c){1&n&&(t.TgZ(0,"span"),t._uU(1,"Update & Close"),t.qZA())}function Mt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",41),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.save(!0))}),t._UZ(1,"i",42),t.YNc(2,Ct,2,0,"span",4),t.YNc(3,Dt,2,0,"span",4),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("disabled",e.form.invalid),t.xp6(2),t.Q6J("ngIf",e.data.mode===e.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",e.data.mode===e.EFormMode.EDIT)}}function Tt(n,c){1&n&&t._UZ(0,"p-progressSpinner",43)}let K=(()=>{class n{fb;ns;generalS;constantsS;dbMastersS;authCS;monacoS;instanceS;eventCenterS;generalCS;navigationCS;userS;cd;data;loading={form:!1};EFormMode=h.D;form;subscriptions=[];formData;IEventData=u.F;id;BE_HOST_PORT=T.N.BE_HOST_PORT;DOCS_HOST_PORT=T.N.DOCS_HOST_PORT;instances=[];editorDBMaster;editorOptionsDBMasters={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab={};dbIdMap={};colIdMap={};formDataTemp=null;constructor(e,a,o,r,l,_,C,b,p,E,w,F,U){this.fb=e,this.ns=a,this.generalS=o,this.constantsS=r,this.dbMastersS=l,this.authCS=_,this.monacoS=C,this.instanceS=b,this.eventCenterS=p,this.generalCS=E,this.navigationCS=w,this.userS=F,this.cd=U}ngOnInit(){var e=this;return(0,d.Z)(function*(){e.createForm(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){if(o)if(e.form.enable(),o.action===u.F.OPEN_FORM_IN_EDIT_MODE)yield e.editViewLoadData(),e.cd.detectChanges();else if(o.action===u.F.OPEN_FORM_IN_VIEW_MODE)yield e.editViewLoadData(),e.form.disable(),e.cd.detectChanges();else if(o.action===u.F.OPEN_FORM_IN_ADD_MODE){e.form.reset(),e.resetDependentObjects("INSTANCE"),yield e.loadInstances();const r=yield e.instanceS.getDefaultContent(e.BE_HOST_PORT,s.R.DB_MASTERS_JSON).toPromise();e.editorOptionsDBMasters={readOnly:!1},e.generalCS.setValueInEditor(e,"editorDBMaster",r.data),e.cd.detectChanges()}});return function(o){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var e=this;return(0,d.Z)(function*(){const a=yield e.dbMastersS.getById(e.data.formData._id).toPromise();e.form.reset(),e.resetDependentObjects("INSTANCE"),e.form.patchValue(a.data),e.formDataTemp=a.data,e.generalCS.setValueInEditor(e,"editorDBMaster",a.data?.dbMasterConfigCode||""),yield e.loadInstances(),e.formDataTemp=null})()}createForm(){this.form=this.fb.group({name:[null,[m.kI.required,m.kI.minLength(3),m.kI.maxLength(50),m.kI.pattern("[a-zA-Z0-9_-]*$")]],instanceName:[null,[m.kI.required]],databaseName:[null,[m.kI.required]],collectionName:[null,[m.kI.required]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idDBMastersForm").modal("show")},100)}hideModal(){$("#idDBMastersForm").modal("hide")}save(e){var a=this;return(0,d.Z)(function*(){const o=a.form.getRawValue();let C;o.instanceName=o.instanceName.name,o.databaseName=o.databaseName.db,o.collectionName=o.collectionName.name,C=a.data.formData&&a.data.formData._id?(yield a.dbMastersS.getById(a.data.formData._id).toPromise()).data:{};const b=Object.assign({},C,o);b.user=a.authCS.getUserId(),b.dbMasterConfigCode=a.editorDBMaster.getValue();try{let p;a.loading.form=!0,a.lastError=void 0,a.monacoS.clearEditorDecorations(a.editorDBMaster,a.monacoDecorations),a.data.mode===h.D.ADD?p=yield a.dbMastersS.post(b).toPromise():a.data.mode===h.D.EDIT&&(p=yield a.dbMastersS.put(b._id,b,{select:g.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===h.D.ADD?a.constantsS.dbMaster.addSuccess:a.constantsS.dbMaster.editSuccess),e&&a.data.eventChannel.emit({action:a.data.mode===h.D.ADD?u.F.SAVED:u.F.UPDATED,data:p}),a.loading.form=!1}catch(p){a.loading.form=!1,a.ns.showErrorFromResponse(p.error||p,"Unable to save database master."),a.lastError=p.error,a.tab={axiosResponse:{data:p.error}},a.monacoS.highlightErrorInMonacoEditor(a.editorDBMaster,a.tab,"MainSandbox.ts",a.monacoDecorations)}a.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=j.H.All,this.insertCodeModalC.showModal(y.b.CodeFinderResultC)}editorGenerated(e){var a=this;return(0,d.Z)(function*(){a.editorDBMaster=e,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(e,o=>{a.form.valid&&a.save(!1)}),a.monacoS.addInsertCodeKeyBinding(e,o=>{a.generalCS.messageReceivedFor=j.H.All,a.data.mode!==h.D.VIEW&&a.insertCodeModalC.showModal(y.b.DBMastersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(o=>{o.type&&o.type===st.g.TEXT_COPIED&&o.componentName===y.b.DBMastersFormC&&(a.monacoS.insertAtCursor(e,o.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),at.d.json)}loadInstances(){var e=this;return(0,d.Z)(function*(){e.resetDependentObjects("INSTANCE"),e.loading.form=!0;try{const a={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,active:1,user:1}};e.tab.allInstances=(yield e.instanceS.query(a).toPromise()).data||[]}catch(a){e.ns.showErrorMessageFromErrorObject(a),e.tab.allInstances=[]}if(e.formDataTemp){const a=e.form.controls.instanceName;e.tab.instance=f.find(e.tab.allInstances,{name:e.formDataTemp.instanceName}),e.tab.instance&&a.setValue(e.tab.instance)}else e.tab.instance=e.tab.allInstances[0];yield e.loadDatabases(),e.loading.form=!1,e.cd.detectChanges()})()}loadDatabases(){var e=this;return(0,d.Z)(function*(){if(e.loading.form=!0,e.resetDependentObjects("DATABASE"),!e.tab.instance)return e.tab.allDatabases=[],void(e.tab.allCollections=[]);try{e.tab.allDatabases=((yield e.instanceS.getDatabases([e.tab.instance]).toPromise()).data||[])[0]||[],e.dbIdMap=f.keyBy(e.tab.allDatabases,g.N7.db)}catch(a){e.ns.showErrorMessageFromErrorObject(a),e.tab.allDatabases=[]}if(e.formDataTemp){const a=e.form.get("databaseName");e.tab.database=f.find(e.tab.allDatabases,{db:e.formDataTemp.databaseName}),e.tab.database&&a.patchValue(e.tab.database)}else e.tab.database=e.tab.allDatabases[0];yield e.loadCollections(),e.loading.form=!1})()}loadCollections(){var e=this;return(0,d.Z)(function*(){if(e.loading.form=!0,e.resetDependentObjects("COLLECTION"),e.tab.instance&&e.tab.database){try{e.tab.allCollections=((yield e.instanceS.getCollections([e.tab.database]).toPromise()).data||[])[0]||[],e.colIdMap=f.keyBy(e.tab.allCollections,g.GR.name)}catch(a){e.ns.showErrorMessageFromErrorObject(a),e.tab.allCollections=[]}if(e.formDataTemp){const a=e.form.get("collectionName");e.tab.collection=f.find(e.tab.allCollections,{name:e.formDataTemp.collectionName}),e.tab.collection&&a.patchValue(e.tab.collection)}else e.tab.collection=e.tab.allCollections[0];e.loading.form=!1,e.cd.detectChanges()}else e.tab.allCollections=[]})()}resetDependentObjects(e){"INSTANCE"===e?(this.tab.allInstances=this.tab.allDatabases=this.tab.allCollections=[],this.tab.instance=this.tab.database=this.tab.collection=this.tab.api=void 0):"DATABASE"===e?(this.tab.allDatabases=this.tab.allCollections=[],this.tab.database=this.tab.collection=this.tab.api=void 0):"COLLECTION"===e&&(this.tab.allCollections=[],this.tab.collection=this.tab.api=void 0)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||n)(t.Y36(m.qu),t.Y36(x.W),t.Y36(O.b),t.Y36(I.L),t.Y36(Y.z),t.Y36(J.D),t.Y36(ot.b),t.Y36(P.E),t.Y36(B.u),t.Y36(O.b),t.Y36(R.S),t.Y36(L.K),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-db-masters-form"]],viewQuery:function(a,o){if(1&a&&(t.Gf(ct,5),t.Gf(mt,5)),2&a){let r;t.iGM(r=t.CRH())&&(o.insertCodeModalC=r.first),t.iGM(r=t.CRH())&&(o.viewDockerfileModelC=r.first)}},inputs:{data:"data"},decls:53,vars:21,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idDBMastersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/features/db-masters.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["optionLabel","name","filterBy","name","appendTo","body","formControlName","instanceName","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["formControlName","databaseName","optionLabel","db","filterBy","db","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["formControlName","collectionName","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,ft,3,0,"span",4),t.YNc(5,ut,3,0,"span",4),t.YNc(6,pt,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6),t.NdJ("click",function(){return o.hideModal()}),t.TgZ(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"span",9),t.NdJ("click",function(){return o.showInsertCodeModel()}),t._UZ(12,"i",10),t.qZA(),t.TgZ(13,"a",11),t._UZ(14,"img",12),t.qZA()()(),t.TgZ(15,"div",13)(16,"p-tabView")(17,"p-tabPanel",14)(18,"form",15)(19,"div",16)(20,"label",17),t._uU(21,"Name"),t.qZA(),t.TgZ(22,"div",18),t._UZ(23,"input",19),t.qZA()(),t.TgZ(24,"div",16)(25,"label",17),t._uU(26,"Instance"),t.qZA(),t.TgZ(27,"div",18)(28,"p-dropdown",20),t.NdJ("onChange",function(l){return o.tab.instance=l.value,o.loadDatabases()}),t.qZA()()(),t.TgZ(29,"div",16)(30,"label",17),t._uU(31,"Database"),t.qZA(),t.TgZ(32,"div",18)(33,"p-dropdown",21),t.NdJ("onChange",function(l){return o.tab.database=l.value,o.loadCollections()}),t.qZA()()(),t.TgZ(34,"div",16)(35,"label",17),t._uU(36,"Collection"),t.qZA(),t.TgZ(37,"div",18)(38,"p-dropdown",22),t.NdJ("onChange",function(l){return o.tab.collection=l.value}),t.qZA()()()()(),t.TgZ(39,"p-tabPanel",23),t.YNc(40,ht,2,2,"div",24),t.qZA()()(),t.TgZ(41,"div",25),t.YNc(42,bt,2,0,"a",26),t.TgZ(43,"button",27),t.NdJ("click",function(){return o.hideModal()}),t._UZ(44,"i",28),t._uU(45," Close"),t.qZA(),t.YNc(46,_t,3,2,"button",29),t.YNc(47,Mt,4,3,"button",29),t.qZA(),t.YNc(48,Tt,1,0,"p-progressSpinner",30),t.qZA()()(),t._UZ(49,"app-insert-code-modal",31,32)(51,"app-monaco-editor-modal",33,34)),2&a&&(t.xp6(4),t.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",o.data.mode===o.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),t.xp6(12),t.Q6J("formGroup",o.form),t.xp6(10),t.Q6J("options",o.tab.allInstances)("filter",!0),t.xp6(5),t.Q6J("options",o.tab.allDatabases)("filter",!0),t.xp6(5),t.Q6J("options",o.tab.allCollections)("filter",!0),t.xp6(2),t.Q6J("ngIf",o.shouldLoadMonacoEditor),t.xp6(2),t.Q6J("ngIf",o.lastError),t.xp6(4),t.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),t.xp6(1),t.Q6J("ngIf",o.data.mode!==o.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",o.loading.form),t.xp6(1),t.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",o.DOCS_HOST_PORT),t.xp6(2),t.Q6J("modalId","idMonacoEditorModalDBMaster")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[m._Y,m.Fj,m.JJ,m.JL,m.sg,m.u,Q.O5,nt.y,it.P,rt.O,G.G,V.xf,V.x4,z.u,lt.Lt,dt.A],encapsulation:2,changeDetection:0})}return n})();const vt=["DBMastersFormC"];function St(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"span",16),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.edit())}),t._UZ(1,"i",17),t.qZA()}}function Zt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"span",18),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.removePermanent())}),t._UZ(1,"i",19),t.qZA()}}function Nt(n,c){1&n&&(t.TgZ(0,"th",23),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function At(n,c){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,Nt,2,0,"th",20),t.TgZ(2,"th",21),t._uU(3,"Name"),t.qZA(),t.TgZ(4,"th"),t._uU(5,"Instance \u2192 Database \u2192 Collection"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Required Auth Headers"),t.qZA(),t._UZ(8,"th",22),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.showCheckbox)}}function Ot(n,c){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",29),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function xt(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"tr",24),t.YNc(1,Ot,2,2,"td",25),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td")(9,"div",26)(10,"button",27),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.openMasterPageInNewTab(r))}),t._UZ(11,"i",28),t.qZA()()()()}if(2&n){const e=c.$implicit,a=t.oxw();t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",a.showCheckbox),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.lnq("",e.instanceName," \u2192 ",e.databaseName," \u2192 ",e.collectionName,""),t.xp6(2),t.Oqu(e.authHeadersGrid)}}function It(n,c){1&n&&t._UZ(0,"p-progressSpinner",30)}let H=(()=>{class n{dbMastersS;generalS;notificationS;navigationCS;navigationS;authCS;authS;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={};EUserType=q.dN;gridKey=g.iH._id;EAPICategory=s.R;selectedRows=[];dbMastersFormC;constructor(e,a,o,r,l,_,C,b,p,E,w,F,U,Ut,Yt,Rt){this.dbMastersS=e,this.generalS=a,this.notificationS=o,this.navigationCS=r,this.navigationS=l,this.authCS=_,this.authS=C,this.constantsS=b,this.eventCenterS=p,this.router=E,this.userS=w,this.instanceS=F,this.ns=U,this.cs=Ut,this.confirmationService=Yt,this.cd=Rt}ngOnInit(){var e=this;return(0,d.Z)(function*(){if(!e.authS.backendSettings.extensions)return e.navigationS.gotoDashboard();e.eventCenterS.dbMasters.selectedDBMaster.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){(o.action===u.F.SAVED||o.action===u.F.UPDATED)&&(e.dbMastersFormC.hideModal(),yield e.loadGridData())});return function(o){return a.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Database Masters")})()}loadGridData(){var e=this;return(0,d.Z)(function*(){e.loading.grid=!0;const a=yield e.dbMastersS.getDBMastersGrid({}).toPromise();if(a){e.selectedRows=[],e.rows=a.data,e.rowsMap=f.keyBy(e.rows,g.iH._id);for(const r of e.rows){const l=[];for(const _ of r.authHeaders||[])l.push(_.name);r.authHeadersGrid=l.join(", ")}}let o=e.navigationCS.getQueryParam(D.p.am_db_master);o&&!e.rowsMap[o]&&e.rows.length&&(o=e.rows[0]._id),e.rowsMap[o]?yield e.fillData():e.eventCenterS.dbMasters.selectedDBMaster.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(f.max(f.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.dbMastersFormC.showModal()}edit(){this.data.formData=this.rowsMap[f.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),this.dbMastersFormC.showModal()}removePermanent(){var e=this;return(0,d.Z)(function*(){var a;e.confirmationService.confirm({message:e.cs.dbMaster.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,d.Z)(function*(){for(const o of e.selectedRows)yield e.hardDelete(o._id);e.ns.showSuccess(e.cs.dbMaster.removePermanent),yield e.loadGridData()}),function(){return a.apply(this,arguments)})})})()}hardDelete(e){var a=this;return(0,d.Z)(function*(){yield a.dbMastersS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.dbMasters.selectedDBMaster.next(void 0)}resetThisUrl(){var e=this;return(0,d.Z)(function*(){e.eventCenterS.dbMasters.selectedDBMaster.next(void 0),yield e.navigationCS.setQueryParam(D.p.am_db_master,null)})()}itemSelected(){var e=this;return(0,d.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,d.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(D.p.am_db_master,""),void e.eventCenterS.dbMasters.selectedDBMaster.next(null);const a=e.selectedRows[0];a?(yield e.navigationCS.setQueryParam(D.p.am_db_master,a._id),e.eventCenterS.dbMasters.selectedDBMaster.next(a)):yield e.resetThisUrl()})()}dblClick(){this.selectedRows.length&&this.edit()}openMasterPageInNewTab(e){const a=this.authCS.getUserPath();let o=[T.N.BE_HOST_PORT,"/dist-db-masters/browser/",`?${N.ZF.ADMIN_PATH}=${a}&`].join("");const r=[`${N.ZF.DB_MASTER_NAME}=${e.name}`];for(const l of e.authHeaders)r.push(`${l.name}=____actual_header_value____`);o+=r.join("&"),window.open(o,"_blank")}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}clone=f.clone;static \u0275fac=function(a){return new(a||n)(t.Y36(Y.z),t.Y36(O.b),t.Y36(x.W),t.Y36(R.S),t.Y36(tt.X),t.Y36(J.D),t.Y36(et.e),t.Y36(I.L),t.Y36(B.u),t.Y36(S.F0),t.Y36(L.K),t.Y36(P.E),t.Y36(x.W),t.Y36(I.L),t.Y36(k.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-db-masters-list"]],viewQuery:function(a,o){if(1&a&&t.Gf(vt,5),2&a){let r;t.iGM(r=t.CRH())&&(o.dbMastersFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:18,vars:10,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/masters.png","alt","Database master image",1,"fa-fw","mr-1",2,"width","27px"],["href","https://docs.apimaker.dev/v1/docs/features/database-masters.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["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","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"],["DBMastersFormC",""],["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","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","25%"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"text-center"],["tooltipPosition","left","pTooltip","Open master page",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-external-link-alt","text-info","fa-fw"],[3,"value","pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Database Masters"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.TgZ(7,"span",5),t.NdJ("click",function(){return o.add()}),t._UZ(8,"i",6),t.qZA(),t.YNc(9,St,2,0,"span",7),t.YNc(10,Zt,2,0,"span",8),t.qZA(),t.TgZ(11,"div",9)(12,"p-table",10),t.NdJ("selectionChange",function(l){return o.selectedRows=l})("selectionChange",function(){return o.itemSelected()})("dblclick",function(){return o.dblClick()}),t.YNc(13,At,9,1,"ng-template",11),t.YNc(14,xt,12,7,"ng-template",12),t.qZA(),t.YNc(15,It,1,0,"p-progressSpinner",13),t.qZA()(),t._UZ(16,"app-db-masters-form",14,15)),2&a&&(t.xp6(9),t.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",o.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",o.selectedRows)("dataKey",o.gridKey)("scrollable",!0)("value",o.rows),t.xp6(3),t.Q6J("ngIf",o.loading.grid),t.xp6(1),t.Q6J("data",o.data))},dependencies:[Q.O5,A.iA,k.jx,A.Ei,A.UA,A.Mo,G.G,z.u,K],encapsulation:2,changeDetection:0})}return n})(),W=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=t.Xpm({type:n,selectors:[["app-db-masters-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(a,o){1&a&&(t.TgZ(0,"div",0),t._UZ(1,"app-db-masters-list"),t.qZA())},dependencies:[H],encapsulation:2})}return n})();var yt=i(4950);let Et=(()=>{class n{static \u0275fac=function(a){return new(a||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[M.u,yt.A]})}return n})();const wt=[{path:"main",component:W,canActivate:[Z.P]}];let Ft=(()=>{class n{static \u0275fac=function(a){return new(a||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[S.Bz.forChild(wt),M.u,Et]})}return n})()},6925:(X,v,i)=>{i.d(v,{Eg:()=>f,Yp:()=>Z,ZF:()=>u,vT:()=>M});var M=function(s){return s.FORM_DATA="FORM_DATA",s.JSON="JSON",s.TEXT="TEXT",s}(M||{}),Z=function(s){return s.GET="GET",s.POST="POST",s.PUT="PUT",s.DELETE="DELETE",s}(Z||{}),f=function(s){return s.CONTENT_TYPE="content-type",s.ACCEPT_ENCODING="accept-encoding",s.NO_COMPRESSION_STD="x-no-compression",s.AUTHORIZATION_AM="x-am-authorization",s.AUTHORIZATION_AM_USER="x-am-user-authorization",s.AUTHORIZATION_AWS="x-aws-authorization",s.AUTHORIZATION_GOOGLE="x-google-authorization",s.AUTHORIZATION_AZURE="x-azure-authorization",s.RUN_IN_SANDBOX="x-am-run-in-sandbox",s.ORIGIN="origin",s.AUTHORIZATION="authorization",s.META="x-am-meta",s.SECRET="x-am-secret",s.CONTENT_TYPE_RESPONSE="x-am-content-type-response",s.CACHE_CONTROL="x-am-cache-control",s.CODE_HASH="x-am-code-hash",s.SANDBOX_TIMEOUT="x-am-sandbox-timeout",s.GET_ENCRYPTED_DATA="x-am-get-encrypted-data",s.ENCRYPTED_PAYLOAD="x-am-encrypted-payload",s.RESPONSE_CASE="x-am-response-case",s.RESPONSE_OBJECT_TYPE="x-am-response-object-type",s.AM_I18N="x-am-internationalization",s.DATA_SOURCE="x-am-data-source",s.TEST_HOOK="x-am-test-hook",s.TEST_EVENT="x-am-test-event",s.INTER_COMM="x-am-inter-comm",s.SEND_ONLY_OBJECTS="x-am-send-only-objects-in-stream",s.AM_REQUEST_ID="x-am-request-id",s.AM_STORE_TOKEN="x-am-store-token",s}(f||{}),u=function(s){return s.DB_MASTER_NAME="db-master-name",s.ADMIN_PATH="admin-path",s}(u||{})}}]);
package/dist/5334.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5334],{5334:(T,o,i)=>{i.r(o),i.d(o,{AmWelcomeM:()=>U});var r=i(7664),g=i(8176),m=i(3726),d=i(921),t=i(4946),p=i(5852),u=i(4795),Z=i(7240),v=i(6814);function l(e,c){1&e&&(t.TgZ(0,"a",80)(1,"div",11),t._UZ(2,"img",81),t.TgZ(3,"h1"),t._uU(4,"Licenses"),t.qZA()()())}function h(e,c){1&e&&(t.TgZ(0,"a",82)(1,"div",11),t._UZ(2,"img",83),t.TgZ(3,"h1"),t._uU(4,"Masters"),t.qZA()()())}function f(e,c){1&e&&(t.TgZ(0,"a",84)(1,"div",11),t._UZ(2,"img",85),t.TgZ(3,"h1"),t._uU(4,"Dev Account"),t.qZA()()())}const x=[{path:"",component:(()=>{class e{authCS;authS;generalCS;EUserType=d.dN;constructor(n,a,s){this.authCS=n,this.authS=a,this.generalCS=s}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||e)(t.Y36(p.D),t.Y36(u.e),t.Y36(Z.b))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-am-welcome"]],decls:190,vars:3,consts:[[1,"p-5",2,"height","calc(100vh - 44px)","overflow","auto"],[1,"row","h4","bold"],[1,"col-6"],[1,"fas","fa-tachometer-alt","fa-fw","text-success"],["src","/assets/images/logo/store_logo.svg",2,"height","25px"],[1,"row","mt-3","h4","bold"],[1,"icon-row","mt-lg-n2","ml-0"],["href","javascript:","routerLink","/dashboard/summary-dashboard",2,"text-decoration","none"],[1,"icon-box","ml-0"],["src","/assets/images/icons/nodes.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/redis-dashboard",2,"text-decoration","none"],[1,"icon-box"],["src","/assets/images/icons/redis.svg",1,"mt-2"],["href","javascript:","routerLink","/diagram",2,"text-decoration","none"],["src","/assets/images/icons/diagram.svg",1,"mt-3"],["href","javascript:","routerLink","/dashboard/ext-licenses","style","text-decoration: none",4,"ngIf"],[1,"icon-row","mt-lg-n2"],["href","javascript:","routerLink","/utility/app-store/main",2,"text-decoration","none"],["src","/assets/images/logo/logo_store.svg",1,"mt-4","p-1"],["href","https://docs.apimaker.dev/","target","_blank",2,"text-decoration","none"],["src","/assets/images/logo/logo_docs.svg",1,"mt-4","p-1"],["href","https://www.youtube.com/playlist?list=PLfJ8NnUMaDUYNNZUX5M_KcIzn9qGCNj43","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/film-movies-icon.svg",1,"mt-2","p-1"],[1,"row","mt-5","bold"],[1,"col-12"],[1,"bold","m-0"],[1,"fas","fa-code","fa-fw","text-info"],[1,"row","h4","bold","mt-3"],["href","javascript:","routerLink","/api-info/db-cell/layout",2,"text-decoration","none"],["src","/assets/images/icons/database.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/custom-api/functions-tree",2,"text-decoration","none"],["src","/assets/images/icons/custom.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/system-api/layout",2,"text-decoration","none"],["src","/assets/images/icons/systems.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/third-party-api/tp-layout",2,"text-decoration","none"],["src","/assets/images/icons/third-party.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/am-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/event.png",1,"mt-2"],["href","javascript:","routerLink","/api-info/schedulers/scheduler-layout",2,"text-decoration","none"],["src","/assets/images/icons/schedulers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/web-socket-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/web.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/process-initializers/main",2,"text-decoration","none"],["src","/assets/images/icons/process_initializers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/api-testing/testing",2,"text-decoration","none"],["src","/assets/images/icons/testing.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/db-masters/main","style","text-decoration: none",4,"ngIf"],[1,"fas","fa-lock","fa-fw","text-warning"],["href","javascript:","routerLink","/permissions/group/group-layout",2,"text-decoration","none"],["src","/assets/images/icons/api-group.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/api-user/layout",2,"text-decoration","none"],["src","/assets/images/icons/api-user.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/vulnerabilities/layout",2,"text-decoration","none"],["src","/assets/images/icons/vulnerability.svg",1,"mt-2"],[1,"fas","fa-tools","fa-fw","text-yellow"],["href","javascript:","routerLink","/accounts/secret-management",2,"text-decoration","none"],["src","/assets/images/icons/secret.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts","style","text-decoration: none",4,"ngIf"],["href","javascript:","routerLink","/utility/internationalization/main",2,"text-decoration","none"],["src","/assets/images/icons/i18n.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-profile/main",2,"text-decoration","none"],["src","/assets/images/icons/log-profile.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-table/main",2,"text-decoration","none"],["src","/assets/images/icons/log.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/sandbox-settings/main",2,"text-decoration","none"],["src","/assets/images/icons/sandbox.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/notes/main",2,"text-decoration","none"],["src","/assets/images/icons/notes.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/utility-classes/utility-classes-internal/main",2,"text-decoration","none"],["src","/assets/images/icons/utility.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/system-migration/main",2,"text-decoration","none"],["src","/assets/images/icons/db-m.svg",1,"mt-2","p-1"],["href","javascript:","routerLink","/utility/code-finder/finder",2,"text-decoration","none"],["src","/assets/images/icons/finder.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/code-comparator/main",2,"text-decoration","none"],["src","/assets/images/icons/comparator.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/auto-increment/main",2,"text-decoration","none"],["src","/assets/images/icons/increment.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/ts-gen-interfaces/main",2,"text-decoration","none"],["src","/assets/images/icons/typescript.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/ext-licenses",2,"text-decoration","none"],["src","/assets/images/icons/license.png",1,"mt-3"],["href","javascript:","routerLink","/api-info/db-masters/main",2,"text-decoration","none"],["src","/assets/images/icons/masters.png",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts",2,"text-decoration","none"],["src","/assets/images/icons/dev.svg",1,"mt-2"]],template:function(a,s){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),t._UZ(4,"i",3),t.TgZ(5,"span"),t._uU(6," Dashboard"),t.qZA()()(),t.TgZ(7,"div",2)(8,"span"),t._UZ(9,"img",4),t.TgZ(10,"span"),t._uU(11," API Maker Family"),t.qZA()()()(),t.TgZ(12,"div",5)(13,"div",2)(14,"div",6)(15,"a",7)(16,"div",8),t._UZ(17,"img",9),t.TgZ(18,"h1"),t._uU(19,"Nodes Summary"),t.qZA()()(),t.TgZ(20,"a",10)(21,"div",11),t._UZ(22,"img",12),t.TgZ(23,"h1"),t._uU(24,"Redis Dashboard"),t.qZA()()(),t.TgZ(25,"a",13)(26,"div",11),t._UZ(27,"img",14),t.TgZ(28,"h1"),t._uU(29,"ER Diagram"),t.qZA()()(),t.YNc(30,l,5,0,"a",15),t.qZA()(),t.TgZ(31,"div",2)(32,"div",16)(33,"a",17)(34,"div",8),t._UZ(35,"img",18),t.qZA()(),t.TgZ(36,"a",19)(37,"div",11),t._UZ(38,"img",20),t.qZA()(),t.TgZ(39,"a",21)(40,"div",11),t._UZ(41,"img",22),t.TgZ(42,"h1"),t._uU(43,"Learn API Maker"),t.qZA()()()()()(),t.TgZ(44,"div",23)(45,"div",24)(46,"h4",25),t._UZ(47,"i",26),t._uU(48," API Info "),t.qZA()()(),t.TgZ(49,"div",27)(50,"div",24)(51,"div",16)(52,"a",28)(53,"div",11),t._UZ(54,"img",29),t.TgZ(55,"h1"),t._uU(56,"Instance API (DB API)"),t.qZA()()(),t.TgZ(57,"a",30)(58,"div",11),t._UZ(59,"img",31),t.TgZ(60,"h1"),t._uU(61,"Custom API"),t.qZA()()(),t.TgZ(62,"a",32)(63,"div",11),t._UZ(64,"img",33),t.TgZ(65,"h1"),t._uU(66,"System API"),t.qZA()()(),t.TgZ(67,"a",34)(68,"div",11),t._UZ(69,"img",35),t.TgZ(70,"h1"),t._uU(71,"Third Party API"),t.qZA()()(),t.TgZ(72,"a",36)(73,"div",11),t._UZ(74,"img",37),t.TgZ(75,"h1"),t._uU(76,"Events"),t.qZA()()(),t.TgZ(77,"a",38)(78,"div",11),t._UZ(79,"img",39),t.TgZ(80,"h1"),t._uU(81,"Schedulers"),t.qZA()()(),t.TgZ(82,"a",40)(83,"div",11),t._UZ(84,"img",41),t.TgZ(85,"h1"),t._uU(86,"WebSocket Events"),t.qZA()()(),t.TgZ(87,"a",42)(88,"div",11),t._UZ(89,"img",43),t.TgZ(90,"h1"),t._uU(91," Process Initializers"),t.qZA()()(),t.TgZ(92,"a",44)(93,"div",11),t._UZ(94,"img",45),t.TgZ(95,"h1"),t._uU(96,"API Testing"),t.qZA()()(),t.YNc(97,h,5,0,"a",46),t.qZA()()(),t.TgZ(98,"div",23)(99,"div",24)(100,"h4",25),t._UZ(101,"i",47),t._uU(102," API Security "),t.qZA()()(),t.TgZ(103,"div",27)(104,"div",24)(105,"div",16)(106,"a",48)(107,"div",11),t._UZ(108,"img",49),t.TgZ(109,"h1"),t._uU(110,"API Group Permissions"),t.qZA()()(),t.TgZ(111,"a",50)(112,"div",11),t._UZ(113,"img",51),t.TgZ(114,"h1"),t._uU(115,"API User Permissions"),t.qZA()()(),t.TgZ(116,"a",52)(117,"div",11),t._UZ(118,"img",53),t.TgZ(119,"h1"),t._uU(120,"Vulnerabilities"),t.qZA()()()()()(),t.TgZ(121,"div",23)(122,"div",24)(123,"h4",25),t._UZ(124,"i",54),t._uU(125," Utility "),t.qZA()()(),t.TgZ(126,"div",27)(127,"div",24)(128,"div",16)(129,"a",55)(130,"div",11),t._UZ(131,"img",56),t.TgZ(132,"h1"),t._uU(133,"Secret Management"),t.qZA()()(),t.YNc(134,f,5,0,"a",57),t.TgZ(135,"a",58)(136,"div",11),t._UZ(137,"img",59),t.TgZ(138,"h1"),t._uU(139,"i18N Management"),t.qZA()()(),t.TgZ(140,"a",60)(141,"div",11),t._UZ(142,"img",61),t.TgZ(143,"h1"),t._uU(144,"Log Profile"),t.qZA()()(),t.TgZ(145,"a",62)(146,"div",11),t._UZ(147,"img",63),t.TgZ(148,"h1"),t._uU(149,"Log Table"),t.qZA()()(),t.TgZ(150,"a",64)(151,"div",11),t._UZ(152,"img",65),t.TgZ(153,"h1"),t._uU(154,"Sandbox Settings"),t.qZA()()(),t.TgZ(155,"a",66)(156,"div",11),t._UZ(157,"img",67),t.TgZ(158,"h1"),t._uU(159,"Notes"),t.qZA()()(),t.TgZ(160,"a",68)(161,"div",11),t._UZ(162,"img",69),t.TgZ(163,"h1"),t._uU(164,"Utility Classes"),t.qZA()()(),t.TgZ(165,"a",70)(166,"div",11),t._UZ(167,"img",71),t.TgZ(168,"h1"),t._uU(169,"Database Migration"),t.qZA()()(),t.TgZ(170,"a",72)(171,"div",11),t._UZ(172,"img",73),t.TgZ(173,"h1"),t._uU(174,"Code Finder"),t.qZA()()(),t.TgZ(175,"a",74)(176,"div",11),t._UZ(177,"img",75),t.TgZ(178,"h1"),t._uU(179,"Code Comparator"),t.qZA()()(),t.TgZ(180,"a",76)(181,"div",11),t._UZ(182,"img",77),t.TgZ(183,"h1"),t._uU(184," Auto Increments"),t.qZA()()(),t.TgZ(185,"a",78)(186,"div",11),t._UZ(187,"img",79),t.TgZ(188,"h1"),t._uU(189," Generated Interfaces"),t.qZA()()()()()()()),2&a&&(t.xp6(30),t.Q6J("ngIf",null==s.authS.backendSettings?null:s.authS.backendSettings.extensions),t.xp6(67),t.Q6J("ngIf",null==s.authS.backendSettings?null:s.authS.backendSettings.extensions),t.xp6(37),t.Q6J("ngIf",(null==s.authCS.gUser?null:s.authCS.gUser.userType)===s.EUserType.ADMIN))},dependencies:[r.rH,v.O5],styles:[".icon-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}h1[_ngcontent-%COMP%]{font-size:15px;margin-top:10px}img[_ngcontent-%COMP%]{height:50px}.icon-box[_ngcontent-%COMP%]{font-size:15px;text-align:center;width:120px;min-width:120px;height:120px;background:transparent;border:1px solid #515151;margin:0 20px 20px 0;padding:5px;transition:all .1s;border-radius:10px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px}.icon-box[_ngcontent-%COMP%]:hover{background:#292929;box-shadow:#b8b8b840 0 54px 55px,#a5a5a51f 0 -12px 30px,#ffffff1f 0 4px 6px,#0b88982b 0 12px 13px,#ab151517 0 -3px 5px;--darkreader-inline-boxshadow: rgba(0, 0, 0, .25) 0px 54px 55px, rgba(0, 0, 0, .12) 0px -12px 30px, rgba(0, 0, 0, .12) 0px 4px 6px, rgba(0, 0, 0, .17) 0px 12px 13px, rgba(0, 0, 0, .09) 0px -3px 5px}"]})}return e})(),canActivate:[m.P]}];let U=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=t.oAB({type:e});static \u0275inj=t.cJS({imports:[r.Bz.forChild(x),g.u]})}return e})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5334],{5334:(T,o,s)=>{s.r(o),s.d(o,{AmWelcomeM:()=>U});var r=s(7664),c=s(8176),m=s(3726),d=s(921),t=s(4946),p=s(5852),u=s(4795),Z=s(7240),v=s(6814);function l(e,g){1&e&&(t.TgZ(0,"a",80)(1,"div",11),t._UZ(2,"img",81),t.TgZ(3,"h1"),t._uU(4,"Licenses"),t.qZA()()())}function h(e,g){1&e&&(t.TgZ(0,"a",82)(1,"div",11),t._UZ(2,"img",83),t.TgZ(3,"h1"),t._uU(4,"Masters"),t.qZA()()())}function f(e,g){1&e&&(t.TgZ(0,"a",84)(1,"div",11),t._UZ(2,"img",85),t.TgZ(3,"h1"),t._uU(4,"Dev Account"),t.qZA()()())}const x=[{path:"",component:(()=>{class e{authCS;authS;generalCS;EUserType=d.dN;constructor(n,a,i){this.authCS=n,this.authS=a,this.generalCS=i}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||e)(t.Y36(p.D),t.Y36(u.e),t.Y36(Z.b))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-am-welcome"]],decls:190,vars:3,consts:[[1,"p-5",2,"height","calc(100vh - 44px)","overflow","auto"],[1,"row","h4","bold"],[1,"col-6"],[1,"fas","fa-tachometer-alt","fa-fw","text-success"],["src","/assets/images/logo/store_logo.svg",2,"height","25px"],[1,"row","mt-3","h4","bold"],[1,"icon-row","mt-lg-n2","ml-0"],["href","javascript:","routerLink","/dashboard/summary-dashboard",2,"text-decoration","none"],[1,"icon-box","ml-0"],["src","/assets/images/icons/nodes.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/redis-dashboard",2,"text-decoration","none"],[1,"icon-box"],["src","/assets/images/icons/redis.svg",1,"mt-2"],["href","javascript:","routerLink","/diagram",2,"text-decoration","none"],["src","/assets/images/icons/diagram.svg",1,"mt-3"],["href","javascript:","routerLink","/dashboard/ext-licenses","style","text-decoration: none",4,"ngIf"],[1,"icon-row","mt-lg-n2"],["href","javascript:","routerLink","/utility/app-store/main",2,"text-decoration","none"],["src","/assets/images/logo/logo_store.svg",1,"mt-4","p-1"],["href","https://docs.apimaker.dev/","target","_blank",2,"text-decoration","none"],["src","/assets/images/logo/logo_docs.svg",1,"mt-4","p-1"],["href","https://www.youtube.com/playlist?list=PLfJ8NnUMaDUYNNZUX5M_KcIzn9qGCNj43","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/film-movies-icon.svg",1,"mt-2","p-1"],[1,"row","mt-5","bold"],[1,"col-12"],[1,"bold","m-0"],[1,"fas","fa-code","fa-fw","text-info"],[1,"row","h4","bold","mt-3"],["href","javascript:","routerLink","/api-info/db-cell/layout",2,"text-decoration","none"],["src","/assets/images/icons/database.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/custom-api/functions-tree",2,"text-decoration","none"],["src","/assets/images/icons/custom.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/system-api/layout",2,"text-decoration","none"],["src","/assets/images/icons/systems.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/third-party-api/tp-layout",2,"text-decoration","none"],["src","/assets/images/icons/third-party.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/am-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/event.png",1,"mt-2"],["href","javascript:","routerLink","/api-info/schedulers/scheduler-layout",2,"text-decoration","none"],["src","/assets/images/icons/schedulers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/web-socket-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/web.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/process-initializers/main",2,"text-decoration","none"],["src","/assets/images/icons/process_initializers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/api-testing/testing",2,"text-decoration","none"],["src","/assets/images/icons/testing.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/db-masters/main","style","text-decoration: none",4,"ngIf"],[1,"fas","fa-lock","fa-fw","text-warning"],["href","javascript:","routerLink","/permissions/group/group-layout",2,"text-decoration","none"],["src","/assets/images/icons/api-group.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/api-user/layout",2,"text-decoration","none"],["src","/assets/images/icons/api-user.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/vulnerabilities/layout",2,"text-decoration","none"],["src","/assets/images/icons/vulnerability.svg",1,"mt-2"],[1,"fas","fa-tools","fa-fw","text-yellow"],["href","javascript:","routerLink","/accounts/secret-management",2,"text-decoration","none"],["src","/assets/images/icons/secret.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts","style","text-decoration: none",4,"ngIf"],["href","javascript:","routerLink","/utility/internationalization/main",2,"text-decoration","none"],["src","/assets/images/icons/i18n.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-profile/main",2,"text-decoration","none"],["src","/assets/images/icons/log-profile.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-table/main",2,"text-decoration","none"],["src","/assets/images/icons/log.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/sandbox-settings/main",2,"text-decoration","none"],["src","/assets/images/icons/sandbox.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/notes/main",2,"text-decoration","none"],["src","/assets/images/icons/notes.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/utility-classes/utility-classes-internal/main",2,"text-decoration","none"],["src","/assets/images/icons/utility.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/system-migration/main",2,"text-decoration","none"],["src","/assets/images/icons/db-m.svg",1,"mt-2","p-1"],["href","javascript:","routerLink","/utility/code-finder/finder",2,"text-decoration","none"],["src","/assets/images/icons/finder.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/code-comparator/main",2,"text-decoration","none"],["src","/assets/images/icons/comparator.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/auto-increment/main",2,"text-decoration","none"],["src","/assets/images/icons/increment.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/ts-gen-interfaces/main",2,"text-decoration","none"],["src","/assets/images/icons/typescript.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/ext-licenses",2,"text-decoration","none"],["src","/assets/images/icons/license.png",1,"mt-3"],["href","javascript:","routerLink","/api-info/db-masters/main",2,"text-decoration","none"],["src","/assets/images/icons/masters.png",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts",2,"text-decoration","none"],["src","/assets/images/icons/dev.svg",1,"mt-2"]],template:function(a,i){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),t._UZ(4,"i",3),t.TgZ(5,"span"),t._uU(6," Dashboard"),t.qZA()()(),t.TgZ(7,"div",2)(8,"span"),t._UZ(9,"img",4),t.TgZ(10,"span"),t._uU(11," API Maker Family"),t.qZA()()()(),t.TgZ(12,"div",5)(13,"div",2)(14,"div",6)(15,"a",7)(16,"div",8),t._UZ(17,"img",9),t.TgZ(18,"h1"),t._uU(19,"Nodes Summary"),t.qZA()()(),t.TgZ(20,"a",10)(21,"div",11),t._UZ(22,"img",12),t.TgZ(23,"h1"),t._uU(24,"Redis Dashboard"),t.qZA()()(),t.TgZ(25,"a",13)(26,"div",11),t._UZ(27,"img",14),t.TgZ(28,"h1"),t._uU(29,"ER Diagram"),t.qZA()()(),t.YNc(30,l,5,0,"a",15),t.qZA()(),t.TgZ(31,"div",2)(32,"div",16)(33,"a",17)(34,"div",8),t._UZ(35,"img",18),t.qZA()(),t.TgZ(36,"a",19)(37,"div",11),t._UZ(38,"img",20),t.qZA()(),t.TgZ(39,"a",21)(40,"div",11),t._UZ(41,"img",22),t.TgZ(42,"h1"),t._uU(43,"Learn API Maker"),t.qZA()()()()()(),t.TgZ(44,"div",23)(45,"div",24)(46,"h4",25),t._UZ(47,"i",26),t._uU(48," API Info "),t.qZA()()(),t.TgZ(49,"div",27)(50,"div",24)(51,"div",16)(52,"a",28)(53,"div",11),t._UZ(54,"img",29),t.TgZ(55,"h1"),t._uU(56,"Instance API (DB API)"),t.qZA()()(),t.TgZ(57,"a",30)(58,"div",11),t._UZ(59,"img",31),t.TgZ(60,"h1"),t._uU(61,"Custom API"),t.qZA()()(),t.TgZ(62,"a",32)(63,"div",11),t._UZ(64,"img",33),t.TgZ(65,"h1"),t._uU(66,"System API"),t.qZA()()(),t.TgZ(67,"a",34)(68,"div",11),t._UZ(69,"img",35),t.TgZ(70,"h1"),t._uU(71,"Third Party API"),t.qZA()()(),t.TgZ(72,"a",36)(73,"div",11),t._UZ(74,"img",37),t.TgZ(75,"h1"),t._uU(76,"Events"),t.qZA()()(),t.TgZ(77,"a",38)(78,"div",11),t._UZ(79,"img",39),t.TgZ(80,"h1"),t._uU(81,"Schedulers"),t.qZA()()(),t.TgZ(82,"a",40)(83,"div",11),t._UZ(84,"img",41),t.TgZ(85,"h1"),t._uU(86,"WebSocket Events"),t.qZA()()(),t.TgZ(87,"a",42)(88,"div",11),t._UZ(89,"img",43),t.TgZ(90,"h1"),t._uU(91," Process Initializers"),t.qZA()()(),t.TgZ(92,"a",44)(93,"div",11),t._UZ(94,"img",45),t.TgZ(95,"h1"),t._uU(96,"API Testing"),t.qZA()()(),t.YNc(97,h,5,0,"a",46),t.qZA()()(),t.TgZ(98,"div",23)(99,"div",24)(100,"h4",25),t._UZ(101,"i",47),t._uU(102," API Security "),t.qZA()()(),t.TgZ(103,"div",27)(104,"div",24)(105,"div",16)(106,"a",48)(107,"div",11),t._UZ(108,"img",49),t.TgZ(109,"h1"),t._uU(110,"API Group Permissions"),t.qZA()()(),t.TgZ(111,"a",50)(112,"div",11),t._UZ(113,"img",51),t.TgZ(114,"h1"),t._uU(115,"API User Permissions"),t.qZA()()(),t.TgZ(116,"a",52)(117,"div",11),t._UZ(118,"img",53),t.TgZ(119,"h1"),t._uU(120,"Vulnerabilities"),t.qZA()()()()()(),t.TgZ(121,"div",23)(122,"div",24)(123,"h4",25),t._UZ(124,"i",54),t._uU(125," Utility "),t.qZA()()(),t.TgZ(126,"div",27)(127,"div",24)(128,"div",16)(129,"a",55)(130,"div",11),t._UZ(131,"img",56),t.TgZ(132,"h1"),t._uU(133,"Secret Management"),t.qZA()()(),t.YNc(134,f,5,0,"a",57),t.TgZ(135,"a",58)(136,"div",11),t._UZ(137,"img",59),t.TgZ(138,"h1"),t._uU(139,"i18N Management"),t.qZA()()(),t.TgZ(140,"a",60)(141,"div",11),t._UZ(142,"img",61),t.TgZ(143,"h1"),t._uU(144,"Log Profile"),t.qZA()()(),t.TgZ(145,"a",62)(146,"div",11),t._UZ(147,"img",63),t.TgZ(148,"h1"),t._uU(149,"Log Table"),t.qZA()()(),t.TgZ(150,"a",64)(151,"div",11),t._UZ(152,"img",65),t.TgZ(153,"h1"),t._uU(154,"Sandbox Settings"),t.qZA()()(),t.TgZ(155,"a",66)(156,"div",11),t._UZ(157,"img",67),t.TgZ(158,"h1"),t._uU(159,"Notes"),t.qZA()()(),t.TgZ(160,"a",68)(161,"div",11),t._UZ(162,"img",69),t.TgZ(163,"h1"),t._uU(164,"Utility Classes"),t.qZA()()(),t.TgZ(165,"a",70)(166,"div",11),t._UZ(167,"img",71),t.TgZ(168,"h1"),t._uU(169,"Database Migration"),t.qZA()()(),t.TgZ(170,"a",72)(171,"div",11),t._UZ(172,"img",73),t.TgZ(173,"h1"),t._uU(174,"Code Finder"),t.qZA()()(),t.TgZ(175,"a",74)(176,"div",11),t._UZ(177,"img",75),t.TgZ(178,"h1"),t._uU(179,"Code Comparator"),t.qZA()()(),t.TgZ(180,"a",76)(181,"div",11),t._UZ(182,"img",77),t.TgZ(183,"h1"),t._uU(184," Auto Increments"),t.qZA()()(),t.TgZ(185,"a",78)(186,"div",11),t._UZ(187,"img",79),t.TgZ(188,"h1"),t._uU(189," Generated Interfaces"),t.qZA()()()()()()()),2&a&&(t.xp6(30),t.Q6J("ngIf",(null==i.authS.backendSettings?null:i.authS.backendSettings.extensions)&&(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN),t.xp6(67),t.Q6J("ngIf",null==i.authS.backendSettings?null:i.authS.backendSettings.extensions),t.xp6(37),t.Q6J("ngIf",(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN))},dependencies:[r.rH,v.O5],styles:[".icon-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}h1[_ngcontent-%COMP%]{font-size:15px;margin-top:10px}img[_ngcontent-%COMP%]{height:50px}.icon-box[_ngcontent-%COMP%]{font-size:15px;text-align:center;width:120px;min-width:120px;height:120px;background:transparent;border:1px solid #515151;margin:0 20px 20px 0;padding:5px;transition:all .1s;border-radius:10px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px}.icon-box[_ngcontent-%COMP%]:hover{background:#292929;box-shadow:#b8b8b840 0 54px 55px,#a5a5a51f 0 -12px 30px,#ffffff1f 0 4px 6px,#0b88982b 0 12px 13px,#ab151517 0 -3px 5px;--darkreader-inline-boxshadow: rgba(0, 0, 0, .25) 0px 54px 55px, rgba(0, 0, 0, .12) 0px -12px 30px, rgba(0, 0, 0, .12) 0px 4px 6px, rgba(0, 0, 0, .17) 0px 12px 13px, rgba(0, 0, 0, .09) 0px -3px 5px}"]})}return e})(),canActivate:[m.P]}];let U=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=t.oAB({type:e});static \u0275inj=t.cJS({imports:[r.Bz.forChild(x),c.u]})}return e})()}}]);
package/dist/7436.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7436],{7436:(se,p,a)=>{a.r(p),a.d(p,{ExtLicensesM:()=>W});var h=a(7664),x=a(7213),v=a(8176),Z=a(3726),r=a(5861),y=a(921),f=a(1162),C=a(5085),e=a(4946),T=a(5852),L=a(4795),A=a(7240),S=a(3429),I=a(9961),U=a(5561),m=a(5219),E=a(7414),w=a(2915),l=a(95),u=a(6814),P=a(2660),g=a(5431),K=a(7680),b=a(3259);function N(n,c){1&n&&(e.TgZ(0,"span",5),e._UZ(1,"i",31),e.qZA())}function M(n,c){1&n&&(e.TgZ(0,"tr")(1,"th",32),e._uU(2,"#"),e.qZA(),e.TgZ(3,"th",32),e._uU(4,"\xa0"),e.qZA(),e.TgZ(5,"th",33),e._uU(6,"License Key"),e.qZA(),e.TgZ(7,"th",34),e._uU(8,"Server Info"),e.qZA(),e.TgZ(9,"th",35),e._uU(10,"Action Required"),e.qZA(),e.TgZ(11,"th",36),e._uU(12,"Actions"),e.qZA()())}function k(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",46),e.qZA())}function J(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",47),e.qZA())}function Y(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",48),e.qZA())}function q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"a",49),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.hideLicenseKey(i))}),e._UZ(4,"i",50),e.qZA()()}if(2&n){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.licenseKey)}}function F(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"span"),e._uU(2,"\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7"),e.qZA(),e.TgZ(3,"a",49),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.showLicenseKey(i))}),e._UZ(4,"i",51),e.qZA()()}}function O(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",52),e._uU(2," All good"),e.qZA())}function B(n,c){if(1&n&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&n){const t=c.$implicit;e.xp6(2),e.hij("\u274c ",t.message,"")}}function D(n,c){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,B,3,1,"div",53),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.licenseError)}}function Q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",54),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.resetMacAddress(i))}),e._UZ(1,"i",55),e.qZA()}}function R(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",56),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.showDialogToGetNewLicenseKey(i))}),e._UZ(1,"i",57),e.qZA()}}function G(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",58),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.reduceCPUUsageButtonClick(i))}),e._UZ(1,"i",59),e.qZA()}}function H(n,c){if(1&n&&(e.TgZ(0,"tr",37)(1,"td",38),e._uU(2),e.qZA(),e.TgZ(3,"td",38),e.YNc(4,k,2,0,"span",39),e.YNc(5,J,2,0,"span",39),e.YNc(6,Y,2,0,"span",39),e.qZA(),e.TgZ(7,"td",40),e.YNc(8,q,5,1,"div",39),e.YNc(9,F,5,0,"div",39),e.qZA(),e.TgZ(10,"td")(11,"span"),e._uU(12),e.qZA(),e._UZ(13,"br"),e.TgZ(14,"a",41),e._uU(15),e.qZA()(),e.TgZ(16,"td",42),e.YNc(17,O,3,0,"span",39),e.YNc(18,D,2,1,"div",39),e.qZA(),e.TgZ(19,"td",38),e.YNc(20,Q,2,0,"a",43),e.YNc(21,R,2,0,"a",44),e.YNc(22,G,2,0,"a",45),e.qZA()()),2&n){const t=c.$implicit,s=c.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(s+1),e.xp6(2),e.Q6J("ngIf","PENDING"===t.licenseCheckStatus),e.xp6(1),e.Q6J("ngIf","VALID"===t.licenseCheckStatus),e.xp6(1),e.Q6J("ngIf","INVALID"===t.licenseCheckStatus),e.xp6(2),e.Q6J("ngIf",t.showLicenseKey),e.xp6(1),e.Q6J("ngIf",!t.showLicenseKey),e.xp6(3),e.Oqu(t.hostName),e.xp6(2),e.s9C("href",t.beHostPort,e.LSH),e.xp6(1),e.Oqu(t.beHostPort),e.xp6(2),e.Q6J("ngIf","VALID"===t.licenseCheckStatus&&0===t.licenseError.length),e.xp6(1),e.Q6J("ngIf",t.licenseError.length),e.xp6(2),e.Q6J("ngIf",t.licenseActions.indexOf("RESET_MAC")>=0),e.xp6(1),e.Q6J("ngIf",t.licenseActions.indexOf("LICENSE_NOT_FOUND")>=0||t.licenseActions.indexOf("EXPIRED")>=0),e.xp6(1),e.Q6J("ngIf",t.licenseActions.indexOf("REDUCE_CPU_USAGE")>=0)}}function V(n,c){1&n&&e._UZ(0,"p-progressSpinner",60)}const j=[{path:"",component:(()=>{class n{authCS;authS;generalCS;instanceS;ns;navigationS;confirmationService;constantsS;eventCenterS;EUserType=y.dN;EAPICategory=C.R;gridKey=f.iH._id;loading={grid:!1};serverList=[];newLicenseKey="";setLicenseKeyForObj;showValidationInProgress;constructor(t,s,i,o,d,X,z,ee,te){this.authCS=t,this.authS=s,this.generalCS=i,this.instanceS=o,this.ns=d,this.navigationS=X,this.confirmationService=z,this.constantsS=ee,this.eventCenterS=te}ngOnInit(){if(!this.authS.backendSettings.extensions)return this.navigationS.gotoDashboard();this.generalCS.setNewTitle("AM - Extensions Licenses"),this.loadData().then()}loadData(){var t=this;return(0,r.Z)(function*(){t.loading.grid=!0;try{t.serverList=[];const s=(yield t.instanceS.getFullSystemInfo().toPromise()).data,i=_.groupBy(s,f.GR.hostName);for(const o in i)t.serverList.push(i[o][0])}catch(s){console.log(s),t.ns.showErrorFromResponse(s.error||s,"Unable to load server information.")}t.loading.grid=!1})()}resetMacAddress(t){var s=this;return(0,r.Z)(function*(){var i;s.confirmationService.confirm({message:s.constantsS.license.resetMacAddressConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){try{yield s.instanceS.resetMacAddressOfLicense({key:t.licenseKey}).toPromise(),s.ns.showSuccess("MAC address reset successfully."),s.setUIAfterFix(1e4)}catch(o){console.log(o),s.ns.showErrorFromResponse(o.error||o,"Unable to reset MAC address of license.")}}),function(){return i.apply(this,arguments)})})})()}showLicenseKey(t){t.showLicenseKey=!0}hideLicenseKey(t){t.showLicenseKey=!1}showModalSetLicenseKey(){$("#idSetLicenseKeyModal").modal("show")}hideModalSetLicenseKey(){$("#idSetLicenseKeyModal").modal("hide")}showDialogToGetNewLicenseKey(t){this.setLicenseKeyForObj=t,this.newLicenseKey=t.licenseKey,this.showModalSetLicenseKey()}setLicenseKeyAPICall(t){var s=this;return(0,r.Z)(function*(){try{yield s.instanceS.setLicenseKeyOnServer({updateMode:"LICENSE_KEY",uniqueServerId:t.uniqueServerId,uniqueProcessId:t.uniqueProcessId,workerId:t.workerId,licenseKey:s.newLicenseKey,serverName:t.hostName}).toPromise(),s.hideModalSetLicenseKey(),s.ns.showSuccess("License key set successfully."),s.setUIAfterFix(6e3)}catch(i){console.log(i),s.ns.showErrorFromResponse(i.error||i,"Unable to reset MAC address of license.")}})()}reduceCPUUsageButtonClick(t){var i,s=this;this.confirmationService.confirm({message:this.constantsS.license.setCPUCoreConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield s.setCPUCoreAPICall(t)}),function(){return i.apply(this,arguments)})})}setCPUCoreAPICall(t){var s=this;return(0,r.Z)(function*(){try{const i=(t.licenseError||[]).find(o=>o.licensePermitsCPU)?.licensePermitsCPU;if(!i)return void s.ns.showError("Unable to find CPU core issue in license error.");yield s.instanceS.setLicenseKeyOnServer({updateMode:"CPU_CORE",uniqueServerId:t.uniqueServerId,uniqueProcessId:t.uniqueProcessId,workerId:t.workerId,serverName:t.hostName,cpuCore:i}).toPromise(),s.hideModalSetLicenseKey(),s.ns.showSuccess("CPU core set successfully."),s.setUIAfterFix(1e4)}catch(i){console.log(i),s.ns.showErrorFromResponse(i.error||i,"Unable to reset MAC address of license.")}})()}setUIAfterFix(t){var s=this;this.loadData().then(),this.showValidationInProgress=!0,setTimeout((0,r.Z)(function*(){yield s.loadData(),s.showValidationInProgress=!1,yield s.eventCenterS.headerC.setLicenseHasIssues(s.serverList)}),t)}static \u0275fac=function(s){return new(s||n)(e.Y36(T.D),e.Y36(L.e),e.Y36(A.b),e.Y36(S.E),e.Y36(I.W),e.Y36(U.X),e.Y36(m.YP),e.Y36(E.L),e.Y36(w.u))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-ext-licenses"]],decls:39,vars:7,consts:[[1,"pt-1","pl-1","pr-1"],[1,"full-body","overflow-hidden"],[1,"card"],[1,"card-header"],["src","/assets/images/icons/license.png","alt","Extension license icon",1,"fa-fw","mr-1",2,"vertical-align","text-top"],[1,"float-right"],["class","float-right",4,"ngIf"],[1,"card-body","p-0","overflow-auto","text-center",2,"height","calc(100vh - 88px)"],["styleClass","p-datatable-striped custom-api-grid-height","scrollHeight","flex",3,"selectionMode","dataKey","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idSetLicenseKeyModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["name","licenseKey","spellcheck","false","type","text","autocomplete","off",1,"form-control","form-control-sm","font-monospaced",3,"ngModel","ngModelChange"],[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-save","text-success","fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Validation in progress.",1,"fas","fa-sync-alt","text-success","fa-fw","fa-spin"],[1,"text-center","bg-table-header",2,"width","30px"],[1,"bg-table-header",2,"width","260px"],[1,"bg-table-header",2,"width","240px"],[1,"bg-table-header"],[1,"text-center","bg-table-header",2,"width","125px"],[3,"pSelectableRow"],[1,"text-center"],[4,"ngIf"],[1,"small","font-monospaced"],["target","_blank",1,"ml-2","small","text-muted",3,"href"],[1,""],["class","btn btn-xsm-custom ml-1","pTooltip","Reset registered mac address.","tooltipPosition","left","href","javascript:",3,"click",4,"ngIf"],["class","btn btn-xsm-custom ml-1","pTooltip","Set license key","tooltipPosition","left","href","javascript:",3,"click",4,"ngIf"],["class","btn btn-xsm-custom ml-1","pTooltip","Set CPU core usage from license","tooltipPosition","left","href","javascript:",3,"click",4,"ngIf"],["pTooltip","License validation will happen in future.",1,"fas","fa-circle","text-warning"],["pTooltip","Valid license",1,"fas","fa-circle","text-success"],["pTooltip","Invalid license",1,"fas","fa-circle","text-danger"],["href","javascript:",1,"btn","btn-xsm-custom","ml-2",3,"click"],[1,"fas","fa-eye-slash","fa-fw","pt-1"],[1,"fas","fa-eye","fa-fw","pt-1"],[1,"fas","fa-check","fa-fw","text-success"],[4,"ngFor","ngForOf"],["pTooltip","Reset registered mac address.","tooltipPosition","left","href","javascript:",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"fas","fa-history","text-info","fa-fw","pt-1"],["pTooltip","Set license key","tooltipPosition","left","href","javascript:",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"fas","fa-wrench","text-success","fa-fw","pt-1"],["pTooltip","Set CPU core usage from license","tooltipPosition","left","href","javascript:",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"fas","fa-microchip","text-success","fa-fw","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,i){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"img",4),e._uU(6," Server List "),e.qZA(),e.TgZ(7,"div",5),e.YNc(8,N,2,0,"span",6),e.qZA()(),e.TgZ(9,"div",7)(10,"p-table",8),e.YNc(11,M,13,0,"ng-template",9),e.YNc(12,H,23,15,"ng-template",10),e.qZA(),e.YNc(13,V,1,0,"p-progressSpinner",11),e.qZA()()()(),e.TgZ(14,"div",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"span"),e._UZ(19,"i",16),e._uU(20," Set License Key"),e.qZA(),e.TgZ(21,"button",17)(22,"span",18),e._UZ(23,"i",19),e.qZA()()(),e.TgZ(24,"div",20)(25,"form",21)(26,"div",22)(27,"label",23),e._uU(28,"Name"),e.qZA(),e.TgZ(29,"div",24)(30,"input",25),e.NdJ("ngModelChange",function(d){return i.newLicenseKey=d}),e.qZA()()()()(),e.TgZ(31,"div",26)(32,"button",27),e._UZ(33,"i",28),e._uU(34," Close "),e.qZA(),e.TgZ(35,"button",29),e.NdJ("click",function(){return i.setLicenseKeyAPICall(i.setLicenseKeyForObj)}),e._UZ(36,"i",30),e.TgZ(37,"span"),e._uU(38,"Set Key"),e.qZA()()()()()()),2&s&&(e.xp6(8),e.Q6J("ngIf",i.showValidationInProgress),e.xp6(2),e.Q6J("selectionMode","multiple")("dataKey",i.gridKey)("scrollable",!0)("value",i.serverList),e.xp6(3),e.Q6J("ngIf",i.loading.grid),e.xp6(17),e.Q6J("ngModel",i.newLicenseKey))},dependencies:[l._Y,l.Fj,l.JJ,l.JL,l.On,l.F,u.sg,u.O5,P.y,g.iA,m.jx,g.Ei,K.G,b.u],styles:[".bg-table-header[_ngcontent-%COMP%]{background-color:#272727}"]})}return n})(),canActivate:[Z.P]}];let W=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[h.Bz.forChild(j),v.u,x.S]})}return n})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7436],{7436:(se,p,a)=>{a.r(p),a.d(p,{ExtLicensesM:()=>W});var x=a(7664),v=a(7213),Z=a(8176),y=a(3726),r=a(5861),f=a(921),m=a(1162),C=a(5085),e=a(4946),T=a(5852),L=a(4795),S=a(7240),A=a(3429),I=a(9961),U=a(5561),u=a(5219),E=a(7414),w=a(2915),l=a(95),g=a(6814),P=a(2660),h=a(5431),b=a(7680),K=a(3259);function N(n,c){1&n&&(e.TgZ(0,"span",5),e._UZ(1,"i",31),e.qZA())}function M(n,c){1&n&&(e.TgZ(0,"tr")(1,"th",32),e._uU(2,"#"),e.qZA(),e.TgZ(3,"th",32),e._uU(4,"\xa0"),e.qZA(),e.TgZ(5,"th",33),e._uU(6,"License Key"),e.qZA(),e.TgZ(7,"th",34),e._uU(8,"Server Info"),e.qZA(),e.TgZ(9,"th",35),e._uU(10,"Action Required"),e.qZA(),e.TgZ(11,"th",36),e._uU(12,"Actions"),e.qZA()())}function k(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",46),e.qZA())}function J(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",47),e.qZA())}function Y(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",48),e.qZA())}function q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"a",49),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.hideLicenseKey(i))}),e._UZ(4,"i",50),e.qZA()()}if(2&n){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.licenseKey)}}function F(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"span"),e._uU(2,"\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7\xb7"),e.qZA(),e.TgZ(3,"a",49),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.showLicenseKey(i))}),e._UZ(4,"i",51),e.qZA()()}}function O(n,c){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",52),e._uU(2," All good"),e.qZA())}function B(n,c){if(1&n&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&n){const t=c.$implicit;e.xp6(2),e.hij("\u274c ",t.message,"")}}function D(n,c){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,B,3,1,"div",53),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.licenseError)}}function Q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",54),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.resetMacAddress(i))}),e._UZ(1,"i",55),e.qZA()}}function R(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",56),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.showDialogToGetNewLicenseKey(i))}),e._UZ(1,"i",57),e.qZA()}}function G(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",58),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,o=e.oxw();return e.KtG(o.reduceCPUUsageButtonClick(i))}),e._UZ(1,"i",59),e.qZA()}}function H(n,c){if(1&n&&(e.TgZ(0,"tr",37)(1,"td",38),e._uU(2),e.qZA(),e.TgZ(3,"td",38),e.YNc(4,k,2,0,"span",39),e.YNc(5,J,2,0,"span",39),e.YNc(6,Y,2,0,"span",39),e.qZA(),e.TgZ(7,"td",40),e.YNc(8,q,5,1,"div",39),e.YNc(9,F,5,0,"div",39),e.qZA(),e.TgZ(10,"td")(11,"span"),e._uU(12),e.qZA(),e._UZ(13,"br"),e.TgZ(14,"a",41),e._uU(15),e.qZA()(),e.TgZ(16,"td",42),e.YNc(17,O,3,0,"span",39),e.YNc(18,D,2,1,"div",39),e.qZA(),e.TgZ(19,"td",38),e.YNc(20,Q,2,0,"a",43),e.YNc(21,R,2,0,"a",44),e.YNc(22,G,2,0,"a",45),e.qZA()()),2&n){const t=c.$implicit,s=c.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(s+1),e.xp6(2),e.Q6J("ngIf","PENDING"===t.licenseCheckStatus),e.xp6(1),e.Q6J("ngIf","VALID"===t.licenseCheckStatus),e.xp6(1),e.Q6J("ngIf","INVALID"===t.licenseCheckStatus),e.xp6(2),e.Q6J("ngIf",t.showLicenseKey),e.xp6(1),e.Q6J("ngIf",!t.showLicenseKey),e.xp6(3),e.Oqu(t.hostName),e.xp6(2),e.s9C("href",t.beHostPort,e.LSH),e.xp6(1),e.Oqu(t.beHostPort),e.xp6(2),e.Q6J("ngIf","VALID"===t.licenseCheckStatus&&0===t.licenseError.length),e.xp6(1),e.Q6J("ngIf",t.licenseError.length),e.xp6(2),e.Q6J("ngIf",t.licenseActions.indexOf("RESET_MAC")>=0),e.xp6(1),e.Q6J("ngIf",t.licenseActions.indexOf("LICENSE_NOT_FOUND")>=0||t.licenseActions.indexOf("EXPIRED")>=0),e.xp6(1),e.Q6J("ngIf",t.licenseActions.indexOf("REDUCE_CPU_USAGE")>=0)}}function V(n,c){1&n&&e._UZ(0,"p-progressSpinner",60)}const j=[{path:"",component:(()=>{class n{authCS;authS;generalCS;instanceS;ns;navigationS;confirmationService;constantsS;eventCenterS;EUserType=f.dN;EAPICategory=C.R;gridKey=m.iH._id;loading={grid:!1};serverList=[];newLicenseKey="";setLicenseKeyForObj;showValidationInProgress;constructor(t,s,i,o,d,X,z,ee,te){this.authCS=t,this.authS=s,this.generalCS=i,this.instanceS=o,this.ns=d,this.navigationS=X,this.confirmationService=z,this.constantsS=ee,this.eventCenterS=te}ngOnInit(){return this.authS.backendSettings.extensions?this.authCS.gUser?.userType!==f.dN.ADMIN?this.navigationS.gotoDashboard():(this.generalCS.setNewTitle("AM - Extensions Licenses"),void this.loadData().then()):this.navigationS.gotoDashboard()}loadData(){var t=this;return(0,r.Z)(function*(){t.loading.grid=!0;try{t.serverList=[];const s=(yield t.instanceS.getFullSystemInfo().toPromise()).data,i=_.groupBy(s,m.GR.hostName);for(const o in i)t.serverList.push(i[o][0])}catch(s){console.log(s),t.ns.showErrorFromResponse(s.error||s,"Unable to load server information.")}t.loading.grid=!1})()}resetMacAddress(t){var s=this;return(0,r.Z)(function*(){var i;s.confirmationService.confirm({message:s.constantsS.license.resetMacAddressConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){try{yield s.instanceS.resetMacAddressOfLicense({key:t.licenseKey}).toPromise(),s.ns.showSuccess("MAC address reset successfully."),s.setUIAfterFix(1e4)}catch(o){console.log(o),s.ns.showErrorFromResponse(o.error||o,"Unable to reset MAC address of license.")}}),function(){return i.apply(this,arguments)})})})()}showLicenseKey(t){t.showLicenseKey=!0}hideLicenseKey(t){t.showLicenseKey=!1}showModalSetLicenseKey(){$("#idSetLicenseKeyModal").modal("show")}hideModalSetLicenseKey(){$("#idSetLicenseKeyModal").modal("hide")}showDialogToGetNewLicenseKey(t){this.setLicenseKeyForObj=t,this.newLicenseKey=t.licenseKey,this.showModalSetLicenseKey()}setLicenseKeyAPICall(t){var s=this;return(0,r.Z)(function*(){try{yield s.instanceS.setLicenseKeyOnServer({updateMode:"LICENSE_KEY",uniqueServerId:t.uniqueServerId,uniqueProcessId:t.uniqueProcessId,workerId:t.workerId,licenseKey:s.newLicenseKey,serverName:t.hostName}).toPromise(),s.hideModalSetLicenseKey(),s.ns.showSuccess("License key set successfully."),s.setUIAfterFix(6e3)}catch(i){console.log(i),s.ns.showErrorFromResponse(i.error||i,"Unable to reset MAC address of license.")}})()}reduceCPUUsageButtonClick(t){var i,s=this;this.confirmationService.confirm({message:this.constantsS.license.setCPUCoreConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield s.setCPUCoreAPICall(t)}),function(){return i.apply(this,arguments)})})}setCPUCoreAPICall(t){var s=this;return(0,r.Z)(function*(){try{const i=(t.licenseError||[]).find(o=>o.licensePermitsCPU)?.licensePermitsCPU;if(!i)return void s.ns.showError("Unable to find CPU core issue in license error.");yield s.instanceS.setLicenseKeyOnServer({updateMode:"CPU_CORE",uniqueServerId:t.uniqueServerId,uniqueProcessId:t.uniqueProcessId,workerId:t.workerId,serverName:t.hostName,cpuCore:i}).toPromise(),s.hideModalSetLicenseKey(),s.ns.showSuccess("CPU core set successfully."),s.setUIAfterFix(1e4)}catch(i){console.log(i),s.ns.showErrorFromResponse(i.error||i,"Unable to reset MAC address of license.")}})()}setUIAfterFix(t){var s=this;this.loadData().then(),this.showValidationInProgress=!0,setTimeout((0,r.Z)(function*(){yield s.loadData(),s.showValidationInProgress=!1,yield s.eventCenterS.headerC.setLicenseHasIssues(s.serverList)}),t)}static \u0275fac=function(s){return new(s||n)(e.Y36(T.D),e.Y36(L.e),e.Y36(S.b),e.Y36(A.E),e.Y36(I.W),e.Y36(U.X),e.Y36(u.YP),e.Y36(E.L),e.Y36(w.u))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-ext-licenses"]],decls:39,vars:7,consts:[[1,"pt-1","pl-1","pr-1"],[1,"full-body","overflow-hidden"],[1,"card"],[1,"card-header"],["src","/assets/images/icons/license.png","alt","Extension license icon",1,"fa-fw","mr-1",2,"vertical-align","text-top"],[1,"float-right"],["class","float-right",4,"ngIf"],[1,"card-body","p-0","overflow-auto","text-center",2,"height","calc(100vh - 88px)"],["styleClass","p-datatable-striped custom-api-grid-height","scrollHeight","flex",3,"selectionMode","dataKey","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idSetLicenseKeyModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["name","licenseKey","spellcheck","false","type","text","autocomplete","off",1,"form-control","form-control-sm","font-monospaced",3,"ngModel","ngModelChange"],[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-save","text-success","fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Validation in progress.",1,"fas","fa-sync-alt","text-success","fa-fw","fa-spin"],[1,"text-center","bg-table-header",2,"width","30px"],[1,"bg-table-header",2,"width","300px"],[1,"bg-table-header",2,"width","240px"],[1,"bg-table-header"],[1,"text-center","bg-table-header",2,"width","125px"],[3,"pSelectableRow"],[1,"text-center"],[4,"ngIf"],[1,"small","font-monospaced"],["target","_blank",1,"ml-2","small","text-muted",3,"href"],[1,""],["class","btn btn-xsm-custom ml-1","pTooltip","Reset registered mac address.","tooltipPosition","left","href","javascript:",3,"click",4,"ngIf"],["class","btn btn-xsm-custom ml-1","pTooltip","Set license key","tooltipPosition","left","href","javascript:",3,"click",4,"ngIf"],["class","btn btn-xsm-custom ml-1","pTooltip","Set CPU core usage from license","tooltipPosition","left","href","javascript:",3,"click",4,"ngIf"],["pTooltip","License validation will happen in future.",1,"fas","fa-circle","text-warning"],["pTooltip","Valid license",1,"fas","fa-circle","text-success"],["pTooltip","Invalid license",1,"fas","fa-circle","text-danger"],["href","javascript:",1,"btn","btn-xsm-custom","ml-2",3,"click"],[1,"fas","fa-eye-slash","fa-fw","pt-1"],[1,"fas","fa-eye","fa-fw","pt-1"],[1,"fas","fa-check","fa-fw","text-success"],[4,"ngFor","ngForOf"],["pTooltip","Reset registered mac address.","tooltipPosition","left","href","javascript:",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"fas","fa-history","text-info","fa-fw","pt-1"],["pTooltip","Set license key","tooltipPosition","left","href","javascript:",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"fas","fa-wrench","text-success","fa-fw","pt-1"],["pTooltip","Set CPU core usage from license","tooltipPosition","left","href","javascript:",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"fas","fa-microchip","text-success","fa-fw","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,i){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"img",4),e._uU(6," Server List "),e.qZA(),e.TgZ(7,"div",5),e.YNc(8,N,2,0,"span",6),e.qZA()(),e.TgZ(9,"div",7)(10,"p-table",8),e.YNc(11,M,13,0,"ng-template",9),e.YNc(12,H,23,15,"ng-template",10),e.qZA(),e.YNc(13,V,1,0,"p-progressSpinner",11),e.qZA()()()(),e.TgZ(14,"div",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"span"),e._UZ(19,"i",16),e._uU(20," Set License Key"),e.qZA(),e.TgZ(21,"button",17)(22,"span",18),e._UZ(23,"i",19),e.qZA()()(),e.TgZ(24,"div",20)(25,"form",21)(26,"div",22)(27,"label",23),e._uU(28,"Name"),e.qZA(),e.TgZ(29,"div",24)(30,"input",25),e.NdJ("ngModelChange",function(d){return i.newLicenseKey=d}),e.qZA()()()()(),e.TgZ(31,"div",26)(32,"button",27),e._UZ(33,"i",28),e._uU(34," Close "),e.qZA(),e.TgZ(35,"button",29),e.NdJ("click",function(){return i.setLicenseKeyAPICall(i.setLicenseKeyForObj)}),e._UZ(36,"i",30),e.TgZ(37,"span"),e._uU(38,"Set Key"),e.qZA()()()()()()),2&s&&(e.xp6(8),e.Q6J("ngIf",i.showValidationInProgress),e.xp6(2),e.Q6J("selectionMode","multiple")("dataKey",i.gridKey)("scrollable",!0)("value",i.serverList),e.xp6(3),e.Q6J("ngIf",i.loading.grid),e.xp6(17),e.Q6J("ngModel",i.newLicenseKey))},dependencies:[l._Y,l.Fj,l.JJ,l.JL,l.On,l.F,g.sg,g.O5,P.y,h.iA,u.jx,h.Ei,b.G,K.u],styles:[".bg-table-header[_ngcontent-%COMP%]{background-color:#272727}"]})}return n})(),canActivate:[y.P]}];let W=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[x.Bz.forChild(j),Z.u,v.S]})}return n})()}}]);