Commit 258f38d1 authored by wangqinghua's avatar wangqinghua

update

parent 15a41fab
<!--&lt;!&ndash;资源可用性统计&ndash;&gt;-->
<!--<div nz-row class="breadcrumbs">-->
<!--<div nz-col nzSpan="16">-->
<!--<nz-breadcrumb class="padding-8-0">-->
<!--<nz-breadcrumb-item>-->
<!--当前位置:首页-->
<!--</nz-breadcrumb-item>-->
<!--</nz-breadcrumb>-->
<!--</div>-->
<!--<div nz-col nzSpan="8" class="text-right">-->
<!--<button (click)="search()" nz-button nzType="primary"><i class="anticon anticon-search"></i></button>-->
<!--<button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>-->
<!--<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>-->
<!--</div>-->
<!--</div>-->
<!--<div nz-row nzGutter="4">-->
<!--<div nz-col nzSpan="16">-->
<!--<nz-spin [nzSpinning]="isTopLoading">-->
<!--<div echarts [options]="chartTopOption" style="height: 400px;width: 100%"></div>-->
<!--</nz-spin>-->
<!--</div>-->
<!--<div nz-col nzSpan="12">-->
<!--<nz-spin [nzSpinning]="isLastLoading">-->
<!--<div echarts [options]="chartLastOption" style="height: 400px;width: 100%"></div>-->
<!--</nz-spin>-->
<!--</div>-->
<!--</div>-->
<!--资源可用性统计-->
<div nz-row class="breadcrumbs">
<div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
当前位置:首页
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button (click)="search()" nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div>
</div>
<div nz-row nzGutter="4">
<div nz-col nzSpan="16">
<div echarts [options]="leftOneChart" style="height: 400px;width: 100%"></div>
<div echarts [options]="leftTwoChart" style="height: 400px;width: 100%"></div>
</div>
<div nz-col nzSpan="12">
<div echarts [options]="rightOneChart" style="height: 400px;width: 100%"></div>
<div echarts [options]="rightTwoChart" style="height: 400px;width: 100%"></div>
</div>
</div>
......@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { JhiEventManager } from 'ng-jhipster';
import { Account, Principal } from '../shared';
import {OverAllService} from '../overAll/overAll.service';
@Component({
selector: 'jhi-home',
......@@ -19,15 +20,34 @@ export class HomeComponent implements OnInit {
rightTwoChart;
constructor(
private overAllSer:OverAllService,
private principal: Principal,
private eventManager: JhiEventManager
) {
}
ngOnInit() {
this.findGroupCount();
this.findHostCount();
}
findGroupCount(){
this.overAllSer.findGroupCount().subscribe(
(res)=>{
}
)
}
findHostCount(){
this.overAllSer.findHostCount().subscribe(
(res)=>{
}
)
}
login() {
search(){
}
}
......@@ -217,6 +217,9 @@ export class BasicEditComponent implements OnInit {
if (this.macroTYpe == 'macroExpand') {
this.validateForm.macros = this.macroList2;
}
if(!this.isInVentory){
this.validateForm.inventoryExtend = null;
}
this.overAllSer.createHost(this.validateForm).subscribe(
(res) => {
if (res.errCode == 10000) {
......@@ -239,6 +242,9 @@ export class BasicEditComponent implements OnInit {
update() {
//比较监控模版是否发生变化
const clearArr = [];
if(!this.isInVentory){
this.validateForm.inventoryExtend = null;
}
this.templatesResoure.forEach(res => {
if (this.validateForm.templates.indexOf(res) == -1) {
clearArr.push(res);
......
......@@ -22,8 +22,7 @@
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td nzShowCheckbox [(nzChecked)]="data.checked"
(nzCheckedChange)="selectItem(data,$event)"></td>
<td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="selectItem(data,$event)"></td>
<td>{{data.name}}</td>
<td>{{data.phoneNumber}}</td>
</tr>
......
......@@ -150,8 +150,9 @@ export class SelectPersonComponent implements OnInit {
handEditleOk(){
if(this.title == "授予用户"){
}else{
this.done.emit(this.selectList);
}
this.done.emit(this.selectList);
this.isVisible = false;
this.init();
}
......
......@@ -314,4 +314,14 @@ export class OverAllService {
return this.http.get(SERVER_API_URL + '/valuemap/find');
}
//主机组中的主机数量统计
findGroupCount(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/findGroupCount');
}
//查询设备类型下主机的数量
findHostCount(): Observable<any> {
return this.http.get(SERVER_API_URL + '/statistics/findHostCount');
}
}
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