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
261b434f
Commit
261b434f
authored
Dec 25, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e1012384
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
11 deletions
+21
-11
select-group.component.ts
...n/webapp/app/modal/select-group/select-group.component.ts
+6
-3
icon.component.ts
src/main/webapp/app/netTopology/model/icon/icon.component.ts
+2
-0
ne-topology.component.html
...pp/app/netTopology/ne-topology/ne-topology.component.html
+5
-5
ne-topology.component.ts
...bapp/app/netTopology/ne-topology/ne-topology.component.ts
+7
-3
global.css
src/main/webapp/content/css/global.css
+1
-0
No files found.
src/main/webapp/app/modal/select-group/select-group.component.ts
View file @
261b434f
...
...
@@ -72,8 +72,6 @@ export class SelectGroupComponent implements OnInit {
//获取下级
mouseAction
(
name
:
string
,
event
:
NzFormatEmitEvent
)
{
let
type
;
setTimeout
(
_
=>
{
},
1000
);
if
(
event
.
node
.
level
==
0
)
{
type
=
'host'
;
//主机
}
...
...
@@ -83,6 +81,11 @@ export class SelectGroupComponent implements OnInit {
if
(
this
.
title
==
'选择资源'
&&
event
.
node
.
level
==
1
)
{
return
false
;
}
if
(
this
.
title
==
'添加设备'
&&
event
.
node
.
level
==
1
)
{
return
false
;
}
const
index
=
<
any
>
event
.
node
.
key
-
1
;
const
data
=
{
'id'
:
event
.
node
.
origin
.
id
,
...
...
@@ -95,7 +98,7 @@ export class SelectGroupComponent implements OnInit {
dataSet
.
forEach
(
res
=>
{
res
.
title
=
res
.
name
;
res
.
key
=
res
.
id
;
if
(
this
.
title
==
'选择资源'
)
{
if
(
this
.
title
==
'选择资源'
||
this
.
title
==
'添加设备'
)
{
res
.
isLeaf
=
true
;
}
});
...
...
src/main/webapp/app/netTopology/model/icon/icon.component.ts
View file @
261b434f
...
...
@@ -33,6 +33,8 @@ export class IconComponent implements OnInit {
initForm
()
{
this
.
fileList
=
[];
this
.
firstTypeId
=
null
;
//分类ID
this
.
iconId
=
null
;
//图标ID
}
//一级分类
...
...
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.html
View file @
261b434f
...
...
@@ -5,10 +5,10 @@
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
告警管理
</a>
<a>
网络拓扑
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
告警推送设置
网络拓扑图
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
...
...
@@ -141,5 +141,5 @@
<!--添加监测点-->
<smart-check
#
smartCheck
(
done
)="
setCheckList
($
event
)"
></smart-check>
<!--添加设备-->
<smart-device
#
smartDevice
(
done
)="
setImg
($
event
)"
></smart-device>
\ No newline at end of file
<!--选择资源-->
<smart-select-group
#
smartSelectGroup
(
done
)="
getItem
($
event
)"
></smart-select-group>
\ No newline at end of file
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.ts
View file @
261b434f
...
...
@@ -6,6 +6,7 @@ import * as $ from 'jquery';
import
{
TopologyComponent
}
from
'../model/topology/topology.component'
;
import
{
CheckComponent
}
from
'../model/check/check.component'
;
import
{
DeviceComponent
}
from
'../model/device/device.component'
;
import
{
SelectGroupComponent
}
from
'../../modal/select-group/select-group.component'
;
declare
let
editor
:
any
;
declare
var
layui
:
any
;
...
...
@@ -58,7 +59,7 @@ export class NeTopologyComponent implements OnInit, AfterViewInit {
@
ViewChild
(
'topologyCanvas'
)
topologyCanvas
:
ElementRef
;
@
ViewChild
(
'smartTopology'
)
smartTopology
:
TopologyComponent
;
@
ViewChild
(
'smartCheck'
)
smartCheck
:
CheckComponent
;
@
ViewChild
(
'smart
Device'
)
smartDevice
:
Device
Component
;
@
ViewChild
(
'smart
SelectGroup'
)
smartSelectGroup
:
SelectGroup
Component
;
dataSet
;
isVisible
=
false
;
...
...
@@ -116,7 +117,7 @@ export class NeTopologyComponent implements OnInit, AfterViewInit {
this
.
message
.
warning
(
"请选择需要编辑的拓扑图"
);
return
false
;
}
this
.
smart
Device
.
showAddModal
(
"添加设备"
);
this
.
smart
SelectGroup
.
showAddModal
(
"添加设备"
);
}
//获取设备图片
...
...
@@ -172,6 +173,9 @@ export class NeTopologyComponent implements OnInit, AfterViewInit {
let
json
=
JSON
.
parse
(
res
.
data
.
json
);
editor
.
loadTopologyByJson
(
JSON
.
parse
(
json
.
topology
),
'img/backimg.png'
);
this
.
checkJson
=
json
.
check
;
}
else
{
editor
.
utils
.
clearTopology
();
this
.
checkJson
=
[];
}
this
.
name
=
res
.
data
.
name
;
this
.
refreshRete
=
res
.
data
.
refreshRete
;
...
...
@@ -282,7 +286,7 @@ export class NeTopologyComponent implements OnInit, AfterViewInit {
const
formData
=
new
FormData
();
this
.
fileList
.
forEach
((
file
:
any
)
=>
{
formData
.
append
(
'file'
,
file
);
})
})
;
this
.
topologySer
.
addPic
(
formData
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
src/main/webapp/content/css/global.css
View file @
261b434f
...
...
@@ -310,6 +310,7 @@ ui bootstrap tweaks
height
:
200px
;
overflow
:
auto
;
margin-top
:
10px
;
padding
:
5px
10px
;
}
.time-div
{
position
:
absolute
;
...
...
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