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
ac3e0334
Commit
ac3e0334
authored
Nov 30, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
dd88d9d5
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
159 additions
and
82 deletions
+159
-82
alarm-log.component.html
src/main/webapp/app/alarm/alarm-log/alarm-log.component.html
+4
-6
alarm-log.component.ts
src/main/webapp/app/alarm/alarm-log/alarm-log.component.ts
+6
-6
send-log.component.html
...n/webapp/app/alarm/modal/send-log/send-log.component.html
+12
-8
app.component.ts
src/main/webapp/app/app.component.ts
+4
-0
ne-topology.component.html
...pp/app/netTopology/ne-topology/ne-topology.component.html
+114
-8
ne-topology.component.ts
...bapp/app/netTopology/ne-topology/ne-topology.component.ts
+1
-1
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+2
-1
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+1
-1
power.component.ts
src/main/webapp/app/system/power/power.component.ts
+0
-44
jtopo-editor.js
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
+10
-4
index.html
src/main/webapp/index.html
+5
-3
No files found.
src/main/webapp/app/alarm/alarm-log/alarm-log.component.html
View file @
ac3e0334
...
...
@@ -61,8 +61,7 @@
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
logList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<nz-table
#
nzTable
[
nzData
]="
logList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
告警名称
</th>
...
...
@@ -78,8 +77,8 @@
<tbody>
<tr
*
ngFor=
"let data of logList"
>
<td
class=
"round-tag tag-form"
>
<
nz-tag
[
nzColor
]="'#
fc0d1b
'"
></nz-tag
>
{{data.
subject
}}
<
!--<nz-tag [nzColor]="'#fc0d1b'"></nz-tag>--
>
{{data.
name
}}
</td>
<td>
{{data.clock | date:"yyyy-MM-dd HH:mm:ss"}}
</td>
<td>
...
...
@@ -110,8 +109,7 @@
</tbody>
</nz-table>
<!--告警内容-->
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzFooter
]="
null
"
nzTitle=
"查看告警内容"
(
nzOnCancel
)="
handleCancel
()"
>
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzFooter
]="
null
"
nzTitle=
"查看告警内容"
(
nzOnCancel
)="
handleCancel
()"
>
<div
style=
"padding: 10px;"
>
<p>
主题:
</p>
<p>
{{title}}
</p>
...
...
src/main/webapp/app/alarm/alarm-log/alarm-log.component.ts
View file @
ac3e0334
...
...
@@ -63,17 +63,17 @@ export class AlarmLogComponent implements OnInit {
ngOnInit
()
{
this
.
getType
();
this
.
getWarnGroup
();
this
.
getList
(
this
.
obj
);
this
.
getList
();
}
//获取list
getList
(
obj
){
getList
(){
const
data
=
{
"eventPage"
:
this
.
pageNum
,
"pageRecords"
:
this
.
pageCount
,
"alertGroupId"
:
this
.
obj
.
alertGroupId
,
"time_from"
:
obj
.
time_from
,
"time_till"
:
obj
.
time_till
,
"time_from"
:
this
.
obj
.
time_from
,
"time_till"
:
this
.
obj
.
time_till
,
"mediatypeids"
:[
this
.
obj
.
mediatypeids
],
"hostids"
:[
this
.
obj
.
hostids
]
};
...
...
@@ -162,12 +162,12 @@ export class AlarmLogComponent implements OnInit {
search
(){
this
.
obj
.
time_from
=
new
Date
(
this
.
obj
.
time_from
).
getTime
();
this
.
obj
.
time_till
=
new
Date
(
this
.
obj
.
time_till
).
getTime
();
this
.
getList
(
this
.
obj
);
this
.
getList
();
}
change
(
e
){
this
.
pageNum
=
e
;
// this.getList(null
);
this
.
getList
(
);
}
//查看消息内容
...
...
src/main/webapp/app/alarm/modal/send-log/send-log.component.html
View file @
ac3e0334
<nz-modal
[
nzWidth
]="
700
"
[(
nzVisible
)]="
isShow
"
nzTitle=
"发送记录"
(
nzOnCancel
)="
closeModal
()"
(
nzOnOk
)="
closeModal
()"
>
<nz-modal
[
nzWidth
]="
980
"
[(
nzVisible
)]="
isShow
"
[
nzFooter
]="
null
"
nzTitle=
"发送记录"
(
nzOnCancel
)="
closeModal
()"
(
nzOnOk
)="
closeModal
()"
>
<nz-table
#
nzTable
[
nzData
]="
logList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th>
告警名称
</th>
<th>
告警时间
</th>
<
th>
告警资源
</th
>
<th>
告警内容
</th>
<th
nzWidth=
"15%"
>
告警名称
</th>
<th
nzWidth=
"20%"
>
告警时间
</th>
<
!--<th>告警资源</th>--
>
<th
nzWidth=
"30%"
>
告警内容
</th>
<th>
状态
</th>
<th>
发送方式
</th>
<th>
发送对象
</th>
...
...
@@ -13,16 +13,20 @@
</thead>
<tbody>
<tr
*
ngFor=
"let data of logList"
>
<td>
{{data.
subject
}}
</td>
<td>
{{data.
name
}}
</td>
<td>
{{data.clock | date:"yyyy-MM-dd hh:mm:ss"}}
</td>
<
td>
告警资源
</td
>
<
!--<td>告警资源</td>--
>
<td>
{{data.message}}
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
消息未发送
</span>
<span
*
ngIf=
"data.status == 1"
>
消息已发送
</span>
<span
*
ngIf=
"data.status == 2"
>
经多次重试后失败
</span>
</td>
<td>
{{data.mediatypes[0].description}}
</td>
<td>
<ng-container
*
ngIf=
"data.mediatypes"
>
{{data.mediatypes[0].description}}
</ng-container>
</td>
<td
class=
"list-icon"
>
{{data.sendto}}
</td>
</tr>
</tbody>
...
...
src/main/webapp/app/app.component.ts
View file @
ac3e0334
...
...
@@ -8,9 +8,13 @@ import { Router } from "@angular/router";
export
class
AppComponent
{
constructor
(
private
router
:
Router
){
//火狐拖动图片会打开新tab
document
.
body
.
ondrop
=
(
event
)
=>
{
event
.
preventDefault
();
event
.
stopPropagation
();
}
//监听打开弹窗
}
}
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.html
View file @
ac3e0334
...
...
@@ -36,11 +36,13 @@
<div
class=
"layui-layout layui-layout-admin"
>
<div
class=
"layui-header layui-bg-gray"
>
<div
class=
"layui-header layui-bg-gray"
style=
"line-height: 60px"
>
<input
style=
"width: 200px;"
type=
"text"
[(
ngModel
)]="
name
"
nz-input
placeholder=
"请输入拓扑图名称"
>
图标:
<span
onclick=
"editor.utils.addNode()"
>
添加
</span>
<span
onclick=
"editor.utils.deleteSelectedNodes()"
>
移除
</span>
<!-- 顶部工具栏 -->
<div
class=
"layui-nav layui-layout-right"
style=
"line-height: 60px"
>
<!--<span aria-hidden="true" title="编辑" onClick="editor.utils.editTopology()">编辑</span>-->
<div
class=
"layui-nav layui-layout-right"
>
<span
aria-hidden=
"true"
title=
"全屏查看"
onClick=
"editor.utils.showInFullScreen(editor.stage.canvas,'RequestFullScreen')"
>
全屏查看
</span>
...
...
@@ -51,8 +53,6 @@
<span
aria-hidden=
"true"
title=
"保存"
(
click
)="
save
()"
>
保存
</span>
<span
aria-hidden=
"true"
title=
"复制"
onClick=
"editor.utils.cloneSelectedNodes()"
>
复制
</span>
<span
aria-hidden=
"true"
title=
"删除"
onClick=
"editor.utils.deleteSelectedNodes()"
>
删除
</span>
<span
aria-hidden=
"true"
title=
"清空"
onClick=
"editor.utils.clearTopology()"
>
清空
</span>
<span
aria-hidden=
"true"
title=
"放大"
...
...
@@ -556,7 +556,7 @@
<span>
当前时间:
<label
name=
"current_time"
></label></span>
</div>
<canvas
class=
"topology-context"
id=
"topology-canvas"
#
topologyCanvas
style=
"height: 580px;
width: 100%;
"
>
style=
"height: 580px;"
>
您的浏览器不支持HTML5!
</canvas>
<span
class=
"tips"
>
{{topoType}}
</span>
...
...
@@ -564,4 +564,110 @@
</div>
</div>
</div>
</div>
\ No newline at end of file
</div>
<!-- 设备编辑 -->
<div
id=
"node-dialog"
style=
"display: none;"
>
<form
id=
"node-form"
class=
"layui-form"
action=
""
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
类型
</label>
<div
class=
"layui-input-block"
>
<select
name=
"city"
>
<option
value=
""
></option>
<option
value=
"0"
>
主机
</option>
<option
value=
"1"
>
拓扑图
</option>
<option
value=
"2"
>
触发器
</option>
<option
value=
"3"
>
主机群组
</option>
<option
value=
"4"
>
图片
</option>
</select>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
标签
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"text"
required
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
标签位置
</label>
<div
class=
"layui-input-block"
>
<select
name=
"textPosition"
>
<option
value=
"Bottom_Center"
>
默认
</option>
<option
value=
"Top_Left"
>
顶部居左
</option>
<option
value=
"Top_Center"
>
顶部居中
</option>
<option
value=
"Top_Right"
>
顶部居右
</option>
<option
value=
"Bottom_Left"
>
低部居左
</option>
<option
value=
"Bottom_Center"
>
低部居中
</option>
<option
value=
"Bottom_Right"
>
低部居右
</option>
</select>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
坐标
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"text"
name=
"x"
placeholder=
"X"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"text"
name=
"y"
placeholder=
"Y"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
</form>
</div>
<!--连线编辑-->
<div
id=
"link-dialog"
style=
"display: none;"
>
<form
id=
"link-form"
class=
"layui-form"
action=
""
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
线类型
</label>
<div
class=
"layui-input-block"
>
<select
name=
"textPosition"
>
<option
value=
"0"
>
无
</option>
<option
value=
"1"
>
———
</option>
<option
value=
"2"
>
· · · ·
</option>
<option
value=
"dashedPattern"
>
- - - -
</option>
</select>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
线宽
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"lineWidth"
required
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
名称
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"lineName"
required
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
x1
</label>
<div
class=
"layui-input-inline"
style=
"width: 60px;"
>
<input
type=
"text"
name=
"x1"
placeholder=
"X"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<label
class=
"layui-form-label"
>
y1
</label>
<div
class=
"layui-input-inline"
style=
"width: 60px;"
>
<input
type=
"text"
name=
"y1"
placeholder=
"Y"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
x2
</label>
<div
class=
"layui-input-inline"
style=
"width: 60px;"
>
<input
type=
"text"
name=
"x2"
placeholder=
"X"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<label
class=
"layui-form-label"
>
y2
</label>
<div
class=
"layui-input-inline"
style=
"width: 60px;"
>
<input
type=
"text"
name=
"y2"
placeholder=
"Y"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
</form>
</div>
<nz-modal
>
</nz-modal>
\ No newline at end of file
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.ts
View file @
ac3e0334
...
...
@@ -20,7 +20,7 @@ declare let layui: any;
color: #666666;
}
.layui-
layout-right
span {
.layui-
header
span {
margin-right: 15px;
cursor: pointer;
}
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
ac3e0334
...
...
@@ -160,9 +160,10 @@
</thead>
<tbody>
<tr
*
ngFor=
"let data of checkTable.data"
>
<td>
<td
class=
"tag-form"
>
<nz-tag
*
ngIf=
"data.priority == 4 || data.priority == 5"
[
nzColor
]="
color
.
red
"
></nz-tag>
<nz-tag
*
ngIf=
"data.priority == 2 || data.priority == 3"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<nz-tag
*
ngIf=
"data.priority == -1"
[
nzColor
]="
color
.
green
"
></nz-tag>
{{data.name}}
</td>
<td>
{{data.lastvalue}}
</td>
<td>
{{data.lastclock}}
</td>
...
...
src/main/webapp/app/overAll/overAll.service.ts
View file @
ac3e0334
...
...
@@ -185,7 +185,7 @@ export class OverAllService {
}
itemUpdata
(
data
):
Observable
<
any
>
{
return
this
.
http
.
p
os
t
(
SERVER_API_URL
+
'/item/updata/'
,
data
);
return
this
.
http
.
p
u
t
(
SERVER_API_URL
+
'/item/updata/'
,
data
);
}
//临时暂停
...
...
src/main/webapp/app/system/power/power.component.ts
View file @
ac3e0334
...
...
@@ -18,50 +18,6 @@ export class PowerComponent implements OnInit {
}
ngOnInit
()
{
this
.
dataSet
=
[
{
key1
:
'角色名称'
,
key2
:
'说明'
,
key3
:
'权限模块'
,
key4
:
'资源权限'
,
key5
:
'有效'
},
{
key1
:
'角色名称'
,
key2
:
'说明'
,
key3
:
'权限模块'
,
key4
:
'资源权限'
,
key5
:
'有效'
},
{
key1
:
'角色名称'
,
key2
:
'说明'
,
key3
:
'权限模块'
,
key4
:
'资源权限'
,
key5
:
'有效'
},
{
key1
:
'角色名称'
,
key2
:
'说明'
,
key3
:
'权限模块'
,
key4
:
'资源权限'
,
key5
:
'有效'
},
{
key1
:
'角色名称'
,
key2
:
'说明'
,
key3
:
'权限模块'
,
key4
:
'资源权限'
,
key5
:
'有效'
},
{
key1
:
'角色名称'
,
key2
:
'说明'
,
key3
:
'权限模块'
,
key4
:
'资源权限'
,
key5
:
'有效'
},
];
this
.
getRole
();
}
...
...
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
View file @
ac3e0334
...
...
@@ -30,7 +30,6 @@ TopologyPanel.prototype.saveTopology = function (url) {
}
// 获取json
let
topologyJSON
=
editor
.
stage
.
toJson
();
console
.
log
(
topologyJSON
);
return
topologyJSON
;
// 保存拓扑图数据
}
...
...
@@ -476,7 +475,6 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
// alert('加载拓扑编辑器失败!')
return
}
console
.
log
(
topologyJson
);
this
.
topologyGuid
=
topologyGuid
// 创建jTopo舞台屏幕对象
let
canvas
=
document
.
getElementById
(
'topology-canvas'
)
...
...
@@ -487,7 +485,6 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
this
.
stage
=
new
JTopo
.
Stage
(
canvas
)
// 定义舞台对象
this
.
scene
=
new
JTopo
.
Scene
(
this
.
stage
)
// 定义场景对象
}
else
{
console
.
log
(
topologyJson
);
this
.
stage
=
JTopo
.
createStageFromJson
(
topologyJson
,
canvas
)
// 根据保存好的jsonStr(拓扑结构)创建舞台对象
this
.
scene
=
this
.
stage
.
childs
[
0
]
// 场景对象列表,childs是舞台的属性
}
...
...
@@ -626,9 +623,13 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
self
.
currentNode
.
text
=
param
.
text
;
self
.
currentNode
.
textPosition
=
param
.
textPosition
;
self
.
currentNode
.
setLocation
(
param
.
x
,
param
.
y
);
$
(
"#node-dialog"
).
css
(
"display"
,
"none"
)
},
btn2
:
function
()
{
editor
.
utils
.
deleteNode
(
self
.
currentNode
);
},
cancel
:
function
()
{
$
(
"#node-dialog"
).
css
(
"display"
,
"none"
)
}
});
}
else
if
(
event
.
target
instanceof
JTopo
.
Link
&&
editor
.
stageMode
===
'edit'
)
{
...
...
@@ -640,12 +641,17 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
btn
:
[
"应用"
,
"删除"
,
"取消"
],
yes
:
function
(
index
,
layero
){
let
param
=
getParam
(
"link-form"
);
self
.
currentNode
.
text
=
param
.
text
;
self
.
currentNode
.
text
=
param
.
lineName
;
self
.
currentNode
.
textPosition
=
param
.
textPosition
;
self
.
currentNode
.
setLocation
(
param
.
x
,
param
.
y
);
$
(
'#link-dialog'
).
css
(
'display'
,
'none'
)
layer
.
close
(
index
);
},
btn2
:
function
()
{
editor
.
utils
.
deleteNode
(
self
.
currentNode
);
},
cancel
:
function
()
{
$
(
'#link-dialog'
).
css
(
'display'
,
'none'
)
}
});
}
...
...
src/main/webapp/index.html
View file @
ac3e0334
...
...
@@ -18,7 +18,9 @@
height
:
100%
;
font-weight
:
400
;
}
body
{
padding-right
:
0
!important
;
}
.square-flip
{
position
:
relative
;
width
:
100%
;
...
...
@@ -57,7 +59,7 @@
}
</style>
<body
class=
"layui-layout-body"
>
<body>
<!--[if lt IE 9]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
your browser</a> to improve your experience.</p>
...
...
@@ -71,7 +73,7 @@
<h1>
You must enable javascript to view this page
</h1>
</noscript>
<script
src=
"javascript/jquery-3.3.1/jquery-3.3.1.min.js"
type=
"text/javascript"
></script>
<script
src=
"javascript/layui-2.3.0/layui.js"
type=
"text/javascript"
></script>
<script
src=
"javascript/layui-2.3.0/layui.
all.
js"
type=
"text/javascript"
></script>
<!-- js of this project -->
<script
src=
"javascript/jtopo/js/util.js"
type=
"text/javascript"
></script>
<script
src=
"javascript/jtopo/js/jtopo-0.4.8-dev.js"
type=
"text/javascript"
></script>
...
...
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