Commit 6d2cfffe authored by wangqinghua's avatar wangqinghua

workService

parent 63ce9507
...@@ -334,7 +334,7 @@ export class BasicEditComponent implements OnInit { ...@@ -334,7 +334,7 @@ export class BasicEditComponent implements OnInit {
this.interfaceslist.splice(index, 1); this.interfaceslist.splice(index, 1);
} }
// agent:10050 SNMP:161 JMX:12345 IPMI:623 // agent:161 SNMP:161 JMX:12345 IPMI:623
changePort(index) { changePort(index) {
switch (this.interfaceslist[index].type) { switch (this.interfaceslist[index].type) {
case '1': { case '1': {
......
...@@ -116,8 +116,6 @@ ...@@ -116,8 +116,6 @@
<td class="round-tag tag-form" > <td class="round-tag tag-form" >
<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag> <nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>
<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag> <nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>
<!--<span *ngIf="item.status == 0">已监控</span>-->
<!--<span *ngIf="item.status == 1">未监控</span>-->
</td> </td>
<td> <td>
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
......
...@@ -278,14 +278,18 @@ export class BasicComponent implements OnInit { ...@@ -278,14 +278,18 @@ export class BasicComponent implements OnInit {
} }
//删除单个资源 //删除单个资源
showDeleteConfirm(data) { showDeleteConfirm(item) {
this.modalService.confirm({ this.modalService.confirm({
nzTitle: '删除', nzTitle: '删除',
nzContent: '<b style="color: red;">确认删除该资源吗?</b>', nzContent: '<b style="color: red;">确认删除该资源吗?</b>',
nzOkText: '确定', nzOkText: '确定',
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: () => { nzOnOk: () => {
this.overAllSer.deleteHostGet(data.hostid).subscribe( const data = {
hostids:[]
};
data.hostids.push(item.hostid);
this.overAllSer.deleteHostPost(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.info('删除成功'); this.message.info('删除成功');
...@@ -315,7 +319,7 @@ export class BasicComponent implements OnInit { ...@@ -315,7 +319,7 @@ export class BasicComponent implements OnInit {
nzOnOk: () => { nzOnOk: () => {
const data = { const data = {
hostids:this.batchDelList hostids:this.batchDelList
} };
this.overAllSer.deleteHostPost(data).subscribe( this.overAllSer.deleteHostPost(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
......
...@@ -19,53 +19,53 @@ ...@@ -19,53 +19,53 @@
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button> <button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div> </div>
</div> </div>
<div class="content-params">
<div nz-row> <div nz-row>
<div nz-col class="text-right" nzSpan="3"> <div nz-col class="text-right" nzSpan="3">
事件编号前缀 事件编号前缀
</div> </div>
<div nz-col nzSpan="1"></div> <div nz-col nzSpan="1"></div>
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<input style="width: 50%" nz-input placeholder="事件编号前缀" disabled="{{isDisabled}}" [(ngModel)]="value"> <input style="width: 50%" nz-input placeholder="事件编号前缀" disabled="{{isDisabled}}" [(ngModel)]="value">
<button *ngIf="isDisabled" (click)="editType()" nz-button nzType="default">编辑</button> <button *ngIf="isDisabled" (click)="editType()" nz-button nzType="default">编辑</button>
<button *ngIf="!isDisabled" (click)="saveType()" nz-button nzType="default">保存</button> <button *ngIf="!isDisabled" (click)="saveType()" nz-button nzType="default">保存</button>
</div>
</div> </div>
</div>
<div nz-row> <div nz-row>
<div nz-col class="text-right" nzSpan="3"> <div nz-col class="text-right" nzSpan="3">
事件分类 事件分类
</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="18">
<div>
<button (click)="showAddModal('添加事件分类',0)" nz-button nzType="default">添加</button>
</div> </div>
<div *ngFor="let item of eventList;"> <div nz-col nzSpan="1"></div>
<span>{{item.name}}</span> <div nz-col nzSpan="18">
<span (click)="showEditModal('编辑事件分类',1,item)">编辑</span> <div>
<span (click)="deleteItem(item)">删除</span> <button (click)="showAddModal('添加事件分类',0)" nz-button nzType="default">添加</button>
</div>
<div *ngFor="let item of eventList;">
<span>{{item.name}}</span>
<span (click)="showEditModal('编辑事件分类',1,item)">编辑</span>
<span (click)="deleteItem(item)">删除</span>
</div>
</div> </div>
</div> </div>
</div>
<div nz-row> <div nz-row>
<div nz-col class="text-right" nzSpan="3"> <div nz-col class="text-right" nzSpan="3">
计划分类 计划分类
</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="18">
<div>
<button (click)="showAddModal('添加计划分类',1)" nz-button nzType="default">添加</button>
</div> </div>
<div *ngFor="let item of planList;"> <div nz-col nzSpan="1"></div>
<span>{{item.name}}</span> <div nz-col nzSpan="18">
<span (click)="showEditModal('编辑计划分类',1,item)">编辑</span> <div>
<span (click)="deleteItem(item)">删除</span> <button (click)="showAddModal('添加计划分类',1)" nz-button nzType="default">添加</button>
</div>
<div *ngFor="let item of planList;">
<span>{{item.name}}</span>
<span (click)="showEditModal('编辑计划分类',1,item)">编辑</span>
<span (click)="deleteItem(item)">删除</span>
</div>
</div> </div>
</div> </div>
</div> </div>
<smart-params-type #smartParamstype (done)="getList()"></smart-params-type> <smart-params-type #smartParamstype (done)="getList()"></smart-params-type>
...@@ -7,7 +7,13 @@ import {CommonService} from '../../shared/common/common.service'; ...@@ -7,7 +7,13 @@ import {CommonService} from '../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-pararms', selector: 'smart-pararms',
templateUrl: './pararms.component.html', templateUrl: './pararms.component.html',
styles: [] styles: [
`
:host ::ng-deep .content-params .ant-row{
margin: 10px 0;
}
`
]
}) })
export class PararmsComponent implements OnInit { export class PararmsComponent implements OnInit {
@ViewChild('smartParamstype') smartParamstype:ParamsTypeComponent; @ViewChild('smartParamstype') smartParamstype:ParamsTypeComponent;
......
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