Commit 7332539f authored by wangqinghua's avatar wangqinghua

update

parent 739c58e4
...@@ -36,10 +36,9 @@ Module ng g module my-module ...@@ -36,10 +36,9 @@ Module ng g module my-module
日志分析 logAnalysis 日志分析 logAnalysis
业务配置 bConfig 业务配置 bConfig
部署代码
scp -r 22 build/www root@10.10.38.99:/home/nginx
密码:Aa123456
版本更新: 版本更新:
v2.0.1 修复选择节点之后 流量查询不出来 v2.0.1 修复选择节点之后 流量查询不出来
scp -r 22 build/www root@10.10.38.99:/home/nginx
scp -r 22 build/wx root@10.10.38.99:/home/nginx/www
This diff is collapsed.
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
"@angular/platform-browser-dynamic": "5.2.0", "@angular/platform-browser-dynamic": "5.2.0",
"@angular/router": "5.2.0", "@angular/router": "5.2.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0", "@ng-bootstrap/ng-bootstrap": "1.0.0",
"@types/core-js": "0.9.35",
"classlist.js": "^1.1.20150312", "classlist.js": "^1.1.20150312",
"core-js": "2.4.1", "core-js": "2.4.1",
"@types/core-js": "0.9.35",
"font-awesome": "4.7.0", "font-awesome": "4.7.0",
"g": "^2.0.1", "g": "^2.0.1",
"ng-jhipster": "0.4.0", "ng-jhipster": "0.4.0",
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</nz-select> </nz-select>
</div> </div>
<div nz-col nzSpan="7"> <div nz-col nzSpan="7">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" [nzButtonStyle]="'solid'"> <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType($event)">
<label nz-radio-button nzValue="1">今天</label> <label nz-radio-button nzValue="1">今天</label>
<label nz-radio-button nzValue="2">昨天</label> <label nz-radio-button nzValue="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label> <label nz-radio-button nzValue="3">三天</label>
......
...@@ -56,7 +56,7 @@ export class AlarmListComponent implements OnInit { ...@@ -56,7 +56,7 @@ export class AlarmListComponent implements OnInit {
constructor(public alarmSer: AlarmService, public overAllSer: OverAllService, public message: NzMessageService, constructor(public alarmSer: AlarmService, public overAllSer: OverAllService, public message: NzMessageService,
public datePipe: DatePipe,private commonSer:CommonService,private workSer:WorkService) { public datePipe: DatePipe,private commonSer:CommonService,private workSer:WorkService) {
this.changeType(); this.changeType('1');
} }
ngOnInit() { ngOnInit() {
...@@ -90,39 +90,11 @@ export class AlarmListComponent implements OnInit { ...@@ -90,39 +90,11 @@ export class AlarmListComponent implements OnInit {
} }
//时间改变 //时间改变
changeType() { changeType(e) {
const nowDate = new Date().getTime(); if(e == '5') return false;
let day1, day2; const obj = this.commonSer.getTimeByType(e);
switch (this.timeType) { this.obj.startTime = obj.startTime;
case'1': { this.obj.endTime = obj.endTime;
this.obj.startTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'2': {
day1 = nowDate - 1 * 24 * 60 * 60 * 1000;
this.obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'3': {
day1 = nowDate - 3 * 24 * 60 * 60 * 1000;
day2 = nowDate;
this.obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'4': {
day1 = nowDate - 7 * 24 * 60 * 60 * 1000;
day2 = nowDate;
this.obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'5': {
break;
}
}
} }
//查询 //查询
......
...@@ -24,6 +24,12 @@ import {WorkService} from '../../work/work.service'; ...@@ -24,6 +24,12 @@ import {WorkService} from '../../work/work.service';
padding: 2px 4px; padding: 2px 4px;
border-radius: 4px; border-radius: 4px;
} }
.tag-warn span.select-border {
border: 1px solid #1626e2;
border-radius: 5px;
padding: 2px;
margin-right: 5px;
}
:host ::ng-deep .tag-warn .ant-tag{ :host ::ng-deep .tag-warn .ant-tag{
margin-right: 0px; margin-right: 0px;
} }
...@@ -51,8 +57,8 @@ export class NowAlarmComponent implements OnInit, OnDestroy { ...@@ -51,8 +57,8 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
} }
ngOnInit() { ngOnInit() {
this.search(null);
this.getType(); this.getType();
this.search(null);
this.time_ = setInterval(()=>{ this.time_ = setInterval(()=>{
this.search(null); this.search(null);
},2*60*1000); },2*60*1000);
...@@ -68,7 +74,7 @@ export class NowAlarmComponent implements OnInit, OnDestroy { ...@@ -68,7 +74,7 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
isWaring:'yes', isWaring:'yes',
hostid:hostid, hostid:hostid,
}; };
this.warnList.getList(obj); this.warnList.outGet(obj);
} }
getType(){ getType(){
......
...@@ -55,6 +55,11 @@ export class AnalysisService { ...@@ -55,6 +55,11 @@ export class AnalysisService {
return this.http.post(SERVER_API_URL + '/statistics/waringTrend' ,data); return this.http.post(SERVER_API_URL + '/statistics/waringTrend' ,data);
} }
//告警总数趋势
waringTrendByHost(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/waringTrendByHost' ,data);
}
//常发问题TOP10 //常发问题TOP10
commonProblemTop(data): Observable<any>{ commonProblemTop(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/commonProblemTop' ,data); return this.http.post(SERVER_API_URL + '/statistics/commonProblemTop' ,data);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</nz-select> </nz-select>
</div> </div>
<div nz-col nzSpan="7"> <div nz-col nzSpan="7">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" [nzButtonStyle]="'solid'"> <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()">
<label nz-radio-button nzValue="1">今天</label> <label nz-radio-button nzValue="1">今天</label>
<label nz-radio-button nzValue="2">昨天</label> <label nz-radio-button nzValue="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label> <label nz-radio-button nzValue="3">三天</label>
......
...@@ -23,8 +23,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -23,8 +23,8 @@ export class ResourceUsabilComponent implements OnInit {
//显示无数据图片 //显示无数据图片
data = { data = {
left:false, left: false,
right:false, right: false,
}; };
chartLastOption; chartLastOption;
...@@ -43,7 +43,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -43,7 +43,7 @@ export class ResourceUsabilComponent implements OnInit {
isDownload = false; isDownload = false;
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe, constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,private workSer:WorkService,private commonSer:CommonService) { private overAllSer: OverAllService, private workSer: WorkService, private commonSer: CommonService) {
} }
ngOnInit() { ngOnInit() {
...@@ -61,7 +61,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -61,7 +61,7 @@ export class ResourceUsabilComponent implements OnInit {
this.groupList = res.data; this.groupList = res.data;
this.obj.groupid = this.groupList[0].groupid + ''; this.obj.groupid = this.groupList[0].groupid + '';
this.search(); this.search();
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
...@@ -73,18 +73,17 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -73,18 +73,17 @@ export class ResourceUsabilComponent implements OnInit {
this.obj.type = 'top'; this.obj.type = 'top';
this.analysisSer.findFailureRate(this.obj).subscribe( this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
if(res.data.length > 0){ if (res.data.length > 0) {
this.data.left = false; this.data.left = false;
this.topList = res.data; this.topList = res.data;
this.setTopEcharts(); this.setTopEcharts();
}else{ } else {
this.data.left = true; this.data.left = true;
this.isLoading = false; this.isLoading = false;
this.message.warning("可用性TOP暂无数据"); this.message.warning('可用性TOP暂无数据');
} }
} else {
}else{
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
...@@ -92,21 +91,21 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -92,21 +91,21 @@ export class ResourceUsabilComponent implements OnInit {
} }
//设置top图表 //设置top图表
setTopEcharts(){ setTopEcharts() {
this.chartTopOption = { this.chartTopOption = {
title: { title: {
text: '可用性TOP 10' text: '可用性TOP 10'
}, },
tooltip : { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}, },
formatter: "{b} : {c}%" formatter: '{b} : {c}%'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.topList.map(e=>{ data: this.topList.map(e => {
return e.name; return e.name;
}), }),
...@@ -121,8 +120,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -121,8 +120,8 @@ export class ResourceUsabilComponent implements OnInit {
}, },
series: [{ series: [{
name: '可用性TOP 10', name: '可用性TOP 10',
data: this.topList.map(e=>{ data: this.topList.map(e => {
return (e.value).toFixed(2) *100; return (e.value).toFixed(2) * 100;
}), }),
type: 'bar' type: 'bar'
}] }]
...@@ -135,18 +134,18 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -135,18 +134,18 @@ export class ResourceUsabilComponent implements OnInit {
this.obj.type = 'last'; this.obj.type = 'last';
this.analysisSer.findFailureRate(this.obj).subscribe( this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
if(res.data.length > 0){ if (res.data.length > 0) {
this.data.right = false; this.data.right = false;
this.lastList = res.data; this.lastList = res.data;
this.setLastEcharts(); this.setLastEcharts();
}else{ } else {
this.data.right = true; this.data.right = true;
this.isLoading = false; this.isLoading = false;
this.message.warning("可用性Last暂无数据"); this.message.warning('可用性Last暂无数据');
} }
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
...@@ -154,21 +153,21 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -154,21 +153,21 @@ export class ResourceUsabilComponent implements OnInit {
} }
//设置last图表 //设置last图表
setLastEcharts(){ setLastEcharts() {
this.chartLastOption = { this.chartLastOption = {
title: { title: {
text: '可用性LAST 10' text: '可用性LAST 10'
}, },
tooltip : { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}, },
formatter: "{b} : {c}%" formatter: '{b} : {c}%'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.lastList.map(e=>{ data: this.lastList.map(e => {
return e.name; return e.name;
}) })
}, },
...@@ -182,8 +181,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -182,8 +181,8 @@ export class ResourceUsabilComponent implements OnInit {
}, },
series: [{ series: [{
name: '可用性LAST 10', name: '可用性LAST 10',
data: this.lastList.map(e=>{ data: this.lastList.map(e => {
return (e.value).toFixed(2) *100; return (e.value).toFixed(2) * 100;
}), }),
type: 'bar' type: 'bar'
}] }]
...@@ -239,7 +238,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -239,7 +238,7 @@ export class ResourceUsabilComponent implements OnInit {
} }
//导出 可用性 //导出 可用性
downLoadCommon(){ downLoadCommon() {
this.isDownload = true; this.isDownload = true;
const data = { const data = {
groupid: this.obj.groupid, groupid: this.obj.groupid,
...@@ -247,20 +246,20 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -247,20 +246,20 @@ export class ResourceUsabilComponent implements OnInit {
endTime: this.obj.endTime, endTime: this.obj.endTime,
}; };
this.analysisSer.findFailureRateImport(data).subscribe( this.analysisSer.findFailureRateImport(data).subscribe(
(res)=>{ (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
this.workSer.downloadTemplate('failureRate',res.data).subscribe( this.workSer.downloadTemplate('failureRate', res.data).subscribe(
(data)=>{ (data) => {
this.isDownload = false; this.isDownload = false;
this.commonSer.downloadFile('资源可用性统计.xlsx',data) this.commonSer.downloadFile('资源可用性统计.xlsx', data);
} }
) );
}else{ } else {
this.isDownload = false; this.isDownload = false;
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
) );
} }
} }
...@@ -12,8 +12,7 @@ export class AppComponent { ...@@ -12,8 +12,7 @@ export class AppComponent {
document.body.ondrop = (event)=> { document.body.ondrop = (event)=> {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
} };
console.log("智能运行监管平台:v2.0.1 update By 2019-04-01") console.log("智能运行监管平台:v2.0.7 update By 2019-06-10")
} }
} }
...@@ -4,15 +4,45 @@ export const SERVER_API_URL_COMS = '/coms'; ...@@ -4,15 +4,45 @@ export const SERVER_API_URL_COMS = '/coms';
export const SERVER_API_URL = '/zabbixBox'; export const SERVER_API_URL = '/zabbixBox';
export const BUILD_TIMESTAMP = process.env.BUILD_TIMESTAMP; export const BUILD_TIMESTAMP = process.env.BUILD_TIMESTAMP;
export const pageSize = 10; export const pageSize = 10;
//颜色
export const color = { export const color = {
green:'#58ca13', green: '#58ca13',
yellow:'#ffc029', yellow: '#ffc029',
red:'#f44e4e', red: '#f44e4e',
gray:'#bfbfbf', gray: '#bfbfbf',
black:'#000000' black: '#000000'
}; };
//主题
export const ThemeList = [ export const ThemeList = [
{ value:'white',label:'白色主题' }, {value: 'white', label: '白色主题'},
{ value:'dark',label:'深色主题' }, {value: 'dark', label: '深色主题'},
] ];
export const colorObj = {
dark:{
fontColor:'#b7d1f1',
},
white:{
fontColor:'#333'
}
}
//流量单位
export const UnitList = [
{'label': 'bps', value: 'bps'},
{'label': 'Kbps', value: 'Kbps'},
{'label': 'Mbps', value: 'Mbps'},
{'label': 'Gbps', value: 'Gbps'},
];
//主机指标
export const HostFlow = [
{'label': 'CPU利用率(%)', value: 'cpu_use'},
{'label': 'Ping延时(ms)', value: 'ping_delay'},
{'label': '丢包数', value: 'packet_loss'},
{'label': '内存利用率(%)', value: 'vm_use'},
{'label': '总接受流量', value: 'total_flow_receive'},
{'label': '总发送流量', value: 'total_flow'},
];
import './vendor.ts'; import './vendor.ts';
import {NgModule, Injector, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA} from '@angular/core'; import {NgModule, Injector, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { HTTP_INTERCEPTORS } from '@angular/common/http'; import {HTTP_INTERCEPTORS} from '@angular/common/http';
import { Ng2Webstorage, LocalStorageService, SessionStorageService } from 'ngx-webstorage'; import {Ng2Webstorage, LocalStorageService, SessionStorageService} from 'ngx-webstorage';
import { JhiEventManager } from 'ng-jhipster'; import {JhiEventManager} from 'ng-jhipster';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { HttpModule } from "@angular/http"; import {HttpModule} from '@angular/http';
import { AuthInterceptor } from './blocks/interceptor/auth.interceptor'; import {AuthInterceptor} from './blocks/interceptor/auth.interceptor';
import { AuthExpiredInterceptor } from './blocks/interceptor/auth-expired.interceptor'; import {AuthExpiredInterceptor} from './blocks/interceptor/auth-expired.interceptor';
import { ErrorHandlerInterceptor } from './blocks/interceptor/errorhandler.interceptor'; import {ErrorHandlerInterceptor} from './blocks/interceptor/errorhandler.interceptor';
import { NotificationInterceptor } from './blocks/interceptor/notification.interceptor'; import {NotificationInterceptor} from './blocks/interceptor/notification.interceptor';
import { BootappSharedModule, UserRouteAccessService } from './shared'; import {BootappSharedModule, UserRouteAccessService} from './shared';
import { PaginationConfig } from './blocks/config/uib-pagination.config'; import {PaginationConfig} from './blocks/config/uib-pagination.config';
import { FileUploadModule } from 'ng2-file-upload'; import {FileUploadModule} from 'ng2-file-upload';
import {CommonModule, LocationStrategy, PathLocationStrategy} from '@angular/common'; import {CommonModule, LocationStrategy, PathLocationStrategy} from '@angular/common';
import { LayoutService } from "./layouts/layout.service"; import {LayoutService} from './layouts/layout.service';
import { NgxEchartsModule } from "ngx-echarts"; import {NgxEchartsModule} from 'ngx-echarts';
import { import {
FooterComponent, FooterComponent,
ProfileService,
PageRibbonComponent,
ErrorComponent ErrorComponent
} from './layouts'; } from './layouts';
import {AppComponent} from "./app.component"; import {AppComponent} from './app.component';
import {RouterModule} from "@angular/router"; import {RouterModule} from '@angular/router';
import { route } from "./app.route"; import {DEBUG_INFO_ENABLED} from './app.constants';
import {LoginGuard} from "./shared/common/loginGuard"; import {route} from './app.route';
import {LoginGuard} from './shared/common/loginGuard';
import {AppMainModule} from './app.main.module'; import {AppMainModule} from './app.main.module';
import {AppService} from './app.service'; import {AppService} from './app.service';
import {HostComponent} from './overAll/host.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -37,24 +41,27 @@ import {AppService} from './app.service'; ...@@ -37,24 +41,27 @@ import {AppService} from './app.service';
HttpModule, HttpModule,
BrowserAnimationsModule, BrowserAnimationsModule,
RouterModule, RouterModule,
Ng2Webstorage.forRoot({ prefix: 'smart', separator: '-'}), Ng2Webstorage.forRoot({prefix: 'smart', separator: '-'}),
BootappSharedModule, BootappSharedModule,
FileUploadModule, FileUploadModule,
CommonModule, CommonModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule.forRoot(route,{useHash: true}) RouterModule.forRoot(route, {useHash: true})
], ],
declarations: [ declarations: [
ErrorComponent, ErrorComponent,
PageRibbonComponent,
FooterComponent, FooterComponent,
AppComponent, AppComponent,
], ],
providers: [ providers: [
LayoutService, LayoutService,
ProfileService,
PaginationConfig, PaginationConfig,
LoginGuard, LoginGuard,
AppService, AppService,
HostComponent,
UserRouteAccessService, UserRouteAccessService,
{ {
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
...@@ -90,9 +97,9 @@ import {AppService} from './app.service'; ...@@ -90,9 +97,9 @@ import {AppService} from './app.service';
] ]
}, },
], ],
bootstrap: [ AppComponent ], bootstrap: [AppComponent],
schemas: [ CUSTOM_ELEMENTS_SCHEMA,NO_ERRORS_SCHEMA ], schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
exports:[ exports: []
]
}) })
export class BootappAppModule {} export class BootappAppModule {
}
This diff is collapsed.
import { ITEMS_PER_PAGE } from '../../shared';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { NgbPaginationConfig} from '@ng-bootstrap/ng-bootstrap'; import { NgbPaginationConfig} from '@ng-bootstrap/ng-bootstrap';
...@@ -8,6 +8,7 @@ export class PaginationConfig { ...@@ -8,6 +8,7 @@ export class PaginationConfig {
constructor(private config: NgbPaginationConfig) { constructor(private config: NgbPaginationConfig) {
config.boundaryLinks = true; config.boundaryLinks = true;
config.maxSize = 5; config.maxSize = 5;
config.pageSize = ITEMS_PER_PAGE;
config.size = 'sm'; config.size = 'sm';
} }
} }
...@@ -6,11 +6,13 @@ import { ...@@ -6,11 +6,13 @@ import {
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do'; import 'rxjs/add/operator/do';
import { LoginService } from '../../shared/login/login.service'; import { LoginService } from '../../shared/login/login.service';
import {NzMessageService} from 'ng-zorro-antd';
export class AuthExpiredInterceptor implements HttpInterceptor { export class AuthExpiredInterceptor implements HttpInterceptor {
constructor( constructor(
private injector: Injector private injector: Injector,
private message: NzMessageService,
) {} ) {}
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<div nz-col nzSpan="12" class="layui-header "> <div nz-col nzSpan="12" class="layui-header ">
<ng-container *ngIf="editType == '只读模式'"> <ng-container *ngIf="editType == '只读模式'">
<nz-select style="width: 200px;" nzPlaceHolder="选择背景色" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()"> <nz-select style="width: 200px;" nzPlaceHolder="选择背景色" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()">
<nz-option nzLabel="深蓝" nzValue="#3d76ab"></nz-option>
<nz-option nzLabel="白色" nzValue="#ffffff"></nz-option> <nz-option nzLabel="白色" nzValue="#ffffff"></nz-option>
<nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option> <nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option>
<nz-option nzLabel="棕色" nzValue="#cbb492"></nz-option> <nz-option nzLabel="棕色" nzValue="#cbb492"></nz-option>
...@@ -44,7 +45,7 @@ ...@@ -44,7 +45,7 @@
</ng-container> </ng-container>
<ng-container *ngIf="editType == '编辑模式'"> <ng-container *ngIf="editType == '编辑模式'">
<span onClick="editor.utils.deleteSelectedNodes()">移除</span> <span onClick="editor.utils.deleteSelectedNodes()">移除</span>
<nz-select style="width: 200px;" nzPlaceHolder="选择线条" [(ngModel)]="lineType" (ngModelChange)="changeLine($event)"> <nz-select style="width: 200px;" nzPlaceHolder="选择线条" (ngModelChange)="changeLine($event)">
<nz-option nzLabel="直线" nzValue="1"></nz-option> <nz-option nzLabel="直线" nzValue="1"></nz-option>
<nz-option nzLabel="折线(横向)" nzValue="2"></nz-option> <nz-option nzLabel="折线(横向)" nzValue="2"></nz-option>
<nz-option nzLabel="折线(纵向)" nzValue="3"></nz-option> <nz-option nzLabel="折线(纵向)" nzValue="3"></nz-option>
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
</ng-container> </ng-container>
</div> </div>
</div> </div>
<div class="container"> <div class="topo-container">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-md12"> <div class="layui-col-md12">
<div #topologyBody id="topology-body" class="topology-context"> <div #topologyBody id="topology-body" class="topology-context">
......
...@@ -23,24 +23,29 @@ import {NzMessageService} from 'ng-zorro-antd'; ...@@ -23,24 +23,29 @@ import {NzMessageService} from 'ng-zorro-antd';
.chart-left p { .chart-left p {
margin-left: 20px; margin-left: 20px;
} }
.header > div{
.header > div {
height: 250px; height: 250px;
position: relative; position: relative;
} }
.header div > .position-center{
.header div > .position-center {
position: absolute; position: absolute;
width: 100%; width: 100%;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%,-50%); transform: translate(-50%, -50%);
} }
.p1{
.p1 {
font-size: 20px; font-size: 20px;
} }
.p2{
.p2 {
font-size: 40px; font-size: 40px;
} }
.spanBorder span.select{
.spanBorder span.select {
border: 1px solid #6097b7; border: 1px solid #6097b7;
color: #6097b7; color: #6097b7;
} }
...@@ -76,7 +81,7 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -76,7 +81,7 @@ export class EffectAnalysisComponent implements OnInit {
chartUser; chartUser;
constructor(private busineSer: BusinessService, private overAllSer: OverAllService, constructor(private busineSer: BusinessService, private overAllSer: OverAllService,
private datePipe: DatePipe,private message:NzMessageService) { private datePipe: DatePipe, private message: NzMessageService) {
} }
ngOnInit() { ngOnInit() {
...@@ -183,7 +188,11 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -183,7 +188,11 @@ export class EffectAnalysisComponent implements OnInit {
echartData.forEach((value, index, array) => { echartData.forEach((value, index, array) => {
total += value.value; total += value.value;
}); });
if (params.value == 0) {
percent = 0;
} else if (params.value > 0) {
percent = ((params.value / total) * 100).toFixed(1); percent = ((params.value / total) * 100).toFixed(1);
}
return '{black|' + params.name + ':}{black|' + params.value + '个}\n{black|' + percent + '%}'; return '{black|' + params.name + ':}{black|' + params.value + '个}\n{black|' + percent + '%}';
}, },
rich: rich rich: rich
...@@ -199,7 +208,7 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -199,7 +208,7 @@ export class EffectAnalysisComponent implements OnInit {
this.busineSer.findRoot().subscribe( this.busineSer.findRoot().subscribe(
(res) => { (res) => {
this.rootList = res.data; this.rootList = res.data;
if(this.rootList.length > 0 ){ if (this.rootList.length > 0) {
this.serviceId = this.rootList[0].serviceid; this.serviceId = this.rootList[0].serviceid;
this.changeService(); this.changeService();
} }
...@@ -224,37 +233,37 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -224,37 +233,37 @@ export class EffectAnalysisComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.webList = res.data; this.webList = res.data;
if(this.webList.length > 0){ if (this.webList.length > 0) {
this.selectHttp(this.webList[0]); this.selectHttp(this.webList[0]);
} }
this.noData = false; this.noData = false;
}else{ } else {
this.noData = true; this.noData = true;
this.message.info(res.errMsg) this.message.info(res.errMsg);
} }
} }
); );
} }
//用户数量趋势 //用户数量趋势
userCount(){ userCount() {
const data = { const data = {
startTime:this.obj.startTime, startTime: this.obj.startTime,
endTime:this.obj.endTime, endTime: this.obj.endTime,
serviceId:this.serviceId serviceId: this.serviceId
} };
this.busineSer.userCount(data).subscribe( this.busineSer.userCount(data).subscribe(
(res)=>{ (res) => {
const response = res.data; const response = res.data;
if(response.length > 0){ if (response.length > 0) {
this.chartUser = { this.chartUser = {
legend: { legend: {
right: 20, right: 20,
data: ['在线用户数','重要用户数'] data: ['在线用户数', '重要用户数']
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: response.map(e=>{ data: response.map(e => {
return e.createTime; return e.createTime;
}), }),
boundaryGap: false, boundaryGap: false,
...@@ -263,7 +272,7 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -263,7 +272,7 @@ export class EffectAnalysisComponent implements OnInit {
}, },
}, },
yAxis: { yAxis: {
name : '人数', name: '人数',
type: 'value', type: 'value',
axisTick: { axisTick: {
show: false show: false
...@@ -275,7 +284,7 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -275,7 +284,7 @@ export class EffectAnalysisComponent implements OnInit {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbolSize: 6, symbolSize: 6,
data: response.map(e=>{ data: response.map(e => {
return e.onlineUser; return e.onlineUser;
}), }),
itemStyle: { itemStyle: {
...@@ -294,7 +303,7 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -294,7 +303,7 @@ export class EffectAnalysisComponent implements OnInit {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbolSize: 6, symbolSize: 6,
data: response.map(e=>{ data: response.map(e => {
return e.onlineImportantUser; return e.onlineImportantUser;
}), }),
itemStyle: { itemStyle: {
...@@ -310,11 +319,11 @@ export class EffectAnalysisComponent implements OnInit { ...@@ -310,11 +319,11 @@ export class EffectAnalysisComponent implements OnInit {
}] }]
}; };
this.userData = true; this.userData = true;
}else{ } else {
this.userData = false; this.userData = false;
} }
} }
) );
} }
//选择网站监测 //选择网站监测
......
<div #topologyBody id="topology-body" class="topology-context" style="height: 400px;">
<nz-spin [nzSpinning]="isLoading">
<canvas class="topology-context" id="topology-canvas" width="1190" height="520" #topologyCanvas>
您的浏览器不支持HTML5!
</canvas>
</nz-spin>
</div>
import {AfterViewInit, Component, ElementRef, OnInit, Renderer2, ViewChild} from '@angular/core'; import {AfterViewInit, Component, ElementRef, OnInit, Renderer2, ViewChild} from '@angular/core';
import { JhiEventManager } from 'ng-jhipster'; import {JhiEventManager} from 'ng-jhipster';
import { Principal } from '../shared'; import { Principal} from '../shared';
import {OverAllService} from '../overAll/overAll.service'; import {OverAllService} from '../overAll/overAll.service';
import {color, pageSize} from '../app.constants'; import {color, pageSize} from '../app.constants';
import {AlarmService} from '../alarm/alarm.service'; import {AlarmService} from '../alarm/alarm.service';
......
...@@ -3,4 +3,7 @@ export * from './error/error.route'; ...@@ -3,4 +3,7 @@ export * from './error/error.route';
export * from './main/main.component'; export * from './main/main.component';
export * from './footer/footer.component'; export * from './footer/footer.component';
export * from './navbar/navbar.component'; export * from './navbar/navbar.component';
export * from './profiles/page-ribbon.component';
export * from './profiles/profile.service';
export * from './profiles/profile-info.model';
export * from './sidebar/sidebar.component'; export * from './sidebar/sidebar.component';
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<nz-sider [nzWidth]="200"> <nz-sider [nzWidth]="200">
<jhi-sidebar></jhi-sidebar> <jhi-sidebar></jhi-sidebar>
</nz-sider> </nz-sider>
<nz-layout> <nz-layout class="layout-content">
<jhi-navbar></jhi-navbar> <jhi-navbar></jhi-navbar>
<nz-content> <nz-content>
<div class="container" #container> <div class="container" #container>
......
...@@ -13,6 +13,16 @@ import {Subscription} from 'rxjs'; ...@@ -13,6 +13,16 @@ import {Subscription} from 'rxjs';
selector: 'jhi-main', selector: 'jhi-main',
templateUrl: './main.component.html', templateUrl: './main.component.html',
styles:[` styles:[`
.layout{
display: -ms-flexbox;
-ms-flex-direction:row;
}
.layout-content{
display: -ms-flexbox;
-ms-flex-direction: column;
-ms-flex: auto;
width: 80%;
}
`] `]
}) })
export class JhiMainComponent implements OnInit { export class JhiMainComponent implements OnInit {
......
...@@ -11,20 +11,20 @@ ...@@ -11,20 +11,20 @@
</span> </span>
</div> </div>
<div nz-col [nzSpan]="12" style="text-align: right"> <div nz-col [nzSpan]="12" style="text-align: right">
<nz-select style="width: 100px;" [(ngModel)]="theme" (ngModelChange)="changeTheme()"> <nz-select style="width: 150px;margin-right: 20px" [(ngModel)]="theme" (ngModelChange)="changeTheme()">
<ng-container *ngFor="let item of themeList"> <ng-container *ngFor="let item of themeList">
<nz-option [nzValue]="item.value" [nzLabel]="item.label"></nz-option> <nz-option [nzValue]="item.value" [nzLabel]="item.label"></nz-option>
</ng-container> </ng-container>
</nz-select> </nz-select>
<nz-dropdown [nzTrigger]="'click'"> <nz-dropdown [nzTrigger]="'click'">
<a nz-dropdown>{{user.loginName}}<i class="anticon anticon-down"></i> <a nz-dropdown style="color: #bfbfbf">{{user.loginName}}<i class="anticon anticon-down"></i>
</a> </a>
<ul nz-menu> <ul nz-menu>
<li (click)="showPasswordModal()" nz-menu-item>修改密码</li> <li (click)="showPasswordModal()" nz-menu-item>修改密码</li>
<ng-container *ngIf="roleType == 3"> <ng-container *ngIf="roleType == 3">
<li (click)="showSeparationModal()" nz-menu-item>三员分立</li> <li (click)="showSeparationModal()" nz-menu-item>三员分立</li>
</ng-container> </ng-container>
<li nz-menu-item (click)="logout()" >退出</li> <li nz-menu-item (click)="logout()">退出</li>
</ul> </ul>
</nz-dropdown> </nz-dropdown>
</div> </div>
......
...@@ -2,6 +2,7 @@ import {AfterViewChecked, Component, ElementRef, OnChanges, OnInit, ViewChild} f ...@@ -2,6 +2,7 @@ import {AfterViewChecked, Component, ElementRef, OnChanges, OnInit, ViewChild} f
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ProfileService } from '../profiles/profile.service';
import { Principal, LoginService } from '../../shared'; import { Principal, LoginService } from '../../shared';
import {ThemeList, VERSION} from '../../app.constants'; import {ThemeList, VERSION} from '../../app.constants';
...@@ -48,6 +49,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -48,6 +49,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
constructor( constructor(
private loginService: LoginService, private loginService: LoginService,
private principal: Principal, private principal: Principal,
private profileService: ProfileService,
private router: Router, private router: Router,
private appSer:AppService, private appSer:AppService,
private $localStorage:LocalStorageService, private $localStorage:LocalStorageService,
......
import { Component, OnInit } from '@angular/core';
import { ProfileService } from './profile.service';
import { ProfileInfo } from './profile-info.model';
@Component({
selector: 'jhi-page-ribbon',
template: ``,
styleUrls: [
'page-ribbon.css'
]
})
export class PageRibbonComponent implements OnInit {
profileInfo: ProfileInfo;
ribbonEnv: string;
constructor(private profileService: ProfileService) {}
ngOnInit() {
// this.profileService.getProfileInfo().then((profileInfo) => {
// this.profileInfo = profileInfo;
// this.ribbonEnv = profileInfo.ribbonEnv;
// });
}
}
/* ==========================================================================
Developement Ribbon
========================================================================== */
.ribbon {
background-color: rgba(170, 0, 0, 0.5);
left: -3.5em;
moz-transform: rotate(-45deg);
ms-transform: rotate(-45deg);
o-transform: rotate(-45deg);
webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
overflow: hidden;
position: absolute;
top: 40px;
white-space: nowrap;
width: 15em;
z-index: 9999;
pointer-events: none;
opacity: 0.75;
}
.ribbon a {
color: #fff;
display: block;
font-weight: 400;
margin: 1px 0;
padding: 10px 50px;
text-align: center;
text-decoration: none;
text-shadow: 0 0 5px #444;
pointer-events: none;
}
export class ProfileInfo {
activeProfiles: string[];
ribbonEnv: string;
inProduction: boolean;
swaggerEnabled: boolean;
}
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { SERVER_API_URL } from '../../app.constants';
import { ProfileInfo } from './profile-info.model';
@Injectable()
export class ProfileService {
private profileInfoUrl = SERVER_API_URL + 'api/profile-info';
private profileInfo: Promise<ProfileInfo>;
constructor(private http: HttpClient) { }
getProfileInfo(): Promise<ProfileInfo> {
if (!this.profileInfo) {
this.profileInfo = this.http.get<ProfileInfo>(this.profileInfoUrl, { observe: 'response' })
.map((res: HttpResponse<ProfileInfo>) => {
const data = res.body;
const pi = new ProfileInfo();
pi.activeProfiles = data.activeProfiles;
pi.ribbonEnv = data.ribbonEnv;
pi.inProduction = data.activeProfiles.includes('prod') ;
pi.swaggerEnabled = data.activeProfiles.includes('swagger');
return pi;
}).toPromise();
}
return this.profileInfo;
}
}
<div class="logo">智能运维监管平台</div> <div class="logo">
<!-- <div class="text-center">-->
<!-- <img class="margin-bottom-10" style="height: 35px;" src="../../../content/images/logo_gaocun.png" alt="高淳监狱智能运维管理系统">-->
<!-- </div>-->
{{systemName}}
</div>
<ul nz-menu [nzMode]="'inline'"> <ul nz-menu [nzMode]="'inline'">
<ng-container *ngFor="let item of menuList"> <ng-container *ngFor="let item of menuList">
<li nz-submenu (nzOpenChange)="openHandler(item)" [(nzOpen)]="item.checked"> <li nz-submenu (nzOpenChange)="openHandler(item)" [(nzOpen)]="item.checked">
......
...@@ -4,6 +4,7 @@ import {Http} from '@angular/http'; ...@@ -4,6 +4,7 @@ import {Http} from '@angular/http';
import {LayoutService} from '../layout.service'; import {LayoutService} from '../layout.service';
import {LocalStorageService, SessionStorageService} from 'ngx-webstorage'; import {LocalStorageService, SessionStorageService} from 'ngx-webstorage';
import {CommonService} from '../../shared/common/common.service'; import {CommonService} from '../../shared/common/common.service';
import {OverAllService} from '../../overAll/overAll.service';
@Component({ @Component({
selector: 'jhi-sidebar', selector: 'jhi-sidebar',
...@@ -18,16 +19,24 @@ import {CommonService} from '../../shared/common/common.service'; ...@@ -18,16 +19,24 @@ import {CommonService} from '../../shared/common/common.service';
export class SidebarComponent implements OnInit { export class SidebarComponent implements OnInit {
token: boolean; token: boolean;
menuList = []; menuList = [];
systemName;
constructor(public router: Router, private http: Http, constructor(public router: Router, private http: Http,
public layoutSer: LayoutService, public layoutSer: LayoutService,
public commonSer: CommonService, public commonSer: CommonService,
private overAll:OverAllService,
private $localStorage: LocalStorageService, private $localStorage: LocalStorageService,
private $sessionStorage: SessionStorageService) { private $sessionStorage: SessionStorageService) {
} }
ngOnInit() { ngOnInit() {
this.getMenu(); this.getMenu();
this.overAll.getSystem().subscribe(
(res)=>{
console.log(res);
this.systemName = res.main.name;
}
)
// this.menuList = this.commonSer.listToTree('id', 'parentId', this.menuList); // this.menuList = this.commonSer.listToTree('id', 'parentId', this.menuList);
} }
......
...@@ -257,7 +257,7 @@ export class BasicEditComponent implements OnInit { ...@@ -257,7 +257,7 @@ export class BasicEditComponent implements OnInit {
} }
interfaceArr.push(a); interfaceArr.push(a);
}); });
this.validateForm.interfaces = interfaceArr; this.validateForm.interfaceList = interfaceArr;
this.validateForm.groups = groupArr; this.validateForm.groups = groupArr;
this.isOkLoading = true; this.isOkLoading = true;
if (this.modalTitle == '编辑资源') { if (this.modalTitle == '编辑资源') {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<tbody> <tbody>
<tr *ngFor="let data of warnList"> <tr *ngFor="let data of warnList">
<td class="table-timeline"> <td class="table-timeline">
<nz-timeline-item>{{data.clock | date:"yyyy-MM-dd HH:mm:ss"}}</nz-timeline-item> <nz-timeline-item>{{data.newClock | date:"yyyy-MM-dd HH:mm:ss"}}</nz-timeline-item>
</td> </td>
<td class="round-tag tag-form"> <td class="round-tag tag-form">
<nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="'#fc0d1b'"></nz-tag> <nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="'#fc0d1b'"></nz-tag>
......
...@@ -33,6 +33,11 @@ export class WarnListComponent implements OnInit { ...@@ -33,6 +33,11 @@ export class WarnListComponent implements OnInit {
// this.getList(); // this.getList();
} }
outGet(obj){
this.pageNum = 1;
this.getList(obj);
}
getList(obj) { getList(obj) {
this.obj = obj; this.obj = obj;
this.loading = true; this.loading = true;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<div nz-col nzSpan="12" class="layui-header "> <div nz-col nzSpan="12" class="layui-header ">
<ng-container *ngIf="editType == '只读模式'"> <ng-container *ngIf="editType == '只读模式'">
<nz-select style="width: 200px;" nzPlaceHolder="选择背景色" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()"> <nz-select style="width: 200px;" nzPlaceHolder="选择背景色" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()">
<nz-option nzLabel="深蓝" nzValue="#3d76ab"></nz-option>
<nz-option nzLabel="白色" nzValue="#ffffff"></nz-option> <nz-option nzLabel="白色" nzValue="#ffffff"></nz-option>
<nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option> <nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option>
<nz-option nzLabel="棕色" nzValue="#cbb492"></nz-option> <nz-option nzLabel="棕色" nzValue="#cbb492"></nz-option>
...@@ -76,7 +77,7 @@ ...@@ -76,7 +77,7 @@
</ng-container> </ng-container>
</div> </div>
</div> </div>
<div class="container"> <div class="topo-container">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-md12"> <div class="layui-col-md12">
<div #topologyBody id="topology-body" class="topology-context"> <div #topologyBody id="topology-body" class="topology-context">
......
...@@ -9,7 +9,6 @@ import {NodeComponent} from '../model/node/node.component'; ...@@ -9,7 +9,6 @@ import {NodeComponent} from '../model/node/node.component';
import {SelectRadioGroupComponent} from '../../modal/select-radio-group/select-radio-group.component'; import {SelectRadioGroupComponent} from '../../modal/select-radio-group/select-radio-group.component';
declare let editor: any; declare let editor: any;
declare var layui: any;
@Component({ @Component({
selector: 'smart-ne-topology', selector: 'smart-ne-topology',
...@@ -398,13 +397,13 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -398,13 +397,13 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
// } // }
if(e1.status == 1){ if(e1.status == 1){
e2.alarm = "危险"; e2.alarm = "危险";
e2.fontColor='0,0,0'; // e2.fontColor='0,0,0';
e2.alarmColor='255,153,18'; e2.alarmColor='255,153,18';
e2.alarmAlpha=0.9; e2.alarmAlpha=0.9;
} }
if(e1.status == 2){ if(e1.status == 2){
e2.alarm = "故障"; e2.alarm = "故障";
e2.fontColor='0,0,0'; // e2.fontColor='0,0,0';
e2.alarmAlpha=0.9; e2.alarmAlpha=0.9;
} }
} }
...@@ -427,7 +426,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -427,7 +426,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
response.forEach(e1=>{ response.forEach(e1=>{
arr.forEach(e2=>{ arr.forEach(e2=>{
if(e1.linkId == e2.id){ if(e1.linkId == e2.id){
e2.text = "进口流量:"+e1.fullValueIn+" 出口流量:"+e1.fullValueOut; e2.text = "In:"+e1.fullValueIn+" Out:"+e1.fullValueOut;
} }
}) })
}); });
......
...@@ -31,19 +31,23 @@ ...@@ -31,19 +31,23 @@
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<span>监控设备数:{{deviceNo}}</span> <span>监控设备数:{{deviceNo}}</span>
<span>设备状态: <span>设备状态:
<span [ngClass]="{'select-border': status == '正常'}" (click)="changeStatus('正常')" style="margin-right: 8px" > <nz-tag class="tag-green" [nzColor]="color.green"></nz-tag> <span [ngClass]="{'select-border': status == '正常'}" (click)="changeStatus('正常')" style="margin-right: 8px"> <nz-tag
class="tag-green" [nzColor]="color.green"></nz-tag>
<i *ngIf="!green && green !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!green && green !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{green}} {{green}}
</span> </span>
<span [ngClass]="{'select-border': status == '告警'}" (click)="changeStatus('告警')" style="margin-right: 8px"> <nz-tag class="tag-yellow" [nzColor]="color.yellow"></nz-tag> <span [ngClass]="{'select-border': status == '告警'}" (click)="changeStatus('告警')" style="margin-right: 8px"> <nz-tag
class="tag-yellow" [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!yellow && yellow != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!yellow && yellow != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{yellow}} {{yellow}}
</span> </span>
<span [ngClass]="{'select-border': status == '严重'}" (click)="changeStatus('严重')" style="margin-right: 8px"> <nz-tag class="tag-red" [nzColor]="color.red"></nz-tag> <span [ngClass]="{'select-border': status == '严重'}" (click)="changeStatus('严重')" style="margin-right: 8px"> <nz-tag
class="tag-red" [nzColor]="color.red"></nz-tag>
<i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{red}} {{red}}
</span> </span>
<span [ngClass]="{'select-border': status == '禁用'}" (click)="changeStatus('禁用')"> <nz-tag [nzColor]="color.gray"></nz-tag> <span [ngClass]="{'select-border': status == '禁用'}" (click)="changeStatus('禁用')"> <nz-tag
[nzColor]="color.gray"></nz-tag>
<i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{gray}} {{gray}}
</span> </span>
...@@ -97,7 +101,7 @@ ...@@ -97,7 +101,7 @@
</ng-container> </ng-container>
<!--子集--> <!--子集-->
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
<td nzShowCheckbox [nzIndeterminate]="indeterminate" <td nzShowCheckbox
(nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td> (nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td>
<td class="cursor main-color" [nzIndentSize]="item.level*20"> <td class="cursor main-color" [nzIndentSize]="item.level*20">
<span (click)="goDetail(item)">{{item.name}}</span> <span (click)="goDetail(item)">{{item.name}}</span>
...@@ -189,8 +193,8 @@ ...@@ -189,8 +193,8 @@
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li> <li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li>
<li (click)="goDetail(item)" nz-menu-item><a>查看监测点</a></li> <li (click)="goDetail(item)" nz-menu-item><a>查看监测点</a></li>
<li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li> <li (click)="showAlarm()" nz-menu-item><a>添加告警</a></li>
<li (click)="showAlarm(item)" nz-menu-item><a>关联资产</a></li> <li (click)="showAlarm()" nz-menu-item><a>关联资产</a></li>
</ul> </ul>
</nz-dropdown> </nz-dropdown>
</ng-container> </ng-container>
...@@ -210,12 +214,13 @@ ...@@ -210,12 +214,13 @@
<td></td> <td></td>
<td [nzIndentSize]="item.level*20" nzShowExpand [nzExpand]='item.expand' <td [nzIndentSize]="item.level*20" nzShowExpand [nzExpand]='item.expand'
(nzExpandChange)="getChildren(item)"> (nzExpandChange)="getChildren(item)">
<span>{{item.name}} <span style="color: #1b6b5b; margin-left: 10px">主机数量:{{item.hostcount}}</span> </span> <span>{{item.name}} <span
style="color: #1b6b5b; margin-left: 10px">主机数量:{{item.hostcount}}</span> </span>
</td> </td>
</ng-container> </ng-container>
<!--子集--> <!--子集-->
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
<td nzShowCheckbox [nzIndeterminate]="indeterminate" <td nzShowCheckbox
(nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td> (nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td>
<td class="cursor main-color" [nzIndentSize]="item.level*20"> <td class="cursor main-color" [nzIndentSize]="item.level*20">
<span (click)="goDetail(item)">{{item.name}}</span> <span (click)="goDetail(item)">{{item.name}}</span>
...@@ -294,7 +299,7 @@ ...@@ -294,7 +299,7 @@
</td> </td>
<td class="handle main-color"> <td class="handle main-color">
<ng-container *ngIf="!item.level"> <ng-container *ngIf="!item.level">
<span (click)="showBasicEditModal(item)">添加资源</span> <span (click)="showBasicEditModal()">添加资源</span>
<span (click)="updateGroup(item)">编辑</span> <span (click)="updateGroup(item)">编辑</span>
<span (click)="showDeleteGroupConfirm(item)">删除</span> <span (click)="showDeleteGroupConfirm(item)">删除</span>
</ng-container> </ng-container>
...@@ -306,14 +311,15 @@ ...@@ -306,14 +311,15 @@
<a nz-dropdown>更多 <i class="anticon anticon-down main-color"></i> <a nz-dropdown>更多 <i class="anticon anticon-down main-color"></i>
</a> </a>
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li *ngIf="!item.monitorTask" (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li> <li *ngIf="!item.monitorTask" (click)="showTempStop(item)" nz-menu-item>
<a>临时暂停</a></li>
<li (click)="openHost(item)" nz-menu-item><a> <li (click)="openHost(item)" nz-menu-item><a>
<ng-container *ngIf="item.status == 1">开启</ng-container> <ng-container *ngIf="item.status == 1">开启</ng-container>
<ng-container *ngIf="item.status == 0">停止</ng-container> <ng-container *ngIf="item.status == 0">停止</ng-container>
监控 监控
</a></li> </a></li>
<li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li> <li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li>
<li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li> <li (click)="showAlarm()" nz-menu-item><a>添加告警</a></li>
</ul> </ul>
</nz-dropdown> </nz-dropdown>
</ng-container> </ng-container>
...@@ -328,13 +334,16 @@ ...@@ -328,13 +334,16 @@
<ng-container *ngIf="searchStatus"> <ng-container *ngIf="searchStatus">
<nz-table #nzTable [nzData]="dataSet" [nzLoading]="loading" [nzFrontPagination]="false" [nzShowPagination]="true" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="dataSet" [nzLoading]="loading" [nzFrontPagination]="false" [nzShowPagination]="true"
[nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
(nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th [nzChecked]="allChecked"></th> <th [nzChecked]="allChecked"></th>
<th>名称</th> <th>名称</th>
<th>状态</th> <th>状态</th>
<th>关联资产</th> <th>关联资产</th>
<th>设备类型</th>
<th>可用性</th> <th>可用性</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
...@@ -342,7 +351,7 @@ ...@@ -342,7 +351,7 @@
<tbody> <tbody>
<ng-container *ngFor="let item of nzTable.data"> <ng-container *ngFor="let item of nzTable.data">
<tr> <tr>
<td nzShowCheckbox [nzIndeterminate]="indeterminate" (nzCheckedChange)="selectChecked($event,item)" <td nzShowCheckbox (nzCheckedChange)="selectChecked($event,item)"
[(nzChecked)]="item.checked"></td> [(nzChecked)]="item.checked"></td>
<td class="cursor main-color"> <td class="cursor main-color">
<span (click)="goDetail(item)">{{item.name}}</span> <span (click)="goDetail(item)">{{item.name}}</span>
...@@ -430,7 +439,7 @@ ...@@ -430,7 +439,7 @@
监控 监控
</a></li> </a></li>
<li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li> <li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li>
<li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li> <li (click)="showAlarm()" nz-menu-item><a>添加告警</a></li>
</ul> </ul>
</nz-dropdown> </nz-dropdown>
</td> </td>
......
...@@ -12,16 +12,16 @@ import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component ...@@ -12,16 +12,16 @@ import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component
templateUrl: './network-check.component.html', templateUrl: './network-check.component.html',
styles: [ styles: [
` `
:host ::ng-deep .table-dropdown a{ :host ::ng-deep .table-dropdown a {
font-weight: 300; font-weight: 300;
} }
` `
] ]
}) })
export class NetworkCheckComponent implements OnInit { export class NetworkCheckComponent implements OnInit {
@ViewChild('smartWebsite') smartWebsite:WebsiteComponent; @ViewChild('smartWebsite') smartWebsite: WebsiteComponent;
@ViewChild('smartPause') smartPause:PauseComponent; @ViewChild('smartPause') smartPause: PauseComponent;
@ViewChild('smartAlarmModal') smartAlarmModal:AlarmModalComponent; @ViewChild('smartAlarmModal') smartAlarmModal: AlarmModalComponent;
color = color; color = color;
dataSet; dataSet;
...@@ -35,19 +35,19 @@ export class NetworkCheckComponent implements OnInit { ...@@ -35,19 +35,19 @@ export class NetworkCheckComponent implements OnInit {
totalNum; totalNum;
checkStatus = { checkStatus = {
type:{ type: {
seriousNum:null, seriousNum: null,
notNum:null, notNum: null,
warnNum:null, warnNum: null,
normalNum:null normalNum: null
}, },
total:null total: null
}; };
batchSelectList = []; batchSelectList = [];
constructor(private overAllSer: OverAllService,private router:Router, constructor(private overAllSer: OverAllService, private router: Router,
private modalService:NzModalService,private message:NzMessageService) { private modalService: NzModalService, private message: NzMessageService) {
} }
ngOnInit() { ngOnInit() {
...@@ -59,86 +59,84 @@ export class NetworkCheckComponent implements OnInit { ...@@ -59,86 +59,84 @@ export class NetworkCheckComponent implements OnInit {
getwebList() { getwebList() {
this.loading = true; this.loading = true;
const data = { const data = {
name:this.name, name: this.name,
eventPage:this.pageIndex, eventPage: this.pageIndex,
pageRecords:this.pageSize pageRecords: this.pageSize
}; };
this.overAllSer.findWebscenario(data).subscribe( this.overAllSer.findWebscenario(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) {
this.dataSet = res.data.data; this.dataSet = res.data.data;
this.totalNum = res.data.totalNum; this.totalNum = res.data.totalNum;
}
this.loading = false; this.loading = false;
} }
); );
} }
//详情 //详情
goDetail(item){ goDetail(item) {
this.router.navigate(['app/main/network-detail'],{ this.router.navigate(['app/main/network-detail'], {
queryParams:{ queryParams: {
httptestid:item.httptestid, httptestid: item.httptestid,
name:item.name name: item.name
} }
}) });
} }
//监测状态 //监测状态
getCheckStatus() { getCheckStatus() {
this.overAllSer.countStatus().subscribe( this.overAllSer.countStatus().subscribe(
(res)=>{ (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
this.checkStatus = res.data; this.checkStatus = res.data;
}else{ } else {
this.message.info(res.errMsg); this.message.error(res.errMsg);
} }
} }
) );
} }
//选中 //选中
selectChecked(event,item){ selectChecked(event, item) {
if(event){ if (event) {
this.batchSelectList.push(item.httptestid); this.batchSelectList.push(item.httptestid);
}else{ } else {
const index = this.batchSelectList.indexOf(item.hostid); const index = this.batchSelectList.indexOf(item.hostid);
this.batchSelectList.splice(index,1); this.batchSelectList.splice(index, 1);
} }
} }
//单个开启关闭 //单个开启关闭
operationHost(item,status,operation){ operationHost(item, status, operation) {
this.batchSelectList.push(item.httptestid); this.batchSelectList.push(item.httptestid);
this.openBatchHost(status,operation); this.openBatchHost(status, operation);
} }
//添加网站 //添加网站
showAddmodal(){ showAddmodal() {
this.smartWebsite.showAddModal(); this.smartWebsite.showAddModal();
} }
//编辑网站 //编辑网站
editBasicModal(item){ editBasicModal(item) {
this.smartWebsite.showEditModal(item.httptestid) this.smartWebsite.showEditModal(item.httptestid);
} }
//批量开启or关闭 //批量开启or关闭
openBatchHost(status,operation){ openBatchHost(status, operation) {
if(this.batchSelectList.length == 0){ if (this.batchSelectList.length == 0) {
this.message.info('请选择需要'+ operation +'的网站监测'); this.message.info('请选择需要' + operation + '的网站监测');
return false; return false;
} }
this.modalService.confirm({ this.modalService.confirm({
nzTitle: '监控', nzTitle: '监控',
nzContent: '确定'+operation+'网站监测?', nzContent: '确定' + operation + '网站监测?',
nzOkText: '确定', nzOkText: '确定',
nzCancelText: '取消', nzCancelText: '取消',
nzOnOk: () => { nzOnOk: () => {
const data = { const data = {
status:status, status: status,
ids:this.batchSelectList ids: this.batchSelectList
} };
this.overAllSer.statusBatch(data).subscribe( this.overAllSer.statusBatch(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -156,8 +154,8 @@ export class NetworkCheckComponent implements OnInit { ...@@ -156,8 +154,8 @@ export class NetworkCheckComponent implements OnInit {
} }
//批量删除 //批量删除
batchDeleteConfirm(){ batchDeleteConfirm() {
if(this.batchSelectList.length == 0){ if (this.batchSelectList.length == 0) {
this.message.info('请选择需要删除的网站监测'); this.message.info('请选择需要删除的网站监测');
return false; return false;
} }
...@@ -168,8 +166,8 @@ export class NetworkCheckComponent implements OnInit { ...@@ -168,8 +166,8 @@ export class NetworkCheckComponent implements OnInit {
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: () => { nzOnOk: () => {
const data = { const data = {
ids:this.batchSelectList ids: this.batchSelectList
} };
this.overAllSer.deleteBatch(data).subscribe( this.overAllSer.deleteBatch(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -188,7 +186,7 @@ export class NetworkCheckComponent implements OnInit { ...@@ -188,7 +186,7 @@ export class NetworkCheckComponent implements OnInit {
} }
//单个删除 //单个删除
showDeleteConfirm(item){ showDeleteConfirm(item) {
this.modalService.confirm({ this.modalService.confirm({
nzTitle: '删除', nzTitle: '删除',
nzContent: '<b style="color: red;">确认要删除该网站监测吗?</b>', nzContent: '<b style="color: red;">确认要删除该网站监测吗?</b>',
...@@ -198,8 +196,8 @@ export class NetworkCheckComponent implements OnInit { ...@@ -198,8 +196,8 @@ export class NetworkCheckComponent implements OnInit {
let arr = []; let arr = [];
arr.push(item.httptestid); arr.push(item.httptestid);
const data = { const data = {
ids:arr ids: arr
} };
this.overAllSer.deleteBatch(data).subscribe( this.overAllSer.deleteBatch(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -218,12 +216,12 @@ export class NetworkCheckComponent implements OnInit { ...@@ -218,12 +216,12 @@ export class NetworkCheckComponent implements OnInit {
} }
//临时暂停 //临时暂停
showTempStop(item){ showTempStop(item) {
this.smartPause.showModal(item.httptestid,'网站监测'); this.smartPause.showModal(item.httptestid, '网站监测');
} }
//添加告警 //添加告警
showAlarm() { showAlarm() {
this.smartAlarmModal.showAddModal('添加告警',null); this.smartAlarmModal.showAddModal('添加告警', null);
} }
} }
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<span>监测数据图表</span> <span>监测数据图表</span>
</div> </div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" [nzButtonStyle]="'solid'"> <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" nzButtonStyle="'solid'">
<label nz-radio-button nzValue="1">今天</label> <label nz-radio-button nzValue="1">今天</label>
<label nz-radio-button nzValue="2">昨天</label> <label nz-radio-button nzValue="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label> <label nz-radio-button nzValue="3">三天</label>
......
...@@ -27,7 +27,7 @@ import {CommonService} from '../../../shared/common/common.service'; ...@@ -27,7 +27,7 @@ import {CommonService} from '../../../shared/common/common.service';
` `
] ]
}) })
export class NetworkDetailComponent implements OnInit, OnChanges { export class NetworkDetailComponent implements OnInit {
@ViewChild('chartSpeedLeft') chartSpeedLeft: ElementRef; @ViewChild('chartSpeedLeft') chartSpeedLeft: ElementRef;
@ViewChild('chartTimeLeft') chartTimeLeft: ElementRef; @ViewChild('chartTimeLeft') chartTimeLeft: ElementRef;
@ViewChild('smartWebsite') smartWebsite: WebsiteComponent; @ViewChild('smartWebsite') smartWebsite: WebsiteComponent;
...@@ -73,9 +73,6 @@ export class NetworkDetailComponent implements OnInit, OnChanges { ...@@ -73,9 +73,6 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
this.getNowStatus(); this.getNowStatus();
} }
ngOnChanges() {
}
//历史告警 //历史告警
findAlertList() { findAlertList() {
const data = { const data = {
......
...@@ -26,7 +26,7 @@ export class OverAllService { ...@@ -26,7 +26,7 @@ export class OverAllService {
//获取分组信息 --编辑页面获取分组 1 表示模板 0表示主机 //获取分组信息 --编辑页面获取分组 1 表示模板 0表示主机
getEditGroups(params): Observable<any> { getEditGroups(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getAllUpdate/'+ params); return this.http.get(SERVER_API_URL + '/groups/getAllUpdate/' + params);
} }
//资源列表--所有类型 //资源列表--所有类型
...@@ -326,52 +326,52 @@ export class OverAllService { ...@@ -326,52 +326,52 @@ export class OverAllService {
//创建模板 //创建模板
createTemplates(data): Observable<any> { createTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/create',data); return this.http.post(SERVER_API_URL + '/templates/create', data);
} }
//修改模板 //修改模板
updateTemplates(data): Observable<any> { updateTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/update',data); return this.http.post(SERVER_API_URL + '/templates/update', data);
} }
//克隆模板 //克隆模板
cloneTemplates(data): Observable<any> { cloneTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/clone',data); return this.http.post(SERVER_API_URL + '/templates/clone', data);
} }
//删除模板(支持批量删除) //删除模板(支持批量删除)
deleteTemplates(data): Observable<any> { deleteTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/delete',data); return this.http.post(SERVER_API_URL + '/templates/delete', data);
} }
//查询模板 //查询模板
findTemplates(data): Observable<any> { findTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/find',data); return this.http.post(SERVER_API_URL + '/templates/find', data);
} }
//添加主机自动发现 //添加主机自动发现
createLldrule(data): Observable<any> { createLldrule(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/lldrule/create',data); return this.http.post(SERVER_API_URL + '/lldrule/create', data);
} }
//修改主机自动发现 //修改主机自动发现
updateLldrule(data): Observable<any> { updateLldrule(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/lldrule/update',data); return this.http.post(SERVER_API_URL + '/lldrule/update', data);
} }
//主机自动发现列表 //主机自动发现列表
findPageLldrule(data): Observable<any> { findPageLldrule(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/lldrule/findPage',data); return this.http.post(SERVER_API_URL + '/lldrule/findPage', data);
} }
//删除主机自动发现 //删除主机自动发现
deleteLldrule(data): Observable<any> { deleteLldrule(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/lldrule/delete',data); return this.http.post(SERVER_API_URL + '/lldrule/delete', data);
} }
//自动发现 详情 //自动发现 详情
findLldrule(params): Observable<any> { findLldrule(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/lldrule/find/'+ params); return this.http.get(SERVER_API_URL + '/lldrule/find/' + params);
} }
//分页查询触发器 //分页查询触发器
...@@ -381,7 +381,7 @@ export class OverAllService { ...@@ -381,7 +381,7 @@ export class OverAllService {
//主键查询触发器原型 //主键查询触发器原型
findTriggerById(params): Observable<any> { findTriggerById(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/triggerPrototype/find/'+ params); return this.http.get(SERVER_API_URL + '/triggerPrototype/find/' + params);
} }
//删除触发器 //删除触发器
...@@ -421,7 +421,7 @@ export class OverAllService { ...@@ -421,7 +421,7 @@ export class OverAllService {
//主键查询监控项原型 //主键查询监控项原型
findItemById(params): Observable<any> { findItemById(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/itemprototype/find/'+ params); return this.http.get(SERVER_API_URL + '/itemprototype/find/' + params);
} }
//创建阈值 //创建阈值
...@@ -468,4 +468,76 @@ export class OverAllService { ...@@ -468,4 +468,76 @@ export class OverAllService {
findHostNew(data): Observable<any> { findHostNew(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/findHostNew', data); return this.http.post(SERVER_API_URL + '/host/findHostNew', data);
} }
//发送利用率排名
homeUseOrder(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/useOrder/' + params);
}
//查询业务系统的安全运行天数
findSafeRunDayList(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itservice/findSafeRunDayList', data);
}
//查询主机cpu内存使用率排名列表
runStateOrder(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/runStateOrder/' + params);
}
//查询主机发送接收流量排名列表
homeFlowOrder(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/flowOrder/' + params);
}
//查询监控项流量排名列表
flowOrderByItem(params1, params2): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/flowOrderByItem/' + params1 + '/' + params2);
}
// 无锡监狱
//查找所有有数据的网口
findNetworkCard(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/hostSwitch/findNetworkCard/' + params);
}
//查询网卡流量图表接口
findNetworkFlow(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/hostSwitch/findNetworkFlow', data);
}
//根据类型查询图表数据(右上角指标趋势)
findChartByKey(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/hostSwitch/findChartByKey', data);
}
//根据数据库类型查找数据库详细指标
findDatabaseDetailByHost(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemDatabase/findDatabaseDetailByHost', data);
}
//查找数据库详情指标
findIndexDetail(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemDatabase/findIndexDetail', data);
}
//查找数据库详情指标
findChartData(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemDatabase/findChartData', data);
}
//根据主机查询所有的数据库类型
findAllDatabaseByHost(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/itemDatabase/findAllDatabaseByHost/' + params);
}
//根据主机查询告警总数趋势图表
waringTrendByHost(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/statistics/waringTrendByHost', data);
}
//查询系统信息
getSystem(): Observable<any> {
return this.http.get( './json/system.json');
}
} }
...@@ -46,7 +46,7 @@ import 'core-js/es7/reflect'; ...@@ -46,7 +46,7 @@ import 'core-js/es7/reflect';
* Required to support Web Animations `@angular/animation`. * Required to support Web Animations `@angular/animation`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/ **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by Angular itself. * Zone JS is required by Angular itself.
...@@ -67,4 +67,3 @@ import 'zone.js/dist/zone'; // Included with Angular CLI. ...@@ -67,4 +67,3 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
*/ */
// import 'intl/locale-data/jsonp/en'; // import 'intl/locale-data/jsonp/en';
require('../manifest.webapp');
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