Commit 60f5e480 authored by wangqinghua's avatar wangqinghua

style update

parent c1158be1
...@@ -16,16 +16,6 @@ ...@@ -16,16 +16,6 @@
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<div class="leftDiv"> <div class="leftDiv">
<div #leftDiv class="leftDiv-container"> <div #leftDiv class="leftDiv-container">
<div nz-row class="padding-10">
<div nz-col nzSpan="12"> <h2>运行情况统计</h2></div>
<div nz-col nzSpan="12">
<nz-select style="width: 200px;float: right" nzPlaceHolder="选择分组" [(ngModel)]="obj.leftGroupId" (ngModelChange)="countGroupItem()">
<ng-container *ngFor="let item of groupList;let i = index;">
<nz-option [nzLabel]="item.name" [nzValue]="item.groupid"></nz-option>
</ng-container>
</nz-select>
</div>
</div>
<div nz-row> <div nz-row>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<div echarts [options]="leftOneChart" style="height: 250px;width: 100%"></div> <div echarts [options]="leftOneChart" style="height: 250px;width: 100%"></div>
...@@ -33,7 +23,7 @@ ...@@ -33,7 +23,7 @@
<div class="flex-item round-tag tag-form"> <div class="flex-item round-tag tag-form">
<p> <p>
<nz-tag class="tag-red" [nzColor]="color.red"></nz-tag> <nz-tag class="tag-red" [nzColor]="color.red"></nz-tag>
<span class="margin-0-10">严重 {{leftOneData.high}}个,{{leftOneDataPre.highPer}}%</span> <span class="margin-0-10">严重 {{leftOneData.serious}}个,{{leftOneDataPre.seriousPer}}%</span>
</p> </p>
<p> <p>
<nz-tag class="tag-yellow" [nzColor]="color.yellow"></nz-tag> <nz-tag class="tag-yellow" [nzColor]="color.yellow"></nz-tag>
...@@ -45,7 +35,7 @@ ...@@ -45,7 +35,7 @@
</p> </p>
<p> <p>
<nz-tag class="tag-gray" [nzColor]="color.gray"></nz-tag> <nz-tag class="tag-gray" [nzColor]="color.gray"></nz-tag>
<span class="margin-0-10">禁止 {{leftOneData.disabled}}个,{{leftOneDataPre.disabledPer}}%</span> <span class="margin-0-10">禁止 {{leftOneData.disable}}个,{{leftOneDataPre.disablePer}}%</span>
</p> </p>
</div> </div>
</div> </div>
...@@ -56,7 +46,7 @@ ...@@ -56,7 +46,7 @@
<div class="flex-item round-tag tag-form"> <div class="flex-item round-tag tag-form">
<p> <p>
<nz-tag class="tag-red" [nzColor]="color.red"></nz-tag> <nz-tag class="tag-red" [nzColor]="color.red"></nz-tag>
<span class="margin-0-10">严重 {{leftTwoData.high}}个,{{leftTwoDataPre.highPer}}% </span> <span class="margin-0-10">严重 {{leftTwoData.serious}}个,{{leftTwoDataPre.seriousPer}}% </span>
</p> </p>
<p> <p>
<nz-tag class="tag-yellow" [nzColor]="color.yellow"></nz-tag> <nz-tag class="tag-yellow" [nzColor]="color.yellow"></nz-tag>
...@@ -68,7 +58,7 @@ ...@@ -68,7 +58,7 @@
</p> </p>
<p> <p>
<nz-tag class="tag-gray" [nzColor]="color.gray"></nz-tag> <nz-tag class="tag-gray" [nzColor]="color.gray"></nz-tag>
<span class="margin-0-10">禁止 {{leftTwoData.disabled}}个,{{leftTwoDataPre.disabledPer}}%</span> <span class="margin-0-10">禁止 {{leftTwoData.disable}}个,{{leftTwoDataPre.disablePer}}%</span>
</p> </p>
</div> </div>
</div> </div>
......
...@@ -42,30 +42,30 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -42,30 +42,30 @@ export class HomeComponent implements OnInit,AfterViewInit {
}; };
leftOneData = { leftOneData = {
high:0, serious:0,
warning:0, warning:0,
normal:0, normal:0,
disabled:0, disable:0,
}; };
leftOneDataPre = { leftOneDataPre = {
highPer:0, seriousPer:0,
warningPer:0, warningPer:0,
normalPer:0, normalPer:0,
disabledPer:0, disablePer:0,
}; };
leftOneTotal = 0; leftOneTotal = 0;
leftTwoData ={ leftTwoData ={
high:0, serious:0,
warning:0, warning:0,
normal:0, normal:0,
disabled:0, disable:0,
}; };
leftTwoDataPre = { leftTwoDataPre = {
highPer:0, seriousPer:0,
warningPer:0, warningPer:0,
normalPer:0, normalPer:0,
disabledPer:0, disablePer:0,
}; };
leftTwoTotal = 0; leftTwoTotal = 0;
...@@ -87,8 +87,6 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -87,8 +87,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
ngOnInit() { ngOnInit() {
this.getAlarmList(); this.getAlarmList();
this.findGroupCount();
this.findHostCount(); this.findHostCount();
this.getGroup(); this.getGroup();
...@@ -117,7 +115,7 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -117,7 +115,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
this.overAllSer.findGroup().subscribe( this.overAllSer.findGroup().subscribe(
(res) => { (res) => {
if(res.data){ if(res.data){
this.groupList = res.data; this.groupList = res.data.data;
this.obj.leftGroupId = this.groupList[0].groupid; this.obj.leftGroupId = this.groupList[0].groupid;
this.countGroupItem(); this.countGroupItem();
} }
...@@ -143,16 +141,16 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -143,16 +141,16 @@ export class HomeComponent implements OnInit,AfterViewInit {
setLeftOne(data){ setLeftOne(data){
this.leftOneDataPre = { this.leftOneDataPre = {
highPer:0, seriousPer:0,
warningPer:0, warningPer:0,
normalPer:0, normalPer:0,
disabledPer:0, disablePer:0,
}; };
this.leftOneTotal = data.disabled + data.high + data.normal + data.warning; this.leftOneTotal = data.total;
if(this.leftOneData.high > 0){ if(this.leftOneData.serious > 0){
let a:any = (this.leftOneData.high / this.leftOneTotal)* 100; let a:any = (this.leftOneData.serious / this.leftOneTotal)* 100;
this.leftOneDataPre.highPer = a.toFixed(2); this.leftOneDataPre.seriousPer = a.toFixed(2);
} }
if(this.leftOneData.warning > 0){ if(this.leftOneData.warning > 0){
...@@ -165,9 +163,9 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -165,9 +163,9 @@ export class HomeComponent implements OnInit,AfterViewInit {
this.leftOneDataPre.normalPer = c .toFixed(2); this.leftOneDataPre.normalPer = c .toFixed(2);
} }
if(this.leftOneData.disabled > 0){ if(this.leftOneData.disable > 0){
let d:any = ( (this.leftOneData.disabled / this.leftOneTotal)* 100 ); let d:any = ( (this.leftOneData.disable / this.leftOneTotal)* 100 );
this.leftOneDataPre.disabledPer = d .toFixed(2); this.leftOneDataPre.disablePer = d .toFixed(2);
} }
this.leftOneChart = this.leftOneChart =
...@@ -212,10 +210,10 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -212,10 +210,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
} }
}, },
data: [ data: [
{value: data.high, name: '严重'}, {value: data.serious, name: '严重'},
{value: data.warning, name: '告警'}, {value: data.warning, name: '告警'},
{value: data.normal, name: '正常'}, {value: data.normal, name: '正常'},
{value: data.disabled, name: '禁止'}, {value: data.disable, name: '禁止'},
], ],
itemStyle: { itemStyle: {
emphasis: { emphasis: {
...@@ -231,15 +229,15 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -231,15 +229,15 @@ export class HomeComponent implements OnInit,AfterViewInit {
setLeftTwo(data){ setLeftTwo(data){
this.leftTwoDataPre = { this.leftTwoDataPre = {
highPer:0, seriousPer:0,
warningPer:0, warningPer:0,
normalPer:0, normalPer:0,
disabledPer:0, disablePer:0,
}; };
this.leftTwoTotal = data.disabled + data.high + data.normal + data.warning; this.leftTwoTotal = data.total;
if(this.leftTwoData.high > 0){ if(this.leftTwoData.serious > 0){
let w:any = ( (this.leftTwoData.high / this.leftTwoTotal)*100 ); let w:any = ( (this.leftTwoData.serious / this.leftTwoTotal)*100 );
this.leftTwoDataPre.highPer = w.toFixed(2); this.leftTwoDataPre.seriousPer = w.toFixed(2);
} }
if(this.leftTwoData.warning > 0){ if(this.leftTwoData.warning > 0){
...@@ -252,9 +250,9 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -252,9 +250,9 @@ export class HomeComponent implements OnInit,AfterViewInit {
this.leftTwoDataPre.normalPer = y.toFixed(2); this.leftTwoDataPre.normalPer = y.toFixed(2);
} }
if(this.leftTwoData.disabled > 0){ if(this.leftTwoData.disable > 0){
let z:any = ( (this.leftTwoData.disabled / this.leftTwoTotal)*100); let z:any = ( (this.leftTwoData.disable / this.leftTwoTotal)*100);
this.leftTwoDataPre.disabledPer = z.toFixed(2); this.leftTwoDataPre.disablePer = z.toFixed(2);
} }
this.leftTwoChart = this.leftTwoChart =
...@@ -299,10 +297,10 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -299,10 +297,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
} }
}, },
data: [ data: [
{value: data.high, name: '严重'}, {value: data.serious, name: '严重'},
{value: data.warning, name: '告警'}, {value: data.warning, name: '告警'},
{value: data.normal, name: '正常'}, {value: data.normal, name: '正常'},
{value: data.disabled, name: '禁止'}, {value: data.disable, name: '禁止'},
], ],
itemStyle: { itemStyle: {
emphasis: { emphasis: {
...@@ -316,45 +314,6 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -316,45 +314,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
}; };
} }
findGroupCount(){
this.layoutSer.findGroupCount().subscribe(
(res)=>{
if(res.data.length > 0){
this.rightTotal = res.data.length;
this.rightOneChart = {
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
series : [
{
name: '',
type: 'pie',
radius : '55%',
center: ['50%', '60%'],
data:res.data.map(e=>{
const arr = {
value:e.count,
name:e.name
};
return arr;
}),
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
}
}
)
}
findHostCount(){ findHostCount(){
this.layoutSer.findHostCount().subscribe( this.layoutSer.findHostCount().subscribe(
(res)=>{ (res)=>{
......
...@@ -37,12 +37,12 @@ export class LayoutService { ...@@ -37,12 +37,12 @@ export class LayoutService {
//主机状态统计(用于首页) //主机状态统计(用于首页)
findHostCountByStatusByGroup(params): Observable<any> { findHostCountByStatusByGroup(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/findHostCountByStatusByGroup/'+params); return this.http.get(SERVER_API_URL + '/host/findHostCountByStatus');
} }
//根据组id统计监控项状态数量 //根据组id统计监控项状态数量
findItemStatisticsByGroupid(params): Observable<any> { findItemStatisticsByGroupid(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/item/findItemStatisticsByGroupid/'+params); return this.http.get(SERVER_API_URL + '/item/findItemCountByStatus');
} }
//取消关注 //取消关注
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<nz-form-control [nzSpan]="20"> <nz-form-control [nzSpan]="20">
<ng-container *ngFor="let item of interfaceslist;let i = index;"> <ng-container *ngFor="let item of interfaceslist;let i = index;">
<div nz-row [nzGutter]="12"> <div nz-row [nzGutter]="12">
<nz-form-control nz-col [nzSpan]="3"> <nz-form-control nz-col [nzSpan]="5">
<nz-select name="main" nzPlaceHolder="选择接口类型" [(ngModel)]="item.main" <nz-select name="main" nzPlaceHolder="选择接口类型" [(ngModel)]="item.main"
(ngModelChange)="changeMain(i)"> (ngModelChange)="changeMain(i)">
<nz-option nzValue="1" nzLabel="默认"></nz-option> <nz-option nzValue="1" nzLabel="默认"></nz-option>
...@@ -69,12 +69,9 @@ ...@@ -69,12 +69,9 @@
<nz-option nzValue="4" nzLabel="JMX接口"></nz-option> <nz-option nzValue="4" nzLabel="JMX接口"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
<nz-form-control nz-col [nzSpan]="2"> <nz-form-control nz-col [nzSpan]="4">
<input type="text" placeholder="端口" nz-input name="port" [(ngModel)]="item.port"> <input type="text" placeholder="端口" nz-input name="port" [(ngModel)]="item.port">
</nz-form-control> </nz-form-control>
<nz-form-control nz-col [nzSpan]="4" *ngIf="item.type == 2">
<label nz-checkbox [(ngModel)]="item.bulk">使用大量请求</label>
</nz-form-control>
<nz-form-control nz-col [nzSpan]="2"> <nz-form-control nz-col [nzSpan]="2">
<span class="main-color cursor" (click)="deleteInterfaces(i)">X</span> <span class="main-color cursor" (click)="deleteInterfaces(i)">X</span>
</nz-form-control> </nz-form-control>
...@@ -85,7 +82,7 @@ ...@@ -85,7 +82,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzFor="test3">agent代理程序检测</nz-form-label> <nz-form-label [nzSpan]="4" nzFor="test3">agent代理程序检测</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select name="test3" name="test3" nzPlaceHolder="无agen代理程序"> <nz-select name="test3" name="test3" nzPlaceHolder="无agen代理程序">
<nz-option nzValue="" nzLabel="无agen代理程序"></nz-option> <nz-option nzValue="" nzLabel="无agen代理程序"></nz-option>
......
...@@ -123,7 +123,7 @@ export class BasicEditComponent implements OnInit { ...@@ -123,7 +123,7 @@ export class BasicEditComponent implements OnInit {
} }
//编辑 //编辑
editModal(hostId, name, gId): void { editModal(hostId): void {
this.isBasicEdit = true; this.isBasicEdit = true;
this.tabNum = 0; this.tabNum = 0;
this.hostId = hostId; this.hostId = hostId;
...@@ -236,6 +236,11 @@ export class BasicEditComponent implements OnInit { ...@@ -236,6 +236,11 @@ export class BasicEditComponent implements OnInit {
} }
} }
this.validateForm.groups = groupArr; this.validateForm.groups = groupArr;
let tempArr = [];
this.validateForm.templates.forEach(e=>{
tempArr.push({id:e})
});
this.validateForm.templates = tempArr;
this.isOkLoading = true; this.isOkLoading = true;
if (this.modalTitle == '编辑资源') { if (this.modalTitle == '编辑资源') {
this.update(); this.update();
...@@ -252,17 +257,7 @@ export class BasicEditComponent implements OnInit { ...@@ -252,17 +257,7 @@ export class BasicEditComponent implements OnInit {
ip: res.ip, ip: res.ip,
type: res.type, type: res.type,
port: res.port, port: res.port,
bulk: ''
}; };
if (res.type == '2') {
if (res.bulk == true || res.bulk == '1') {
a.bulk = '1';
} else {
a.bulk = '0';
}
} else {
delete a.bulk;
}
interfaceArr.push(a); interfaceArr.push(a);
}); });
this.validateForm.interfaces = interfaceArr; this.validateForm.interfaces = interfaceArr;
...@@ -282,7 +277,6 @@ export class BasicEditComponent implements OnInit { ...@@ -282,7 +277,6 @@ export class BasicEditComponent implements OnInit {
}); });
this.validateForm.templates = clearArr; this.validateForm.templates = clearArr;
} }
this.overAllSer.createHost(this.validateForm).subscribe( this.overAllSer.createHost(this.validateForm).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -307,19 +301,9 @@ export class BasicEditComponent implements OnInit { ...@@ -307,19 +301,9 @@ export class BasicEditComponent implements OnInit {
ip: res.ip, ip: res.ip,
type: res.type, type: res.type,
port: res.port, port: res.port,
bulk: '',
hostid: this.hostId, hostid: this.hostId,
interfaceid: res.interfaceid interfaceid: res.interfaceid
}; };
if (res.type == '2') {
if (res.bulk == true || res.bulk == '1') {
a.bulk = '1';
} else {
a.bulk = '0';
}
} else {
delete a.bulk;
}
interfaceArr.push(a); interfaceArr.push(a);
}); });
this.validateForm.interfaces = interfaceArr; this.validateForm.interfaces = interfaceArr;
...@@ -337,13 +321,14 @@ export class BasicEditComponent implements OnInit { ...@@ -337,13 +321,14 @@ export class BasicEditComponent implements OnInit {
} }
}); });
this.validateForm.clearTemplateids = clearArr; // this.validateForm.clearTemplateids = clearArr;
if (this.macroTYpe == 'macroExpand') { if (this.macroTYpe == 'macroExpand') {
this.validateForm.macros = this.macroList2; this.validateForm.macros = this.macroList2;
} }
this.validateForm.hostid = this.hostId; this.validateForm.hostid = this.hostId;
this.validateForm.macros = this.macroList1; this.validateForm.macros = this.macroList1;
this.validateForm.id = this.hostId;
this.overAllSer.updateHost(this.validateForm).subscribe( this.overAllSer.updateHost(this.validateForm).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -409,7 +394,6 @@ export class BasicEditComponent implements OnInit { ...@@ -409,7 +394,6 @@ export class BasicEditComponent implements OnInit {
ip: '', ip: '',
type: '2', type: '2',
port: '10050', port: '10050',
bulk: true,
}; };
this.interfaceslist.push(demo); this.interfaceslist.push(demo);
} }
...@@ -428,7 +412,6 @@ export class BasicEditComponent implements OnInit { ...@@ -428,7 +412,6 @@ export class BasicEditComponent implements OnInit {
} }
case '2': { case '2': {
this.interfaceslist[index].port = '161'; this.interfaceslist[index].port = '161';
this.interfaceslist[index].bulk = true;
break; break;
} }
case '3': { case '3': {
...@@ -528,11 +511,10 @@ export class BasicEditComponent implements OnInit { ...@@ -528,11 +511,10 @@ export class BasicEditComponent implements OnInit {
ip: '', ip: '',
type: '2', type: '2',
port: '10050', port: '10050',
bulk: true,
} }
]; ];
this.tabNum = 0; this.tabNum = 0;
this.validateForm = { this.validateForm = <any>{
groups: [], groups: [],
hostExtend: { hostExtend: {
equipmentTypeid: null, equipmentTypeid: null,
...@@ -555,7 +537,7 @@ export class BasicEditComponent implements OnInit { ...@@ -555,7 +537,7 @@ export class BasicEditComponent implements OnInit {
repaircount: null, repaircount: null,
scrapcount: null, scrapcount: null,
}, },
templates: null, templates: [],
name: null, name: null,
host: null, host: null,
}; };
......
...@@ -176,8 +176,7 @@ ...@@ -176,8 +176,7 @@
<li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li> <li (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>-->
</ul> </ul>
...@@ -197,5 +196,3 @@ ...@@ -197,5 +196,3 @@
<smart-create-group #smartCreateGroup (add)="handleOk($event)"></smart-create-group> <smart-create-group #smartCreateGroup (add)="handleOk($event)"></smart-create-group>
<!--临时暂停--> <!--临时暂停-->
<smart-pause #smartPause (done)="handleOk($event)"></smart-pause> <smart-pause #smartPause (done)="handleOk($event)"></smart-pause>
<!--添加告警-->
<!--<smart-alarm-modal #smartAlarmModal></smart-alarm-modal>-->
...@@ -43,12 +43,10 @@ export interface TreeNodeInterface { ...@@ -43,12 +43,10 @@ export interface TreeNodeInterface {
}) })
export class BasicComponent implements OnInit { export class BasicComponent implements OnInit {
//组件 //组件
@ViewChild('basicEdit') basicEdit: BasicEditComponent; @ViewChild('basicEdit') basicEdit: BasicEditComponent;
@ViewChild('smartCheck') smartCheck: BasiCheckComponent; @ViewChild('smartCheck') smartCheck: BasiCheckComponent;
@ViewChild('smartCreateGroup') smartCreateGroup: CreateGroupComponent; @ViewChild('smartCreateGroup') smartCreateGroup: CreateGroupComponent;
@ViewChild('smartPause') smartPause: PauseComponent; @ViewChild('smartPause') smartPause: PauseComponent;
// @ViewChild('smartAlarmModal') smartAlarmModal: AlarmModalComponent;
color = color; color = color;
...@@ -289,7 +287,7 @@ export class BasicComponent implements OnInit { ...@@ -289,7 +287,7 @@ export class BasicComponent implements OnInit {
//编辑资源 name--分组名称,gId-当前分组的id //编辑资源 name--分组名称,gId-当前分组的id
editBasicModal(item) { editBasicModal(item) {
this.basicEdit.editModal(item.hostid, item.name, item.gId); this.basicEdit.editModal(item.hostid);
} }
//添加监测点 //添加监测点
...@@ -470,29 +468,25 @@ export class BasicComponent implements OnInit { ...@@ -470,29 +468,25 @@ export class BasicComponent implements OnInit {
//开启or停止监控 //开启or停止监控
openHost(item) { openHost(item) {
this.modalService.confirm({ this.commonSer.confirmThing('暂停',`确定开启监控设备${item.name}?`,()=>{
nzTitle: '监控', this.loading = true;
nzContent: '确定开启监控设备' + item.name + '?', let params1 = 0;
nzOkText: '确定', if (item.status == 0) {
nzCancelText: '取消', params1 = 1;
nzOnOk: () => { }
this.loading = true; const data = {
let params1 = 0; hostid:item.hostid,
if (item.status == 0) { status:params1,
params1 = 1; }
} this.overAllSer.updateHostStatus(data).subscribe(
const params2 = item.hostid; (res) => {
this.overAllSer.stopOrOpen(params1, params2).subscribe( if (res.errCode == 10000) {
(res) => { this.message.info('修改成功');
if (res.errCode == 10000) { this.searchRe();
this.message.info('修改成功');
this.searchRe();
}
} }
); }
}, );
nzOnCancel: () => console.log('Cancel') })
});
} }
//批量开启or停止监控 //批量开启or停止监控
......
...@@ -2,11 +2,12 @@ import {HttpClient} from '@angular/common/http'; ...@@ -2,11 +2,12 @@ import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs/Rx'; import {Observable} from 'rxjs/Rx';
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {SERVER_API_URL} from '../app.constants'; import {SERVER_API_URL} from '../app.constants';
import {CommonService} from '../shared/common/common.service';
@Injectable() @Injectable()
export class OverAllService { export class OverAllService {
constructor(private http: HttpClient) { constructor(private http: HttpClient,private commonSer:CommonService) {
} }
//获取分组信息 --列表 //获取分组信息 --列表
...@@ -35,8 +36,8 @@ export class OverAllService { ...@@ -35,8 +36,8 @@ export class OverAllService {
} }
//停止-开启监控 //停止-开启监控
stopOrOpen(params1, params2): Observable<any> { updateHostStatus(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/stopOrOpen/' + params1 + '/' + params2); return this.http.get(SERVER_API_URL + '/host/updateHostStatus/' +this.commonSer.toQuery(data));
} }
//批量停止开启监控接口 //批量停止开启监控接口
......
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