File diff suppressed because it is too large
Load Diff
@ -1,4 +1,103 @@ |
||||
|
||||
<!-- <app-wechart-robot [data]="wechartRobotData"></app-wechart-robot> --> |
||||
|
||||
<div>cdfddffff</div> |
||||
<!-- <div>cdfddffff</div> --> |
||||
|
||||
<div> |
||||
<nz-table *ngIf="viewType === 1" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]"> |
||||
<thead> |
||||
<tr> |
||||
<th>访问源IP</th> |
||||
<th>访问频次</th> |
||||
<th nzRight>操作</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr *ngFor="let data of basicTable.data"> |
||||
<td>{{ data.req_ip }}</td> |
||||
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td> |
||||
<td nzRight> |
||||
<a (click)="clickWihteList(data)">白名单</a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a (click)="clickGreyList(data)">灰名单</a> |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</nz-table> |
||||
|
||||
<nz-table *ngIf="viewType === 2" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]"> |
||||
<thead> |
||||
<tr> |
||||
<th>账号</th> |
||||
<th>访问频次</th> |
||||
<th>工号</th> |
||||
<th nzRight>操作</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr *ngFor="let data of basicTable.data"> |
||||
<td>{{ data.req_account }}</td> |
||||
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td> |
||||
<td>{{ data.req_jobnum }}</td> |
||||
<td nzRight> |
||||
<a (click)="clickWihteList(data)">白名单</a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a (click)="clickGreyList(data)">灰名单</a> |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</nz-table> |
||||
|
||||
<nz-table *ngIf="viewType === 3" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]"> |
||||
<thead> |
||||
<tr> |
||||
<th>接口地址</th> |
||||
<th>访问IP</th> |
||||
<th>访问账号</th> |
||||
<th>访问频次</th> |
||||
<th>工号</th> |
||||
<th nzRight>操作</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr *ngFor="let data of basicTable.data"> |
||||
<td>{{ data.interface_addr }}</td> |
||||
<td>{{ data.req_ip }}</td> |
||||
<td>{{ data.req_account }}</td> |
||||
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td> |
||||
<td>{{ data.req_jobnum }}</td> |
||||
<td nzRight> |
||||
<a (click)="clickWihteList(data)">白名单</a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a (click)="clickGreyList(data)">灰名单</a> |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</nz-table> |
||||
|
||||
<nz-table *ngIf="viewType === 4" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]"> |
||||
<thead> |
||||
<tr> |
||||
<th>菜单名称</th> |
||||
<th>访问IP</th> |
||||
<th>访问账号</th> |
||||
<th>访问频次</th> |
||||
<th>工号</th> |
||||
<th nzRight>操作</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr *ngFor="let data of basicTable.data"> |
||||
<td>{{ data.menu_name }}</td> |
||||
<td>{{ data.req_ip }}</td> |
||||
<td>{{ data.req_account }}</td> |
||||
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td> |
||||
<td>{{ data.req_jobnum }}</td> |
||||
<td nzRight> |
||||
<a (click)="clickWihteList(data)">白名单</a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a (click)="clickGreyList(data)">灰名单</a> |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</nz-table> |
||||
</div> |
||||
|
@ -0,0 +1,18 @@ |
||||
<nz-modal [(nzVisible)]="open" |
||||
[nzMaskClosable]="false" |
||||
[nzKeyboard]="false" |
||||
(nzOnCancel)="justClose()" |
||||
[nzFooter]="footer" |
||||
nzTitle="搜索进度"> |
||||
<nz-row> |
||||
<nz-col nzSpan="4">查询进度</nz-col> |
||||
<nz-col nzSpan="20"> |
||||
<nz-progress [nzPercent]="process"> |
||||
</nz-progress> |
||||
</nz-col> |
||||
</nz-row> |
||||
</nz-modal> |
||||
|
||||
<ng-template #footer> |
||||
<button nz-button (click)="cancel()">取消查询</button> |
||||
</ng-template> |
@ -0,0 +1,28 @@ |
||||
/* tslint:disable:no-unused-variable */ |
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
import { By } from '@angular/platform-browser'; |
||||
import { DebugElement } from '@angular/core'; |
||||
|
||||
import { PathComponent } from './process.component'; |
||||
|
||||
describe('PathComponent', () => { |
||||
let component: PathComponent; |
||||
let fixture: ComponentFixture<PathComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ PathComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(PathComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,88 @@ |
||||
import { |
||||
ChangeDetectionStrategy, |
||||
ChangeDetectorRef, |
||||
Component, |
||||
EventEmitter, |
||||
Input, |
||||
OnChanges, |
||||
Output, |
||||
SimpleChanges |
||||
} from '@angular/core'; |
||||
|
||||
@Component({ |
||||
selector: 'app-process', |
||||
templateUrl: './process.component.html', |
||||
styleUrls: ['./process.component.styl'], |
||||
changeDetection: ChangeDetectionStrategy.OnPush |
||||
}) |
||||
// @ts-ignore
|
||||
export class ProcessComponent implements OnChanges { |
||||
// @ts-ignore
|
||||
@Input() visible = false; |
||||
// @ts-ignore
|
||||
// tslint:disable-next-line:no-output-on-prefix
|
||||
@Output() onCancel = new EventEmitter(); |
||||
|
||||
open = false; |
||||
process = 0; |
||||
intervalId = -1; |
||||
|
||||
constructor( |
||||
private cdr: ChangeDetectorRef |
||||
) {} |
||||
|
||||
ngOnChanges(changes: SimpleChanges): void { |
||||
const visible = changes['visible']; |
||||
|
||||
if (visible.currentValue !== null) { |
||||
if (visible.currentValue) { |
||||
this.start(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
random() { |
||||
const acc = Math.ceil(Math.random() * 10); |
||||
const added = this.process + acc; |
||||
this.process = added >= 99 ? 99 : added; |
||||
} |
||||
|
||||
start() { |
||||
this.open = true; |
||||
this.process = 0; |
||||
clearTimeout(this.intervalId); |
||||
this.ticker(); |
||||
} |
||||
|
||||
ticker() { |
||||
this.intervalId = setTimeout(() => { |
||||
if (this.visible) { |
||||
this.random(); |
||||
this.ticker(); |
||||
} else { |
||||
this.process = 100; |
||||
this.autoClose(); |
||||
} |
||||
this.cdr.markForCheck(); |
||||
}, 1000); |
||||
} |
||||
|
||||
cancel() { |
||||
this.open = false; |
||||
clearTimeout(this.intervalId); |
||||
this.onCancel.emit(); |
||||
} |
||||
|
||||
autoClose() { |
||||
clearTimeout(this.intervalId); |
||||
setTimeout(() => { |
||||
this.open = false; |
||||
this.cdr.markForCheck(); |
||||
}, 300); |
||||
} |
||||
|
||||
justClose() { |
||||
this.open = false; |
||||
clearTimeout(this.intervalId); |
||||
} |
||||
} |
@ -1,5 +1,5 @@ |
||||
export const environment = { |
||||
production: true, |
||||
productionUrls: '/WebApi/notice/static/dist/', |
||||
productionUrls: '/WebApi/uebaMetricsAnalysis/static/dist/', |
||||
hashPrefx: '' |
||||
}; |
||||
|
Loading…
Reference in new issue