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
febeff6e
Commit
febeff6e
authored
Dec 02, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
455948e7
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
109 additions
and
40 deletions
+109
-40
now-alarm.component.html
src/main/webapp/app/alarm/now-alarm/now-alarm.component.html
+1
-1
now-alarm.component.ts
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
+1
-0
create-group.component.html
...webapp/app/modal/create-group/create-group.component.html
+1
-2
check.component.html
...n/webapp/app/netTopology/model/check/check.component.html
+12
-10
check.component.ts
...ain/webapp/app/netTopology/model/check/check.component.ts
+31
-1
topology.component.html
...pp/app/netTopology/model/topology/topology.component.html
+8
-8
topology.component.ts
...bapp/app/netTopology/model/topology/topology.component.ts
+34
-1
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
+16
-6
layui.all.js
src/main/webapp/content/javascript/layui-2.3.0/layui.all.js
+0
-6
No files found.
src/main/webapp/app/alarm/now-alarm/now-alarm.component.html
View file @
febeff6e
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</span>
</span>
</div>
</div>
</div>
</div>
<div
class=
"tag-warn tag-form"
>
<div
class=
"tag-warn tag-form
handle
"
>
<ng-container
*
ngFor=
"let item of warnCountList"
>
<ng-container
*
ngFor=
"let item of warnCountList"
>
<span
(
click
)="
search
(
item
.
hostid
)"
>
<span
(
click
)="
search
(
item
.
hostid
)"
>
<nz-tag
*
ngIf=
"item.level == 4 || item.level == 5"
[
nzColor
]="
color
.
red
"
></nz-tag>
<nz-tag
*
ngIf=
"item.level == 4 || item.level == 5"
[
nzColor
]="
color
.
red
"
></nz-tag>
...
...
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
View file @
febeff6e
...
@@ -54,6 +54,7 @@ export class NowAlarmComponent implements OnInit {
...
@@ -54,6 +54,7 @@ export class NowAlarmComponent implements OnInit {
isWaring
:
'yes'
,
isWaring
:
'yes'
,
hostid
:
hostid
,
hostid
:
hostid
,
};
};
console
.
log
(
obj
);
this
.
warnList
.
getList
(
obj
);
this
.
warnList
.
getList
(
obj
);
}
}
...
...
src/main/webapp/app/modal/create-group/create-group.component.html
View file @
febeff6e
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
组名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
组名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"组名称"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"组名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入分组名称
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入分组名称
</nz-form-explain>
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
...
...
src/main/webapp/app/netTopology/model/check/check.component.html
View file @
febeff6e
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
>
<form
[
formGroup
]="
validateForm
"
nz-form
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
name"
>
拓扑图名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
group"
>
选择监测点
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
name=
"name"
[(
ngModel
)]="
name
"
placeholder=
"名称"
>
<input
type=
"text"
nz-input
name=
"group"
formControlName=
"group"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"modalMsg"
>
请输入内容
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('group').dirty && validateForm.get('group').errors"
>
请选择监测点
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
刷新频率
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
显示名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
name=
"name"
[(
ngModel
)]="
name
"
placeholder=
"名称"
>
<input
type=
"text"
nz-input
name=
"name"
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"modalMsg"
>
请输入内容
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入显示名称
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
name"
>
共享角色
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
fontSize"
>
字体大小
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
name=
"
name"
[(
ngModel
)]="
nam
e
"
placeholder=
"名称"
>
<input
type=
"text"
nz-input
name=
"
fontSize"
formControlName=
"fontSiz
e"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"
modalMsg"
>
请输入内容
</nz-form-explain>
<nz-form-explain
*
ngIf=
"
validateForm.get('fontSize').dirty && validateForm.get('fontSize').errors"
>
请输入分组名称
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</form>
</form>
...
...
src/main/webapp/app/netTopology/model/check/check.component.ts
View file @
febeff6e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
@
Component
({
@
Component
({
selector
:
'smart-check'
,
selector
:
'smart-check'
,
...
@@ -9,13 +10,22 @@ export class CheckComponent implements OnInit {
...
@@ -9,13 +10,22 @@ export class CheckComponent implements OnInit {
isVisible
=
false
;
isVisible
=
false
;
title
:
string
;
title
:
string
;
validateForm
:
FormGroup
;
constructor
()
{
constructor
(
private
fb
:
FormBuilder
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
initForm
();
}
}
initForm
(){
this
.
validateForm
=
this
.
fb
.
group
({
name
:[
''
,[
Validators
.
required
]],
fontSize
:[
''
,[
Validators
.
required
]],
group
:[
''
]
})
}
showAddMOodal
()
{
showAddMOodal
()
{
this
.
isVisible
=
true
;
this
.
isVisible
=
true
;
...
@@ -27,6 +37,26 @@ export class CheckComponent implements OnInit {
...
@@ -27,6 +37,26 @@ export class CheckComponent implements OnInit {
this
.
isVisible
=
true
;
this
.
isVisible
=
true
;
}
}
handleOk
(){
for
(
const
i
in
this
.
validateForm
.
controls
){
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
if
(
this
.
validateForm
.
invalid
){
return
false
;
}
if
(
this
.
title
==
"添加监测点"
){
this
.
create
();
}
if
(
this
.
title
==
"编辑监测点"
){
this
.
update
();
}
}
create
(){}
update
(){}
handleCancel
()
{
handleCancel
()
{
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
}
}
...
...
src/main/webapp/app/netTopology/model/topology/topology.component.html
View file @
febeff6e
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
>
<form
[
formGroup
]="
validateForm
"
nz-form
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
拓扑图名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
拓扑图名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
name=
"name"
[(
ngModel
)]="
name
"
placeholder=
"名称"
>
<input
type=
"text"
nz-input
name=
"name"
[(
ngModel
)]="
name
"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"
modalMsg"
>
请输入内容
</nz-form-explain>
<nz-form-explain
*
ngIf=
"
validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入拓扑图名称
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
na
me"
>
刷新频率
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
ti
me"
>
刷新频率
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
name=
"name"
[(
ngModel
)]="
name
"
placeholder=
"名称"
>
<input
style=
"width: 100px;margin-right: 10px"
type=
"text"
nz-input
name=
"time"
[(
ngModel
)]="
time
"
placeholder=
"名称"
>
分钟
<nz-form-explain
*
ngIf=
"
modalMsg"
>
请输入内容
</nz-form-explain>
<nz-form-explain
*
ngIf=
"
validateForm.get('time').dirty && validateForm.get('time').errors"
>
请输入刷新频率
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
name
"
>
共享角色
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"
group
"
>
共享角色
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
name=
"
name"
[(
ngModel
)]="
name
"
placeholder=
"名称"
>
<input
type=
"text"
nz-input
name=
"
group"
[(
ngModel
)]="
group
"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"
modalMsg"
>
请输入内容
</nz-form-explain>
<nz-form-explain
*
ngIf=
"
validateForm.get('group').dirty && validateForm.get('group').errors"
>
请输入分组名称
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</form>
</form>
...
...
src/main/webapp/app/netTopology/model/topology/topology.component.ts
View file @
febeff6e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
@
Component
({
@
Component
({
selector
:
'smart-topology'
,
selector
:
'smart-topology'
,
...
@@ -9,11 +10,23 @@ export class TopologyComponent implements OnInit {
...
@@ -9,11 +10,23 @@ export class TopologyComponent implements OnInit {
isVisible
=
false
;
isVisible
=
false
;
title
:
string
;
title
:
string
;
validateForm
:
FormGroup
;
constructor
()
{
constructor
(
private
fb
:
FormBuilder
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
initForm
();
}
initForm
(){
this
.
validateForm
=
this
.
fb
.
group
(
{
name
:[
''
,[
Validators
.
required
]],
time
:[
''
,[
Validators
.
required
]],
group
:[
''
]
}
)
}
}
showAddMOodal
()
{
showAddMOodal
()
{
...
@@ -26,6 +39,26 @@ export class TopologyComponent implements OnInit {
...
@@ -26,6 +39,26 @@ export class TopologyComponent implements OnInit {
this
.
isVisible
=
true
;
this
.
isVisible
=
true
;
}
}
handleOk
(){
for
(
const
i
in
this
.
validateForm
.
controls
){
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
if
(
this
.
validateForm
.
invalid
){
return
false
;
}
if
(
this
.
title
==
"添加拓扑图"
){
this
.
create
();
}
if
(
this
.
title
==
"编辑拓扑图"
){
this
.
update
();
}
}
create
(){}
update
(){}
handleCancel
()
{
handleCancel
()
{
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
}
}
...
...
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.html
View file @
febeff6e
...
@@ -39,8 +39,9 @@
...
@@ -39,8 +39,9 @@
<div
class=
"layui-header layui-bg-gray"
style=
"line-height: 60px"
>
<div
class=
"layui-header layui-bg-gray"
style=
"line-height: 60px"
>
<input
style=
"width: 200px;"
type=
"text"
[(
ngModel
)]="
name
"
nz-input
placeholder=
"请输入拓扑图名称"
>
<input
style=
"width: 200px;"
type=
"text"
[(
ngModel
)]="
name
"
nz-input
placeholder=
"请输入拓扑图名称"
>
图标
:
<span
onclick=
"editor.utils.addNode()"
>
添加
</span>
设备
:
<span
onclick=
"editor.utils.addNode()"
>
添加
</span>
<span
onclick=
"editor.utils.deleteSelectedNodes()"
>
移除
</span>
<span
onclick=
"editor.utils.deleteSelectedNodes()"
>
移除
</span>
监测点:
<span
(
click
)="
addCheck
()"
>
添加
</span>
<span>
移除
</span>
<!-- 顶部工具栏 -->
<!-- 顶部工具栏 -->
<div
class=
"layui-nav layui-layout-right"
>
<div
class=
"layui-nav layui-layout-right"
>
<span
aria-hidden=
"true"
title=
"全屏查看"
<span
aria-hidden=
"true"
title=
"全屏查看"
...
@@ -668,6 +669,5 @@
...
@@ -668,6 +669,5 @@
</form>
</form>
</div>
</div>
<nz-modal
>
<smart-topology
#
smartTopology
></smart-topology>
<smart-check
#
smartCheck
></smart-check>
</nz-modal>
\ No newline at end of file
\ No newline at end of file
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.ts
View file @
febeff6e
...
@@ -3,6 +3,7 @@ import {TopologyService} from '../topology.service';
...
@@ -3,6 +3,7 @@ import {TopologyService} from '../topology.service';
import
{
NzMessageService
,
NzModalService
}
from
'ng-zorro-antd'
;
import
{
NzMessageService
,
NzModalService
}
from
'ng-zorro-antd'
;
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
*
as
$
from
'jquery'
;
import
*
as
$
from
'jquery'
;
import
{
TopologyComponent
}
from
'../model/topology/topology.component'
;
declare
let
editor
:
any
;
declare
let
editor
:
any
;
declare
var
layui
:
any
;
declare
var
layui
:
any
;
...
@@ -36,6 +37,8 @@ declare var layui: any;
...
@@ -36,6 +37,8 @@ declare var layui: any;
})
})
export
class
NeTopologyComponent
implements
OnInit
{
export
class
NeTopologyComponent
implements
OnInit
{
@
ViewChild
(
'topologyCanvas'
)
topologyCanvas
:
ElementRef
;
@
ViewChild
(
'topologyCanvas'
)
topologyCanvas
:
ElementRef
;
@
ViewChild
(
'smartTopology'
)
smartTopology
:
TopologyComponent
;
@
ViewChild
(
'smartCheck'
)
smartCheck
:
TopologyComponent
;
element
;
element
;
dataSet
;
dataSet
;
...
@@ -60,9 +63,10 @@ export class NeTopologyComponent implements OnInit {
...
@@ -60,9 +63,10 @@ export class NeTopologyComponent implements OnInit {
//新增拓扑图
//新增拓扑图
addTopo
()
{
addTopo
()
{
this
.
topoType
=
'添加模式'
;
// this.topoType = '添加模式';
this
.
message
.
info
(
'添加模式'
);
// this.message.info('添加模式');
editor
.
utils
.
editTopology
();
// editor.utils.editTopology();
this
.
smartTopology
.
showAddMOodal
();
}
}
//编辑拓扑图
//编辑拓扑图
...
@@ -71,9 +75,15 @@ export class NeTopologyComponent implements OnInit {
...
@@ -71,9 +75,15 @@ export class NeTopologyComponent implements OnInit {
this
.
message
.
info
(
"请选择需要编辑的拓扑图"
);
this
.
message
.
info
(
"请选择需要编辑的拓扑图"
);
return
false
;
return
false
;
}
}
this
.
topoType
=
'编辑模式'
;
// this.topoType = '编辑模式';
this
.
message
.
info
(
'编辑模式'
);
// this.message.info('编辑模式');
editor
.
utils
.
editTopology
();
// editor.utils.editTopology();
this
.
smartTopology
.
showEditModal
();
}
//添加监测点
addCheck
(){
this
.
smartCheck
.
showAddMOodal
();
}
}
//获取列表
//获取列表
...
...
src/main/webapp/content/javascript/layui-2.3.0/layui.all.js
View file @
febeff6e
/** layui-v2.3.0 MIT License By https://www.layui.com */
/** layui-v2.3.0 MIT License By https://www.layui.com */
;
!
function
(
e
)
{
;
!
function
(
e
)
{
"use strict"
;
"use strict"
;
console
.
log
(
"done"
);
var
t
=
document
var
t
=
document
,
n
=
{
,
n
=
{
modules
:
{},
modules
:
{},
...
@@ -7555,7 +7554,6 @@ layui.define("jquery", function (t) {
...
@@ -7555,7 +7554,6 @@ layui.define("jquery", function (t) {
}
}
};
};
s
.
prototype
.
init
=
function
(
t
,
e
)
{
s
.
prototype
.
init
=
function
(
t
,
e
)
{
console
.
log
(
"init"
);
var
l
=
function
()
{
var
l
=
function
()
{
return
e
?
'[lay-filter="'
+
e
+
'"]'
:
""
return
e
?
'[lay-filter="'
+
e
+
'"]'
:
""
}()
}()
...
@@ -7659,17 +7657,13 @@ layui.define("jquery", function (t) {
...
@@ -7659,17 +7657,13 @@ layui.define("jquery", function (t) {
},
},
collapse
:
function
()
{
collapse
:
function
()
{
var
t
=
"layui-collapse"
;
var
t
=
"layui-collapse"
;
console
.
log
(
t
);
console
.
log
(
$
(
"."
+
t
+
l
));
a
(
"."
+
t
+
l
).
each
(
function
()
{
a
(
"."
+
t
+
l
).
each
(
function
()
{
console
.
log
(
a
(
this
));
var
t
=
a
(
this
).
find
(
".layui-colla-item"
);
var
t
=
a
(
this
).
find
(
".layui-colla-item"
);
t
.
each
(
function
()
{
t
.
each
(
function
()
{
var
t
=
a
(
this
)
var
t
=
a
(
this
)
,
i
=
t
.
find
(
".layui-colla-title"
)
,
i
=
t
.
find
(
".layui-colla-title"
)
,
e
=
t
.
find
(
".layui-colla-content"
)
,
e
=
t
.
find
(
".layui-colla-content"
)
,
l
=
"none"
===
e
.
css
(
"display"
);
,
l
=
"none"
===
e
.
css
(
"display"
);
console
.
log
(
i
);
i
.
find
(
".layui-colla-icon"
).
remove
(),
i
.
find
(
".layui-colla-icon"
).
remove
(),
i
.
append
(
'<i class="layui-icon layui-colla-icon">'
+
(
l
?
""
:
""
)
+
"</i>"
),
i
.
append
(
'<i class="layui-icon layui-colla-icon">'
+
(
l
?
""
:
""
)
+
"</i>"
),
i
.
off
(
"click"
,
f
.
collapse
).
on
(
"click"
,
f
.
collapse
)
i
.
off
(
"click"
,
f
.
collapse
).
on
(
"click"
,
f
.
collapse
)
...
...
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