Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
a075be7e
Commit
a075be7e
authored
Feb 20, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
business
parent
b4d7a00b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
9 deletions
+138
-9
b-config.component.html
...main/webapp/app/business/b-config/b-config.component.html
+4
-2
b-config.component.ts
src/main/webapp/app/business/b-config/b-config.component.ts
+16
-0
b-overview.component.html
.../webapp/app/business/b-overview/b-overview.component.html
+92
-3
b-overview.component.ts
...in/webapp/app/business/b-overview/b-overview.component.ts
+19
-1
business.service.ts
src/main/webapp/app/business/business.service.ts
+5
-0
business.component.html
...ebapp/app/business/modal/business/business.component.html
+1
-1
business.component.ts
.../webapp/app/business/modal/business/business.component.ts
+1
-1
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+0
-1
No files found.
src/main/webapp/app/business/b-config/b-config.component.html
View file @
a075be7e
...
...
@@ -48,9 +48,11 @@
<td
[
nzIndentSize
]="
item
.
level
*
20
"
[
nzShowExpand
]="!!
item
.
children
"
[(
nzExpand
)]="
item
.
expand
"
(
nzExpandChange
)="
getChildren
(
item
)"
>
<span
(
click
)="
showEditModal
(
item
)"
class=
"main-color cursor"
>
{{item.name}}
</span>
</td>
<td
class=
"round-tag tag-form"
>
<td
class=
"round-tag tag-form"
(
mouseenter
)="
getTime
(
item
)"
>
<ng-container
*
ngIf=
"item.status == 0"
>
<nz-tag
class=
"tag-green"
[
nzColor
]="
color
.
green
"
></nz-tag>
<nz-tooltip
[
nzTitle
]="
item
.
info
"
>
<nz-tag
class=
"tag-green"
[
nzColor
]="
color
.
green
"
></nz-tag>
</nz-tooltip>
</ng-container>
<ng-container
*
ngIf=
"item.status == 2 || item.status == 3"
>
<nz-tag
class=
"tag-yellow"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
...
...
src/main/webapp/app/business/b-config/b-config.component.ts
View file @
a075be7e
...
...
@@ -148,6 +148,22 @@ export class BConfigComponent implements OnInit {
}
//告警时间
getTime
(
item
){
console
.
log
(
item
);
this
.
busineSer
.
selectAlarmsClock
(
item
.
serviceid
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
let
info
=
"告警时间:"
+
res
.
data
.
last
.
time
+
"<br>"
+
"上次告警时间:"
+
res
.
data
.
now
.
time
;
item
.
info
=
info
;
console
.
log
(
this
.
dataSet
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
}
//添加业务
showAddModal
()
{
this
.
smartBusiness
.
showModal
(
'添加业务'
);
...
...
src/main/webapp/app/business/b-overview/b-overview.component.html
View file @
a075be7e
<p>
b-overview works!
</p>
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"12"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
业务监管
</nz-breadcrumb-item>
<nz-breadcrumb-item>
业务概览
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"12"
class=
"text-right"
>
<button
(
click
)="
ngOnInit
()"
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<smart-full-screen></smart-full-screen>
</div>
</div>
<div
nz-row
class=
"search-form tag-form"
>
<div
nz-col
nzSpan=
"12"
>
<span>
业务概览:
<span
style=
"margin-right: 8px"
(
click
)="
search
('
0
')"
>
<nz-tag
class=
"tag-green"
[
nzColor
]="
color
.
green
"
></nz-tag>
<i
*
ngIf=
"!green && green !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
正常
</span>
<span
(
click
)="
search
('
2
')"
style=
"margin-right: 8px"
>
<nz-tag
class=
"tag-yellow"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<i
*
ngIf=
"!yellow && yellow != 0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
告警
</span>
<span
(
click
)="
search
('
3
')"
style=
"margin-right: 8px"
>
<nz-tag
class=
"tag-red"
[
nzColor
]="
color
.
red
"
></nz-tag>
<i
*
ngIf=
"!red && red != 0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
严重
</span>
</span>
</div>
</div>
<div
nz-row
>
<ng-container
*
ngFor=
"let item of list;let i = index;"
>
<div
nz-col
nzSpan=
"12"
class=
"follow"
>
<span
(
click
)="
cancel
(
i
,
item
)"
class=
"cursor calcle-follow"
><i
class=
"anticon anticon-close-circle"
></i></span>
<div
class=
"follow-container"
>
<div
class=
"follow-title"
>
<div>
<p>
{{item.name}}
<span>
类型:{{item.extendName}}
</span>
<span
style=
"margin-left: 10px"
>
IP:{{item.host}}
</span>
</p>
<p>
所在分组:
<span
style=
"margin-right: 5px;"
*
ngFor=
"let groups of item.groupName"
>
{{groups}}
</span></p>
</div>
</div>
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
class=
"height-150 releative"
>
<div
class=
"container-top"
>
<p>
监测点
</p>
<p
class=
"round-tag tag-form"
>
<nz-tag
class=
"tag-red"
[
nzColor
]="
color
.
red
"
></nz-tag>
<span
style=
"margin-right: 10px"
>
{{item.item.high}}
</span>
<nz-tag
class=
"tag-yellow"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<span
style=
"margin-right: 10px"
>
{{item.item.warning}}
</span>
</p>
</div>
<div
class=
"container-bottom"
>
<p>
PING值:{{item.lose}}
</p>
</div>
</div>
<div
nz-col
nzSpan=
"12"
class=
"height-150"
echarts
[
options
]="
item
.
option
"
></div>
<div
class=
"chart-font"
>
<p>
<nz-tag
nzColor=
"#f09363"
></nz-tag>
CPU使用率 {{item.cpu}}%
</p>
<p>
<nz-tag
nzColor=
"#80ba78"
></nz-tag>
内存使用率 {{(item.memory).toFixed(2)}}%
</p>
<!--<p>-->
<!--<nz-tag nzColor="#73b6e4"></nz-tag>-->
<!--带宽使用率 {{item.lose}}%-->
<!--</p>-->
</div>
</div>
</div>
</div>
</ng-container>
</div>
<!--业务-->
<smart-business
#
smartBusiness
></smart-business>
\ No newline at end of file
src/main/webapp/app/business/b-overview/b-overview.component.ts
View file @
a075be7e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
BusinessService
}
from
'../business.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
color
}
from
'../../app.constants'
;
@
Component
({
selector
:
'smart-b-overview'
,
...
...
@@ -7,9 +10,24 @@ import { Component, OnInit } from '@angular/core';
})
export
class
BOverviewComponent
implements
OnInit
{
constructor
()
{
}
color
=
color
;
list
;
constructor
(
private
busineSer
:
BusinessService
,
private
message
:
NzMessageService
)
{
}
ngOnInit
()
{
this
.
getList
();
}
getList
(){
this
.
busineSer
.
itserviceOverview
().
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
list
=
res
.
data
;
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
}
}
src/main/webapp/app/business/business.service.ts
View file @
a075be7e
...
...
@@ -39,4 +39,9 @@ export class BusinessService {
selectAlarmsClock
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/itservice/selectAlarmsClock/'
+
params
);
}
//查询业务概览统计
itserviceOverview
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/itserviceOverview/count'
);
}
}
src/main/webapp/app/business/modal/business/business.component.html
View file @
a075be7e
...
...
@@ -11,7 +11,7 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"parentid"
>
上层服务
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-select
id=
"parentid"
formControlName=
"parentid"
nzPlaceHolder=
"上层服务"
>
<nz-select
id=
"parentid"
[
nzShowSearch
]="
true
"
formControlName=
"parentid"
nzPlaceHolder=
"上层服务"
>
<nz-option
nzValue=
"1"
nzLabel=
"问题,至少有一个问题"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"问题,都有问题"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"不计算"
></nz-option>
...
...
src/main/webapp/app/business/modal/business/business.component.ts
View file @
a075be7e
...
...
@@ -45,7 +45,7 @@ export class BusinessComponent implements OnInit {
this
.
checked
=
false
;
this
.
validateForm
=
this
.
fb
.
group
({
name
:
[
''
,
[
Validators
.
required
]],
algorithm
:
[
''
],
algorithm
:
[
null
],
showsla
:
[
'99.9000'
],
sortorder
:
[
'1'
,[
Validators
.
maxLength
(
3
)]],
parentid
:
[
'1'
],
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
a075be7e
...
...
@@ -75,7 +75,6 @@
<th>
名称
</th>
<th>
状态
</th>
<th>
关联资产
</th>
<!--<th nzWidth="20%">主机启用状态</th>-->
<th>
可用性
</th>
<th>
操作
</th>
</tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment