Commit fa987cfd authored by wangqinghua's avatar wangqinghua

项目名称配置

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