Commit ef1b6872 authored by wangqinghua's avatar wangqinghua

message update

parent 0d1891db
......@@ -39,7 +39,7 @@
</nz-select>
</div>
<div nz-col nzSpan="7">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" [nzButtonStyle]="'solid'">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType($event)">
<label nz-radio-button nzValue="1">今天</label>
<label nz-radio-button nzValue="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label>
......@@ -68,4 +68,4 @@
</div>
</div>
<smart-warn-list #warnList></smart-warn-list>
\ No newline at end of file
<smart-warn-list #warnList></smart-warn-list>
......@@ -56,7 +56,7 @@ export class AlarmListComponent implements OnInit {
constructor(public alarmSer: AlarmService, public overAllSer: OverAllService, public message: NzMessageService,
public datePipe: DatePipe,private commonSer:CommonService,private workSer:WorkService) {
this.changeType();
this.changeType('1');
}
ngOnInit() {
......@@ -90,39 +90,11 @@ export class AlarmListComponent implements OnInit {
}
//时间改变
changeType() {
const nowDate = new Date().getTime();
let day1, day2;
switch (this.timeType) {
case'1': {
this.obj.startTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'2': {
day1 = nowDate - 1 * 24 * 60 * 60 * 1000;
this.obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'3': {
day1 = nowDate - 3 * 24 * 60 * 60 * 1000;
day2 = nowDate;
this.obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'4': {
day1 = nowDate - 7 * 24 * 60 * 60 * 1000;
day2 = nowDate;
this.obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'5': {
break;
}
}
changeType(e) {
if(e == '5') return false;
const obj = this.commonSer.getTimeByType(e);
this.obj.startTime = obj.startTime;
this.obj.endTime = obj.endTime;
}
//查询
......
......@@ -6,11 +6,13 @@ import {
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do';
import { LoginService } from '../../shared/login/login.service';
import {NzMessageService} from 'ng-zorro-antd';
export class AuthExpiredInterceptor implements HttpInterceptor {
constructor(
private injector: Injector
private injector: Injector,
private message: NzMessageService,
) {}
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
......
......@@ -132,6 +132,11 @@
</nz-col>
</nz-row>
</ng-container>
<ng-container *ngIf="countOrderList?.length == 0">
<div class="img-noData" style="min-height: 400px">
<div class="noData" title="暂无数据"></div>
</div>
</ng-container>
</div>
</nz-col>
<nz-col class="padding-10" nzSpan="12">
......@@ -158,6 +163,11 @@
<nz-col nzSpan="8">{{flow.receive}}</nz-col>
</nz-row>
</ng-container>
<ng-container *ngIf="flowListNum?.length == 0">
<div class="img-noData" style="min-height: 400px">
<div class="noData" title="暂无数据"></div>
</div>
</ng-container>
</div>
</nz-col>
<nz-col class="padding-10" nzSpan="12">
......@@ -202,6 +212,11 @@
<nz-col nzSpan="12">系统名称</nz-col>
<nz-col nzSpan="12">运行天数</nz-col>
</nz-row>
<ng-container *ngIf="safeRunDayList?.length == 0">
<div class="img-noData" style="min-height: 400px">
<div class="noData" title="暂无数据"></div>
</div>
</ng-container>
<ng-container *ngFor="let day of safeRunDayList;">
<nz-row class="table-content">
<nz-col nzSpan="12">{{day.name}}</nz-col>
......
......@@ -126,10 +126,12 @@ export class HomeComponent implements OnInit, AfterViewInit {
getGroup() {
this.overAllSer.findGroup().subscribe(
(res) => {
if (res.data) {
if (res.errCode == 10000 && res.data) {
this.groupList = res.data;
this.obj.leftGroupId = this.groupList[0].groupid;
this.countGroupItem();
}else{
this.message.error(res.errMsg);
}
}
);
......@@ -141,8 +143,6 @@ export class HomeComponent implements OnInit, AfterViewInit {
(res) => {
if (res.errCode == 10000) {
this.dataSet = res.data;
} else {
this.message.create('error', res.errMsg);
}
}
);
......@@ -439,7 +439,6 @@ export class HomeComponent implements OnInit, AfterViewInit {
}
} else {
this.noData = true;
this.message.error(res.errMsg);
}
this.isTrendLoading = false;
}
......
<div class="logo">
<div class="text-center">
<img class="margin-bottom-10" style="height: 35px;" src="../../../content/images/logo_gaocun.png" alt="高淳监狱智能运维管理系统">
</div>
<!-- <div class="text-center">-->
<!-- <img class="margin-bottom-10" style="height: 35px;" src="../../../content/images/logo_gaocun.png" alt="高淳监狱智能运维管理系统">-->
<!-- </div>-->
{{systemName}}
</div>
<ul nz-menu [nzMode]="'inline'">
......
......@@ -14,29 +14,33 @@ import {ThresholdComponent} from '../../../modal/threshold/threshold.component';
selector: 'jhi-basic-detail',
templateUrl: './basic-detail.component.html',
styles: [
`
`
.checkTags {
position: absolute;
top: 12px;
left: 233px;
z-index: 989;
}
.time-select{
.time-select {
position: absolute;
top: 55px;
right: 15px;
z-index: 999;
}
.select-border{
.select-border {
border: 1px solid #6097b7;
border-radius: 5px;
padding: 2px;
margin-right: 5px;
}
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3){
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3) {
margin-right: 180px !important;
}
:host ::ng-deep .ant-radio-button-wrapper{
:host ::ng-deep .ant-radio-button-wrapper {
margin: 4px;
}
`
......@@ -47,8 +51,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
@ViewChild('smartThreshold') smartThreshold: ThresholdComponent;
@ViewChild('thirdTabs') thirdTabs: ElementRef;
@ViewChild('warnList') warnList: WarnListComponent;
@ViewChild('colorEle') colorEle:ElementRef;
@ViewChild('checkEle') checkEle:ElementRef;
@ViewChild('colorEle') colorEle: ElementRef;
@ViewChild('checkEle') checkEle: ElementRef;
color = color;
loading = false;
hostId: string;
......@@ -69,7 +73,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
secondOptionRight;
dataSet: any[];
panel1 = {active: true, name: '响应时间与丢包率', disabled: false};
panel2 = {active: true, name: 'CPU使用率及内存使用率',disabled: false};
panel2 = {active: true, name: 'CPU使用率及内存使用率', disabled: false};
panel3 = {active: true, name: '磁盘使用情况', disabled: false};
//监控点
......@@ -123,17 +127,17 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
units; //图表单位
constructor(private routerInfo: ActivatedRoute, private message: NzMessageService,
private overAllSer: OverAllService, private renderer: Renderer,private router:Router,
private fb: FormBuilder, private modalService: NzModalService,private datePipe:DatePipe) {
private overAllSer: OverAllService, private renderer: Renderer, private router: Router,
private fb: FormBuilder, private modalService: NzModalService, private datePipe: DatePipe) {
this.routerInfo.queryParams.subscribe(queryParams => {
this.hostId = queryParams.hostId;
this.overAllSer.findDetailed(this.hostId).subscribe(
(res)=>{
let data = res.data[0]
(res) => {
let data = res.data[0];
this.hostName = data.name; //显示名
this.realName = data.host; //主机名
}
)
);
});
}
......@@ -155,7 +159,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
ngAfterViewInit() {
this.checkEle.nativeElement.children[1].children[0].children[0].children[2].children[0].children[0].children[2].style.marginRight = this.colorEle.nativeElement.offsetWidth +'px';
this.checkEle.nativeElement.children[1].children[0].children[0].children[2].children[0].children[0].children[2].style.marginRight = this.colorEle.nativeElement.offsetWidth + 'px';
}
//平均响应时间
......@@ -220,10 +224,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
]
};
} else {
this.message.info(res.errMsg);
}
}
);
}
......@@ -290,10 +291,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
]
};
} else {
this.message.info(res.errMsg);
}
}
);
}
......@@ -363,10 +361,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
]
};
} else {
this.message.info(res.errMsg);
}
}
);
}
......@@ -482,10 +477,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
data: res.data.disks.map((item) => {
return item.name;
}),
axisLabel:res.data.disks.map((item) => {
axisLabel: res.data.disks.map((item) => {
let data = item.name;
if(data.length > 5) {
data = data.substring(0, 4) + "..";
if (data.length > 5) {
data = data.substring(0, 4) + '..';
}
return data;
}),
......@@ -512,7 +507,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
},
},
data: res.data.disks.map((item) => {
const pre = ( (item.used / item.total) * 100 ).toFixed(2); //已使用百分比
const pre = ((item.used / item.total) * 100).toFixed(2); //已使用百分比
return pre;
})
},
......@@ -537,7 +532,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
},
},
data: res.data.disks.map((item) => {
const pre = ( (item.total - item.used) / (item.total) * 100 ).toFixed(2); //剩余百分比
const pre = ((item.total - item.used) / (item.total) * 100).toFixed(2); //剩余百分比
return pre;
})
},
......@@ -556,12 +551,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
const arr = [
{
name:"已使用",
value:used,
name: '已使用',
value: used,
},
{
name:"未使用",
value:total,
name: '未使用',
value: total,
}
];
......@@ -574,7 +569,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
color: ['#3194e0','#bfbfbf'],
color: ['#3194e0', '#bfbfbf'],
series: [
{
name: '',
......@@ -609,10 +604,6 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
);
}
extension(){
}
add(arr) {
let total = 0;
for (let i = 0; i < arr.length; i++) {
......@@ -625,19 +616,19 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
inOutInfo() {
this.inOutLoading = true;
const data = {
obj:{
hostid:Number(this.hostId)
obj: {
hostid: Number(this.hostId)
},
pageNum:this.pageNum,
pageCount:this.pageCount
}
pageNum: this.pageNum,
pageCount: this.pageCount
};
this.overAllSer.inOutInfoSnmp(data).subscribe(
(res) => {
if (res.errCode == 10000) {
this.dataSet = res.data.data;
this.inOutLoading = false;
this.totalNumInOut = res.data.totalNum;
}else{
} else {
this.message.info(res.errMsg);
}
}
......@@ -645,33 +636,33 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
//进出口流量 翻页
changeInoutInfo(e){
changeInoutInfo(e) {
this.pageNum = e;
// this.inOutInfo();
}
//添加监测点
showCheckModal() {
this.smartCheck.showAddModal(this.hostId,this.realName,'添加监测点');
this.smartCheck.showAddModal(this.hostId, this.realName, '添加监测点');
}
//编辑监测点
showEditModal(item){
this.smartCheck.showEditModal(this.hostId,item.itemid,this.realName,item.templateid,'编辑监测点');
showEditModal(item) {
this.smartCheck.showEditModal(this.hostId, item.itemid, this.realName, item.templateid, '编辑监测点');
}
//添加阈值
showAddThresholdModal(item){
this.smartThreshold.showAddModal("添加阈值",item.itemid,this.realName);
showAddThresholdModal(item) {
this.smartThreshold.showAddModal('添加阈值', item.itemid, this.realName);
}
//编辑阈值
showEditThresholdModal(item){
this.smartThreshold.showEditModal("编辑阈值",item.itemid,this.hostId,this.realName);
showEditThresholdModal(item) {
this.smartThreshold.showEditModal('编辑阈值', item.itemid, this.hostId, this.realName);
}
//添加or编辑监测点 之后
getList(){
getList() {
this.getCheckList();
this.findItemType();
}
......@@ -691,11 +682,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
const data = {
pageNum: this.pageIndex,
pageCount: pageSize,
obj:{
obj: {
applicationid: this.applicationId,
hostid: this.hostId,
priorityName:this.changeStates,
name:this.searchName
priorityName: this.changeStates,
name: this.searchName
}
};
this.overAllSer.findCheckByType(data).subscribe(
......@@ -707,7 +698,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
);
}
changeState(state){
changeState(state) {
this.tabNum = 1;
this.changeStates = state;
this.getCheckList();
......@@ -721,7 +712,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
changeType(item) {
this.pageIndex = 1;
if(item.name == "全部"){
if (item.name == '全部') {
this.changeStates = null;
}
this.applicationId = item.applicationid;
......@@ -732,7 +723,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
getCheckStatus() {
this.overAllSer.findItemCount(this.hostId).subscribe(
(res) => {
if(res.errCode == 10000){
if (res.errCode == 10000) {
this.checkStatus = res.data;
}
}
......@@ -748,8 +739,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType: 'danger',
nzOnOk: () => {
const data = {
itemids:[item.itemid],
templateid:item.templateid
itemids: [item.itemid],
templateid: item.templateid
};
this.overAllSer.deleteItem(data).subscribe(
(res) => {
......@@ -776,9 +767,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
//获取图表数据
getGraphDate(){
getGraphDate() {
const data = {
date: this.datePipe.transform(this.imageSelectDate,'yyyy-MM-dd'),
date: this.datePipe.transform(this.imageSelectDate, 'yyyy-MM-dd'),
itemid: this.selectGraphadata.itemid
};
this.overAllSer.findGraphData(data).subscribe(
......@@ -801,9 +792,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
splitLine: {
show: false
},
axisLabel:{ //Y轴数据
formatter:(value)=>{
return value+ " " +this.selectGraphadata.units; //负数取绝对值变正数
axisLabel: { //Y轴数据
formatter: (value) => {
return value + ' ' + this.selectGraphadata.units; //负数取绝对值变正数
},
},
},
......@@ -815,7 +806,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
series: {
type: 'line',
data: result.map((item) => {
return item.value ;
return item.value;
}),
}
......@@ -840,10 +831,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
(res) => {
this.itemTypeList = res.data;
const data = {
applicationid:'',
name:'全部'
applicationid: '',
name: '全部'
};
if (null!=res.data){
if (null != res.data) {
this.itemTypeList.unshift(data);
}
this.itemTypeValue = '';
......@@ -887,7 +878,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType: 'danger',
nzOnOk: () => {
const data = {
hostids:[]
hostids: []
};
data.hostids.push(this.hostId);
this.overAllSer.deleteHostPost(data).subscribe(
......
......@@ -67,4 +67,3 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
*/
// import 'intl/locale-data/jsonp/en';
require('../manifest.webapp');
......@@ -72,7 +72,6 @@ export class JhiLoginModalComponent implements OnInit {
});
this.overAll.getSystem().subscribe(
(res)=>{
console.log(res);
this.systemName = res.main.name;
}
)
......
......@@ -4,11 +4,10 @@
<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">
<link rel="manifest" href="manifest.webapp"/>
<link rel="stylesheet" href="javascript/jtopo/css/jtopo-editor.css"/>
<script src="javascript/jquery-3.3.1/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="javascript/jtopo/js/util.js" type="text/javascript"></script>
......
{
"name": "Bootapp",
"short_name": "Bootapp",
"icons": [
{
"src": "./content/images/logo.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "./content/images/logo.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "./content/images/logo.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "./content/images/logo.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#000000",
"background_color": "#e0e0e0",
"start_url": "/index.html",
"display": "standalone",
"orientation": "portrait"
}
......@@ -8,7 +8,7 @@
false,
"check-space"
],
"curly": true,
"curly": false,
"eofline": true,
"forin": false,
"indent": [
......
......@@ -33,10 +33,6 @@ module.exports = (options) => ({
test: /\.(jpe?g|png|gif|svg|woff2?|ttf|eot)$/i,
loaders: ['file-loader?hash=sha512&digest=hex&name=content/[hash].[ext]']
},
{
test: /manifest.webapp$/,
loader: 'file-loader?name=manifest.webapp!web-app-manifest-loader'
}
]
},
plugins: [
......@@ -65,10 +61,10 @@ module.exports = (options) => ({
new webpack.optimize.CommonsChunkPlugin({
name: ['polyfills', 'vendor'].reverse()
}),
new webpack.optimize.CommonsChunkPlugin({
name: ['manifest'],
minChunks: Infinity,
}),
// new webpack.optimize.CommonsChunkPlugin({
// name: ['manifest'],
// minChunks: Infinity,
// }),
/**
* See: https://github.com/angular/angular/issues/11580
*/
......@@ -78,7 +74,7 @@ module.exports = (options) => ({
),
new CopyWebpackPlugin([
// { from: './src/main/webapp/favicon.ico', to: 'favicon.ico' },
{ 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
{ from: './src/main/webapp/robots.txt', to: 'robots.txt' },
{ from: './src/main/webapp/content/json', to: 'json' },
......
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