Commit 7332539f authored by wangqinghua's avatar wangqinghua

update

parent 739c58e4
......@@ -36,10 +36,9 @@ Module ng g module my-module
日志分析 logAnalysis
业务配置 bConfig
部署代码
scp -r 22 build/www root@10.10.38.99:/home/nginx
密码:Aa123456
版本更新:
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 @@
"@angular/platform-browser-dynamic": "5.2.0",
"@angular/router": "5.2.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0",
"@types/core-js": "0.9.35",
"classlist.js": "^1.1.20150312",
"core-js": "2.4.1",
"@types/core-js": "0.9.35",
"font-awesome": "4.7.0",
"g": "^2.0.1",
"ng-jhipster": "0.4.0",
......
......@@ -39,7 +39,7 @@
</nz-select>
</div>
<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="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label>
......
......@@ -56,7 +56,7 @@ export class AlarmListComponent implements OnInit {
constructor(public alarmSer: AlarmService, public overAllSer: OverAllService, public message: NzMessageService,
public datePipe: DatePipe,private commonSer:CommonService,private workSer:WorkService) {
this.changeType();
this.changeType('1');
}
ngOnInit() {
......@@ -90,39 +90,11 @@ export class AlarmListComponent implements OnInit {
}
//时间改变
changeType() {
const nowDate = new Date().getTime();
let day1, day2;
switch (this.timeType) {
case'1': {
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;
}
}
changeType(e) {
if(e == '5') return false;
const obj = this.commonSer.getTimeByType(e);
this.obj.startTime = obj.startTime;
this.obj.endTime = obj.endTime;
}
//查询
......
......@@ -24,6 +24,12 @@ import {WorkService} from '../../work/work.service';
padding: 2px 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{
margin-right: 0px;
}
......@@ -51,8 +57,8 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.search(null);
this.getType();
this.search(null);
this.time_ = setInterval(()=>{
this.search(null);
},2*60*1000);
......@@ -68,7 +74,7 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
isWaring:'yes',
hostid:hostid,
};
this.warnList.getList(obj);
this.warnList.outGet(obj);
}
getType(){
......
......@@ -55,6 +55,11 @@ export class AnalysisService {
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
commonProblemTop(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/commonProblemTop' ,data);
......
......@@ -33,7 +33,7 @@
</nz-select>
</div>
<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="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label>
......
......@@ -23,8 +23,8 @@ export class ResourceUsabilComponent implements OnInit {
//显示无数据图片
data = {
left:false,
right:false,
left: false,
right: false,
};
chartLastOption;
......@@ -43,7 +43,7 @@ export class ResourceUsabilComponent implements OnInit {
isDownload = false;
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() {
......@@ -61,7 +61,7 @@ export class ResourceUsabilComponent implements OnInit {
this.groupList = res.data;
this.obj.groupid = this.groupList[0].groupid + '';
this.search();
}else{
} else {
this.message.error(res.errMsg);
}
}
......@@ -73,18 +73,17 @@ export class ResourceUsabilComponent implements OnInit {
this.obj.type = 'top';
this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => {
if(res.errCode == 10000){
if(res.data.length > 0){
if (res.errCode == 10000) {
if (res.data.length > 0) {
this.data.left = false;
this.topList = res.data;
this.setTopEcharts();
}else{
} else {
this.data.left = true;
this.isLoading = false;
this.message.warning("可用性TOP暂无数据");
this.message.warning('可用性TOP暂无数据');
}
}else{
} else {
this.message.error(res.errMsg);
}
}
......@@ -92,21 +91,21 @@ export class ResourceUsabilComponent implements OnInit {
}
//设置top图表
setTopEcharts(){
setTopEcharts() {
this.chartTopOption = {
title: {
text: '可用性TOP 10'
},
tooltip : {
tooltip: {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
formatter: "{b} : {c}%"
formatter: '{b} : {c}%'
},
xAxis: {
type: 'category',
data: this.topList.map(e=>{
data: this.topList.map(e => {
return e.name;
}),
......@@ -121,8 +120,8 @@ export class ResourceUsabilComponent implements OnInit {
},
series: [{
name: '可用性TOP 10',
data: this.topList.map(e=>{
return (e.value).toFixed(2) *100;
data: this.topList.map(e => {
return (e.value).toFixed(2) * 100;
}),
type: 'bar'
}]
......@@ -135,18 +134,18 @@ export class ResourceUsabilComponent implements OnInit {
this.obj.type = 'last';
this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => {
if(res.errCode == 10000){
if(res.data.length > 0){
if (res.errCode == 10000) {
if (res.data.length > 0) {
this.data.right = false;
this.lastList = res.data;
this.setLastEcharts();
}else{
} else {
this.data.right = true;
this.isLoading = false;
this.message.warning("可用性Last暂无数据");
this.message.warning('可用性Last暂无数据');
}
}else{
} else {
this.message.error(res.errMsg);
}
}
......@@ -154,21 +153,21 @@ export class ResourceUsabilComponent implements OnInit {
}
//设置last图表
setLastEcharts(){
setLastEcharts() {
this.chartLastOption = {
title: {
text: '可用性LAST 10'
},
tooltip : {
tooltip: {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
formatter: "{b} : {c}%"
formatter: '{b} : {c}%'
},
xAxis: {
type: 'category',
data: this.lastList.map(e=>{
data: this.lastList.map(e => {
return e.name;
})
},
......@@ -182,8 +181,8 @@ export class ResourceUsabilComponent implements OnInit {
},
series: [{
name: '可用性LAST 10',
data: this.lastList.map(e=>{
return (e.value).toFixed(2) *100;
data: this.lastList.map(e => {
return (e.value).toFixed(2) * 100;
}),
type: 'bar'
}]
......@@ -239,7 +238,7 @@ export class ResourceUsabilComponent implements OnInit {
}
//导出 可用性
downLoadCommon(){
downLoadCommon() {
this.isDownload = true;
const data = {
groupid: this.obj.groupid,
......@@ -247,20 +246,20 @@ export class ResourceUsabilComponent implements OnInit {
endTime: this.obj.endTime,
};
this.analysisSer.findFailureRateImport(data).subscribe(
(res)=>{
if(res.errCode == 10000){
this.workSer.downloadTemplate('failureRate',res.data).subscribe(
(data)=>{
(res) => {
if (res.errCode == 10000) {
this.workSer.downloadTemplate('failureRate', res.data).subscribe(
(data) => {
this.isDownload = false;
this.commonSer.downloadFile('资源可用性统计.xlsx',data)
this.commonSer.downloadFile('资源可用性统计.xlsx', data);
}
)
}else{
);
} else {
this.isDownload = false;
this.message.error(res.errMsg);
}
}
)
);
}
}
......@@ -12,8 +12,7 @@ export class AppComponent {
document.body.ondrop = (event)=> {
event.preventDefault();
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';
export const SERVER_API_URL = '/zabbixBox';
export const BUILD_TIMESTAMP = process.env.BUILD_TIMESTAMP;
export const pageSize = 10;
//颜色
export const color = {
green:'#58ca13',
yellow:'#ffc029',
red:'#f44e4e',
gray:'#bfbfbf',
black:'#000000'
green: '#58ca13',
yellow: '#ffc029',
red: '#f44e4e',
gray: '#bfbfbf',
black: '#000000'
};
//主题
export const ThemeList = [
{ value:'white',label:'白色主题' },
{ value:'dark',label:'深色主题' },
]
{value: 'white', 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 {NgModule, Injector, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { Ng2Webstorage, LocalStorageService, SessionStorageService } from 'ngx-webstorage';
import { JhiEventManager } from 'ng-jhipster';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from "@angular/http";
import { AuthInterceptor } from './blocks/interceptor/auth.interceptor';
import { AuthExpiredInterceptor } from './blocks/interceptor/auth-expired.interceptor';
import { ErrorHandlerInterceptor } from './blocks/interceptor/errorhandler.interceptor';
import { NotificationInterceptor } from './blocks/interceptor/notification.interceptor';
import { BootappSharedModule, UserRouteAccessService } from './shared';
import { PaginationConfig } from './blocks/config/uib-pagination.config';
import { FileUploadModule } from 'ng2-file-upload';
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {Ng2Webstorage, LocalStorageService, SessionStorageService} from 'ngx-webstorage';
import {JhiEventManager} from 'ng-jhipster';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {AuthInterceptor} from './blocks/interceptor/auth.interceptor';
import {AuthExpiredInterceptor} from './blocks/interceptor/auth-expired.interceptor';
import {ErrorHandlerInterceptor} from './blocks/interceptor/errorhandler.interceptor';
import {NotificationInterceptor} from './blocks/interceptor/notification.interceptor';
import {BootappSharedModule, UserRouteAccessService} from './shared';
import {PaginationConfig} from './blocks/config/uib-pagination.config';
import {FileUploadModule} from 'ng2-file-upload';
import {CommonModule, LocationStrategy, PathLocationStrategy} from '@angular/common';
import { LayoutService } from "./layouts/layout.service";
import { NgxEchartsModule } from "ngx-echarts";
import {LayoutService} from './layouts/layout.service';
import {NgxEchartsModule} from 'ngx-echarts';
import {
FooterComponent,
ProfileService,
PageRibbonComponent,
ErrorComponent
} from './layouts';
import {AppComponent} from "./app.component";
import {RouterModule} from "@angular/router";
import { route } from "./app.route";
import {LoginGuard} from "./shared/common/loginGuard";
import {AppComponent} from './app.component';
import {RouterModule} from '@angular/router';
import {DEBUG_INFO_ENABLED} from './app.constants';
import {route} from './app.route';
import {LoginGuard} from './shared/common/loginGuard';
import {AppMainModule} from './app.main.module';
import {AppService} from './app.service';
import {HostComponent} from './overAll/host.component';
@NgModule({
imports: [
......@@ -37,24 +41,27 @@ import {AppService} from './app.service';
HttpModule,
BrowserAnimationsModule,
RouterModule,
Ng2Webstorage.forRoot({ prefix: 'smart', separator: '-'}),
Ng2Webstorage.forRoot({prefix: 'smart', separator: '-'}),
BootappSharedModule,
FileUploadModule,
CommonModule,
FormsModule,
ReactiveFormsModule,
RouterModule.forRoot(route,{useHash: true})
RouterModule.forRoot(route, {useHash: true})
],
declarations: [
ErrorComponent,
PageRibbonComponent,
FooterComponent,
AppComponent,
],
providers: [
LayoutService,
ProfileService,
PaginationConfig,
LoginGuard,
AppService,
HostComponent,
UserRouteAccessService,
{
provide: HTTP_INTERCEPTORS,
......@@ -90,9 +97,9 @@ import {AppService} from './app.service';
]
},
],
bootstrap: [ AppComponent ],
schemas: [ CUSTOM_ELEMENTS_SCHEMA,NO_ERRORS_SCHEMA ],
exports:[
]
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
exports: []
})
export class BootappAppModule {}
export class BootappAppModule {
}
This diff is collapsed.
import { ITEMS_PER_PAGE } from '../../shared';
import { Injectable } from '@angular/core';
import { NgbPaginationConfig} from '@ng-bootstrap/ng-bootstrap';
......@@ -8,6 +8,7 @@ export class PaginationConfig {
constructor(private config: NgbPaginationConfig) {
config.boundaryLinks = true;
config.maxSize = 5;
config.pageSize = ITEMS_PER_PAGE;
config.size = 'sm';
}
}
......@@ -6,11 +6,13 @@ import {
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do';
import { LoginService } from '../../shared/login/login.service';
import {NzMessageService} from 'ng-zorro-antd';
export class AuthExpiredInterceptor implements HttpInterceptor {
constructor(
private injector: Injector
private injector: Injector,
private message: NzMessageService,
) {}
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
......
......@@ -36,6 +36,7 @@
<div nz-col nzSpan="12" class="layui-header ">
<ng-container *ngIf="editType == '只读模式'">
<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="#cadf91"></nz-option>
<nz-option nzLabel="棕色" nzValue="#cbb492"></nz-option>
......@@ -44,7 +45,7 @@
</ng-container>
<ng-container *ngIf="editType == '编辑模式'">
<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="2"></nz-option>
<nz-option nzLabel="折线(纵向)" nzValue="3"></nz-option>
......@@ -54,7 +55,7 @@
</ng-container>
</div>
</div>
<div class="container">
<div class="topo-container">
<div class="layui-row">
<div class="layui-col-md12">
<div #topologyBody id="topology-body" class="topology-context">
......
......@@ -23,24 +23,29 @@ import {NzMessageService} from 'ng-zorro-antd';
.chart-left p {
margin-left: 20px;
}
.header > div{
.header > div {
height: 250px;
position: relative;
}
.header div > .position-center{
.header div > .position-center {
position: absolute;
width: 100%;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
transform: translate(-50%, -50%);
}
.p1{
.p1 {
font-size: 20px;
}
.p2{
.p2 {
font-size: 40px;
}
.spanBorder span.select{
.spanBorder span.select {
border: 1px solid #6097b7;
color: #6097b7;
}
......@@ -76,7 +81,7 @@ export class EffectAnalysisComponent implements OnInit {
chartUser;
constructor(private busineSer: BusinessService, private overAllSer: OverAllService,
private datePipe: DatePipe,private message:NzMessageService) {
private datePipe: DatePipe, private message: NzMessageService) {
}
ngOnInit() {
......@@ -183,7 +188,11 @@ export class EffectAnalysisComponent implements OnInit {
echartData.forEach((value, index, array) => {
total += value.value;
});
if (params.value == 0) {
percent = 0;
} else if (params.value > 0) {
percent = ((params.value / total) * 100).toFixed(1);
}
return '{black|' + params.name + ':}{black|' + params.value + '个}\n{black|' + percent + '%}';
},
rich: rich
......@@ -199,7 +208,7 @@ export class EffectAnalysisComponent implements OnInit {
this.busineSer.findRoot().subscribe(
(res) => {
this.rootList = res.data;
if(this.rootList.length > 0 ){
if (this.rootList.length > 0) {
this.serviceId = this.rootList[0].serviceid;
this.changeService();
}
......@@ -224,37 +233,37 @@ export class EffectAnalysisComponent implements OnInit {
(res) => {
if (res.errCode == 10000) {
this.webList = res.data;
if(this.webList.length > 0){
if (this.webList.length > 0) {
this.selectHttp(this.webList[0]);
}
this.noData = false;
}else{
} else {
this.noData = true;
this.message.info(res.errMsg)
this.message.info(res.errMsg);
}
}
);
}
//用户数量趋势
userCount(){
userCount() {
const data = {
startTime:this.obj.startTime,
endTime:this.obj.endTime,
serviceId:this.serviceId
}
startTime: this.obj.startTime,
endTime: this.obj.endTime,
serviceId: this.serviceId
};
this.busineSer.userCount(data).subscribe(
(res)=>{
(res) => {
const response = res.data;
if(response.length > 0){
if (response.length > 0) {
this.chartUser = {
legend: {
right: 20,
data: ['在线用户数','重要用户数']
data: ['在线用户数', '重要用户数']
},
xAxis: {
type: 'category',
data: response.map(e=>{
data: response.map(e => {
return e.createTime;
}),
boundaryGap: false,
......@@ -263,7 +272,7 @@ export class EffectAnalysisComponent implements OnInit {
},
},
yAxis: {
name : '人数',
name: '人数',
type: 'value',
axisTick: {
show: false
......@@ -275,7 +284,7 @@ export class EffectAnalysisComponent implements OnInit {
type: 'line',
smooth: true,
symbolSize: 6,
data: response.map(e=>{
data: response.map(e => {
return e.onlineUser;
}),
itemStyle: {
......@@ -294,7 +303,7 @@ export class EffectAnalysisComponent implements OnInit {
type: 'line',
smooth: true,
symbolSize: 6,
data: response.map(e=>{
data: response.map(e => {
return e.onlineImportantUser;
}),
itemStyle: {
......@@ -310,11 +319,11 @@ export class EffectAnalysisComponent implements OnInit {
}]
};
this.userData = true;
}else{
} else {
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 { JhiEventManager } from 'ng-jhipster';
import { Principal } from '../shared';
import {JhiEventManager} from 'ng-jhipster';
import { Principal} from '../shared';
import {OverAllService} from '../overAll/overAll.service';
import {color, pageSize} from '../app.constants';
import {AlarmService} from '../alarm/alarm.service';
......
......@@ -3,4 +3,7 @@ export * from './error/error.route';
export * from './main/main.component';
export * from './footer/footer.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';
......@@ -3,7 +3,7 @@
<nz-sider [nzWidth]="200">
<jhi-sidebar></jhi-sidebar>
</nz-sider>
<nz-layout>
<nz-layout class="layout-content">
<jhi-navbar></jhi-navbar>
<nz-content>
<div class="container" #container>
......
......@@ -13,6 +13,16 @@ import {Subscription} from 'rxjs';
selector: 'jhi-main',
templateUrl: './main.component.html',
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 {
......
......@@ -11,20 +11,20 @@
</span>
</div>
<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">
<nz-option [nzValue]="item.value" [nzLabel]="item.label"></nz-option>
</ng-container>
</nz-select>
<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>
<ul nz-menu>
<li (click)="showPasswordModal()" nz-menu-item>修改密码</li>
<ng-container *ngIf="roleType == 3">
<li (click)="showSeparationModal()" nz-menu-item>三员分立</li>
</ng-container>
<li nz-menu-item (click)="logout()" >退出</li>
<li nz-menu-item (click)="logout()">退出</li>
</ul>
</nz-dropdown>
</div>
......
......@@ -2,6 +2,7 @@ import {AfterViewChecked, Component, ElementRef, OnChanges, OnInit, ViewChild} f
import { Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ProfileService } from '../profiles/profile.service';
import { Principal, LoginService } from '../../shared';
import {ThemeList, VERSION} from '../../app.constants';
......@@ -48,6 +49,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
constructor(
private loginService: LoginService,
private principal: Principal,
private profileService: ProfileService,
private router: Router,
private appSer:AppService,
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'">
<ng-container *ngFor="let item of menuList">
<li nz-submenu (nzOpenChange)="openHandler(item)" [(nzOpen)]="item.checked">
......
......@@ -4,6 +4,7 @@ import {Http} from '@angular/http';
import {LayoutService} from '../layout.service';
import {LocalStorageService, SessionStorageService} from 'ngx-webstorage';
import {CommonService} from '../../shared/common/common.service';
import {OverAllService} from '../../overAll/overAll.service';
@Component({
selector: 'jhi-sidebar',
......@@ -18,16 +19,24 @@ import {CommonService} from '../../shared/common/common.service';
export class SidebarComponent implements OnInit {
token: boolean;
menuList = [];
systemName;
constructor(public router: Router, private http: Http,
public layoutSer: LayoutService,
public commonSer: CommonService,
private overAll:OverAllService,
private $localStorage: LocalStorageService,
private $sessionStorage: SessionStorageService) {
}
ngOnInit() {
this.getMenu();
this.overAll.getSystem().subscribe(
(res)=>{
console.log(res);
this.systemName = res.main.name;
}
)
// this.menuList = this.commonSer.listToTree('id', 'parentId', this.menuList);
}
......
......@@ -257,7 +257,7 @@ export class BasicEditComponent implements OnInit {
}
interfaceArr.push(a);
});
this.validateForm.interfaces = interfaceArr;
this.validateForm.interfaceList = interfaceArr;
this.validateForm.groups = groupArr;
this.isOkLoading = true;
if (this.modalTitle == '编辑资源') {
......
......@@ -16,7 +16,7 @@
<tbody>
<tr *ngFor="let data of warnList">
<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 class="round-tag tag-form">
<nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="'#fc0d1b'"></nz-tag>
......
......@@ -33,6 +33,11 @@ export class WarnListComponent implements OnInit {
// this.getList();
}
outGet(obj){
this.pageNum = 1;
this.getList(obj);
}
getList(obj) {
this.obj = obj;
this.loading = true;
......
......@@ -38,6 +38,7 @@
<div nz-col nzSpan="12" class="layui-header ">
<ng-container *ngIf="editType == '只读模式'">
<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="#cadf91"></nz-option>
<nz-option nzLabel="棕色" nzValue="#cbb492"></nz-option>
......@@ -76,7 +77,7 @@
</ng-container>
</div>
</div>
<div class="container">
<div class="topo-container">
<div class="layui-row">
<div class="layui-col-md12">
<div #topologyBody id="topology-body" class="topology-context">
......
......@@ -9,7 +9,6 @@ import {NodeComponent} from '../model/node/node.component';
import {SelectRadioGroupComponent} from '../../modal/select-radio-group/select-radio-group.component';
declare let editor: any;
declare var layui: any;
@Component({
selector: 'smart-ne-topology',
......@@ -398,13 +397,13 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
// }
if(e1.status == 1){
e2.alarm = "危险";
e2.fontColor='0,0,0';
// e2.fontColor='0,0,0';
e2.alarmColor='255,153,18';
e2.alarmAlpha=0.9;
}
if(e1.status == 2){
e2.alarm = "故障";
e2.fontColor='0,0,0';
// e2.fontColor='0,0,0';
e2.alarmAlpha=0.9;
}
}
......@@ -427,7 +426,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
response.forEach(e1=>{
arr.forEach(e2=>{
if(e1.linkId == e2.id){
e2.text = "进口流量:"+e1.fullValueIn+" 出口流量:"+e1.fullValueOut;
e2.text = "In:"+e1.fullValueIn+" Out:"+e1.fullValueOut;
}
})
});
......
......@@ -31,19 +31,23 @@
<div nz-col nzSpan="12">
<span>监控设备数:{{deviceNo}}</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>
{{green}}
</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>
{{yellow}}
</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>
{{red}}
</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>
{{gray}}
</span>
......@@ -97,7 +101,7 @@
</ng-container>
<!--子集-->
<ng-container *ngIf="item.level">
<td nzShowCheckbox [nzIndeterminate]="indeterminate"
<td nzShowCheckbox
(nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td>
<td class="cursor main-color" [nzIndentSize]="item.level*20">
<span (click)="goDetail(item)">{{item.name}}</span>
......@@ -189,8 +193,8 @@
<ul nz-menu nzSelectable>
<li (click)="showTempStop(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(item)" nz-menu-item><a>关联资产</a></li>
<li (click)="showAlarm()" nz-menu-item><a>添加告警</a></li>
<li (click)="showAlarm()" nz-menu-item><a>关联资产</a></li>
</ul>
</nz-dropdown>
</ng-container>
......@@ -210,12 +214,13 @@
<td></td>
<td [nzIndentSize]="item.level*20" nzShowExpand [nzExpand]='item.expand'
(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>
</ng-container>
<!--子集-->
<ng-container *ngIf="item.level">
<td nzShowCheckbox [nzIndeterminate]="indeterminate"
<td nzShowCheckbox
(nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td>
<td class="cursor main-color" [nzIndentSize]="item.level*20">
<span (click)="goDetail(item)">{{item.name}}</span>
......@@ -294,7 +299,7 @@
</td>
<td class="handle main-color">
<ng-container *ngIf="!item.level">
<span (click)="showBasicEditModal(item)">添加资源</span>
<span (click)="showBasicEditModal()">添加资源</span>
<span (click)="updateGroup(item)">编辑</span>
<span (click)="showDeleteGroupConfirm(item)">删除</span>
</ng-container>
......@@ -306,14 +311,15 @@
<a nz-dropdown>更多 <i class="anticon anticon-down main-color"></i>
</a>
<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>
<ng-container *ngIf="item.status == 1">开启</ng-container>
<ng-container *ngIf="item.status == 0">停止</ng-container>
监控
</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>
</nz-dropdown>
</ng-container>
......@@ -328,13 +334,16 @@
<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>
<tr>
<th [nzChecked]="allChecked"></th>
<th>名称</th>
<th>状态</th>
<th>关联资产</th>
<th>设备类型</th>
<th>可用性</th>
<th>操作</th>
</tr>
......@@ -342,7 +351,7 @@
<tbody>
<ng-container *ngFor="let item of nzTable.data">
<tr>
<td nzShowCheckbox [nzIndeterminate]="indeterminate" (nzCheckedChange)="selectChecked($event,item)"
<td nzShowCheckbox (nzCheckedChange)="selectChecked($event,item)"
[(nzChecked)]="item.checked"></td>
<td class="cursor main-color">
<span (click)="goDetail(item)">{{item.name}}</span>
......@@ -430,7 +439,7 @@
监控
</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>
</nz-dropdown>
</td>
......
......@@ -12,16 +12,16 @@ import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component
templateUrl: './network-check.component.html',
styles: [
`
:host ::ng-deep .table-dropdown a{
:host ::ng-deep .table-dropdown a {
font-weight: 300;
}
`
]
})
export class NetworkCheckComponent implements OnInit {
@ViewChild('smartWebsite') smartWebsite:WebsiteComponent;
@ViewChild('smartPause') smartPause:PauseComponent;
@ViewChild('smartAlarmModal') smartAlarmModal:AlarmModalComponent;
@ViewChild('smartWebsite') smartWebsite: WebsiteComponent;
@ViewChild('smartPause') smartPause: PauseComponent;
@ViewChild('smartAlarmModal') smartAlarmModal: AlarmModalComponent;
color = color;
dataSet;
......@@ -35,19 +35,19 @@ export class NetworkCheckComponent implements OnInit {
totalNum;
checkStatus = {
type:{
seriousNum:null,
notNum:null,
warnNum:null,
normalNum:null
type: {
seriousNum: null,
notNum: null,
warnNum: null,
normalNum: null
},
total:null
total: null
};
batchSelectList = [];
constructor(private overAllSer: OverAllService,private router:Router,
private modalService:NzModalService,private message:NzMessageService) {
constructor(private overAllSer: OverAllService, private router: Router,
private modalService: NzModalService, private message: NzMessageService) {
}
ngOnInit() {
......@@ -59,86 +59,84 @@ export class NetworkCheckComponent implements OnInit {
getwebList() {
this.loading = true;
const data = {
name:this.name,
eventPage:this.pageIndex,
pageRecords:this.pageSize
name: this.name,
eventPage: this.pageIndex,
pageRecords: this.pageSize
};
this.overAllSer.findWebscenario(data).subscribe(
(res) => {
if (res.errCode == 10000) {
this.dataSet = res.data.data;
this.totalNum = res.data.totalNum;
}
this.loading = false;
}
);
}
//详情
goDetail(item){
this.router.navigate(['app/main/network-detail'],{
queryParams:{
httptestid:item.httptestid,
name:item.name
goDetail(item) {
this.router.navigate(['app/main/network-detail'], {
queryParams: {
httptestid: item.httptestid,
name: item.name
}
})
});
}
//监测状态
getCheckStatus() {
this.overAllSer.countStatus().subscribe(
(res)=>{
if(res.errCode == 10000){
(res) => {
if (res.errCode == 10000) {
this.checkStatus = res.data;
}else{
this.message.info(res.errMsg);
} else {
this.message.error(res.errMsg);
}
}
)
);
}
//选中
selectChecked(event,item){
if(event){
selectChecked(event, item) {
if (event) {
this.batchSelectList.push(item.httptestid);
}else{
} else {
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.openBatchHost(status,operation);
this.openBatchHost(status, operation);
}
//添加网站
showAddmodal(){
showAddmodal() {
this.smartWebsite.showAddModal();
}
//编辑网站
editBasicModal(item){
this.smartWebsite.showEditModal(item.httptestid)
editBasicModal(item) {
this.smartWebsite.showEditModal(item.httptestid);
}
//批量开启or关闭
openBatchHost(status,operation){
if(this.batchSelectList.length == 0){
this.message.info('请选择需要'+ operation +'的网站监测');
openBatchHost(status, operation) {
if (this.batchSelectList.length == 0) {
this.message.info('请选择需要' + operation + '的网站监测');
return false;
}
this.modalService.confirm({
nzTitle: '监控',
nzContent: '确定'+operation+'网站监测?',
nzContent: '确定' + operation + '网站监测?',
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => {
const data = {
status:status,
ids:this.batchSelectList
}
status: status,
ids: this.batchSelectList
};
this.overAllSer.statusBatch(data).subscribe(
(res) => {
if (res.errCode == 10000) {
......@@ -156,8 +154,8 @@ export class NetworkCheckComponent implements OnInit {
}
//批量删除
batchDeleteConfirm(){
if(this.batchSelectList.length == 0){
batchDeleteConfirm() {
if (this.batchSelectList.length == 0) {
this.message.info('请选择需要删除的网站监测');
return false;
}
......@@ -168,8 +166,8 @@ export class NetworkCheckComponent implements OnInit {
nzOkType: 'danger',
nzOnOk: () => {
const data = {
ids:this.batchSelectList
}
ids: this.batchSelectList
};
this.overAllSer.deleteBatch(data).subscribe(
(res) => {
if (res.errCode == 10000) {
......@@ -188,7 +186,7 @@ export class NetworkCheckComponent implements OnInit {
}
//单个删除
showDeleteConfirm(item){
showDeleteConfirm(item) {
this.modalService.confirm({
nzTitle: '删除',
nzContent: '<b style="color: red;">确认要删除该网站监测吗?</b>',
......@@ -198,8 +196,8 @@ export class NetworkCheckComponent implements OnInit {
let arr = [];
arr.push(item.httptestid);
const data = {
ids:arr
}
ids: arr
};
this.overAllSer.deleteBatch(data).subscribe(
(res) => {
if (res.errCode == 10000) {
......@@ -218,12 +216,12 @@ export class NetworkCheckComponent implements OnInit {
}
//临时暂停
showTempStop(item){
this.smartPause.showModal(item.httptestid,'网站监测');
showTempStop(item) {
this.smartPause.showModal(item.httptestid, '网站监测');
}
//添加告警
showAlarm() {
this.smartAlarmModal.showAddModal('添加告警',null);
this.smartAlarmModal.showAddModal('添加告警', null);
}
}
......@@ -97,7 +97,7 @@
<span>监测数据图表</span>
</div>
<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="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label>
......
......@@ -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('chartTimeLeft') chartTimeLeft: ElementRef;
@ViewChild('smartWebsite') smartWebsite: WebsiteComponent;
......@@ -73,9 +73,6 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
this.getNowStatus();
}
ngOnChanges() {
}
//历史告警
findAlertList() {
const data = {
......
......@@ -26,7 +26,7 @@ export class OverAllService {
//获取分组信息 --编辑页面获取分组 1 表示模板 0表示主机
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 {
//创建模板
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> {
return this.http.post(SERVER_API_URL + '/templates/update',data);
return this.http.post(SERVER_API_URL + '/templates/update', data);
}
//克隆模板
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> {
return this.http.post(SERVER_API_URL + '/templates/delete',data);
return this.http.post(SERVER_API_URL + '/templates/delete', data);
}
//查询模板
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> {
return this.http.post(SERVER_API_URL + '/lldrule/create',data);
return this.http.post(SERVER_API_URL + '/lldrule/create', data);
}
//修改主机自动发现
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> {
return this.http.post(SERVER_API_URL + '/lldrule/findPage',data);
return this.http.post(SERVER_API_URL + '/lldrule/findPage', data);
}
//删除主机自动发现
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> {
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 {
//主键查询触发器原型
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 {
//主键查询监控项原型
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 {
findHostNew(data): Observable<any> {
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';
* Required to support Web Animations `@angular/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.
......@@ -67,4 +67,3 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
*/
// 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