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
9a8a65c0
Commit
9a8a65c0
authored
Jan 17, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
eb661895
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
79 deletions
+51
-79
sidebar.component.html
src/main/webapp/app/layouts/sidebar/sidebar.component.html
+1
-1
discovery.component.html
src/main/webapp/app/modal/discovery/discovery.component.html
+0
-12
discovery.component.ts
src/main/webapp/app/modal/discovery/discovery.component.ts
+2
-19
check-list.component.html
...app/overAll/template/check-list/check-list.component.html
+1
-1
login.component.html
src/main/webapp/app/shared/login/login.component.html
+1
-1
util.js
src/main/webapp/content/javascript/jtopo/js/util.js
+46
-45
No files found.
src/main/webapp/app/layouts/sidebar/sidebar.component.html
View file @
9a8a65c0
<div
class=
"logo padding-40"
>
智能监控平台
</div>
<div
class=
"logo padding-40"
>
运维管理系统
</div>
<ul
nz-menu
[
nzMode
]="'
inline
'"
>
<ng-container
*
ngFor=
"let item of menuList"
>
<li
nz-submenu
(
nzOpenChange
)="
openHandler
(
item
)"
[(
nzOpen
)]="
item
.
checked
"
>
...
...
src/main/webapp/app/modal/discovery/discovery.component.html
View file @
9a8a65c0
...
...
@@ -31,18 +31,6 @@
<nz-form-explain
*
ngIf=
"validateForm.get('type').dirty && validateForm.get('type').errors"
>
请选择监测点类型!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"isInterface"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"interfaceid"
>
主机接口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"interfaceid"
formControlName=
"interfaceid"
nzPlaceHolder=
"选择主机接口"
>
<nz-option
*
ngFor=
"let item of interfaceList"
nzValue=
"{{item.interfaceid}}"
nzLabel=
"{{item.ip}}:{{item.port}}"
></nz-option>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('interfaceid').dirty && validateForm.get('interfaceid').errors"
>
请选择主机接口!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</ng-container>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"key_"
>
键值
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
...
...
src/main/webapp/app/modal/discovery/discovery.component.ts
View file @
9a8a65c0
...
...
@@ -17,11 +17,9 @@ export class DiscoveryComponent implements OnInit {
title
;
isVisiable
=
false
;
isInterface
=
true
;
nzSize
=
'large'
;
hostId
;
//主机ID
itemId
;
//监控项id
interfaceList
:
any
[];
valueMapList
=
[];
validateForm
:
FormGroup
;
checkList
;
//监测点分类
...
...
@@ -44,7 +42,6 @@ export class DiscoveryComponent implements OnInit {
snmp_oid
:
[
'interfaces.ifTable.ifEntry.ifInOctets.1'
],
snmp_community
:
[
'public'
],
port
:
[
this
.
hostId
],
interfaceid
:
[
null
,],
delay
:
[
null
,
[
Validators
.
required
]],
description
:
[
null
],
lifetime
:
[
'3600'
],
...
...
@@ -57,12 +54,6 @@ export class DiscoveryComponent implements OnInit {
this
.
title
=
title
;
this
.
isVisiable
=
true
;
this
.
hostId
=
hostId
;
//主机接口
this
.
overAllSer
.
findInterface
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
;
}
);
}
//编辑
...
...
@@ -75,18 +66,10 @@ export class DiscoveryComponent implements OnInit {
(
res
)
=>
{
const
data
=
res
.
data
[
0
];
data
.
type
+=
''
;
data
.
interfaceid
+=
''
;
data
.
value_type
+=
''
;
this
.
validateForm
.
patchValue
(
data
);
}
);
//主机接口
this
.
overAllSer
.
findInterface
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
;
}
);
}
//添加
...
...
@@ -101,9 +84,9 @@ export class DiscoveryComponent implements OnInit {
}
let
d
=
this
.
validateForm
.
value
.
status
==
true
?
1
:
0
;
this
.
validateForm
.
patchValue
({
status
:
d
status
:
d
,
hostid
:
this
.
hostId
})
this
.
validateForm
.
value
.
hostid
=
this
.
hostId
;
if
(
this
.
title
==
'添加自动发现'
)
{
this
.
create
();
}
...
...
src/main/webapp/app/overAll/template/check-list/check-list.component.html
View file @
9a8a65c0
...
...
@@ -50,7 +50,7 @@
<td
nzShowCheckbox
[(
nzChecked
)]="
data
.
checked
"
(
nzCheckedChange
)="
selectItem
(
data
,$
event
)"
></td>
<td
class=
"round-tag tag-form"
>
{{data.name}}
</td>
<td>
{{data.key_}}
</td>
<td>
{{data.
usedcount
}}
</td>
<td>
{{data.
delay
}}
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
启用
</span>
<span
*
ngIf=
"data.status == 1"
>
禁用
</span>
...
...
src/main/webapp/app/shared/login/login.component.html
View file @
9a8a65c0
<div
class=
"background"
>
<div
class=
"login-center"
>
<div
class=
"login-logo"
>
<img
src=
"../../../content/images/logo.png"
alt=
"智能监控平台"
>
<img
src=
"../../../content/images/logo
-hongqiao
.png"
alt=
"智能监控平台"
>
</div>
<form
nz-form
[
formGroup
]="
validateForm
"
class=
"login-form"
(
ngSubmit
)="
submitForm
()"
>
<nz-form-item>
...
...
src/main/webapp/content/javascript/jtopo/js/util.js
View file @
9a8a65c0
...
...
@@ -3,21 +3,22 @@
* @type {{getRootPath: SysUtil.getRootPath}}
*/
var
SysUtil
=
{
getRootPath
:
function
()
{
// 获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp
var
curWwwPath
=
window
.
document
.
location
.
href
// 获取主机地址之后的目录,如: uimcardprj/share/meun.jsp
var
pathName
=
window
.
document
.
location
.
pathname
var
pos
=
curWwwPath
.
indexOf
(
pathName
,
7
)
// 获取主机地址,如: http://localhost:8083
var
localhostPath
=
curWwwPath
.
substring
(
0
,
pos
)
// 获取带"/"的项目名,如:/uimcardprj
var
projectName
=
pathName
.
substring
(
0
,
pathName
.
substr
(
1
).
indexOf
(
'/'
)
+
2
)
return
localhostPath
+
projectName
}
getRootPath
:
function
()
{
// 获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp
var
curWwwPath
=
window
.
document
.
location
.
href
// 获取主机地址之后的目录,如: uimcardprj/share/meun.jsp
var
pathName
=
window
.
document
.
location
.
pathname
var
pos
=
curWwwPath
.
indexOf
(
pathName
,
7
)
// 获取主机地址,如: http://localhost:8083
var
localhostPath
=
curWwwPath
.
substring
(
0
,
pos
)
// 获取带"/"的项目名,如:/uimcardprj
var
projectName
=
pathName
.
substring
(
0
,
pathName
.
substr
(
1
).
indexOf
(
'/'
)
+
2
)
return
localhostPath
;
}
}
// url根路径
var
rootPath
=
"http://10.10.38.99:8282"
;
var
rootPath
=
SysUtil
.
getRootPath
();
// var topoImgPath = 'javascript/jtopo/img/';
var
topoImgPath
=
rootPath
+
'/file/icon/'
;
/*
...
...
@@ -25,13 +26,13 @@ var topoImgPath = rootPath + '/file/icon/';
* @param x 0-9或a-f范围内的一个32位十六进制数
*/
function
generateUUID
()
{
var
d
=
new
Date
().
getTime
()
var
uuid
=
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
var
r
=
(
d
+
Math
.
random
()
*
16
)
%
16
|
0
d
=
Math
.
floor
(
d
/
16
)
return
(
c
===
'x'
?
r
:
(
r
&
0x3
|
0x8
)).
toString
(
16
)
});
return
uuid
var
d
=
new
Date
().
getTime
()
var
uuid
=
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
var
r
=
(
d
+
Math
.
random
()
*
16
)
%
16
|
0
d
=
Math
.
floor
(
d
/
16
)
return
(
c
===
'x'
?
r
:
(
r
&
0x3
|
0x8
)).
toString
(
16
)
});
return
uuid
}
function
getParam
(
formId
)
{
...
...
@@ -52,30 +53,30 @@ function getParam(formId) {
* @type {{startTime: {}, timeSpan: number, start: Timer.start, stop: Timer.stop, getTimeSpan: Timer.getTimeSpan}}
*/
var
Timer
=
{
startTime
:
{},
stoppedStatus
:
true
,
start
:
function
()
{
if
(
this
.
stoppedStatus
)
{
this
.
startTime
=
new
Date
()
this
.
stoppedStatus
=
false
}
},
pause
:
function
()
{
var
startTime
=
this
.
startTime
if
(
startTime
)
{
return
new
Date
()
-
startTime
}
else
{
return
-
1
}
},
stop
:
function
()
{
var
startTime
=
this
.
startTime
if
(
startTime
)
{
this
.
stoppedStatus
=
true
return
new
Date
()
-
startTime
}
else
{
this
.
stoppedStatus
=
true
return
-
1
startTime
:
{},
stoppedStatus
:
true
,
start
:
function
()
{
if
(
this
.
stoppedStatus
)
{
this
.
startTime
=
new
Date
()
this
.
stoppedStatus
=
false
}
},
pause
:
function
()
{
var
startTime
=
this
.
startTime
if
(
startTime
)
{
return
new
Date
()
-
startTime
}
else
{
return
-
1
}
},
stop
:
function
()
{
var
startTime
=
this
.
startTime
if
(
startTime
)
{
this
.
stoppedStatus
=
true
return
new
Date
()
-
startTime
}
else
{
this
.
stoppedStatus
=
true
return
-
1
}
}
}
}
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