Commit 46ccb72e authored by xiaowenjie's avatar xiaowenjie
parents 1baf0a43 bed93c58
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="color.red"></nz-tag> <nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="color.red"></nz-tag>
<nz-tag *ngIf="data.priority == 2 || data.priority == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="data.priority == 2 || data.priority == 3" [nzColor]="color.yellow"></nz-tag>
</td> </td>
<td class="cursor main-color">{{data.hostname}}</td> <td class="cursor main-color" (click)="goToDetail(data)">{{data.hostname}}</td>
<td>{{data.description}}</td> <td>{{data.description}}</td>
<td>{{data.continuedTime}}</td> <td>{{data.continuedTime}}</td>
</tr> </tr>
......
...@@ -7,6 +7,7 @@ import {AlarmService} from '../alarm/alarm.service'; ...@@ -7,6 +7,7 @@ import {AlarmService} from '../alarm/alarm.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {LayoutService} from '../layouts/layout.service'; import {LayoutService} from '../layouts/layout.service';
import {SelectGroupComponent} from '../modal/select-group/select-group.component'; import {SelectGroupComponent} from '../modal/select-group/select-group.component';
import {Router} from '@angular/router';
@Component({ @Component({
selector: 'jhi-home', selector: 'jhi-home',
...@@ -83,7 +84,8 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -83,7 +84,8 @@ export class HomeComponent implements OnInit,AfterViewInit {
private alarmSer:AlarmService,private renderer:Renderer2, private alarmSer:AlarmService,private renderer:Renderer2,
private layoutSer:LayoutService, private layoutSer:LayoutService,
private principal: Principal, private principal: Principal,
private eventManager: JhiEventManager private eventManager: JhiEventManager,
private router:Router
) { ) {
} }
...@@ -105,6 +107,17 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -105,6 +107,17 @@ export class HomeComponent implements OnInit,AfterViewInit {
this.renderer.setStyle(this.leftDiv.nativeElement,"height",rightHeight +"px"); this.renderer.setStyle(this.leftDiv.nativeElement,"height",rightHeight +"px");
} }
//查看详情
goDetail(item) {
this.router.navigate(['app/main/basic-detail'], {
queryParams: {
hostId: item.hostid,
name: item.hostname,
hostName: item.hostname
}
});
}
//我的关注 //我的关注
getMyFollow(){ getMyFollow(){
this.layoutSer.myFollow().subscribe( this.layoutSer.myFollow().subscribe(
......
...@@ -34,31 +34,33 @@ ...@@ -34,31 +34,33 @@
</ng-container> </ng-container>
</nz-select> </nz-select>
</div> </div>
<div nz-col nzSpan="7"> <ng-container *ngIf="echartType == 'history'">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" <div nz-col nzSpan="7">
[nzButtonStyle]="'solid'"> <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()"
<label nz-radio-button nzValue="1">今天</label> [nzButtonStyle]="'solid'">
<label nz-radio-button nzValue="2">昨天</label> <label nz-radio-button nzValue="1">今天</label>
<label nz-radio-button nzValue="3">三天</label> <label nz-radio-button nzValue="2">昨天</label>
<label nz-radio-button nzValue="4">一周</label> <label nz-radio-button nzValue="3">三天</label>
<label nz-radio-button nzValue="5">自定义</label> <label nz-radio-button nzValue="4">一周</label>
</nz-radio-group> <label nz-radio-button nzValue="5">自定义</label>
</div> </nz-radio-group>
<div nz-col nzSpan="8" > </div>
<ng-container *ngIf="timeType == '5'"> <div nz-col nzSpan="8" >
<nz-date-picker <ng-container *ngIf="timeType == '5'">
nzShowTime <nz-date-picker
[(ngModel)]="timeBegin" nzShowTime
nzPlaceHolder="开始时间" [(ngModel)]="timeBegin"
></nz-date-picker> nzPlaceHolder="开始时间"
<nz-date-picker ></nz-date-picker>
nzShowTime <nz-date-picker
nzFormat="yyyy-MM-dd HH:mm:ss" nzShowTime
[(ngModel)]="timeEnd" nzFormat="yyyy-MM-dd HH:mm:ss"
nzPlaceHolder="结束时间" [(ngModel)]="timeEnd"
></nz-date-picker> nzPlaceHolder="结束时间"
</ng-container> ></nz-date-picker>
</div> </ng-container>
</div>
</ng-container>
<div nz-col nzSpan="3" class="search-input text-right"> <div nz-col nzSpan="3" class="search-input text-right">
<button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button> <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button>
</div> </div>
...@@ -71,49 +73,52 @@ ...@@ -71,49 +73,52 @@
<div echarts [options]="chartOption"style="height: 400px;width: 100%"></div> <div echarts [options]="chartOption"style="height: 400px;width: 100%"></div>
</ng-container> </ng-container>
</nz-spin> </nz-spin>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'"> <ng-container *ngIf="echartType == 'history'">
<nz-tab nzTitle="接收流量排行"> <nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-table #nzTable [nzData]="inList" [nzLoading]="inLoading" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="inChnagePage($event)"> <nz-tab nzTitle="接收流量排行">
<thead> <nz-table #nzTable [nzData]="inList" [nzLoading]="inLoading" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="inChnagePage($event)">
<tr> <thead>
<th nzWidth="20%">监测点名称</th> <tr>
<th>最大值</th> <th nzWidth="20%">监测点名称</th>
<th>最小值</th> <th>最大值</th>
<th>平均值</th> <th>最小值</th>
</tr> <th>平均值</th>
</thead>
<tbody>
<ng-container *ngFor="let item of inList">
<tr class="cursor" (click)="getEcharts(item.itemid)">
<td>{{item.itemName}}</td>
<td>{{item.max | toUtil}}</td>
<td>{{item.min | toUtil}}</td>
<td>{{item.avg | toUtil}}</td>
</tr> </tr>
</ng-container> </thead>
</tbody> <tbody>
</nz-table> <ng-container *ngFor="let item of inList">
</nz-tab> <tr class="cursor" (click)="getEcharts(item.itemid)">
<nz-tab nzTitle="发送流量排行"> <td>{{item.itemName}}</td>
<nz-table #nzTable [nzData]="outList" [nzLoading]="outLoading" [nzFrontPagination]="false" [nzTotal]="outTotalNum" [nzPageIndex]="outPageNum" [nzPageSize]="outPageCount" (nzPageIndexChange)="outChnagePage($event)"> <td>{{item.max | toUtil}}</td>
<thead> <td>{{item.min | toUtil}}</td>
<tr> <td>{{item.avg | toUtil}}</td>
<th nzWidth="20%">监测点名称</th> </tr>
<th>最大值</th> </ng-container>
<th>最小值</th> </tbody>
<th>平均值</th> </nz-table>
</tr> </nz-tab>
</thead> <nz-tab nzTitle="发送流量排行">
<tbody> <nz-table #nzTable [nzData]="outList" [nzLoading]="outLoading" [nzFrontPagination]="false" [nzTotal]="outTotalNum" [nzPageIndex]="outPageNum" [nzPageSize]="outPageCount" (nzPageIndexChange)="outChnagePage($event)">
<ng-container *ngFor="let data of outList"> <thead>
<tr class="cursor" (click)="getEcharts(data.itemid)"> <tr>
<td>{{data.itemName}}</td> <th nzWidth="20%">监测点名称</th>
<td>{{data.max | toUtil}}</td> <th>最大值</th>
<td>{{data.min | toUtil}}</td> <th>最小值</th>
<td>{{data.avg | toUtil}}</td> <th>平均值</th>
</tr> </tr>
</ng-container> </thead>
</tbody> <tbody>
</nz-table> <ng-container *ngFor="let data of outList">
</nz-tab> <tr class="cursor" (click)="getEcharts(data.itemid)">
</nz-tabset> <td>{{data.itemName}}</td>
<td>{{data.max | toUtil}}</td>
<td>{{data.min | toUtil}}</td>
<td>{{data.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
</ng-container>
...@@ -120,7 +120,7 @@ export class LineComponent implements OnInit { ...@@ -120,7 +120,7 @@ export class LineComponent implements OnInit {
this.totalNum = res.data.totalNum; this.totalNum = res.data.totalNum;
this.inList = res.data.data; this.inList = res.data.data;
this.inList.forEach(e=>{ //进口流量回显 this.inList.forEach(e=>{ //进口流量回显
if(e.itemId = this.itemId[0]){ if(e.itemId == this.itemId[0]){
e.checked = true; e.checked = true;
} }
}) })
...@@ -143,7 +143,7 @@ export class LineComponent implements OnInit { ...@@ -143,7 +143,7 @@ export class LineComponent implements OnInit {
this.totalNum = res.data.totalNum; this.totalNum = res.data.totalNum;
this.outList = res.data.data; this.outList = res.data.data;
this.outList.forEach(e=>{ this.outList.forEach(e=>{
if(e.itemId = this.itemId[1]){ //出口流量回显 if(e.itemId == this.itemId[1]){ //出口流量回显
e.checked = true; e.checked = true;
} }
}) })
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<tr> <tr>
<th [nzChecked]="allChecked"></th> <th [nzChecked]="allChecked"></th>
<th>名称</th> <th>名称</th>
<th>告警状态</th> <th>告警</th>
<th>关联资产</th> <th>关联资产</th>
<!--<th nzWidth="20%">主机启用状态</th>--> <!--<th nzWidth="20%">主机启用状态</th>-->
<th>可用性</th> <th>可用性</th>
......
...@@ -84,7 +84,6 @@ TopologyPanel.prototype.loadTopology = function (response, topologyGuid, backImg ...@@ -84,7 +84,6 @@ TopologyPanel.prototype.loadTopology = function (response, topologyGuid, backImg
TopologyPanel.prototype.loadTopologyByJson = function (topologyJson, backImg) { TopologyPanel.prototype.loadTopologyByJson = function (topologyJson, backImg) {
try { try {
JTopo.replaceStageWithJson(topologyJson) JTopo.replaceStageWithJson(topologyJson)
var timer = $interval(function(){},100,10);
if (editor.stage && editor.scene && editor.scene.childs && editor.scene.childs.length > 0) { if (editor.stage && editor.scene && editor.scene.childs && editor.scene.childs.length > 0) {
editor.stage.centerAndZoom() editor.stage.centerAndZoom()
console.log(editor.utils.getAllNodes()[0]); console.log(editor.utils.getAllNodes()[0]);
......
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