feat: update

parent f807dbdc
......@@ -7110,9 +7110,6 @@
"stream-splicer": "2.0.0"
}
},
"layui-layer": {
"version": "git+https://github.com/jumpserver/layer.git#c568876741b64556df9916ed678a6106e1e82899"
},
"lazy-cache": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz",
......@@ -8364,6 +8361,11 @@
"resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-1.9.3.tgz",
"integrity": "sha512-beoKQGJEFwdg0ctIpGb+vx4PTPkyqHrA5tBAEbnUn7ZlTjjfA6533QYGv3qVoKPDNkkHmLA3lRjWKxEMYepCdg=="
},
"ngx-cookie-service": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/ngx-cookie-service/-/ngx-cookie-service-1.0.10.tgz",
"integrity": "sha512-TAXpQsIONAupTqkUDcH44hFQsLTvsXpxM80eKgxvy3vhBFfT1uIdR7BRhM7VpUW5J7BN9qCbGNgLN5lsnVu7pw=="
},
"ngx-layer": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/ngx-layer/-/ngx-layer-0.0.4.tgz",
......
......@@ -43,8 +43,8 @@
"metismenu": "^2.5.0",
"mstsc.js": "^0.2.4",
"ng2-charts": "^1.5.0",
"ng2-cookies": "^1.0.12",
"ngx-bootstrap": "^1.6.6",
"ngx-cookie-service": "^1.0.10",
"ngx-layer": "0.0.4",
"ngx-logger": "^1.1.2",
"ngx-perfect-scrollbar": "5.2.0",
......
......@@ -12,12 +12,9 @@ import {AppService, HttpService, LogService} from '../../app.service';
import {SearchComponent} from '../search/search.component';
import {DataStore} from '../../globals';
import {version} from '../../../environments/environment';
import * as jQuery from 'jquery/dist/jquery.min.js';
import {ElementServerMenuComponent} from '../../elements/server-menu/server-menu.component';
import {NavList, View} from '../control/control.component';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material';
import {logger} from 'codelyzer/util/logger';
import {selector} from 'rxjs/operator/publish';
import {FormControl, Validators} from '@angular/forms';
......@@ -125,7 +122,7 @@ export class CleftbarComponent implements OnInit {
if (user) {
this.login(host, user);
} else {
const dialogRef = this._dialog.open(CleftbarComponentDialog, {
const dialogRef = this._dialog.open(CleftbarDialogComponent, {
height: '200px',
width: '300px',
data: {users: host.system_users_granted}
......
......@@ -7,7 +7,7 @@
*/
import {Injectable, OnInit} from '@angular/core';
import {Router} from '@angular/router';
// import {Cookie} from 'ng2-cookies/ng2-cookies';
import {CookieService} from 'ngx-cookie-service';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import {DataStore, User, Browser} from './globals';
......@@ -141,27 +141,29 @@ export class AppService implements OnInit {
constructor(private _http: HttpService,
private _router: Router,
private _logger: LogService) {
// if (Cookie.get('loglevel')) {
// // 0.- Level.OFF
// // 1.- Level.ERROR
// // 2.- Level.WARN
// // 3.- Level.INFO
// // 4.- Level.DEBUG
// // 5.- Level.LOG
// this._logger.level = parseInt(Cookie.get('loglevel'), 10);
// // this._logger.debug('Your debug stuff');
// // this._logger.info('An info');
// // this._logger.warn('Take care ');
// // this._logger.error('Too late !');
// // this._logger.log('log !');
// } else {
// Cookie.set('loglevel', '0', 99, '/', document.domain);
// // this._logger.level = parseInt(Cookie.getCookie('loglevel'));
// this._logger.level = 0;
// }
private _logger: LogService,
private _cookie: CookieService) {
if (this._cookie.get('loglevel')) {
// 0.- Level.OFF
// 1.- Level.ERROR
// 2.- Level.WARN
// 3.- Level.INFO
// 4.- Level.DEBUG
// 5.- Level.LOG
this._logger.level = parseInt(this._cookie.get('loglevel'), 10);
// this._logger.debug('Your debug stuff');
// this._logger.info('An info');
// this._logger.warn('Take care ');
// this._logger.error('Too late !');
// this._logger.log('log !');
} else {
this._cookie.set('loglevel', '0', 99, '/', document.domain);
// this._logger.level = parseInt(Cookie.getCookie('loglevel'));
this._logger.level = 0;
}
if (environment.production) {
this._logger.level = 2;
this.checklogin();
}
// this._logger
......
......@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
import {DataStore} from '../globals';
import {ActivatedRoute, Params} from '@angular/router';
import * as jQuery from 'jquery/dist/jquery.min.js';
import {LogService} from '../app.service';
@Component({
selector: 'app-term-page',
......@@ -11,8 +12,10 @@ import * as jQuery from 'jquery/dist/jquery.min.js';
export class TermPageComponent implements OnInit {
token: string;
constructor(private activatedRoute: ActivatedRoute) {
constructor(private activatedRoute: ActivatedRoute,
private _logger: LogService) {
DataStore.NavShow = false;
this._logger.debug('TermPageComponent');
}
ngOnInit() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment