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
c7ab0af1
Commit
c7ab0af1
authored
Jan 11, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
template
parent
33ab7b9a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
228 additions
and
30 deletions
+228
-30
alarm-log.component.html
src/main/webapp/app/alarm/alarm-log/alarm-log.component.html
+1
-1
alarm-modal.component.html
...n/webapp/app/modal/alarm-modal/alarm-modal.component.html
+2
-2
alarm-modal.component.ts
...ain/webapp/app/modal/alarm-modal/alarm-modal.component.ts
+1
-0
create-group.component.ts
...n/webapp/app/modal/create-group/create-group.component.ts
+1
-1
discovery.component.html
src/main/webapp/app/modal/discovery/discovery.component.html
+0
-6
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+50
-0
check-list.component.html
...app/overAll/template/check-list/check-list.component.html
+4
-6
check-list.component.ts
...p/app/overAll/template/check-list/check-list.component.ts
+74
-1
discovery-list.component.html
...All/template/discovery-list/discovery-list.component.html
+6
-2
discovery-list.component.ts
...erAll/template/discovery-list/discovery-list.component.ts
+6
-2
trigger-list.component.html
...overAll/template/trigger-list/trigger-list.component.html
+2
-2
trigger-list.component.ts
...p/overAll/template/trigger-list/trigger-list.component.ts
+81
-7
No files found.
src/main/webapp/app/alarm/alarm-log/alarm-log.component.html
View file @
c7ab0af1
...
...
@@ -84,7 +84,7 @@
{{data.hosts[0].name}}
</ng-container>
</td>
<td
class=
"handle"
>
<td
class=
"handle
cursor main-color
"
>
<span
(
click
)="
showDeleteModal
(
data
)"
>
查看
</span>
</td>
<td>
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.html
View file @
c7ab0af1
...
...
@@ -231,14 +231,14 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"serviceid"
>
恢复主题
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"host4"
type=
"text"
nz-input
name=
"host1"
[(
ngModel
)]="
validateForm
.
r_
longdata
"
>
<input
id=
"host4"
type=
"text"
nz-input
name=
"host1"
[(
ngModel
)]="
validateForm
.
r_
shortdata
"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"serviceid"
>
恢复信息
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<textarea
nz-input
nzPlaceholder=
"恢复信息"
[
nzAutosize
]="{
minRows:
4
,
maxRows:
4
}"
[(
ngModel
)]="
validateForm
.
r_
short
data
"
></textarea>
<textarea
nz-input
nzPlaceholder=
"恢复信息"
[
nzAutosize
]="{
minRows:
4
,
maxRows:
4
}"
[(
ngModel
)]="
validateForm
.
r_
long
data
"
></textarea>
</nz-form-control>
</nz-form-item>
</ng-container>
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.ts
View file @
c7ab0af1
...
...
@@ -281,6 +281,7 @@ export class AlarmModalComponent implements OnInit {
def_longdata
:
this
.
validateForm
.
def_longdata
,
r_longdata
:
this
.
validateForm
.
r_longdata
,
r_shortdata
:
this
.
validateForm
.
r_shortdata
,
hostIds
:
this
.
selectTreeList
,
event
:{
eventTypeId
:
this
.
validateForm
.
event
.
eventTypeId
,
//事件分类id
operators
:
this
.
operatorList
,
//事件负责人
...
...
src/main/webapp/app/modal/create-group/create-group.component.ts
View file @
c7ab0af1
...
...
@@ -55,7 +55,7 @@ export class CreateGroupComponent implements OnInit {
return
false
;
}
if
(
this
.
title
==
'添加分组'
){
if
(
this
.
title
==
'添加分组'
||
this
.
title
==
'添加模版组'
){
this
.
create
();
}
else
{
this
.
update
();
...
...
src/main/webapp/app/modal/discovery/discovery.component.html
View file @
c7ab0af1
...
...
@@ -103,10 +103,4 @@
</form>
</nz-modal>
<!--键值查询-->
<smart-basic-key
(
keyValue
)="
getKey
($
event
)"
#
basicKey
></smart-basic-key>
<!--新建分类-->
<smart-new-type
(
data
)="
addItemType
($
event
)"
#
newType
></smart-new-type>
src/main/webapp/app/overAll/overAll.service.ts
View file @
c7ab0af1
...
...
@@ -363,4 +363,54 @@ export class OverAllService {
findLldrule
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/lldrule/find/'
+
params
);
}
//分页查询触发器
findPageTrigger
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/triggerPrototype/findPage'
,
data
);
}
//主键查询触发器原型
findTriggerById
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/triggerPrototype/find/'
+
params
);
}
//删除触发器
deleteTrigger
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/triggerPrototype/delete'
,
data
);
}
//修改触发器原型
updateTriggerPrototype
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/triggerPrototype/update'
,
data
);
}
//添加触发器原型
createTriggerPrototype
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/triggerPrototype/create'
,
data
);
}
//添加监控项原型
createItemPrototype
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/itemprototype/create'
,
data
);
}
//删除监控项原型
deleteItemPrototype
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/itemprototype/delete'
,
data
);
}
//分页查询监控项原型
findItemPrototype
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/itemprototype/findPage'
,
data
);
}
//修改监控项原型
updateItemPrototype
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/itemprototype/update'
,
data
);
}
//主键查询监控项原型
findItemById
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/itemprototype/find/'
+
params
);
}
}
src/main/webapp/app/overAll/template/check-list/check-list.component.html
View file @
c7ab0af1
...
...
@@ -25,18 +25,16 @@
</div>
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-col
nzSpan=
"3"
>
<button
(
click
)="
showAddModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus-circle-o"
></i>
添加资产
</button>
<button
(
click
)="
showAddModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus-circle-o"
></i>
添加资产
</button>
</div>
<div
nz-col
nzSpan=
"18"
></div>
<div
nz-col
nzSpan=
"3"
></div>
</div>
<nz-table
#
nzTable
[
nzData
]="
ch
ildren
List
"
>
<nz-table
#
nzTable
[
nzData
]="
ch
eck
List
"
>
<thead>
<tr>
<th
nzShowCheckbox
[
nzIndeterminate
]="
indeterminate
"
[
nzChecked
]="
allChecked
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
<th
nzShowCheckbox
[
nzIndeterminate
]="
indeterminate
"
[
nzChecked
]="
allChecked
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
<th>
名称
</th>
<th>
监控项
</th>
<th>
阈值
</th>
...
...
@@ -47,7 +45,7 @@
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of ch
ildren
List"
>
<tr
*
ngFor=
"let data of ch
eck
List"
>
<td
nzShowCheckbox
[(
nzChecked
)]="
data
.
checked
"
(
nzCheckedChange
)="
selectItem
(
data
,$
event
)"
></td>
<td
class=
"round-tag tag-form"
>
{{data.inventoryNo}}
</td>
<td>
{{data.name}}
</td>
...
...
src/main/webapp/app/overAll/template/check-list/check-list.component.ts
View file @
c7ab0af1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
CommonService
}
from
'../../../shared/common/common.service'
;
import
{
SystemService
}
from
'../../../system/system.service'
;
import
{
OverAllService
}
from
'../../overAll.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
pageSize
}
from
'../../../app.constants'
;
@
Component
({
selector
:
'smart-check-list'
,
...
...
@@ -9,10 +15,77 @@ export class CheckListComponent implements OnInit {
tempName
;
disName
;
discoveryids
;
constructor
()
{
}
pageNum
=
1
;
pageCount
=
pageSize
;
totalNum
;
checkList
;
selectList
=
[];
allChecked
;
indeterminate
;
constructor
(
private
overAllSer
:
OverAllService
,
private
routerInfo
:
ActivatedRoute
,
private
router
:
Router
,
private
message
:
NzMessageService
,
private
systemSer
:
SystemService
,
private
commonSer
:
CommonService
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
discoveryids
=
res
.
id
;
this
.
tempName
=
res
.
name
}
);
}
checkAll
(
value
:
boolean
):
void
{
this
.
checkList
.
forEach
(
data
=>
data
.
checked
=
value
);
this
.
refreshStatus
();
}
currentPageDataChange
(
$event
:
Array
<
{
checked
:
boolean
}
>
):
void
{
this
.
checkList
=
$event
;
}
selectItem
(
item
,
e
)
{
if
(
e
)
{
this
.
selectList
.
push
(
item
);
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
)
{
this
.
selectList
.
splice
(
index
,
1
);
}
});
}
this
.
refreshStatus
();
}
refreshStatus
():
void
{
const
allChecked
=
this
.
checkList
.
every
(
value
=>
value
.
checked
===
true
);
const
allUnChecked
=
this
.
checkList
.
every
(
value
=>
!
value
.
checked
);
this
.
allChecked
=
allChecked
;
this
.
indeterminate
=
(
!
allChecked
)
&&
(
!
allUnChecked
);
}
ngOnInit
()
{
this
.
getList
();
}
getList
(){
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
hostIds
:[
this
.
discoveryids
]
};
this
.
overAllSer
.
findItemPrototype
(
data
).
subscribe
(
(
res
)
=>
{
this
.
checkList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
);
}
showAddModal
(){
}
}
src/main/webapp/app/overAll/template/discovery-list/discovery-list.component.html
View file @
c7ab0af1
...
...
@@ -45,8 +45,12 @@
<tr
*
ngFor=
"let data of discoveryList"
>
<td
nzShowCheckbox
[(
nzChecked
)]="
data
.
checked
"
(
nzCheckedChange
)="
selectItem
(
data
,$
event
)"
></td>
<td
class=
"round-tag tag-form"
>
{{data.name}}
</td>
<td>
{{data.itemsCount}}
</td>
<td>
{{data.triggersCount}}
</td>
<td
class=
"cursor main-color"
>
<span
(
click
)="
goToCheck
(
data
)"
>
{{data.itemsCount}}
</span>
</td>
<td
class=
"cursor main-color"
>
<span
(
click
)="
goToTrigger
(
data
)"
>
{{data.triggersCount}}
</span>
</td>
<td>
{{data.stock}}
</td>
<td>
{{data.usedcount}}
</td>
<td>
{{data.lendcount}}
</td>
...
...
src/main/webapp/app/overAll/template/discovery-list/discovery-list.component.ts
View file @
c7ab0af1
...
...
@@ -149,7 +149,9 @@ export class DiscoveryListComponent implements OnInit {
goToCheck
(
data
){
this
.
router
.
navigate
([
'app/main/checkList'
],{
queryParams
:{
invertoryId
:
data
.
id
id
:
data
.
itemid
,
name
:
data
.
name
,
tempName
:
this
.
tempName
}
})
}
...
...
@@ -158,7 +160,9 @@ export class DiscoveryListComponent implements OnInit {
goToTrigger
(
data
){
this
.
router
.
navigate
([
'app/main/triggerList'
],{
queryParams
:{
invertoryId
:
data
.
id
id
:
data
.
itemid
,
name
:
data
.
name
,
tempName
:
this
.
tempName
}
})
}
...
...
src/main/webapp/app/overAll/template/trigger-list/trigger-list.component.html
View file @
c7ab0af1
...
...
@@ -32,7 +32,7 @@
<div
nz-col
nzSpan=
"3"
></div>
</div>
<nz-table
#
nzTable
[
nzData
]="
children
List
"
>
<nz-table
#
nzTable
[
nzData
]="
trigger
List
"
>
<thead>
<tr>
<th
nzShowCheckbox
[
nzIndeterminate
]="
indeterminate
"
[
nzChecked
]="
allChecked
"
...
...
@@ -47,7 +47,7 @@
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of
children
List"
>
<tr
*
ngFor=
"let data of
trigger
List"
>
<td
nzShowCheckbox
[(
nzChecked
)]="
data
.
checked
"
(
nzCheckedChange
)="
selectItem
(
data
,$
event
)"
></td>
<td
class=
"round-tag tag-form"
>
{{data.inventoryNo}}
</td>
<td>
{{data.name}}
</td>
...
...
src/main/webapp/app/overAll/template/trigger-list/trigger-list.component.ts
View file @
c7ab0af1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
pageSize
}
from
'../../../app.constants'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
CommonService
}
from
'../../../shared/common/common.service'
;
import
{
SystemService
}
from
'../../../system/system.service'
;
import
{
OverAllService
}
from
'../../overAll.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
@
Component
({
selector
:
'smart-trigger-list'
,
templateUrl
:
'./trigger-list.component.html'
,
styles
:
[]
selector
:
'smart-trigger-list'
,
templateUrl
:
'./trigger-list.component.html'
,
styles
:
[]
})
export
class
TriggerListComponent
implements
OnInit
{
tempName
;
disName
;
discoveryids
;
constructor
()
{
}
pageNum
=
1
;
pageCount
=
pageSize
;
totalNum
;
ngOnInit
()
{
}
triggerList
;
selectList
=
[];
allChecked
;
indeterminate
;
constructor
(
private
overAllSer
:
OverAllService
,
private
routerInfo
:
ActivatedRoute
,
private
router
:
Router
,
private
message
:
NzMessageService
,
private
systemSer
:
SystemService
,
private
commonSer
:
CommonService
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
discoveryids
=
res
.
id
;
this
.
tempName
=
res
.
name
;
}
);
}
checkAll
(
value
:
boolean
):
void
{
this
.
triggerList
.
forEach
(
data
=>
data
.
checked
=
value
);
this
.
refreshStatus
();
}
currentPageDataChange
(
$event
:
Array
<
{
checked
:
boolean
}
>
):
void
{
this
.
triggerList
=
$event
;
}
selectItem
(
item
,
e
)
{
if
(
e
)
{
this
.
selectList
.
push
(
item
);
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
)
{
this
.
selectList
.
splice
(
index
,
1
);
}
});
}
this
.
refreshStatus
();
}
refreshStatus
():
void
{
const
allChecked
=
this
.
triggerList
.
every
(
value
=>
value
.
checked
===
true
);
const
allUnChecked
=
this
.
triggerList
.
every
(
value
=>
!
value
.
checked
);
this
.
allChecked
=
allChecked
;
this
.
indeterminate
=
(
!
allChecked
)
&&
(
!
allUnChecked
);
}
ngOnInit
()
{
this
.
getList
();
}
getList
()
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
hostIds
:
[
this
.
discoveryids
]
};
this
.
overAllSer
.
findItemPrototype
(
data
).
subscribe
(
(
res
)
=>
{
this
.
triggerList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
);
}
showAddModal
()
{
}
}
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