Commit f637d438 authored by wangqinghua's avatar wangqinghua

update

parent 7ddd6a30
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
</p> </p>
<p> <p>
<nz-tag nzColor="#80ba78"></nz-tag> <nz-tag nzColor="#80ba78"></nz-tag>
内存使用率 0% 内存使用率 {{(item.memory).toFixed(2)}}%
</p> </p>
<!--<p>--> <!--<p>-->
<!--<nz-tag nzColor="#73b6e4"></nz-tag>--> <!--<nz-tag nzColor="#73b6e4"></nz-tag>-->
......
...@@ -133,17 +133,17 @@ ...@@ -133,17 +133,17 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <!--<nz-form-item>-->
<nz-form-label [nzSpan]="6" nzFor="valuemapid">查看值</nz-form-label> <!--<nz-form-label [nzSpan]="6" nzFor="valuemapid">查看值</nz-form-label>-->
<nz-form-control [nzSpan]="14"> <!--<nz-form-control [nzSpan]="14">-->
<nz-select name="valuemapid" formControlName="valuemapid" nzPlaceHolder="请选择查看值"> <!--<nz-select name="valuemapid" formControlName="valuemapid" nzPlaceHolder="请选择查看值">-->
<nz-option nzValue="0" nzLabel="不变"></nz-option> <!--<nz-option nzValue="0" nzLabel="不变"></nz-option>-->
<ng-container *ngFor="let item of valueMapList"> <!--<ng-container *ngFor="let item of valueMapList">-->
<nz-option [nzValue]="item.valuemapid" [nzLabel]="item.name"></nz-option> <!--<nz-option [nzValue]="item.valuemapid" [nzLabel]="item.name"></nz-option>-->
</ng-container> <!--</ng-container>-->
</nz-select> <!--</nz-select>-->
</nz-form-control> <!--</nz-form-control>-->
</nz-form-item> <!--</nz-form-item>-->
</form> </form>
<div class="modal-footer-btn"> <div class="modal-footer-btn">
<button nz-button (click)="handleCheckOk()" nzType="primary">下一步</button> <button nz-button (click)="handleCheckOk()" nzType="primary">下一步</button>
......
...@@ -82,9 +82,9 @@ export class BasiCheckComponent implements OnInit { ...@@ -82,9 +82,9 @@ export class BasiCheckComponent implements OnInit {
// formula: [null, [Validators.required]], // formula: [null, [Validators.required]],
history: ['3600'], history: ['3600'],
trends: [null], trends: [null],
valuemapid: ['0'], // valuemapid: ['0'],
delay: [null, [Validators.required]], delay: [null, [Validators.required]],
snmp_oid: [null], snmp_oid: ['interfaces.ifTable.ifEntry.ifInOctets.1'],
snmp_community: ['public'], snmp_community: ['public'],
applications: [null], applications: [null],
}); });
...@@ -112,15 +112,15 @@ export class BasiCheckComponent implements OnInit { ...@@ -112,15 +112,15 @@ export class BasiCheckComponent implements OnInit {
//映射值 //映射值
getValuemap() { getValuemap() {
this.overAllSer.findValuemap().subscribe( // this.overAllSer.findValuemap().subscribe(
(res) => { // (res) => {
if (res.errCode == 10000) { // if (res.errCode == 10000) {
this.valueMapList = res.data; // this.valueMapList = res.data;
} else { // } else {
this.message.error(res.errMsg); // this.message.error(res.errMsg);
} // }
} // }
); // );
} }
//编辑 //编辑
...@@ -136,9 +136,11 @@ export class BasiCheckComponent implements OnInit { ...@@ -136,9 +136,11 @@ export class BasiCheckComponent implements OnInit {
data.type += ''; data.type += '';
data.interfaceid += ''; data.interfaceid += '';
data.value_type += ''; data.value_type += '';
if(data.applications){
data.applications = data.applications.map(e=>{ data.applications = data.applications.map(e=>{
return e.applicationid; return e.applicationid;
}); });
}
this.validateForm.patchValue(data); this.validateForm.patchValue(data);
data.triggers.forEach((value) => { data.triggers.forEach((value) => {
...@@ -405,8 +407,8 @@ export class BasiCheckComponent implements OnInit { ...@@ -405,8 +407,8 @@ export class BasiCheckComponent implements OnInit {
createTrigger(data) { createTrigger(data) {
const res = { const res = {
itemName: this.validateForm.value.name, itemName: this.validateForm.value.name,
faultCondition: data.faultCondition, faultCondition: data.faultCondition.substring(5,data.faultCondition.length),
condition: data.condition condition: data.condition.substring(5,data.faultCondition.length)
}; };
this.overAllSer.createTrigger(res).subscribe( this.overAllSer.createTrigger(res).subscribe(
(response) => { (response) => {
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
></nz-tree> ></nz-tree>
</div> </div>
<div nz-col [nzSpan]="10"> <div nz-col [nzSpan]="11">
<nz-table #basicTable [nzData]="userList" <nz-table #basicTable [nzData]="userList"
[nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageSize"
(nzCurrentPageDataChange)="currentPageDataChange($event)" (nzCurrentPageDataChange)="currentPageDataChange($event)"
(nzPageIndexChange)="refreshStatus()" (nzPageIndexChange)="changePage($event)">
(nzPageSizeChange)="refreshStatus()">
<thead> <thead>
<tr> <tr>
<th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate"
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
</nz-table> </nz-table>
</div> </div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="7">
<p>已选中用户 <span>清空</span></p> <p>已选中用户 <span (click)="clearList()" class="main-color cursor">清空</span></p>
<p (click)="handle" *ngFor="let item of selectList;let i = index;"> <p (click)="handle" *ngFor="let item of selectList;let i = index;">
<span>{{item.name}}</span> <span>{{item.name}}</span>
<span>{{item.phoneNumber}}</span> <span>{{item.phoneNumber}}</span>
<span (click)="deleteSelect(i)">X</span> <span class="main-color cursor" (click)="deleteSelect(i)">X</span>
</p> </p>
</div> </div>
</div> </div>
......
...@@ -6,7 +6,11 @@ import {CommonService} from '../../shared/common/common.service'; ...@@ -6,7 +6,11 @@ import {CommonService} from '../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-select-person', selector: 'smart-select-person',
templateUrl: './select-person.component.html', templateUrl: './select-person.component.html',
styles: [] styles: [
`
`
]
}) })
export class SelectPersonComponent implements OnInit { export class SelectPersonComponent implements OnInit {
@Output() done = new EventEmitter(); @Output() done = new EventEmitter();
...@@ -24,7 +28,8 @@ export class SelectPersonComponent implements OnInit { ...@@ -24,7 +28,8 @@ export class SelectPersonComponent implements OnInit {
deleteList=[]; deleteList=[];
pageNum = 1; pageNum = 1;
pageSize = 10; pageSize = 5;
totalNum;
organizationId = null; organizationId = null;
displayData: Array<{ key1: string; key2: number; key3: string; key4: string; checked: boolean }> = []; displayData: Array<{ key1: string; key2: number; key3: string; key4: string; checked: boolean }> = [];
...@@ -33,7 +38,14 @@ export class SelectPersonComponent implements OnInit { ...@@ -33,7 +38,14 @@ export class SelectPersonComponent implements OnInit {
} }
checkAll(value: boolean): void { checkAll(value: boolean): void {
this.displayData.forEach(data => data.checked = value); this.displayData.forEach(data =>{
data.checked = value;
if(value){
this.selectList.push(data);
}else{
this.selectList = [];
}
});
this.refreshStatus(); this.refreshStatus();
} }
...@@ -101,6 +113,12 @@ export class SelectPersonComponent implements OnInit { ...@@ -101,6 +113,12 @@ export class SelectPersonComponent implements OnInit {
} }
} }
//翻页
changePage($event){
this.pageNum = $event;
this.getUser();
}
getUser() { getUser() {
const data = { const data = {
'search': null, 'search': null,
...@@ -111,6 +129,7 @@ export class SelectPersonComponent implements OnInit { ...@@ -111,6 +129,7 @@ export class SelectPersonComponent implements OnInit {
this.systemSer.user(data).subscribe( this.systemSer.user(data).subscribe(
(res) => { (res) => {
this.userList = res.data.data; this.userList = res.data.data;
this.totalNum = res.data.totalCount;
} }
); );
} }
...@@ -185,4 +204,9 @@ export class SelectPersonComponent implements OnInit { ...@@ -185,4 +204,9 @@ export class SelectPersonComponent implements OnInit {
this.init(); this.init();
} }
//清空选择
clearList(){
this.selectList = [];
}
} }
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</thead> </thead>
<tbody> <tbody>
<ng-container *ngFor="let item of inList"> <ng-container *ngFor="let item of inList">
<tr (click)="getEcharts(item.itemid)"> <tr class="cursor" (click)="getEcharts(item.itemid)">
<td>{{item.itemName}}</td> <td>{{item.itemName}}</td>
<td>{{item.max | toUtil}}</td> <td>{{item.max | toUtil}}</td>
<td>{{item.min | toUtil}}</td> <td>{{item.min | toUtil}}</td>
......
...@@ -30,19 +30,19 @@ ...@@ -30,19 +30,19 @@
</div> </div>
<div class="releative" #checkEle> <div class="releative" #checkEle>
<div #colorEle class="checkTags tag-form"> <div #colorEle class="checkTags tag-form">
<span (click)="changeState('正常')"> <span [ngClass]="{'select-border': changeStates == '正常'}" (click)="changeState('正常')">
<nz-tag [nzColor]="color.green"></nz-tag> <nz-tag [nzColor]="color.green"></nz-tag>
<i *ngIf="!checkStatus.normal && checkStatus.normal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>{{checkStatus.normal}} <i *ngIf="!checkStatus.normal && checkStatus.normal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>{{checkStatus.normal}}
</span> </span>
<span (click)="changeState('告警')"> <nz-tag [nzColor]="color.yellow"></nz-tag> <span [ngClass]="{'select-border': changeStates == '告警'}" (click)="changeState('告警')"> <nz-tag [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!checkStatus.warning && checkStatus.warning !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!checkStatus.warning && checkStatus.warning !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.warning}} {{checkStatus.warning}}
</span> </span>
<span (click)="changeState('严重')"> <nz-tag [nzColor]="color.red"></nz-tag> <span [ngClass]="{'select-border': changeStates == '严重'}" (click)="changeState('严重')"> <nz-tag [nzColor]="color.red"></nz-tag>
<i *ngIf="!checkStatus.high && checkStatus.high !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!checkStatus.high && checkStatus.high !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.high}} {{checkStatus.high}}
</span> </span>
<span (click)="changeState('禁用')"> <nz-tag [nzColor]="color.gray"></nz-tag> <span [ngClass]="{'select-border': changeStates == '禁用'}" (click)="changeState('禁用')"> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!checkStatus.disabled && checkStatus.disabled !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!checkStatus.disabled && checkStatus.disabled !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.disabled}} {{checkStatus.disabled}}
</span> </span>
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<div nz-row> <div nz-row>
<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.applicationid)" 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>
</nz-radio-group> </nz-radio-group>
</div> </div>
<nz-table #checkTable [nzData]="checkList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageIndex" [nzPageSize]="pageSize" (nzPageIndexChange)="change($event)" [nzLoading]="loading"> <nz-table #checkTable [nzData]="checkList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageIndex" [nzPageSize]="pageSize" (nzPageIndexChange)="change($event)" [nzLoading]="loading">
......
...@@ -26,8 +26,14 @@ import {DatePipe} from '@angular/common'; ...@@ -26,8 +26,14 @@ import {DatePipe} from '@angular/common';
right: 15px; right: 15px;
z-index: 999; z-index: 999;
} }
.select-border{
border: 1px solid #6097b7;
border-radius: 5px;
padding: 2px;
margin-right: 5px;
}
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3){ :host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3){
margin-right: 155px !important; margin-right: 180px !important;
} }
` `
] ]
...@@ -694,9 +700,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -694,9 +700,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this.getCheckList(); this.getCheckList();
} }
changeType(type) { changeType(item) {
this.pageIndex = 1; this.pageIndex = 1;
this.applicationId = type; if(item.name == "全部"){
this.changeStates = null;
}
this.applicationId = item.applicationid;
this.getCheckList(); this.getCheckList();
} }
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<span *ngIf="item.status == 0">启用</span> <span *ngIf="item.status == 0">启用</span>
<span *ngIf="item.status == 1">禁用</span> <span *ngIf="item.status == 1">禁用</span>
</td> </td>
<td>最近检查记录</td> <td>{{item.lastCheckTime}}</td>
<td>{{item.steps.length}}</td> <td>{{item.steps.length}}</td>
<td>{{item.delay}}</td> <td>{{item.delay}}</td>
<td>{{item.retries}}</td> <td>{{item.retries}}</td>
...@@ -119,8 +119,11 @@ ...@@ -119,8 +119,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
<!--添加网站--> <!--网站-->
<smart-website #smartWebsite (done)="getwebList()"></smart-website> <smart-website #smartWebsite (done)="getwebList()"></smart-website>
<!--临时暂停--> <!--临时暂停-->
<smart-pause #smartPause (done)="getwebList()"></smart-pause> <smart-pause #smartPause (done)="getwebList()"></smart-pause>
<!--告警-->
<smart-alarm-modal #smartAlarmModal></smart-alarm-modal>
\ No newline at end of file
...@@ -5,6 +5,7 @@ import {WebsiteComponent} from '../../modal/website/website.component'; ...@@ -5,6 +5,7 @@ import {WebsiteComponent} from '../../modal/website/website.component';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {PauseComponent} from '../../modal/pause/pause.component'; import {PauseComponent} from '../../modal/pause/pause.component';
import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component';
@Component({ @Component({
selector: 'smart-network-check', selector: 'smart-network-check',
...@@ -20,6 +21,7 @@ import {PauseComponent} from '../../modal/pause/pause.component'; ...@@ -20,6 +21,7 @@ import {PauseComponent} from '../../modal/pause/pause.component';
export class NetworkCheckComponent implements OnInit { export class NetworkCheckComponent implements OnInit {
@ViewChild('smartWebsite') smartWebsite:WebsiteComponent; @ViewChild('smartWebsite') smartWebsite:WebsiteComponent;
@ViewChild('smartPause') smartPause:PauseComponent; @ViewChild('smartPause') smartPause:PauseComponent;
@ViewChild('smartAlarmModal') smartAlarmModal:AlarmModalComponent;
color = color; color = color;
dataSet; dataSet;
...@@ -219,4 +221,9 @@ export class NetworkCheckComponent implements OnInit { ...@@ -219,4 +221,9 @@ export class NetworkCheckComponent implements OnInit {
showTempStop(item){ showTempStop(item){
this.smartPause.showModal(item.httptestid,'网站监测'); this.smartPause.showModal(item.httptestid,'网站监测');
} }
//添加告警
showAlarm() {
this.smartAlarmModal.showAddModal('添加告警');
}
} }
...@@ -48,6 +48,18 @@ ...@@ -48,6 +48,18 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
</div>
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称
</nz-form-label>
<nz-form-control [nzSpan]="14">
{{inventoryExtend?.name}}
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
...@@ -62,22 +74,21 @@ ...@@ -62,22 +74,21 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称 <nz-form-label [nzOffset]="4" nzRequired [nzSpan]="6" >父分类
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
{{inventoryExtend?.name}}
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">负责人</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired >子分类
</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
{{inventoryExtend?.person}}
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
</div> </div>
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
...@@ -191,27 +202,6 @@ ...@@ -191,27 +202,6 @@
</nz-form-item> </nz-form-item>
</div> </div>
</div> </div>
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" >父分类
</nz-form-label>
<nz-form-control [nzSpan]="14">
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired >子分类
</nz-form-label>
<nz-form-control [nzSpan]="14">
</nz-form-control>
</nz-form-item>
</div>
</div>
</div> </div>
</nz-tab> </nz-tab>
<nz-tab #thirdTabs nzTitle="关联事件" > <nz-tab #thirdTabs nzTitle="关联事件" >
...@@ -231,7 +221,7 @@ ...@@ -231,7 +221,7 @@
<tbody> <tbody>
<tr *ngFor="let data of thingList"> <tr *ngFor="let data of thingList">
<td class="table-timeline"> <td class="table-timeline">
<nz-timeline-item>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}}}</nz-timeline-item> <nz-timeline-item>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</nz-timeline-item>
</td> </td>
<td class="round-tag tag-form"> <td class="round-tag tag-form">
{{data.id}} {{data.id}}
......
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