Commit daf938e5 authored by wangqinghua's avatar wangqinghua

监控项

parent 8c13791b
...@@ -58,9 +58,17 @@ ...@@ -58,9 +58,17 @@
<span *ngIf="data.status == 1">禁用</span> <span *ngIf="data.status == 1">禁用</span>
<span *ngIf="data.status == 0">启用</span> <span *ngIf="data.status == 0">启用</span>
</td> </td>
<td>发送方式</td> <td>
<td>发送对象</td> <span *ngFor="let item of data.mediaTypeDtos">
<td>生成事件</td> {{item.name}}
</span>
</td>
<td>
<span *ngFor="let item of data.userDtos">
{{item.name}}
</span>
</td>
<td>{{data.event.title}}</td>
<td class="handle text-center main-color"> <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>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<th>类型</th> <th>类型</th>
<th>用于告警推送</th> <th>用于告警推送</th>
<th>状态</th> <th>状态</th>
<th nzWidth="15%">细节</th> <th nzWidth="25%">细节</th>
<th style="text-align: center">操作</th> <th style="text-align: center">操作</th>
</tr> </tr>
</thead> </thead>
...@@ -49,7 +49,13 @@ ...@@ -49,7 +49,13 @@
<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>细节</td> <td>
<span *ngIf="data.type == 0">GSM 调制解调器:"{{data.gsm_modem}}"</span>
<span *ngIf="data.type == 1">脚本名称:"{{data.exec_path}}"</span>
<span *ngIf="data.type == 2">GSM 调制解调器:"{{data.gsm_modem}}"</span>
<span *ngIf="data.type == 3">Jabber 标识符:"{{data.username}}"</span>
<span *ngIf="data.type == 100">用户名称:"{{data.username}}"</span>
</td>
<td class="handle text-center main-color"> <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>
......
...@@ -414,17 +414,17 @@ export class OverAllService { ...@@ -414,17 +414,17 @@ export class OverAllService {
return this.http.get(SERVER_API_URL + '/itemprototype/find/'+ params); return this.http.get(SERVER_API_URL + '/itemprototype/find/'+ params);
} }
//创建触发器 //创建阈值
createTri(data): Observable<any> { createTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/create', data); return this.http.post(SERVER_API_URL + '/trigger/create', data);
} }
//修改触发器 //修改阈值
updateTri(data): Observable<any> { updateTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/update', data); return this.http.post(SERVER_API_URL + '/trigger/update', data);
} }
//查询触发器 //查询阈值列表
findTri(data): Observable<any> { findTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/findTrigger', data); return this.http.post(SERVER_API_URL + '/trigger/findTrigger', data);
} }
......
...@@ -95,4 +95,4 @@ ...@@ -95,4 +95,4 @@
</div> </div>
<!--监控项--> <!--监控项-->
<smart-check #smartCheck (done)="getList()"></smart-check> <smart-basi-check #smartBasiCheck (done)="getList()"></smart-basi-check>
...@@ -39,7 +39,7 @@ import {BasiCheckComponent} from '../../../../modal/basi-check/basi-check.compon ...@@ -39,7 +39,7 @@ import {BasiCheckComponent} from '../../../../modal/basi-check/basi-check.compon
] ]
}) })
export class ItemListComponent implements OnInit { export class ItemListComponent implements OnInit {
@ViewChild('smartCheck') smartCheck: BasiCheckComponent; @ViewChild('smartBasiCheck') smartBasiCheck: BasiCheckComponent;
tempName; tempName;
disName; disName;
...@@ -160,8 +160,14 @@ export class ItemListComponent implements OnInit { ...@@ -160,8 +160,14 @@ export class ItemListComponent implements OnInit {
); );
} }
//添加监测点
showAddModal(){ showAddModal(){
this.smartCheck.showAddModal(this.hostId,this.tempName,"添加监测点"); this.smartBasiCheck.showAddModal(this.hostId,this.tempName,"添加监测点");
}
//编辑监测点
showEditModal(item){
this.smartBasiCheck.showEditModal(this.hostId,item.itemid,this.tempName,item.templateid);
} }
} }
...@@ -50,7 +50,10 @@ export class TriModalComponent implements OnInit { ...@@ -50,7 +50,10 @@ export class TriModalComponent implements OnInit {
this.triggerId = id; this.triggerId = id;
this.isVisiable = true; this.isVisiable = true;
this.hostName = hostName; this.hostName = hostName;
this.overAllSer.findTriggerById(id).subscribe( const data = {
triggerid:id
}
this.overAllSer.findTri(data).subscribe(
(res) => { (res) => {
const data = res.data[0]; const data = res.data[0];
this.triggerObj.expression = data.expression; this.triggerObj.expression = data.expression;
......
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