主页面提交 #1

Closed
tangwy wants to merge 2 commits from dev into master
  1. 18
      angular.json
  2. 2
      extra-webpack.config.js
  3. 2
      package-lock.json
  4. 6
      package.json
  5. 2
      src/app/app-routing.module.ts
  6. 2
      src/app/app.component.ts
  7. 53
      src/app/routes/config/layout/manage/manage.component.html
  8. 1032
      src/app/routes/config/layout/manage/manage.component.ts
  9. 4
      src/app/routes/config/layout/manage/manage.module.ts
  10. 103
      src/app/routes/config/layout/manage/path/path.component.html
  11. 59
      src/app/routes/config/layout/manage/path/path.component.ts
  12. 18
      src/app/routes/config/layout/manage/process/process.component.html
  13. 28
      src/app/routes/config/layout/manage/process/process.component.spec.ts
  14. 0
      src/app/routes/config/layout/manage/process/process.component.styl
  15. 88
      src/app/routes/config/layout/manage/process/process.component.ts
  16. 203
      src/app/routes/config/service/https/notice.service.ts
  17. 2
      src/environments/environment.prod.ts
  18. 2
      src/environments/environment.ts

@ -3,7 +3,7 @@
"version": 1, "version": 1,
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"notice": { "uebaMetricsAnalysis": {
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"projectType": "application", "projectType": "application",
@ -21,7 +21,7 @@
"build": { "build": {
"builder": "@angular-builders/custom-webpack:browser", "builder": "@angular-builders/custom-webpack:browser",
"options": { "options": {
"outputPath": "dist/notice", "outputPath": "dist/uebaMetricsAnalysis",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
@ -82,18 +82,18 @@
"serve": { "serve": {
"builder": "@angular-builders/dev-server:generic", "builder": "@angular-builders/dev-server:generic",
"options": { "options": {
"browserTarget": "notice:build" "browserTarget": "uebaMetricsAnalysis:build"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "notice:build:production" "browserTarget": "uebaMetricsAnalysis:build:production"
} }
} }
}, },
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "notice:build" "browserTarget": "uebaMetricsAnalysis:build"
} }
}, },
"test": { "test": {
@ -127,7 +127,7 @@
} }
} }
}, },
"notice-e2e": { "uebaMetricsAnalysis-e2e": {
"root": "e2e/", "root": "e2e/",
"projectType": "application", "projectType": "application",
"prefix": "", "prefix": "",
@ -136,11 +136,11 @@
"builder": "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options": { "options": {
"protractorConfig": "e2e/protractor.conf.js", "protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "notice:serve" "devServerTarget": "uebaMetricsAnalysis:serve"
}, },
"configurations": { "configurations": {
"production": { "production": {
"devServerTarget": "notice:serve:production" "devServerTarget": "uebaMetricsAnalysis:serve:production"
} }
} }
}, },
@ -156,5 +156,5 @@
} }
} }
}, },
"defaultProject": "notice" "defaultProject": "uebaMetricsAnalysis"
} }

@ -7,7 +7,7 @@ module.exports = (angularWebpackConfig, options) => {
output: { output: {
library: `${name}-[name]`, library: `${name}-[name]`,
libraryTarget: 'umd', libraryTarget: 'umd',
publicPath: process.env.NODE_ENV == 'prod' ? '/WebApi/notice/static/dist/' : 'http://localhost:4203/' publicPath: process.env.NODE_ENV == 'prod' ? '/WebApi/uebaMetricsAnalysis/static/dist/' : 'http://localhost:4203/'
}, },

2
package-lock.json generated

@ -1,5 +1,5 @@
{ {
"name": "notice", "name": "uebaMetricsAnalysis",
"version": "0.0.0", "version": "0.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,

@ -1,10 +1,10 @@
{ {
"name": "notice", "name": "uebaMetricsAnalysis",
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve notice --host 0.0.0.0 --disable-host-check --port 4203 --open --proxy-config proxy.conf.js", "start": "ng serve uebaMetricsAnalysis --host 0.0.0.0 --disable-host-check --port 4203 --open --proxy-config proxy.conf.js",
"build": "set NODE_ENV=prod&& ng build notice --aot --output-path dist/ --deploy-url /WebApi/notice/static/dist/ --base-href /WebApi/notice/static/dist/ --prod", "build": "set NODE_ENV=prod&& ng build uebaMetricsAnalysis --aot --output-path dist/ --deploy-url /WebApi/uebaMetricsAnalysis/static/dist/ --base-href /WebApi/uebaMetricsAnalysis/static/dist/ --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"

@ -13,7 +13,7 @@ const routes: Routes = [
imports: [RouterModule.forRoot(routes, { useHash: true })], imports: [RouterModule.forRoot(routes, { useHash: true })],
exports: [RouterModule], exports: [RouterModule],
providers: [ providers: [
{ provide: APP_BASE_HREF, useValue: (window as any).__POWERED_BY_QIANKUN__ ? '/notice' : '/' }, { provide: APP_BASE_HREF, useValue: (window as any).__POWERED_BY_QIANKUN__ ? '/uebaMetricsAnalysis' : '/' },
] ]
}) })
export class AppRoutingModule { } export class AppRoutingModule { }

@ -28,7 +28,7 @@ export class AppComponent implements OnInit {
if (!this.prefixRouter) { if (!this.prefixRouter) {
this.prefixRouter = await this.configService.translatePrefix(); this.prefixRouter = await this.configService.translatePrefix();
} }
const appName = '/notice'; const appName = '/uebaMetricsAnalysis';
const prefix = this.configService.getUrlPrefix(this.prefixRouter, appName); const prefix = this.configService.getUrlPrefix(this.prefixRouter, appName);
document.title = prefix ? prefix : '绿盟智能安全运营平台'; document.title = prefix ? prefix : '绿盟智能安全运营平台';
} }

@ -1,4 +1,5 @@
<div class="container"> <div class="container">
<h1>接口访问统计</h1>
<div class="seach"> <div class="seach">
<div class="form-item"> <div class="form-item">
<div class="form-label">时间选择:</div> <div class="form-label">时间选择:</div>
@ -7,7 +8,7 @@
<div class="form-item" > <div class="form-item" >
<div class="form-label">统计维度:</div> <div class="form-label">统计维度:</div>
<nz-select (ngModelChange)="selectValChange()" [(ngModel)]="dimension"> <nz-select [(ngModel)]="dimension">
<nz-option nzValue="1" nzLabel="IP"></nz-option> <nz-option nzValue="1" nzLabel="IP"></nz-option>
<nz-option nzValue="2" nzLabel="账号"></nz-option> <nz-option nzValue="2" nzLabel="账号"></nz-option>
<nz-option nzValue="3" nzLabel="接口" ></nz-option> <nz-option nzValue="3" nzLabel="接口" ></nz-option>
@ -20,9 +21,10 @@
</div> </div>
</div> </div>
<div class="table-container" style="margin-top: 50px;height:100vh;">
<div style="display: flex;justify-content: right;"><button nz-button (click)="exportExcel()">导出</button></div>
<div style="margin-top: 50px;"> <nz-table *ngIf="tableisShow === '1'" #basicTable [nzData]="listOfData">
<nz-table *ngIf="dimension === '1'" #basicTable [nzData]="listOfData">
<thead> <thead>
<tr> <tr>
<th>归属单位</th> <th>归属单位</th>
@ -43,18 +45,18 @@
"ip_reat": 0.3, "ip_reat": 0.3,
"ip_avg": 0.43, "ip_avg": 0.43,
"trend": 0.3 --> "trend": 0.3 -->
<td>{{ data.company }}</td> <td><a (click)="showModel({type: 1, key: data.company})">{{data.company}}</a></td>
<td>{{ data.req_frequency }}</td> <td>{{ data.req_frequency }}</td>
<td>{{ data.frequency_rate }}</td> <td>{{ data.frequency_rate| percent: '1.1-2' }}</td>
<td>{{ data.ip_count }}</td> <td>{{ data.ip_count }}</td>
<td>{{ data.ip_reat }}</td> <td>{{ data.ip_rate| percent: '1.1-2' }}</td>
<td>{{ data.ip_avg }}</td> <td>{{ data.ip_avg| number: '1.2-2' }}</td>
<td>{{ data.trend }}</td> <td>{{ data.trend| percent: '1.1-2' }}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
<nz-table *ngIf="dimension === '2'" #basicTable [nzData]="listOfData"> <nz-table *ngIf="tableisShow === '2'" #basicTable [nzData]="listOfData">
<thead> <thead>
<tr> <tr>
<th>归属单位</th> <th>归属单位</th>
@ -75,18 +77,18 @@
"account_reat": 0.3, "account_reat": 0.3,
"account_avg": 0.43, "account_avg": 0.43,
"trend": 0.3 --> "trend": 0.3 -->
<td>{{ data.company }}</td> <td><a (click)="showModel({type: 2, key: data.company})">{{data.company}}</a></td>
<td>{{ data.req_frequency }}</td> <td>{{ data.req_frequency }}</td>
<td>{{ data.frequency_rate }}</td> <td>{{ data.frequency_rate| percent: '1.1-2' }}</td>
<td>{{ data.account_count }}</td> <td>{{ data.account_count }}</td>
<td>{{ data.account_reat }}</td> <td>{{ data.account_rate| percent: '1.1-2' }}</td>
<td>{{ data.account_avg }}</td> <td>{{ data.account_avg| number: '1.2-2' }}</td>
<td>{{ data.trend }}</td> <td>{{ data.trend| percent: '1.1-2' }}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
<nz-table *ngIf="dimension === '3'" #basicTable [nzData]="listOfData"> <nz-table *ngIf="tableisShow === '3'" #basicTable [nzData]="listOfData">
<thead> <thead>
<tr> <tr>
<th>接口地址</th> <th>接口地址</th>
@ -103,15 +105,16 @@
"frequency_rate": 0.160727824109174, "frequency_rate": 0.160727824109174,
"frequency_avg": 0, "frequency_avg": 0,
"trend": 0.07 --> "trend": 0.07 -->
<td>{{ data.interface_addr }}</td> <td><a (click)="showModel({type: 3, key: data.interface_addr})">{{ data.interface_addr }}</a></td>
<td>{{ data.req_frequency }}</td> <td>{{ data.req_frequency }}</td>
<td>{{ data.frequency_avg }}</td> <td>{{ data.frequency_rate | percent: '1.1-2' }}</td>
<td>{{ data.trend }}</td> <td>{{ data.frequency_avg| number: '1.2-2' }}</td>
<td>{{ data.trend| percent: '1.1-2' }}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
<nz-table *ngIf="dimension === '4'" #basicTable [nzData]="listOfData"> <nz-table *ngIf="tableisShow === '4'" #basicTable [nzData]="listOfData">
<thead> <thead>
<tr> <tr>
<th>菜单名称</th> <th>菜单名称</th>
@ -128,18 +131,22 @@
"frequency_rate": 0.263449367088608, "frequency_rate": 0.263449367088608,
"frequency_avg": 111, "frequency_avg": 111,
"trend": 0.09 --> "trend": 0.09 -->
<td>{{ data.menu_name }}</td> <td><a (click)="showModel({type: 3, key: data.menu_name})">{{ data.menu_name }}</a></td>
<td>{{ data.req_frequency }}</td> <td>{{ data.req_frequency }}</td>
<td>{{ data.frequency_avg }}</td> <td>{{ data.frequency_rate| percent: '1.1-2' }}</td>
<td>{{ data.trend }}</td> <td>{{ data.frequency_avg| number: '1.2-2'}}</td>
<td>{{ data.trend| percent: '1.1-2' }}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
<app-process [visible]="submitLoading" (onCancel)="cancelSearch()">
</app-process>
<nz-modal [(nzVisible)]="isVisible" nzWidth="80%" nzTitle="The first Modal" (nzOnCancel)="isVisible = false" > <nz-modal [(nzVisible)]="isVisible" nzWidth="80%" nzTitle="The first Modal" (nzOnCancel)="isVisible = false" >
<app-path></app-path> <app-path [detail_data]="detail_data"></app-path>
</nz-modal> </nz-modal>
</div> </div>

File diff suppressed because it is too large Load Diff

@ -4,13 +4,13 @@ import { CommonModule } from '@angular/common';
import { ManageComponent } from './manage.component'; import { ManageComponent } from './manage.component';
import { SharedModule } from 'src/app/common-ui'; import { SharedModule } from 'src/app/common-ui';
import { PathComponent } from './path/path.component'; import { PathComponent } from './path/path.component';
import { ProcessComponent } from './process/process.component';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
SharedModule SharedModule
], ],
declarations: [PathComponent, ManageComponent] declarations: [PathComponent, ManageComponent,ProcessComponent]
}) })
export class ManageModule {} export class ManageModule {}

@ -1,4 +1,103 @@
<!-- <app-wechart-robot [data]="wechartRobotData"></app-wechart-robot> --> <!-- <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>

@ -10,12 +10,7 @@ import { NoticeService } from '../../../service/https/notice.service';
export class PathComponent implements OnInit { export class PathComponent implements OnInit {
@Input() datas: any; @Input() datas: any;
data; data;
mailData: any; viewType = 0;
messageData: any;
qywechatData: any;
dingtalkData: any;
wechartRobotData: any;
dingdingRobotData: any;
constructor( constructor(
private noticeService: NoticeService, private noticeService: NoticeService,
@ -23,47 +18,35 @@ export class PathComponent implements OnInit {
) {} ) {}
ngOnInit() { ngOnInit() {
this.queryData(); // const jsonStr = '{"type":3,"http://190.89.233.2:8909/getpublicconfig":[{"req_ip":"192.156.3.12","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":43327,"req_frequency":43,"req_account":"liuhr"},{"req_ip":"192.156.3.12","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":43328,"req_frequency":44,"req_account":"sunxq01"},{"req_ip":"192.156.3.18","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":65341,"req_frequency":45,"req_account":"shicl"},{"req_ip":"192.106.3.33","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":65342,"req_frequency":46,"req_account":"gongxs"},{"req_ip":"192.106.3.34","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":65343,"req_frequency":47,"req_account":"sunzs"}]}'
// if (this.datas == null) {
// this.datas = JSON.parse(jsonStr);
// }
this.parseData(this.datas);
} }
queryData() { parseData(datas: any) {
this.noticeService.queryConfig().subscribe( for (const dataKey in datas) {
resp => { if (datas.hasOwnProperty(dataKey)) {
if (resp.status === 200) { if (dataKey === 'type') {
// console.log(resp.data); this.viewType = datas[dataKey];
this.data = resp.data;
this.processData(this.data);
} else { } else {
this.message.error(resp.msg); this.data = datas[dataKey];
} }
},
error => {
this.message.error('服务器错误');
} }
);
} }
processData(allData) {
allData.forEach((item) => {
if (item.type === 'mail') {
this.mailData = item;
}
if (item.type === 'message') {
this.messageData = item;
}
if (item.type === 'qywechat') {
this.qywechatData = item;
}
if (item.type === 'dingtalk') {
this.dingtalkData = item;
} }
if (item.type === 'webhook') {
this.wechartRobotData = item; clickWihteList(data) {
alert("点击白名单");
} }
if (item.type === 'robot') {
this.dingdingRobotData = item; clickGreyList(data) {
alert("点击灰名单");
} }
});
clickFrequency(data) {
alert("点击超链接");
} }
} }

@ -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);
}
}

@ -35,7 +35,208 @@ export class NoticeService {
} }
getUebaResult(params:any) { getUebaResult(params:any) {
const url = '/UebaMetricsAnalysis/ueba_metrics/get_summary_data_list'; const url = '/uebaMetricsAnalysis/ueba_metrics/get_summary_data_list';
return this.httpService.get(url, params,30000); return this.httpService.get(url, params,30000);
} }
// 引擎接口
// 获取已有的白名单
whiteListQuery(params){
// {
// "message": "success",
// "code": 200,
// "data": {
// "total": 3,
// "data": [
// {
// "white_content": {
// "sip": "128.3.212.3"
// },
// "update_time": 1717731552,
// "alert_rule_id": [
// 400000
// ],
// "name": "test2",
// "white_rule": {
// "url": [
// "http://baid.com"
// ],
// "sip": {
// "ip_range_list": [],
// "single_ip_list": [
// "128.3.212.3"
// ]
// }
// },
// "des": "\u63cf\u8ff0\u4fe1\u606f",
// "event_rule_id": [],
// "range": [
// "ueba"
// ],
// "is_enable": 1,
// "create_time": 1717731479,
// "is_gray": 0,
// "id": 5
// },
// {
// "white_content": {
// "url": "http://baid.com",
// "sip": "128.3.212.3"
// },
// "update_time": 1717730831,
// "alert_rule_id": [
// 400000
// ],
// "name": "test2",
// "white_rule": {
// "url": [
// "http://baid.com"
// ],
// "sip": {
// "ip_range_list": [],
// "single_ip_list": [
// "128.3.212.3"
// ]
// }
// },
// "des": "\u63cf\u8ff0\u4fe1\u606f",
// "event_rule_id": [],
// "range": [
// "ueba"
// ],
// "is_enable": 1,
// "create_time": 1717730546,
// "is_gray": 0,
// "id": 2
// },
// {
// "white_content": {
// "dport": "123",
// "sip": "0.0.0.0",
// "dip": "0.0.0.0",
// "sport": "111"
// },
// "update_time": 1717399034,
// "alert_rule_id": [],
// "name": "test",
// "white_rule": {
// "dport": [
// 123
// ],
// "sip": {
// "ip_range_list": [],
// "single_ip_list": [
// "0.0.0.0"
// ]
// },
// "dip": {
// "ip_range_list": [],
// "single_ip_list": [
// "0.0.0.0"
// ]
// },
// "sport": [
// 111
// ]
// },
// "des": "",
// "event_rule_id": [
// 490002
// ],
// "range": [
// "cep"
// ],
// "is_enable": 1,
// "create_time": 1713409218,
// "is_gray": 0,
// "id": 1
// }
// ]
// }
// }
//pageIndex,pageSize
//const url = '/ditingEngine/diting/global/whitelist_query/?pageIndex=1&pageSize=10000';
const url = '/ditingEngine/diting/global/whitelist_query';
return this.httpService.get(url, params);
}
// 获取已有的灰名单
greyListQyery(param){
// {
// "message": "\u8c1b\u542c\u5f15\u64ce-\u540d\u5355\u67e5\u8be2\u6210\u529f",
// "code": 200,
// "data": {
// "total": 1,
// "data": [
// {
// "white_content": {
// "url": "http://baid.com",
// "sip": "187.23.23.4"
// },
// "update_time": 1717730747,
// "alert_rule_id": [
// 400000
// ],
// "name": "\u7070\u540d\u5355-\u540d\u79f0",
// "des": "\u7070\u540d\u5355-\u63cf\u8ff0",
// "range": "ueba",
// "is_enable": 1,
// "create_time": 1717730747,
// "is_gray": 1,
// "id": 3
// }
// ]
// }
// }
// const url = 'https://10.65.74.3/ditingEngine/ueba/engine_name_list/query/?pageIndex=1&pageSize=10&type=0';
const url = '/ditingEngine/ueba/engine_name_list/query';
return this.httpService.get(url,param);
}
// 添加白名单
addWhitelist(params){
// {
// "range": [
// "ueba"
// ],
// "fields": [
// "sip",
// ],
// "name": "test2",//ip+加入时间
// "des": "",
// "is_enable": 1,
// "content": {
// "sip": "128.3.212.3",
// },
// "alert_rule_id": [
// 400000,
// 400000
// ]
// }
const url = '/ditingEngine/diting/global/whitelist_add';
return this.httpService.post(url,{}, params);
}
// 添加灰名单
addGreyList(params){
// {
// "fields": [
// "sip",
// "url"
// ],
// "name": "灰名单-名称",//ip+加入时间
// "alert_rule_id": [
// 400000
// ],
// "des": "灰名单-描述",
// "is_enable": 1,
// "content": {
// "sip": "187.23.23.4",
// "url": "http://baid.com"
// },
// "type": 0
// }
const url = '/ditingEngine/diting/global/whitelist_add';
return this.httpService.post(url,{}, params);
}
} }

@ -1,5 +1,5 @@
export const environment = { export const environment = {
production: true, production: true,
productionUrls: '/WebApi/notice/static/dist/', productionUrls: '/WebApi/uebaMetricsAnalysis/static/dist/',
hashPrefx: '' hashPrefx: ''
}; };

@ -5,7 +5,7 @@
export const environment = { export const environment = {
production: false, production: false,
productionUrls: '', productionUrls: '',
hashPrefx: '/WebApi/notice/static/dist/' hashPrefx: '/WebApi/uebaMetricsAnalysis/static/dist/'
}; };
/* /*

Loading…
Cancel
Save