Commit ce253d58 authored by wangqinghua's avatar wangqinghua

update

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