Commit fa987cfd authored by wangqinghua's avatar wangqinghua

项目名称配置

parent 8bbea67d
...@@ -23,8 +23,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -23,8 +23,8 @@ export class ResourceUsabilComponent implements OnInit {
//显示无数据图片 //显示无数据图片
data = { data = {
left:false, left: false,
right:false, right: false,
}; };
chartLastOption; chartLastOption;
...@@ -43,7 +43,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -43,7 +43,7 @@ export class ResourceUsabilComponent implements OnInit {
isDownload = false; isDownload = false;
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe, constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,private workSer:WorkService,private commonSer:CommonService) { private overAllSer: OverAllService, private workSer: WorkService, private commonSer: CommonService) {
} }
ngOnInit() { ngOnInit() {
...@@ -61,7 +61,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -61,7 +61,7 @@ export class ResourceUsabilComponent implements OnInit {
this.groupList = res.data; this.groupList = res.data;
this.obj.groupid = this.groupList[0].groupid + ''; this.obj.groupid = this.groupList[0].groupid + '';
this.search(); this.search();
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
...@@ -73,18 +73,17 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -73,18 +73,17 @@ export class ResourceUsabilComponent implements OnInit {
this.obj.type = 'top'; this.obj.type = 'top';
this.analysisSer.findFailureRate(this.obj).subscribe( this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
if(res.data.length > 0){ if (res.data.length > 0) {
this.data.left = false; this.data.left = false;
this.topList = res.data; this.topList = res.data;
this.setTopEcharts(); this.setTopEcharts();
}else{ } else {
this.data.left = true; this.data.left = true;
this.isLoading = false; this.isLoading = false;
this.message.warning("可用性TOP暂无数据"); this.message.warning('可用性TOP暂无数据');
} }
} else {
}else{
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
...@@ -92,21 +91,21 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -92,21 +91,21 @@ export class ResourceUsabilComponent implements OnInit {
} }
//设置top图表 //设置top图表
setTopEcharts(){ setTopEcharts() {
this.chartTopOption = { this.chartTopOption = {
title: { title: {
text: '可用性TOP 10' text: '可用性TOP 10'
}, },
tooltip : { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}, },
formatter: "{b} : {c}%" formatter: '{b} : {c}%'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.topList.map(e=>{ data: this.topList.map(e => {
return e.name; return e.name;
}), }),
...@@ -121,8 +120,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -121,8 +120,8 @@ export class ResourceUsabilComponent implements OnInit {
}, },
series: [{ series: [{
name: '可用性TOP 10', name: '可用性TOP 10',
data: this.topList.map(e=>{ data: this.topList.map(e => {
return (e.value).toFixed(2) *100; return (e.value).toFixed(2) * 100;
}), }),
type: 'bar' type: 'bar'
}] }]
...@@ -135,18 +134,18 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -135,18 +134,18 @@ export class ResourceUsabilComponent implements OnInit {
this.obj.type = 'last'; this.obj.type = 'last';
this.analysisSer.findFailureRate(this.obj).subscribe( this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
if(res.data.length > 0){ if (res.data.length > 0) {
this.data.right = false; this.data.right = false;
this.lastList = res.data; this.lastList = res.data;
this.setLastEcharts(); this.setLastEcharts();
}else{ } else {
this.data.right = true; this.data.right = true;
this.isLoading = false; this.isLoading = false;
this.message.warning("可用性Last暂无数据"); this.message.warning('可用性Last暂无数据');
} }
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
...@@ -154,21 +153,21 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -154,21 +153,21 @@ export class ResourceUsabilComponent implements OnInit {
} }
//设置last图表 //设置last图表
setLastEcharts(){ setLastEcharts() {
this.chartLastOption = { this.chartLastOption = {
title: { title: {
text: '可用性LAST 10' text: '可用性LAST 10'
}, },
tooltip : { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}, },
formatter: "{b} : {c}%" formatter: '{b} : {c}%'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.lastList.map(e=>{ data: this.lastList.map(e => {
return e.name; return e.name;
}) })
}, },
...@@ -182,8 +181,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -182,8 +181,8 @@ export class ResourceUsabilComponent implements OnInit {
}, },
series: [{ series: [{
name: '可用性LAST 10', name: '可用性LAST 10',
data: this.lastList.map(e=>{ data: this.lastList.map(e => {
return (e.value).toFixed(2) *100; return (e.value).toFixed(2) * 100;
}), }),
type: 'bar' type: 'bar'
}] }]
...@@ -239,7 +238,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -239,7 +238,7 @@ export class ResourceUsabilComponent implements OnInit {
} }
//导出 可用性 //导出 可用性
downLoadCommon(){ downLoadCommon() {
this.isDownload = true; this.isDownload = true;
const data = { const data = {
groupid: this.obj.groupid, groupid: this.obj.groupid,
...@@ -247,20 +246,20 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -247,20 +246,20 @@ export class ResourceUsabilComponent implements OnInit {
endTime: this.obj.endTime, endTime: this.obj.endTime,
}; };
this.analysisSer.findFailureRateImport(data).subscribe( this.analysisSer.findFailureRateImport(data).subscribe(
(res)=>{ (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
this.workSer.downloadTemplate('failureRate',res.data).subscribe( this.workSer.downloadTemplate('failureRate', res.data).subscribe(
(data)=>{ (data) => {
this.isDownload = false; this.isDownload = false;
this.commonSer.downloadFile('资源可用性统计.xlsx',data) this.commonSer.downloadFile('资源可用性统计.xlsx', data);
} }
) );
}else{ } else {
this.isDownload = false; this.isDownload = false;
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
) );
} }
} }
...@@ -43,5 +43,6 @@ export const HostFlow = [ ...@@ -43,5 +43,6 @@ export const HostFlow = [
{'label': 'Ping延时(ms)', value: 'ping_delay'}, {'label': 'Ping延时(ms)', value: 'ping_delay'},
{'label': '丢包数', value: 'packet_loss'}, {'label': '丢包数', value: 'packet_loss'},
{'label': '内存利用率(%)', value: 'vm_use'}, {'label': '内存利用率(%)', value: 'vm_use'},
{'label': '总流速(Kbps)', value: 'total_flow'}, {'label': '总接受流量', value: 'total_flow_receive'},
{'label': '总发送流量', value: 'total_flow'},
]; ];
<div class="logo"> <div class="logo">
<div class="text-center margin-bottom-10"> <!-- <div class="text-center margin-bottom-10">-->
<img style="height: 35px;" src="../../../content/images/logo_gaocun.png" alt="高淳监狱智能运维管理系统"> <!-- <img style="height: 35px;" src="../../../content/images/logo_gaocun.png" alt="高淳监狱智能运维管理系统">-->
</div> <!-- </div>-->
高淳监狱智能运维管理系统 {{systemName}}
</div> </div>
<ul nz-menu [nzMode]="'inline'"> <ul nz-menu [nzMode]="'inline'">
<ng-container *ngFor="let item of menuList"> <ng-container *ngFor="let item of menuList">
......
...@@ -4,6 +4,7 @@ import {Http} from '@angular/http'; ...@@ -4,6 +4,7 @@ import {Http} from '@angular/http';
import {LayoutService} from '../layout.service'; import {LayoutService} from '../layout.service';
import {LocalStorageService, SessionStorageService} from 'ngx-webstorage'; import {LocalStorageService, SessionStorageService} from 'ngx-webstorage';
import {CommonService} from '../../shared/common/common.service'; import {CommonService} from '../../shared/common/common.service';
import {OverAllService} from '../../overAll/overAll.service';
@Component({ @Component({
selector: 'jhi-sidebar', selector: 'jhi-sidebar',
...@@ -18,16 +19,24 @@ import {CommonService} from '../../shared/common/common.service'; ...@@ -18,16 +19,24 @@ import {CommonService} from '../../shared/common/common.service';
export class SidebarComponent implements OnInit { export class SidebarComponent implements OnInit {
token: boolean; token: boolean;
menuList = []; menuList = [];
systemName;
constructor(public router: Router, private http: Http, constructor(public router: Router, private http: Http,
public layoutSer: LayoutService, public layoutSer: LayoutService,
public commonSer: CommonService, public commonSer: CommonService,
private overAll:OverAllService,
private $localStorage: LocalStorageService, private $localStorage: LocalStorageService,
private $sessionStorage: SessionStorageService) { private $sessionStorage: SessionStorageService) {
} }
ngOnInit() { ngOnInit() {
this.getMenu(); this.getMenu();
this.overAll.getSystem().subscribe(
(res)=>{
console.log(res);
this.systemName = res.main.name;
}
)
// this.menuList = this.commonSer.listToTree('id', 'parentId', this.menuList); // this.menuList = this.commonSer.listToTree('id', 'parentId', this.menuList);
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div nz-row class="layui-layout layui-layout-admin header-bar"> <div nz-row class="layui-layout layui-layout-admin header-bar">
<div nz-col nzSpan="12" class="layui-header "> <div nz-col nzSpan="12" class="layui-header ">
<ng-container *ngIf="editType == '只读模式'"> <ng-container *ngIf="editType == '只读模式'">
<nz-select style="width: 200px;" nzPlaceHolder="选择背景色123" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()"> <nz-select style="width: 200px;" nzPlaceHolder="选择背景色" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()">
<nz-option nzLabel="深蓝" nzValue="#3d76ab"></nz-option> <nz-option nzLabel="深蓝" nzValue="#3d76ab"></nz-option>
<nz-option nzLabel="白色" nzValue="#ffffff"></nz-option> <nz-option nzLabel="白色" nzValue="#ffffff"></nz-option>
<nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option> <nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option>
......
...@@ -184,7 +184,6 @@ export class SwitchComponent implements OnInit { ...@@ -184,7 +184,6 @@ export class SwitchComponent implements OnInit {
objReceived.data.push(e.receivedValue); objReceived.data.push(e.receivedValue);
}); });
arr.push(objSend, objReceived); arr.push(objSend, objReceived);
console.log(arr);
this.chartNetworkOption = { this.chartNetworkOption = {
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -259,6 +258,7 @@ export class SwitchComponent implements OnInit { ...@@ -259,6 +258,7 @@ export class SwitchComponent implements OnInit {
}, },
data: data.map(e => { data: data.map(e => {
return e.val; return e.val;
return e.val;
}) })
},] },]
}; };
......
...@@ -535,4 +535,9 @@ export class OverAllService { ...@@ -535,4 +535,9 @@ export class OverAllService {
waringTrendByHost(data): Observable<any> { waringTrendByHost(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/statistics/waringTrendByHost', data); return this.http.post(SERVER_API_URL + '/statistics/waringTrendByHost', data);
} }
//查询系统信息
getSystem(): Observable<any> {
return this.http.get( './json/system.json');
}
} }
...@@ -143,7 +143,6 @@ export class CommonService implements OnInit { ...@@ -143,7 +143,6 @@ export class CommonService implements OnInit {
* @param timeType 0:最近一小时 1:今天 2:昨天(最近一天) 3:最近三天 4:最近一周 5:最近一个月 * @param timeType 0:最近一小时 1:今天 2:昨天(最近一天) 3:最近三天 4:最近一周 5:最近一个月
*/ */
getTimeByType(timeType){ getTimeByType(timeType){
console.log(timeType);
const nowDate = new Date().getTime(); const nowDate = new Date().getTime();
let day1, day2; //当作变量使用 let day1, day2; //当作变量使用
let obj = {startTime:'',endTime:''}; let obj = {startTime:'',endTime:''};
...@@ -190,7 +189,6 @@ export class CommonService implements OnInit { ...@@ -190,7 +189,6 @@ export class CommonService implements OnInit {
break; break;
} }
} }
console.log(obj);
return obj; return obj;
} }
} }
<div class="background"> <div class="background">
<div class="login-center"> <div class="login-center">
<div class="login-logo"> <div class="login-logo">
<!-- <img src="../../../content/images/logo.png" alt="无锡智能运维监管平台">--> {{systemName}}
高淳监狱智能运维管理系统
</div> </div>
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()"> <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item> <nz-form-item>
......
...@@ -15,6 +15,7 @@ import { ...@@ -15,6 +15,7 @@ import {
import {EmitService} from "../event/eventEmitter"; import {EmitService} from "../event/eventEmitter";
import {NzNotificationService} from 'ng-zorro-antd'; import {NzNotificationService} from 'ng-zorro-antd';
import {LocalStorageService} from 'ngx-webstorage'; import {LocalStorageService} from 'ngx-webstorage';
import {OverAllService} from '../../overAll/overAll.service';
@Component({ @Component({
selector: 'jhi-login-modal', selector: 'jhi-login-modal',
...@@ -22,6 +23,7 @@ import {LocalStorageService} from 'ngx-webstorage'; ...@@ -22,6 +23,7 @@ import {LocalStorageService} from 'ngx-webstorage';
}) })
export class JhiLoginModalComponent implements OnInit { export class JhiLoginModalComponent implements OnInit {
validateForm: FormGroup; validateForm: FormGroup;
systemName;
isSpinning = false; isSpinning = false;
authenticationError: boolean; authenticationError: boolean;
...@@ -38,7 +40,8 @@ export class JhiLoginModalComponent implements OnInit { ...@@ -38,7 +40,8 @@ export class JhiLoginModalComponent implements OnInit {
public activeModal: NgbActiveModal, public activeModal: NgbActiveModal,
public emitService:EmitService, public emitService:EmitService,
public notification:NzNotificationService, public notification:NzNotificationService,
public $localStorage:LocalStorageService public $localStorage:LocalStorageService,
public overAll:OverAllService
) { ) {
this.credentials = {}; this.credentials = {};
this.emitService.eventEmit.subscribe((value: any) => { this.emitService.eventEmit.subscribe((value: any) => {
...@@ -67,6 +70,12 @@ export class JhiLoginModalComponent implements OnInit { ...@@ -67,6 +70,12 @@ export class JhiLoginModalComponent implements OnInit {
password: [ null, [ Validators.required ] ], password: [ null, [ Validators.required ] ],
rememberMe: [ true ] rememberMe: [ true ]
}); });
this.overAll.getSystem().subscribe(
(res)=>{
console.log(res);
this.systemName = res.main.name;
}
)
} }
cancel() { cancel() {
......
{
"main": {
"name": "雁南监狱智能运维管理系统"
},
"gaochun": {
"name": "高淳监狱智能运维管理系统"
},
"yannan": {
"name": "雁南监狱智能运维管理系统"
}
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<base href="./"/> <base href="./"/>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>高淳监狱智能运维管理系统</title> <title>雁南监狱智能运维管理系统</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
......
This diff is collapsed.
...@@ -85,7 +85,7 @@ module.exports = (options) => ({ ...@@ -85,7 +85,7 @@ module.exports = (options) => ({
{ from: './src/main/webapp/manifest.webapp', to: 'manifest.webapp' }, { from: './src/main/webapp/manifest.webapp', to: 'manifest.webapp' },
// jhipster-needle-add-assets-to-webpack - JHipster will add/remove third-party resources in this array // jhipster-needle-add-assets-to-webpack - JHipster will add/remove third-party resources in this array
{ from: './src/main/webapp/robots.txt', to: 'robots.txt' }, { from: './src/main/webapp/robots.txt', to: 'robots.txt' },
{ from: './src/main/webapp/network.json', to: 'network.json' }, { from: './src/main/webapp/content/json', to: 'json' },
{ from: './src/main/webapp/content/javascript', to:'javascript' } { from: './src/main/webapp/content/javascript', to:'javascript' }
]), ]),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
......
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