Commit ce253d58 authored by wangqinghua's avatar wangqinghua

update

parent f637d438
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<td> <td>
{{data.sendto}} {{data.sendto}}
</td> </td>
<td class="handle"> <td class="handle main-color">
<span (click)="deleteLog(data)">删除</span> <span (click)="deleteLog(data)">删除</span>
</td> </td>
</tr> </tr>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<td>发送方式</td> <td>发送方式</td>
<td>发送对象</td> <td>发送对象</td>
<td>生成事件</td> <td>生成事件</td>
<td class="handle text-center"> <td class="handle text-center main-color">
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteAlarm(data)">删除</span> <span (click)="deleteAlarm(data)">删除</span>
<span *ngIf="data.status == 1" (click)="changeStatus('启用','0',data)">启用</span> <span *ngIf="data.status == 1" (click)="changeStatus('启用','0',data)">启用</span>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<span *ngIf="data.status == 1">暂停</span> <span *ngIf="data.status == 1">暂停</span>
</td> </td>
<td>细节</td> <td>细节</td>
<td class="handle text-center"> <td class="handle text-center main-color">
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteSend(data)">删除</span> <span (click)="deleteSend(data)">删除</span>
<span (click)="operationSend('启用',0,data)" *ngIf="data.status == 1">启用</span> <span (click)="operationSend('启用',0,data)" *ngIf="data.status == 1">启用</span>
......
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
<label nz-radio-button nzValue="5">自定义</label> <label nz-radio-button nzValue="5">自定义</label>
</nz-radio-group> </nz-radio-group>
</div> </div>
<div nz-col nzSpan="8" *ngIf="timeType == '5'"> <div nz-col nzSpan="8" >
<ng-container *ngIf="timeType == '5'">
<nz-date-picker <nz-date-picker
nzShowTime nzShowTime
[(ngModel)]="timeBegin" [(ngModel)]="timeBegin"
...@@ -54,8 +55,8 @@ ...@@ -54,8 +55,8 @@
[(ngModel)]="timeEnd" [(ngModel)]="timeEnd"
nzPlaceHolder="结束时间" nzPlaceHolder="结束时间"
></nz-date-picker> ></nz-date-picker>
</ng-container>
</div> </div>
<div nz-col nzSpan="3" class="search-input text-right"> <div nz-col nzSpan="3" class="search-input text-right">
<button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button> <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button>
</div> </div>
......
...@@ -82,8 +82,13 @@ export class FlowTrendComponent implements OnInit { ...@@ -82,8 +82,13 @@ export class FlowTrendComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.hostList = res.data; this.hostList = res.data;
if(this.hostList){
this.obj.hostid = this.hostList[0].hostid +""; this.obj.hostid = this.hostList[0].hostid +"";
this.getEcharts(null); this.getEcharts(null);
}else{
this.message.warning("当前资源组无资源");
}
} }
} }
); );
...@@ -107,7 +112,7 @@ export class FlowTrendComponent implements OnInit { ...@@ -107,7 +112,7 @@ export class FlowTrendComponent implements OnInit {
if(res.data.length > 0){ if(res.data.length > 0){
this.inEchartData = res.data; this.inEchartData = res.data;
}else{ }else{
this.message.info("图表暂无数据"); this.message.warning("图表暂无数据");
this.isLoading = false; this.isLoading = false;
} }
data.type = "out"; data.type = "out";
...@@ -143,6 +148,10 @@ export class FlowTrendComponent implements OnInit { ...@@ -143,6 +148,10 @@ export class FlowTrendComponent implements OnInit {
}; };
this.chartOption = { this.chartOption = {
title: {
text: '进出口流量峰值趋势图',
left: 'center',
},
backgroundColor: '#eee', backgroundColor: '#eee',
tooltip: { tooltip: {
// trigger: 'axis', // trigger: 'axis',
...@@ -166,7 +175,8 @@ export class FlowTrendComponent implements OnInit { ...@@ -166,7 +175,8 @@ export class FlowTrendComponent implements OnInit {
}, },
xAxis: { xAxis: {
data: this.inEchartData.map(e=>{ data: this.inEchartData.map(e=>{
return e.clock; let date = this.datePipe.transform(e.clock,"yyyy-MM-dd HH:mm");
return date;
}), }),
name: '时间', name: '时间',
}, },
...@@ -181,7 +191,7 @@ export class FlowTrendComponent implements OnInit { ...@@ -181,7 +191,7 @@ export class FlowTrendComponent implements OnInit {
type : 'value', type : 'value',
axisLabel:{ //Y轴数据 axisLabel:{ //Y轴数据
formatter:function(value){ formatter:function(value){
return Math.abs(value)/10000; //负数取绝对值变正数 return Math.abs(value)/10000 +" kbps"; //负数取绝对值变正数
}, },
textStyle: { textStyle: {
color: '#666' color: '#666'
...@@ -194,7 +204,7 @@ export class FlowTrendComponent implements OnInit { ...@@ -194,7 +204,7 @@ export class FlowTrendComponent implements OnInit {
series: [ series: [
{ {
name: '进口流量', name: '进口流量',
type: 'bar', type: 'line',
stack: 'one', stack: 'one',
itemStyle: itemStyle, itemStyle: itemStyle,
data: this.inEchartData.map(e=>{ data: this.inEchartData.map(e=>{
...@@ -203,7 +213,7 @@ export class FlowTrendComponent implements OnInit { ...@@ -203,7 +213,7 @@ export class FlowTrendComponent implements OnInit {
}, },
{ {
name: '出口流量', name: '出口流量',
type: 'bar', type: 'line',
stack: 'one', stack: 'one',
itemStyle: itemStyle, itemStyle: itemStyle,
data: this.outEchartData.map(e=>{ data: this.outEchartData.map(e=>{
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<td> <td>
<img style="width: 40px;" [src]="imgUrl + data.url"> <img style="width: 40px;" [src]="imgUrl + data.url">
</td> </td>
<td class="handle"> <td class="handle main-color">
<span (click)="editIcon(data)">更换图标</span> <span (click)="editIcon(data)">更换图标</span>
</td> </td>
</tr> </tr>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<nz-tab nzTitle="资源详情"> <nz-tab nzTitle="资源详情">
<section> <section>
资源显示名称 <p class="padding-8-0">资源显示名称</p>
<div nz-row nzGutter="24"> <div nz-row nzGutter="24">
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<nz-collapse> <nz-collapse>
...@@ -141,6 +141,11 @@ ...@@ -141,6 +141,11 @@
</nz-tab> </nz-tab>
<nz-tab nzTitle="监测点列表"> <nz-tab nzTitle="监测点列表">
<div nz-row> <div nz-row>
<div class="padding-8-0">
<input (keyup.enter)="getCheckList()" style="width: 200px;" type="text" nz-input [(ngModel)]="searchName" placeholder="输入监测点名称">
<button (click)="getCheckList()" nz-button nzType="default"><i class="anticon anticon-search"
style="color: #6097b7"></i>搜索</button>
</div>
<div class="padding-15-0"> <div class="padding-15-0">
<nz-radio-group [(ngModel)]="itemTypeValue" [nzButtonStyle]="'solid'"> <nz-radio-group [(ngModel)]="itemTypeValue" [nzButtonStyle]="'solid'">
<label *ngFor="let item of itemTypeList" (click)="changeType(item)" nz-radio-button nzValue="{{item.applicationid}}">{{item.name}}</label> <label *ngFor="let item of itemTypeList" (click)="changeType(item)" nz-radio-button nzValue="{{item.applicationid}}">{{item.name}}</label>
...@@ -155,7 +160,7 @@ ...@@ -155,7 +160,7 @@
<th>监测点分类</th> <th>监测点分类</th>
<th>更新时间间隔</th> <th>更新时间间隔</th>
<th>图表</th> <th>图表</th>
<th>操作</th> <th nzWidth="250px">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -170,12 +175,14 @@ ...@@ -170,12 +175,14 @@
<td>{{data.lastclock}}</td> <td>{{data.lastclock}}</td>
<td>{{data.itemType}}</td> <td>{{data.itemType}}</td>
<td>{{data.delay}}</td> <td>{{data.delay}}</td>
<td class="cursor"> <td class="main-color cursor main-color">
<span (click)="showImageModal(data)">图表</span> <span (click)="showImageModal(data)">图表</span>
</td> </td>
<td class="handle cursor"> <td class="handle cursor">
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑监测点</span>
<span (click)="deleteCheckItem(data)">删除</span> <span (click)="deleteCheckItem(data)">删除监测点</span>
<span (click)="deleteCheckItem(data)">添加阈值</span>
<span (click)="deleteCheckItem(data)">编辑阈值</span>
<span *ngIf="data.status == 0 && data.state==0" (click)="updateItem(data.itemid,1)" style="color: red">停止</span> <span *ngIf="data.status == 0 && data.state==0" (click)="updateItem(data.itemid,1)" style="color: red">停止</span>
<span *ngIf="data.status == 0 && data.state==1" (click)="updateItem(data.itemid,1)" style="color: red">不支持的</span> <span *ngIf="data.status == 0 && data.state==1" (click)="updateItem(data.itemid,1)" style="color: red">不支持的</span>
<span *ngIf="data.status == 1 && data.state==0" (click)="updateItem(data.itemid,0)" style="color: green">启用</span> <span *ngIf="data.status == 1 && data.state==0" (click)="updateItem(data.itemid,0)" style="color: green">启用</span>
......
...@@ -114,6 +114,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -114,6 +114,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
validateForm: FormGroup; validateForm: FormGroup;
isSpinning; //刷新 isSpinning; //刷新
units; //图表单位
constructor(private routerInfo: ActivatedRoute, private message: NzMessageService, constructor(private routerInfo: ActivatedRoute, private message: NzMessageService,
private overAllSer: OverAllService, private renderer: Renderer,private router:Router, private overAllSer: OverAllService, private renderer: Renderer,private router:Router,
...@@ -751,6 +752,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -751,6 +752,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
showImageModal(data) { showImageModal(data) {
this.isGrapha = true; this.isGrapha = true;
this.selectGraphadata = data; this.selectGraphadata = data;
this.getGraphDate(); this.getGraphDate();
} }
...@@ -779,7 +781,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -779,7 +781,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
yAxis: { yAxis: {
splitLine: { splitLine: {
show: false show: false
} },
axisLabel:{ //Y轴数据
formatter:(value)=>{
return value+ " " +this.selectGraphadata.units; //负数取绝对值变正数
},
},
}, },
dataZoom: [{ dataZoom: [{
startValue: '2014-06-01' startValue: '2014-06-01'
...@@ -789,7 +796,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -789,7 +796,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
series: { series: {
type: 'line', type: 'line',
data: result.map((item) => { data: result.map((item) => {
return item.value; return item.value ;
}), }),
} }
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
</ng-container> </ng-container>
</td> </td>
<td class="handle"> <td class="handle main-color">
<ng-container *ngIf="!item.level"> <ng-container *ngIf="!item.level">
<span (click)="showBasicEditModal()">添加资源</span> <span (click)="showBasicEditModal()">添加资源</span>
</ng-container> </ng-container>
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
</ng-container> </ng-container>
</ng-container> </ng-container>
</td> </td>
<td class="handle"> <td class="handle main-color">
<ng-container *ngIf="!item.level"> <ng-container *ngIf="!item.level">
<span (click)="showBasicEditModal(item)">添加资源</span> <span (click)="showBasicEditModal(item)">添加资源</span>
<span (click)="updateGroup(item)">编辑</span> <span (click)="updateGroup(item)">编辑</span>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
<a nz-dropdown>更多 <i class="anticon anticon-down"></i> <a nz-dropdown>更多 <i class="anticon anticon-down"></i>
</a> </a>
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li (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>
...@@ -369,7 +369,7 @@ ...@@ -369,7 +369,7 @@
<nz-tag [nzColor]="'#d44f51'">IPMI</nz-tag> <nz-tag [nzColor]="'#d44f51'">IPMI</nz-tag>
</ng-container> </ng-container>
</td> </td>
<td class="handle"> <td class="handle main-color">
<span (click)="showBasicCheckModal(item.hostid,item.host)">添加监测点</span> <span (click)="showBasicCheckModal(item.hostid,item.host)">添加监测点</span>
<span (click)="editBasicModal(item)">编辑</span> <span (click)="editBasicModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span> <span (click)="showDeleteConfirm(item)">删除</span>
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<td>{{item.retries}}</td> <td>{{item.retries}}</td>
<td>{{item.authentication}}</td> <td>{{item.authentication}}</td>
<td>{{item.headers}}</td> <td>{{item.headers}}</td>
<td class="handle"> <td class="handle main-color">
<span (click)="editBasicModal(item)">编辑</span> <span (click)="editBasicModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span> <span (click)="showDeleteConfirm(item)">删除</span>
<nz-dropdown [nzTrigger]="'click'" class="table-dropdown"> <nz-dropdown [nzTrigger]="'click'" class="table-dropdown">
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<td></td> <td></td>
<td>总计</td> <td>总计</td>
<td></td> <td></td>
<td>{{totalNum}}{{nowStatus[0].response_units}}</td> <td>{{totalNum}}{{(nowStatus[0].response_units).toFixed(4)}}</td>
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
...@@ -138,9 +138,9 @@ ...@@ -138,9 +138,9 @@
<div nz-col [nzSpan]="6" > <div nz-col [nzSpan]="6" >
<div #chartTimeLeft class="chart-left" *ngFor="let item of time,let i = index;"> <div #chartTimeLeft class="chart-left" *ngFor="let item of time,let i = index;">
<p class="tag-form"> <nz-tag [nzColor]="colorArr[i]"></nz-tag> <span>{{item.name}}</span> </p> <p class="tag-form"> <nz-tag [nzColor]="colorArr[i]"></nz-tag> <span>{{item.name}}</span> </p>
<p>平均值 {{item.average}}</p> <p>平均值 {{(item.average.toFixed(4))}}</p>
<p>最大值 {{item.max}}</p> <p>最大值 {{(item.max).toFixed(4)}}</p>
<p>最小值 {{item.min}}</p> <p>最小值 {{(item.min).toFixed(4)}}</p>
</div> </div>
</div> </div>
<div nz-col [nzSpan]="18"> <div nz-col [nzSpan]="18">
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<td> <td>
<span *ngFor="let item of data.roles">{{item.name}} </span> <span *ngFor="let item of data.roles">{{item.name}} </span>
</td> </td>
<td class="handle"> <td class="handle main-color">
<span (click)="grantRole(data)">授权</span> <span (click)="grantRole(data)">授权</span>
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteUser(data)">删除</span> <span (click)="deleteUser(data)">删除</span>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<i class="anticon anticon-check"></i> <i class="anticon anticon-check"></i>
</ng-container> </ng-container>
</td> </td>
<td class="handle"> <td class="handle main-color">
<span (click)="grantUser(data)">授予用户</span> <span (click)="grantUser(data)">授予用户</span>
<!--<span (click)="lookRole(data)">查看</span>--> <!--<span (click)="lookRole(data)">查看</span>-->
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
......
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'smart-threshold',
templateUrl: './threshold.component.html',
styles: []
})
export class ThresholdComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
{{data.scrapcount}} {{data.scrapcount}}
</td> </td>
<td>{{data.eventSum}}</td> <td>{{data.eventSum}}</td>
<td class="handle text-center"> <td class="handle text-center main-color">
<span (click)="goToChild(data)">明细</span> <span (click)="goToChild(data)">明细</span>
<span (click)="deleteChildType(data)">删除</span> <span (click)="deleteChildType(data)">删除</span>
</td> </td>
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
<ng-container *ngIf="data.status == 0">待处理</ng-container> <ng-container *ngIf="data.status == 0">待处理</ng-container>
<ng-container *ngIf="data.status == 1">已结束</ng-container> <ng-container *ngIf="data.status == 1">已结束</ng-container>
</td> </td>
<td class="list-icon "> <td class="list-icon main-color">
<span class="cursor" *ngIf="data.status == 1" (click)="lookEvent(data)">查看</span> <span class="cursor" *ngIf="data.status == 1" (click)="lookEvent(data)">查看</span>
</td> </td>
</tr> </tr>
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
{{data.scrapcount}} {{data.scrapcount}}
</td> </td>
<td>{{data.eventSum}}</td> <td>{{data.eventSum}}</td>
<td class="handle text-center"> <td class="handle text-center main-color">
<span (click)="goToDetail(data)">查看</span> <span (click)="goToDetail(data)">查看</span>
<span (click)="deleteInVentory(data)">删除</span> <span (click)="deleteInVentory(data)">删除</span>
</td> </td>
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<span *ngIf="data.status == 1">进行中</span> <span *ngIf="data.status == 1">进行中</span>
<span *ngIf="data.status == 2">已结束</span> <span *ngIf="data.status == 2">已结束</span>
</td> </td>
<td class="handle text-center"> <td class="handle text-center main-color">
<span (click)="lookPlan(data.id,data.title)">查看</span> <span (click)="lookPlan(data.id,data.title)">查看</span>
<span (click)="editPlan(data.id)">编辑</span> <span (click)="editPlan(data.id)">编辑</span>
<span (click)="deletePlan(data)">删除</span> <span (click)="deletePlan(data)">删除</span>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<span *ngIf="data.status == 0">待处理</span> <span *ngIf="data.status == 0">待处理</span>
<span *ngIf="data.status == 1">已结束</span> <span *ngIf="data.status == 1">已结束</span>
</td> </td>
<td class="handle text-center"> <td class="handle text-center main-color">
<span *ngIf="data.status == 1" (click)="lookEvent(data)">查看</span> <span *ngIf="data.status == 1" (click)="lookEvent(data)">查看</span>
<span *ngIf="data.status == 0" (click)="goToHandle(data)">处理</span> <span *ngIf="data.status == 0" (click)="goToHandle(data)">处理</span>
<span *ngIf="data.status == 0" (click)="showTransforModal(data)">转派</span> <span *ngIf="data.status == 0" (click)="showTransforModal(data)">转派</span>
......
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