Commit e19b8856 authored by wangqinghua's avatar wangqinghua

update

parent 22d0ba8d
......@@ -13,7 +13,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -13,7 +13,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -8,7 +8,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -4,8 +4,10 @@
</nz-sider>
<nz-layout>
<jhi-navbar></jhi-navbar>
<nz-content class="margin-0-16">
<router-outlet></router-outlet>
<nz-content >
<div class="container" #container>
<router-outlet></router-outlet>
</div>
</nz-content>
</nz-layout>
</nz-layout>
import { Component, OnInit } from '@angular/core';
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import { Router, ActivatedRouteSnapshot, NavigationEnd } from '@angular/router';
import { EmitService } from "../../shared/event/eventEmitter";
import { Title } from '@angular/platform-browser';
import {LocalStorageService, SessionStorageService} from "ngx-webstorage";
import { zh_CN,NzI18nService } from "ng-zorro-antd";
import {CommonService} from '../../shared/common/common.service';
@Component({
selector: 'jhi-main',
templateUrl: './main.component.html'
templateUrl: './main.component.html',
styles:[`
.container{
margin: 0 16px;
background-color: #fff;
}
`]
})
export class JhiMainComponent implements OnInit {
@ViewChild('container') container:ElementRef;
token: boolean;
isCollapsed: boolean;
......@@ -19,7 +27,8 @@ export class JhiMainComponent implements OnInit {
private $localStorage: LocalStorageService,
private $sessionStorage: SessionStorageService,
public emitService: EmitService,
private nzI18nService:NzI18nService
private nzI18nService:NzI18nService,
private commonSer:CommonService
) {}
private getPageTitle(routeSnapshot: ActivatedRouteSnapshot) {
......@@ -31,6 +40,8 @@ export class JhiMainComponent implements OnInit {
}
ngOnInit() {
console.log(this.container);
this.nzI18nService.setLocale(zh_CN);
const accessToken = this.$localStorage.retrieve('accessToken');
......@@ -47,5 +58,7 @@ export class JhiMainComponent implements OnInit {
});
}
fullScreen(){
this.commonSer.showInFullScreen(this.container.nativeElement,"RequestFullScreen")
}
}
......@@ -41,18 +41,18 @@
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="editName">显示名</nz-form-label>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="showName">显示名</nz-form-label>
<nz-form-control [nzSpan]="14">
<input id="editName" nz-input placeholder="显示名" name="editName" [(ngModel)]="validateForm.name">
<input id="showName" nz-input placeholder="显示名" name="showName" [(ngModel)]="validateForm.name">
</nz-form-control>
</nz-form-item>
</div>
</div>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="host">IP地址</nz-form-label>
<nz-form-label [nzSpan]="4" nzRequired nzFor="hostAdrress">IP地址</nz-form-label>
<nz-form-control [nzSpan]="14">
<input id="host" type="text" nz-input name="host" [(ngModel)]="validateForm.host">
<input id="hostAdrress" type="text" nz-input name="hostAdrress" [(ngModel)]="validateForm.host">
</nz-form-control>
</nz-form-item>
......@@ -168,9 +168,9 @@
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="ipmi_username">用户名称</nz-form-label>
<nz-form-label [nzSpan]="6" nzFor="ipmi_username_edit">用户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input id="ipmi_username" name="ipmi_username" nz-input placeholder="用户名称" [(ngModel)]="validateForm.ipmi_username">
<input id="ipmi_username_edit" name="ipmi_username_edit" nz-input placeholder="用户名称" [(ngModel)]="validateForm.ipmi_username">
</nz-form-control>
</nz-form-item>
</div>
......@@ -195,9 +195,9 @@
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="ipmi_password">密码</nz-form-label>
<nz-form-label [nzSpan]="6" nzFor="ipmi_password_edit">密码</nz-form-label>
<nz-form-control [nzSpan]="14">
<input id="ipmi_password" name="ipmi_password" nz-input placeholder="密码" [(ngModel)]="validateForm.ipmi_password">
<input id="ipmi_password_edit" name="ipmi_password_edit" nz-input placeholder="密码" [(ngModel)]="validateForm.ipmi_password">
</nz-form-control>
</nz-form-item>
</div>
......
......@@ -13,7 +13,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -547,7 +547,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
color: ['#bfbfbf','#3194e0'],
color: ['#3194e0','#bfbfbf'],
series: [
{
name: '',
......
<div nz-row class="breadcrumbs">
<div nz-col nzSpan="16">
<div nz-col nzSpan="12">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
......@@ -15,15 +15,13 @@
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="5">
<nz-input-group>
<div nz-col nzSpan="10" class="search-input text-right">
<input (keyup.enter)="search('')" type="text" nz-input [(ngModel)]="searchName" placeholder="输入资源名称">
</nz-input-group>
<button (click)="search('')" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button>
</div>
<div nz-col nzSpan="3" class="text-right">
<button (click)="search('')" nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<div nz-col nzSpan="2" class="text-right">
<button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
<button (click)="showInFullScreen()" nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div>
</div>
......
......@@ -14,6 +14,7 @@ import {CreateGroupComponent} from '../../modal/create-group/create-group.compon
import {PauseComponent} from '../../modal/pause/pause.component';
import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component';
import {color} from '../../app.constants';
import {JhiMainComponent} from '../../layouts';
export interface TreeNodeInterface {
host: any;
......@@ -36,6 +37,7 @@ export interface TreeNodeInterface {
})
export class BasicComponent implements OnInit {
//组件
@ViewChild('basicEdit') basicEdit: BasicEditComponent;
@ViewChild('smartCheck') smartCheck: BasiCheckComponent;
@ViewChild('smartCreateGroup') smartCreateGroup: CreateGroupComponent;
......@@ -74,7 +76,7 @@ export class BasicComponent implements OnInit {
searchData;
constructor(private fb: FormBuilder, private overAllSer: OverAllService, private router: Router,
private modalService: NzModalService, private message: NzMessageService,
private modalService: NzModalService, private message: NzMessageService,private main:JhiMainComponent
) {
}
......@@ -96,6 +98,10 @@ export class BasicComponent implements OnInit {
}
}
showInFullScreen(){
this.main.fullScreen();
}
convertTreeToList(root: any, groupId: string,index): TreeNodeInterface[] {
const stack = [];
const array = [];
......
<div nz-row class="breadcrumbs">
<div nz-col nzSpan="16">
<div nz-col nzSpan="12">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
......@@ -12,13 +12,11 @@
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="5">
<nz-input-group>
<input (keyup.enter)="getwebList()" type="text" [(ngModel)]="name" nz-input placeholder="请输入网站名称">
</nz-input-group>
<div nz-col nzSpan="10" class="search-input text-right">
<input (keyup.enter)="getwebList()" type="text" [(ngModel)]="name" nz-input placeholder="请输入网站名称">
<button (click)="getwebList()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button>
</div>
<div nz-col nzSpan="3" class="text-right">
<button (click)="getwebList()" nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<div nz-col nzSpan="2" class="text-right">
<button (click)="ngOnInit()" 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>
......@@ -29,19 +27,23 @@
<span>网站监测数:{{checkStatus.total}}</span>
<span>监测状态:
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.green"></nz-tag>
<i *ngIf="!checkStatus.type.normalNum && checkStatus.type.normalNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<i *ngIf="!checkStatus.type.normalNum && checkStatus.type.normalNum !=0"
class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.normalNum}}
</span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!checkStatus.type.warnNum && checkStatus.type.warnNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<i *ngIf="!checkStatus.type.warnNum && checkStatus.type.warnNum !=0"
class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.warnNum}}
</span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.red"></nz-tag>
<i *ngIf="!checkStatus.type.seriousNum && checkStatus.type.seriousNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<i *ngIf="!checkStatus.type.seriousNum && checkStatus.type.seriousNum !=0"
class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.seriousNum}}
</span>
<span> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!checkStatus.type.notNum && checkStatus.type.notNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<i *ngIf="!checkStatus.type.notNum && checkStatus.type.notNum !=0"
class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.notNum}}
</span>
</span>
......@@ -58,7 +60,8 @@
</button>
</div>
</div>
<nz-table #nzTable [nzData]="dataSet" nzSingleSort [nzLoading]="loading" [nzTotal]="totalNum" [nzPageIndex]="pageIndex" [nzPageSize]="pageSize" (nzPageIndexChange)="getwebList()" [nzFrontPagination]="false">
<nz-table #nzTable [nzData]="dataSet" nzSingleSort [nzLoading]="loading" [nzTotal]="totalNum" [nzPageIndex]="pageIndex"
[nzPageSize]="pageSize" (nzPageIndexChange)="getwebList()" [nzFrontPagination]="false">
<thead>
<tr>
<th [nzChecked]="allChecked"></th>
......@@ -98,9 +101,11 @@
<a nz-dropdown>更多 <i class="anticon anticon-down"></i>
</a>
<ul nz-menu nzSelectable>
<li nz-menu-item><a>
<ng-container *ngIf="item.status == 1"> <span (click)="operationHost(item,'0','开启')">开启监控</span> </ng-container>
<ng-container *ngIf="item.status == 0"> <span (click)="operationHost(item,'1','关闭')">停止监控</span></ng-container>
<li nz-menu-item><a>
<ng-container *ngIf="item.status == 1"><span
(click)="operationHost(item,'0','开启')">开启监控</span></ng-container>
<ng-container *ngIf="item.status == 0"><span
(click)="operationHost(item,'1','关闭')">停止监控</span></ng-container>
</a></li>
<li (click)="showTempStop(item)" nz-menu-item>
<a><span *ngIf="item.monitorTask">取消</span>临时暂停</a>
......
......@@ -13,7 +13,8 @@ import {PauseComponent} from '../../modal/pause/pause.component';
`
:host ::ng-deep .table-dropdown a{
font-weight: 300;
}`
}
`
]
})
export class NetworkCheckComponent implements OnInit {
......
......@@ -95,4 +95,33 @@ export class CommonService implements OnInit {
link.click();
document.body.removeChild(link);
}
/**
* 部分区域全屏
* @param element 全屏区域
* @param method 全屏方法
* @returns {any}
*/
showInFullScreen(element, method){
let usablePrefixMethod;
['webkit', 'moz', 'ms', 'o', ''].forEach( (prefix)=> {
if (usablePrefixMethod) {
return
}
if (prefix === '') {
// 无前缀,方法首字母小写
// method = method.slice(0, 1).toLowerCase() + method.slice(1)
}
let typePrefixMethod = typeof element[prefix + method];
if (typePrefixMethod + '' !== 'undefined') {
if (typePrefixMethod === 'function') {
usablePrefixMethod = element[prefix + method]()
} else {
usablePrefixMethod = element[prefix + method]
}
}
}
)
return usablePrefixMethod;
}
}
......@@ -13,7 +13,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -19,7 +19,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -16,7 +16,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -14,7 +14,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -17,7 +17,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -17,7 +17,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button (click)="ngOnInit()" 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>
......
......@@ -29,6 +29,9 @@
.search-form .ant-input{
width: initial;
}
.search-input .ant-input{
width: 60%;
}
.releative{
position: relative;
}
......
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