MikroWizard.docker-compose-.../mikrofront/dist/html/182.550b6560498517dc.js

1 line
15 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunkmikrowizard=self.webpackChunkmikrowizard||[]).push([[182],{5182:(W,j,m)=>{m.r(j),m.d(j,{AuthModule:()=>J});var C=m(177),d=m(8921),u=m(7062),g=m(7390),M=m(9130),e=m(4438),F=m(9492),x=m(1170),h=m(9417),f=m(6467),v=m(9631),_=m(5084),y=m(4869),T=m(6600);const k=()=>["Local","Mikrowizard"];function A(t,r){if(1&t&&(e.j41(0,"mat-option",31),e.EFF(1),e.k0s()),2&t){const i=r.$implicit;e.Y8G("value",i),e.R7$(),e.SpI(" ",i," ")}}function I(t,r){if(1&t&&(e.j41(0,"mat-option",31),e.EFF(1),e.k0s()),2&t){const i=r.$implicit;e.Y8G("value",i),e.R7$(),e.SpI(" ",i," ")}}function E(t,r){1&t&&e.EFF(0),2&t&&e.SpI(" ",r.item.index," ")}function R(t,r){1&t&&e.nrm(0,"i",34)}function N(t,r){1&t&&e.nrm(0,"i",35)}function D(t,r){if(1&t&&(e.DNE(0,R,1,0,"i",32)(1,N,1,0,"i",33),e.EFF(2)),2&t){const i=r.item.name,s=r.item;e.Y8G("ngIf","local"==s.stype),e.R7$(),e.Y8G("ngIf","radius"==s.stype),e.R7$(),e.SpI(" ",i," ")}}function w(t,r){1&t&&e.EFF(0),2&t&&e.SpI(" ",r.item.devip," ")}function G(t,r){1&t&&e.EFF(0),2&t&&e.SpI(" ",r.item.username," ")}function S(t,r){if(1&t&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&t){const i=r.item.by;e.R7$(),e.JRh(i)}}function z(t,r){1&t&&e.EFF(0),2&t&&e.SpI(" ",r.item.ip," ")}function V(t,r){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&t){const i=e.XpG().item.duration;e.R7$(),e.JRh(i)}}function B(t,r){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&t){const i=e.XpG().item;e.R7$(),e.JRh(i.message)}}function Y(t,r){if(1&t&&e.DNE(0,V,2,1,"span",36)(1,B,2,1,"span",36),2&t){const i=r.item;e.Y8G("ngIf","failed"!=i.ltype),e.R7$(),e.Y8G("ngIf","failed"==i.ltype)}}function U(t,r){1&t&&(e.j41(0,"c-badge",40),e.EFF(1," Logged In"),e.k0s())}function L(t,r){1&t&&(e.j41(0,"c-badge",41),e.EFF(1," Logged Out"),e.k0s())}function H(t,r){1&t&&(e.j41(0,"c-badge",42),e.EFF(1," Failed"),e.k0s())}function X(t,r){if(1&t&&e.DNE(0,U,2,0,"c-badge",37)(1,L,2,0,"c-badge",38)(2,H,2,0,"c-badge",39),2&t){const i=r.item.ltype;e.Y8G("ngIf","loggedin"==i),e.R7$(),e.Y8G("ngIf","loggedout"==i),e.R7$(),e.Y8G("ngIf","failed"==i)}}function $(t,r){1&t&&e.EFF(0),2&t&&e.SpI(" ",r.item.created," ")}const P=[{path:"",component:(()=>{class t{constructor(i,s,n,o){this.data_provider=i,this.router=s,this.login_checker=n,this.route=o,this.tz="UTC",this.devid=0,this.filters={devid:!1,ip:"",devip:"",user:"",state:"All",server:"All",connection_type:"All",start_time:!1,end_time:!1},this.filters_visible=!1,this.connection_types=[],this.source=[],this.columns=[],this.loading=!0,this.rows=[],this.sorting={enabled:!0,multiSorting:!0},this.paging={enabled:!0,page:1,pageSize:10,pageSizes:[5,10,25,50],display:g.sE.ADVANCED},this.columnMenu={enabled:!0,sort:!0,columnsManager:!0},this.infoPanel={enabled:!0,infoDialog:!1,columnsManager:!0,schemaManager:!0},this.rowSelection={enabled:!0,type:g.AU.CHECKBOX,mode:g.fL.MULTIPLE};var l=this;this.login_checker.isLoggedIn()||setTimeout(function(){l.router.navigate(["login"])},100),this.data_provider.getSessionInfo().then(c=>{l.uid=c.uid,l.uname=c.name,l.tz=c.tz,"admin"!=c.role&&setTimeout(function(){l.router.navigate(["/user/dashboard"])},100)})}reinitgrid(i,s){"start"==i?this.filters.start_time=s.target.value:"end"==i?this.filters.end_time=s.target.value:"ip"==i?this.filters.ip=s:"devip"==i?this.filters.devip=s:"user"==i?this.filters.user=s:"connection_type"==i?this.filters.connection_type=s:"state"==i?this.filters.state=s:"server"==i&&(this.filters.server=s),this.initGridTable()}secondsToString(p){var s=Math.floor(p/31536e3),o=0,l="";s&&o<2&&(l+=s+"y ",o++);var a=Math.floor((p%=31536e3)/86400);a&&o<2&&(l+=a+"d ",o++);var c=Math.floor((p%=86400)/3600);c&&o<2&&(l+=c+"h ",o++);var b=Math.floor((p%=3600)/60);return b&&o<2&&(l+=b+"m ",o++),(p%=60)&&o<2&&(l+=p+"s ",o++),l}ngOnInit(){this.devid=Number(this.route.snapshot.paramMap.get("devid")),this.devid>0&&(this.filters.devid=this.devid),this.initGridTable()}onSelectedRows(i){this.rows=i,this.Selectedrows=i.map(s=>s.source.id)}removefilter(i){delete this.filters[i],this.initGridTable()}toggleCollapse(){this.filters_visible=!this.filters_visible}logger(i){console.dir(i)}initG