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
bd08a093
Commit
bd08a093
authored
Jun 11, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容性测试
parent
9e8886d0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
82 additions
and
63 deletions
+82
-63
README.md
README.md
+1
-1
resource-usabil.component.html
...p/analysis/resource-usabil/resource-usabil.component.html
+1
-2
resource-usabil.component.ts
...app/analysis/resource-usabil/resource-usabil.component.ts
+1
-0
effect-analysis.component.html
...p/business/effect-analysis/effect-analysis.component.html
+1
-1
home.component.ts
src/main/webapp/app/home/home.component.ts
+0
-0
alarm-modal.component.html
...n/webapp/app/modal/alarm-modal/alarm-modal.component.html
+1
-1
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+2
-2
strategy.component.html
src/main/webapp/app/modal/strategy/strategy.component.html
+1
-1
website.component.html
src/main/webapp/app/modal/website/website.component.html
+1
-1
line.component.html
...ain/webapp/app/netTopology/model/line/line.component.html
+1
-1
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+1
-1
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+23
-23
network-detail.component.html
...etwork-check/network-detail/network-detail.component.html
+1
-1
common.service.ts
src/main/webapp/app/shared/common/common.service.ts
+46
-27
assets-detail.component.html
...ork/asset-part/assets-detail/assets-detail.component.html
+1
-1
No files found.
README.md
View file @
bd08a093
...
...
@@ -40,7 +40,7 @@ Module ng g module my-module
版本更新:
v2.0.1 修复选择节点之后 流量查询不出来
****
上传文件到服务器
****
**
scp -r 22 build/www root@10.10.38.99:/home/nginx
scp -r 22 build/wx root@10.10.38.99:/home/nginx/www
src/main/webapp/app/analysis/resource-usabil/resource-usabil.component.html
View file @
bd08a093
...
...
@@ -27,8 +27,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
()"
>
<label
nz-radio-button
nzValue=
"1"
>
今天
</label>
<label
nz-radio-button
nzValue=
"2"
>
昨天
</label>
<label
nz-radio-button
nzValue=
"3"
>
三天
</label>
...
...
src/main/webapp/app/analysis/resource-usabil/resource-usabil.component.ts
View file @
bd08a093
...
...
@@ -31,6 +31,7 @@ export class ResourceUsabilComponent implements OnInit {
lastList
;
obj
=
{
timeType
:
this
.
timeType
,
type
:
''
,
groupid
:
''
,
startTime
:
''
,
...
...
src/main/webapp/app/business/effect-analysis/effect-analysis.component.html
View file @
bd08a093
...
...
@@ -72,7 +72,7 @@
</div>
</div>
</div>
<nz-tabset
class=
"tabs-smart"
>
<nz-tabset
class=
"tabs-smart"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"网站监测"
>
<div
style=
"min-height: 500px"
>
<ng-container
*
ngIf=
"noData"
>
...
...
src/main/webapp/app/home/home.component.ts
View file @
bd08a093
This diff is collapsed.
Click to expand it.
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.html
View file @
bd08a093
<!--告警推送-->
<nz-modal
[
nzWidth
]="
1080
"
[(
nzVisible
)]="
isShow
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleEditCancel
()"
(
nzOnOk
)="
handEditleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<nz-tabset
[(
nzSelectedIndex
)]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tabset
[
nzType
]="'
card
'"
[
(
nzSelectedIndex
)]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tab
nzTitle=
"选定告警目标"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<nz-form-item>
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
bd08a093
<!--添加资源-->
<nz-modal
[
nzWidth
]="
1080
"
[(
nzVisible
)]="
isBasicEdit
"
[
nzTitle
]="
modalTitle
"
(
nzOnCancel
)="
handleEditCancel
()"
(
nzOnOk
)="
handEditleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<nz-tabset
[(
nzSelectedIndex
)]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tabset
[(
nzSelectedIndex
)]="
tabNum
"
[
nzType
]="'
card
'"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tab
nzTitle=
"资源信息"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<nz-form-item>
...
...
@@ -232,7 +232,7 @@
全局值(配置)
</div>
</div>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let item of macroList2"
>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let item of macroList2
;let i = index;
"
>
<nz-form-control
nz-col
[
nzOffset
]="
2
"
[
nzSpan
]="
6
"
>
<input
nz-input
placeholder=
"{$SNMP_COMMUNITY}"
value=
"{{item.macro}}"
>
</nz-form-control>
...
...
src/main/webapp/app/modal/strategy/strategy.component.html
View file @
bd08a093
<nz-modal
[
nzWidth
]="
880
"
[
nzFooter
]="
null
"
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-tabset
[
nzSelectedIndex
]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
<nz-tabset
[
nz
Type
]="'
card
'"
[
nz
SelectedIndex
]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tab
nzTitle=
"模版"
>
<div
nz-form
>
...
...
src/main/webapp/app/modal/website/website.component.html
View file @
bd08a093
<nz-modal
[
nzWidth
]="
1080
"
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<nz-tabset
[
nzSelectedIndex
]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tabset
[
nz
Type
]="'
card
'"
[
nz
SelectedIndex
]="
tabNum
"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tab
nzTitle=
"1.场景"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<form
nz-form
class=
"ant-advanced-search-form"
>
...
...
src/main/webapp/app/netTopology/model/line/line.component.html
View file @
bd08a093
<!--进出口流量-->
<nz-modal
[
nzWidth
]="
780
"
[(
nzVisible
)]="
isLine
"
nzTitle=
"流量配置"
(
nzOnCancel
)="
handleLineCancel
()"
(
nzOnOk
)="
handleLineOk
()"
>
<form
nz-form
>
<nz-tabset>
<nz-tabset
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"进流量"
>
<div
class=
"padding-10"
>
<input
(
keyup
.
enter
)="
getInList
()"
name=
"inSearchName"
style=
"width: 200px;"
type=
"text"
nz-input
[(
ngModel
)]="
inSearchName
"
placeholder=
"输入名称"
>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
bd08a093
...
...
@@ -50,7 +50,7 @@
{{checkStatus.disabled}}
</span>
</div>
<nz-tabset
[
nzSelectedIndex
]="
tabNum
"
class=
"tabs-smart"
>
<nz-tabset
[
nz
Type
]="'
card
'"
[
nz
SelectedIndex
]="
tabNum
"
class=
"tabs-smart"
>
<nz-tab
nzTitle=
"资源详情"
>
<section>
<p
class=
"padding-8-0"
>
{{hostName}}
</p>
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
bd08a093
...
...
@@ -81,7 +81,7 @@ export class BasicComponent implements OnInit {
totalNum
;
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
private
router
:
Router
,
private
commonSer
:
CommonService
,
private
commonSer
:
CommonService
,
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
,
private
main
:
JhiMainComponent
)
{
}
...
...
@@ -176,10 +176,10 @@ export class BasicComponent implements OnInit {
this
.
findOpStatus
();
}
changeStatus
(
status
){
if
(
this
.
status
==
status
)
{
changeStatus
(
status
)
{
if
(
this
.
status
==
status
)
{
this
.
status
=
null
;
}
else
{
}
else
{
this
.
status
=
status
;
}
this
.
pageNum
=
1
;
...
...
@@ -189,7 +189,7 @@ export class BasicComponent implements OnInit {
/*
//waringName:(值为:正常,禁用,告警,严重)
*/
search
(){
search
()
{
this
.
pageNum
=
1
;
this
.
searchRe
();
}
...
...
@@ -198,28 +198,28 @@ export class BasicComponent implements OnInit {
this
.
loading
=
true
;
this
.
searchStatus
=
true
;
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
obj
:{
name
:
this
.
searchName
,
waringName
:
this
.
status
,
groupids
:[]
}
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
obj
:
{
name
:
this
.
searchName
,
waringName
:
this
.
status
,
groupids
:
[]
}
};
this
.
overAllSer
.
findHostPageNew
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
dataSet
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
this
.
loading
=
false
;
}
)
)
;
}
//翻页
change
(
event
){
if
(
event
>
0
)
{
change
(
event
)
{
if
(
event
>
0
)
{
this
.
pageNum
=
event
;
this
.
searchRe
();
}
...
...
@@ -235,7 +235,7 @@ export class BasicComponent implements OnInit {
//查询设备状态
findOpStatus
()
{
this
.
overAllSer
.
findHostCountByStatusByHost
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
green
=
res
.
data
.
normal
;
this
.
gray
=
res
.
data
.
disable
;
...
...
@@ -246,7 +246,7 @@ export class BasicComponent implements OnInit {
this
.
message
.
info
(
res
.
Msg
);
}
}
)
)
;
}
//添加资源
...
...
@@ -261,7 +261,7 @@ export class BasicComponent implements OnInit {
//添加监测点
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
,
'添加监测点'
);
this
.
smartCheck
.
showAddModal
(
hostid
,
host
,
'添加监测点'
);
}
//列表
...
...
@@ -325,7 +325,7 @@ export class BasicComponent implements OnInit {
//删除单个资源
showDeleteConfirm
(
item
)
{
this
.
commonSer
.
confirmThing
(
"删除"
,
"确认删除该资源吗?"
,()
=>
{
this
.
commonSer
.
confirmThing
(
'删除'
,
'确认删除该资源吗?'
,
()
=>
{
const
data
=
{
hostids
:
[]
};
...
...
@@ -340,7 +340,7 @@ export class BasicComponent implements OnInit {
}
}
);
})
})
;
}
//批量删除资源
...
...
@@ -350,7 +350,7 @@ export class BasicComponent implements OnInit {
return
false
;
}
this
.
commonSer
.
confirmThing
(
"删除"
,
"确认要删除所选设备吗?"
,()
=>
{
this
.
commonSer
.
confirmThing
(
'删除'
,
'确认要删除所选设备吗?'
,
()
=>
{
const
data
=
{
hostids
:
this
.
batchDelList
};
...
...
@@ -406,7 +406,7 @@ export class BasicComponent implements OnInit {
//添加告警
showAlarm
()
{
this
.
smartAlarmModal
.
showAddModal
(
'添加告警'
,
null
);
this
.
smartAlarmModal
.
showAddModal
(
'添加告警'
,
null
);
}
handleOk
(
e
)
{
...
...
src/main/webapp/app/overAll/network-check/network-detail/network-detail.component.html
View file @
bd08a093
...
...
@@ -27,7 +27,7 @@
<button
(
click
)="
showDeleteConfirm
()"
nz-button
nzType=
"default"
>
删除
</button>
</div>
<div
class=
"releative"
>
<nz-tabset
class=
"tabs-smart
"
>
<nz-tabset
class=
"tabs-smart
"
[
nzType
]="'
card
'
"
>
<nz-tab
nzTitle=
"监测信息"
>
<section>
<div
nz-row
nzGutter=
"24"
>
...
...
src/main/webapp/app/shared/common/common.service.ts
View file @
bd08a093
import
{
Injectable
,
OnInit
}
from
"@angular/core"
;
import
{
Injectable
,
OnInit
}
from
'@angular/core'
;
import
{
NzMessageService
,
NzModalService
}
from
'ng-zorro-antd'
;
import
{
SERVER_API_URL
,
SERVER_API_URL_COMS
}
from
'../../app.constants'
;
import
{
DatePipe
}
from
'@angular/common'
;
declare
var
ActiveXObject
:
ActiveXObject
;
interface
ActiveXObject
{
new
(
type
:
string
):
ActiveXObject
;
SendKeys
(
key
:
string
):
void
;
}
@
Injectable
()
export
class
CommonService
implements
OnInit
{
constructor
(
private
modalSer
:
NzModalService
,
private
datePipe
:
DatePipe
,
private
message
:
NzMessageService
)
{
constructor
(
private
modalSer
:
NzModalService
,
private
datePipe
:
DatePipe
,
private
message
:
NzMessageService
)
{
// 定义发射事件
}
...
...
@@ -14,9 +20,9 @@ export class CommonService implements OnInit {
}
exists
(
list
,
parentId
,
myId
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
][
myId
]
==
parentId
)
{
exists
(
list
,
parentId
,
myId
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
][
myId
]
==
parentId
)
{
return
true
;
}
}
...
...
@@ -30,26 +36,26 @@ export class CommonService implements OnInit {
* @param list
* @returns {any[]}
*/
listToTree
(
myId
,
pId
,
list
)
{
listToTree
(
myId
,
pId
,
list
)
{
const
nodes
=
[];
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
list
[
i
].
checked
=
false
;
const
row
=
list
[
i
];
if
(
!
this
.
exists
(
list
,
row
[
pId
],
myId
)
)
{
if
(
!
this
.
exists
(
list
,
row
[
pId
],
myId
))
{
nodes
.
push
(
row
);
}
}
const
toDo
=
[];
for
(
let
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
toDo
.
push
(
nodes
[
i
]);
}
while
(
toDo
.
length
)
{
while
(
toDo
.
length
)
{
const
node
=
toDo
.
shift
();
// the parent node
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
const
row
=
list
[
i
];
if
(
row
[
pId
]
==
node
[
myId
]){
if
(
node
.
children
){
if
(
row
[
pId
]
==
node
[
myId
])
{
if
(
node
.
children
)
{
node
.
children
.
push
(
row
);
}
else
{
node
.
children
=
[
row
];
...
...
@@ -66,7 +72,7 @@ export class CommonService implements OnInit {
* @param data json格式的数据
* @returns {string}
*/
toQuery
(
data
){
toQuery
(
data
)
{
let
str
=
''
;
for
(
let
key
in
data
)
{
if
(
data
.
hasOwnProperty
(
key
))
{
...
...
@@ -83,16 +89,16 @@ export class CommonService implements OnInit {
* @param title 提示语
* @param callback 回调函数
*/
confirmThing
(
title
,
content
,
callback
)
{
confirmThing
(
title
,
content
,
callback
)
{
this
.
modalSer
.
confirm
({
nzTitle
:
title
,
nzContent
:
'<b style="color: red;">'
+
content
+
'</b>'
,
nzContent
:
'<b style="color: red;">'
+
content
+
'</b>'
,
nzOkText
:
'确定'
,
nzOkType
:
'danger'
,
nzOnOk
:
callback
,
nzCancelText
:
'取消'
,
nzOnCancel
:
()
=>
console
.
log
(
'Cancel'
),
})
})
;
}
/**
...
...
@@ -131,11 +137,24 @@ export class CommonService implements OnInit {
* @param method 全屏方法
* @returns {any}
*/
showInFullScreen
(
element
,
method
){
showInFullScreen
(
element
,
method
)
{
let
usablePrefixMethod
;
[
'webkit'
,
'moz'
,
'ms'
,
'o'
,
''
].
forEach
(
(
prefix
)
=>
{
const
ie
=
navigator
.
userAgent
.
match
(
/MSIE
\s([\d
.
]
+
)
/
),
ie11
=
navigator
.
userAgent
.
match
(
/Trident
\/
7.0/
)
&&
navigator
.
userAgent
.
match
(
/rv:11/
),
ieEDGE
=
navigator
.
userAgent
.
match
(
/Edge/g
),
ieVer
=
(
ie
?
ie
[
1
]
:
(
ie11
?
11
:
(
ieEDGE
?
12
:
-
1
)));
if
(
ieVer
>
-
1
)
{
if
(
typeof
(
<
any
>
window
).
ActiveXObject
!==
"undefined"
)
{
//这的方法 模拟f11键,使浏览器全屏
const
wscript
=
new
ActiveXObject
(
"WScript.Shell"
);
if
(
wscript
!=
null
)
{
wscript
.
SendKeys
(
"{F11}"
);
}
}
}
[
'webkit'
,
'moz'
,
'ms'
,
'o'
,
''
].
forEach
((
prefix
)
=>
{
if
(
usablePrefixMethod
)
{
return
return
;
}
if
(
prefix
===
''
)
{
// 无前缀,方法首字母小写
...
...
@@ -144,13 +163,13 @@ export class CommonService implements OnInit {
let
typePrefixMethod
=
typeof
element
[
prefix
+
method
];
if
(
typePrefixMethod
+
''
!==
'undefined'
)
{
if
(
typePrefixMethod
===
'function'
)
{
usablePrefixMethod
=
element
[
prefix
+
method
]()
usablePrefixMethod
=
element
[
prefix
+
method
]()
;
}
else
{
usablePrefixMethod
=
element
[
prefix
+
method
]
usablePrefixMethod
=
element
[
prefix
+
method
]
;
}
}
}
)
)
;
return
usablePrefixMethod
;
}
...
...
@@ -158,12 +177,12 @@ export class CommonService implements OnInit {
* 根据type 查询时间段
* @param timeType 0:最近一小时 1:今天 2:昨天(最近一天) 3:最近三天 4:最近一周 5:最近一个月
*/
getTimeByType
(
timeType
){
getTimeByType
(
timeType
)
{
const
nowDate
=
new
Date
().
getTime
();
let
day1
,
day2
;
//当作变量使用
let
obj
=
{
startTime
:
''
,
endTime
:
''
};
let
obj
=
{
startTime
:
''
,
endTime
:
''
};
switch
(
timeType
)
{
case
'0'
:{
//最近一小时
case
'0'
:
{
//最近一小时
day1
=
nowDate
-
1
*
60
*
60
*
1000
;
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd HH:mm:ss'
);
obj
.
endTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd HH:mm:ss'
);
...
...
src/main/webapp/app/work/asset-part/assets-detail/assets-detail.component.html
View file @
bd08a093
...
...
@@ -29,7 +29,7 @@
<button
(
click
)="
showEditModal
()"
nz-button
nzType=
"default"
>
编辑
</button>
<button
(
click
)="
deleteModal
()"
nz-button
nzType=
"default"
>
删除
</button>
</div>
<nz-tabset
class=
"tabs-smart "
>
<nz-tabset
[
nzType
]="'
card
'"
class=
"tabs-smart "
>
<nz-tab
#
thirdTabs
nzTitle=
"资产信息"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
...
...
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