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
c1158be1
Commit
c1158be1
authored
Oct 29, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug update
parent
92dee72e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
669 deletions
+23
-669
app.constants.ts
src/main/webapp/app/app.constants.ts
+2
-1
home.component.html
src/main/webapp/app/home/home.component.html
+0
-59
home.component.ts
src/main/webapp/app/home/home.component.ts
+3
-197
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+10
-409
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+8
-3
No files found.
src/main/webapp/app/app.constants.ts
View file @
c1158be1
...
@@ -2,7 +2,8 @@ export const VERSION = process.env.VERSION;
...
@@ -2,7 +2,8 @@ export const VERSION = process.env.VERSION;
export
const
DEBUG_INFO_ENABLED
:
boolean
=
!!
process
.
env
.
DEBUG_INFO_ENABLED
;
export
const
DEBUG_INFO_ENABLED
:
boolean
=
!!
process
.
env
.
DEBUG_INFO_ENABLED
;
export
const
SERVER_API_URL_COMS
=
'/coms'
;
export
const
SERVER_API_URL_COMS
=
'/coms'
;
// export const SERVER_API_URL = '/anke';
// export const SERVER_API_URL = '/anke';
export
const
SERVER_API_URL
=
'/zabbixBox'
;
export
const
SERVER_API_URL
=
'/zhouxi'
;
// export const SERVER_API_URL = '/zabbixBox';
export
const
SERVER_API_URL_MONITOR
=
'/api'
;
export
const
SERVER_API_URL_MONITOR
=
'/api'
;
export
const
BUILD_TIMESTAMP
=
process
.
env
.
BUILD_TIMESTAMP
;
export
const
BUILD_TIMESTAMP
=
process
.
env
.
BUILD_TIMESTAMP
;
export
const
pageSize
=
10
;
export
const
pageSize
=
10
;
...
...
src/main/webapp/app/home/home.component.html
View file @
c1158be1
...
@@ -121,62 +121,3 @@
...
@@ -121,62 +121,3 @@
</tr>
</tr>
</tbody>
</tbody>
</nz-table>
</nz-table>
<div
nz-row
class=
"padding-15-0"
>
<div
nz-col
nzSpan=
"12"
>
<h2>
关注资源
</h2>
</div>
<div
nz-col
nzSpan=
"12"
class=
"text-right"
>
<button
nz-button
nzType=
"default"
(
click
)="
showAddFollow
()"
><i
class=
"anticon anticon-plus-circle-o"
></i>
添加资源
</button>
</div>
</div>
<div
nz-row
>
<ng-container
*
ngFor=
"let item of followList;let i = index;"
>
<div
nz-col
nzSpan=
"12"
class=
"follow"
>
<span
(
click
)="
cancel
(
i
,
item
)"
class=
"cursor calcle-follow"
><i
class=
"anticon anticon-close-circle"
></i></span>
<div
class=
"follow-container"
>
<div
class=
"follow-title"
>
<div>
<p>
{{item.name}}
<span>
类型:{{item.extendName}}
</span>
<span
style=
"margin-left: 10px"
>
IP:{{item.host}}
</span>
</p>
<p>
所在分组:
<span
style=
"margin-right: 5px;"
*
ngFor=
"let groups of item.groupName"
>
{{groups}}
</span></p>
</div>
</div>
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
class=
"height-150 releative"
>
<div
class=
"container-top"
>
<p>
监测点
</p>
<p
class=
"round-tag tag-form"
>
<nz-tag
class=
"tag-red"
[
nzColor
]="
color
.
red
"
></nz-tag>
<span
style=
"margin-right: 10px"
>
{{item.item.high}}
</span>
<nz-tag
class=
"tag-yellow"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<span
style=
"margin-right: 10px"
>
{{item.item.warning}}
</span>
</p>
</div>
<div
class=
"container-bottom"
>
<p>
PING值:{{item.lose}}
</p>
</div>
</div>
<div
nz-col
nzSpan=
"12"
class=
"height-150"
echarts
[
options
]="
item
.
option
"
></div>
<div
class=
"chart-font"
>
<p>
<nz-tag
nzColor=
"#f09363"
></nz-tag>
CPU使用率 {{item.cpu}}%
</p>
<p>
<nz-tag
nzColor=
"#80ba78"
></nz-tag>
内存使用率 {{(item.memory).toFixed(2)}}%
</p>
<!--<p>-->
<!--<nz-tag nzColor="#73b6e4"></nz-tag>-->
<!--带宽使用率 {{item.lose}}%-->
<!--</p>-->
</div>
</div>
</div>
</div>
</ng-container>
</div>
<smart-select-group
#
smartSelectGroup
(
done
)="
getItem
($
event
)"
></smart-select-group>
src/main/webapp/app/home/home.component.ts
View file @
c1158be1
...
@@ -18,7 +18,6 @@ import {Router} from '@angular/router';
...
@@ -18,7 +18,6 @@ import {Router} from '@angular/router';
})
})
export
class
HomeComponent
implements
OnInit
,
AfterViewInit
{
export
class
HomeComponent
implements
OnInit
,
AfterViewInit
{
@
ViewChild
(
'smartSelectGroup'
)
smartSelectGroup
:
SelectGroupComponent
;
@
ViewChild
(
"leftDiv"
)
leftDiv
:
ElementRef
;
@
ViewChild
(
"leftDiv"
)
leftDiv
:
ElementRef
;
@
ViewChild
(
"rightDiv"
)
rightDiv
:
ElementRef
;
@
ViewChild
(
"rightDiv"
)
rightDiv
:
ElementRef
;
...
@@ -73,9 +72,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -73,9 +72,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
rightTotal
=
0
;
rightTotal
=
0
;
//我的关注
followList
;
//资源设备数量
//资源设备数量
deviceNo
;
deviceNo
;
...
@@ -97,8 +93,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -97,8 +93,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
this
.
getGroup
();
this
.
getGroup
();
this
.
getMyFollow
();
this
.
findSize
();
this
.
findSize
();
}
}
...
@@ -118,156 +112,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -118,156 +112,6 @@ export class HomeComponent implements OnInit,AfterViewInit {
});
});
}
}
//我的关注
getMyFollow
(){
this
.
layoutSer
.
myFollow
().
subscribe
(
(
res
)
=>
{
this
.
followList
=
res
.
data
;
if
(
this
.
followList
.
length
>
0
){
let
dataStyle
=
{
normal
:
{
label
:
{
show
:
false
},
labelLine
:
{
show
:
false
},
shadowBlur
:
40
,
borderWidth
:
10
,
shadowColor
:
'rgba(0, 0, 0, 0)'
//边框阴影
}
};
let
placeHolderStyle
=
{
normal
:
{
color
:
'#eee'
,
label
:
{
show
:
false
},
labelLine
:
{
show
:
false
}
},
emphasis
:
{
color
:
'#393d50'
}
};
this
.
followList
.
forEach
(
e
=>
{
e
.
option
=
{
backgroundColor
:
'#fff'
,
title
:
{
text
:
''
,
x
:
'center'
,
y
:
'center'
,
textStyle
:
{
fontWeight
:
'normal'
,
fontSize
:
24
,
color
:
"red"
,
}
},
tooltip
:
{
trigger
:
'item'
,
show
:
true
,
formatter
:
"{b} : <br/>{d}%"
,
backgroundColor
:
'rgba(0,0,0,0.7)'
,
// 背景
padding
:
[
8
,
10
],
//内边距
extraCssText
:
'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);'
,
//添加阴影
},
series
:
[{
name
:
'CPU使用率'
,
type
:
'pie'
,
clockWise
:
false
,
radius
:
[
50
,
58
],
center
:[
'30%'
,
'50%'
],
itemStyle
:
dataStyle
,
hoverAnimation
:
false
,
startAngle
:
90
,
label
:{
borderRadius
:
'10'
,
},
data
:
[{
value
:
e
.
cpu
,
name
:
'CPU使用率'
,
itemStyle
:
{
normal
:
{
color
:
"#f09363"
}
}
},
{
value
:
100
-
e
.
cpu
,
name
:
''
,
tooltip
:
{
show
:
false
},
itemStyle
:
placeHolderStyle
},
]
},
{
name
:
'内存使用率'
,
type
:
'pie'
,
clockWise
:
false
,
radius
:
[
35
,
43
],
center
:[
'30%'
,
'50%'
],
itemStyle
:
dataStyle
,
hoverAnimation
:
false
,
startAngle
:
90
,
data
:
[{
value
:
e
.
memory
,
name
:
'内存使用率'
,
itemStyle
:
{
normal
:
{
color
:
"#80ba78"
}
}
},
{
value
:
100
-
e
.
memory
,
name
:
''
,
tooltip
:
{
show
:
false
},
itemStyle
:
placeHolderStyle
},
]
},
// {
// name: '带宽使用率',
// type: 'pie',
// clockWise: false,
// radius: [20, 28],
// center:['30%','50%'],
// itemStyle: dataStyle,
// hoverAnimation: false,
// startAngle: 90,
// data: [{
// value: e.lose,
// name: '带宽使用率',
// itemStyle: {
// normal: {
// color: "#73b6e4"
// }
// }
// },
// {
// value: 100 - e.lose,
// name: '',
// tooltip: {
// show: false
// },
// itemStyle: placeHolderStyle
// },
// ]
// }
]
};
})
}
}
)
}
//获取分组
//获取分组
getGroup
()
{
getGroup
()
{
this
.
overAllSer
.
findGroup
().
subscribe
(
this
.
overAllSer
.
findGroup
().
subscribe
(
...
@@ -558,8 +402,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -558,8 +402,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
);
);
}
}
//获取告警分组
getAlarmList
()
{
getAlarmList
(){
this
.
loading
=
true
;
this
.
loading
=
true
;
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageNum
:
this
.
pageNum
,
...
@@ -571,8 +414,8 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -571,8 +414,8 @@ export class HomeComponent implements OnInit,AfterViewInit {
};
};
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
warnList
=
res
.
data
.
data
;
this
.
warnList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
}
...
@@ -582,47 +425,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -582,47 +425,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
);
);
}
}
showAddFollow
(){
this
.
smartSelectGroup
.
showAddModal
(
"选择资源"
)
}
change
(
e
){
change
(
e
){
if
(
e
>
0
){
if
(
e
>
0
){
this
.
pageNum
=
e
;
this
.
pageNum
=
e
;
this
.
getAlarmList
();
this
.
getAlarmList
();
}
}
}
}
//设置关注
getItem
(
e
){
const
data
=
{
resourceIds
:
e
.
map
(
res
=>
{
return
res
+
""
;
})
};
this
.
layoutSer
.
addFollow
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"添加关注成功"
);
this
.
getMyFollow
();
}
}
)
}
//取消关注
cancel
(
index
,
item
){
this
.
followList
.
splice
(
index
,
1
);
const
data
=
{
resourceIds
:[
item
.
hostId
+
""
]
};
this
.
layoutSer
.
unFollow
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
getMyFollow
();
this
.
message
.
success
(
'取消关注成功'
);
}
}
)
}
}
}
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
c1158be1
<!--添加资源-->
<!--添加资源-->
<nz-modal
[
nzWidth
]="
1080
"
[(
nzVisible
)]="
isBasicEdit
"
[
nzTitle
]="
modalTitle
"
(
nzOnCancel
)="
handleEditCancel
()"
(
nzOnOk
)="
handEditleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isBasicEdit
"
[
nzTitle
]="
modalTitle
"
(
nzOnCancel
)="
handleEditCancel
()"
<nz-tabset
[(
nzSelectedIndex
)]="
tabNum
"
[
nzType
]="'
card
'"
(
nzSelectedIndexChange
)="
tabsChange
($
event
)"
style=
"padding-bottom: 25px;min-height: 500px"
>
(
nzOnOk
)="
handEditleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<nz-tab
nzTitle=
"资源信息"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"equipmentTypeid"
>
设备类型
</nz-form-label>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"equipmentTypeid"
>
设备类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"equipmentTypeid"
nzPlaceHolder=
"选择设备类型"
[(
ngModel
)]="
validateForm
.
hostExtend
.
equipmentTypeid
"
(
ngModelChange
)="
getChildren
($
event
)"
>
<nz-select
name=
"equipmentTypeid"
nzPlaceHolder=
"选择设备类型"
[(
ngModel
)]="
validateForm
.
hostExtend
.
equipmentTypeid
"
(
ngModelChange
)="
getChildren
($
event
)"
>
<ng-container
*
ngFor=
"let item of hostTypeList"
>
<ng-container
*
ngFor=
"let item of hostTypeList"
>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
</ng-container>
</ng-container>
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"secondLevelType"
>
二级类型
</nz-form-label>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"secondLevelType"
>
二级类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择二级类型"
[(
ngModel
)]="
validateForm
.
hostExtend
.
secondLevelTypeid
"
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择二级类型"
[(
ngModel
)]="
validateForm
.
hostExtend
.
secondLevelTypeid
"
>
<ng-container
*
ngFor=
"let item of hostTypeChildrenList"
>
<ng-container
*
ngFor=
"let item of hostTypeChildrenList"
>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
</ng-container>
</ng-container>
...
@@ -52,7 +53,8 @@
...
@@ -52,7 +53,8 @@
<ng-container
*
ngFor=
"let item of interfaceslist;let i = index;"
>
<ng-container
*
ngFor=
"let item of interfaceslist;let i = index;"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-select
name=
"main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
item
.
main
"
(
ngModelChange
)="
changeMain
(
i
)"
>
<nz-select
name=
"main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
item
.
main
"
(
ngModelChange
)="
changeMain
(
i
)"
>
<nz-option
nzValue=
"1"
nzLabel=
"默认"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"默认"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"不默认"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"不默认"
></nz-option>
</nz-select>
</nz-select>
...
@@ -61,7 +63,8 @@
...
@@ -61,7 +63,8 @@
<input
type=
"text"
placeholder=
"IP地址"
nz-input
name=
"ip"
[(
ngModel
)]="
item
.
ip
"
>
<input
type=
"text"
placeholder=
"IP地址"
nz-input
name=
"ip"
[(
ngModel
)]="
item
.
ip
"
>
</nz-form-control>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"type"
nzPlaceHolder=
"连接类型"
[(
ngModel
)]="
item
.
type
"
(
ngModelChange
)="
changePort
(
i
)"
>
<nz-select
name=
"type"
nzPlaceHolder=
"连接类型"
[(
ngModel
)]="
item
.
type
"
(
ngModelChange
)="
changePort
(
i
)"
>
<nz-option
nzValue=
"2"
nzLabel=
"SNMP接口"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"SNMP接口"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"JMX接口"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"JMX接口"
></nz-option>
</nz-select>
</nz-select>
...
@@ -101,406 +104,4 @@
...
@@ -101,406 +104,4 @@
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</div>
</div>
</nz-tab>
<nz-tab
nzTitle=
"配置信息"
>
<nz-collapse>
<nz-collapse-panel
[
nzHeader
]="
panel1
.
name
"
[
nzActive
]="
panel1
.
active
"
>
<form
nz-form
class=
"ant-advanced-search-form"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzFor=
"ipmi_authtype"
>
认证算法
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"ipmi_authtype"
nzPlaceHolder=
"选择设备类型"
[(
ngModel
)]="
validateForm
.
ipmi_authtype
"
>
<nz-option
nzValue=
"-1"
nzLabel=
"默认"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"无"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"MD2"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"MD5"
></nz-option>
<nz-option
nzValue=
"3"
nzLabel=
"straight"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"OEM"
></nz-option>
<nz-option
nzValue=
"5"
nzLabel=
"RMCP+"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"ipmi_username_edit"
>
用户名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
name=
"ipmi_username_edit"
nz-input
placeholder=
"用户名称"
[(
ngModel
)]="
validateForm
.
ipmi_username
"
>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzFor=
"ipmi_privilege"
>
优先权层级
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"ipmi_privilege"
nzPlaceHolder=
"选择设备类型"
[(
ngModel
)]="
validateForm
.
ipmi_privilege
"
>
<nz-option
nzValue=
"1"
nzLabel=
"回调"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"用户"
></nz-option>
<nz-option
nzValue=
"3"
nzLabel=
"操作者"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"管理者"
></nz-option>
<nz-option
nzValue=
"5"
nzLabel=
"OEM"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"ipmi_password_edit"
>
密码
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
name=
"ipmi_password_edit"
nz-input
placeholder=
"密码"
[(
ngModel
)]="
validateForm
.
ipmi_password
"
>
</nz-form-control>
</nz-form-item>
</div>
</div>
</form>
</nz-collapse-panel>
</nz-collapse>
<nz-collapse>
<nz-collapse-panel
[
nzHeader
]="
panel2
.
name
"
[
nzActive
]="
panel2
.
active
"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<nz-radio-group
[(
ngModel
)]="
macroTYpe
"
>
<label
nz-radio-button
nzValue=
"macro"
><span>
主机宏
</span></label>
<!--<label nz-radio-button nzValue="macroExpand"><span>继承以及主机宏</span></label>-->
</nz-radio-group>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div
*
ngIf=
"macroTYpe == 'macro'"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzOffset
]="
2
"
[
nzSpan
]="
6
"
>
宏
</div>
<div
nz-col
[
nzSpan
]="
6
"
>
值
</div>
</div>
<div
nz-row
*
ngFor=
"let item of macroList1;let i = index;"
[
nzGutter
]="
24
"
>
<nz-form-control
[
nzOffset
]="
2
"
nz-col
[
nzSpan
]="
6
"
>
<input
nz-input
[(
ngModel
)]="
item
.
macro
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
1
"
>
=>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<input
nz-input
[(
ngModel
)]="
item
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<span
class=
"main-color cursor"
(
click
)="
deleteMacro1
(
i
)"
>
移除
</span>
</nz-form-control>
</div>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzOffset
]="
2
"
[
nzSpan
]="
6
"
>
<button
nz-button
(
click
)="
addMacro1
()"
nzType=
"default"
>
添加
</button>
</div>
</div>
</div>
<div
*
ngIf=
"macroTYpe == 'macroExpand'"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzOffset
]="
2
"
[
nzSpan
]="
6
"
>
宏
</div>
<div
nz-col
[
nzSpan
]="
1
"
>
</div>
<div
nz-col
[
nzSpan
]="
6
"
>
值
</div>
<div
nz-col
[
nzSpan
]="
3
"
>
模版值
</div>
<div
nz-col
[
nzSpan
]="
1
"
>
</div>
<div
nz-col
[
nzSpan
]="
3
"
>
全局值(配置)
</div>
</div>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let item of macroList2;let i = index;"
>
<nz-form-control
nz-col
[
nzOffset
]="
2
"
[
nzSpan
]="
6
"
>
<input
nz-input
placeholder=
"{$SNMP_COMMUNITY}"
value=
"{{item.macro}}"
>
</nz-form-control>
<div
nz-col
[
nzSpan
]="
1
"
>
=>
</div>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<input
nz-input
placeholder=
"public"
value=
"{{item.value}}"
>
</nz-form-control>
<div
nz-col
[
nzSpan
]="
3
"
>
<button
nz-button
nzType=
"default"
>
更改
</button>
</div>
<div
nz-col
[
nzSpan
]="
1
"
>
<span></span>
</div>
<div
nz-col
[
nzSpan
]="
3
"
>
<span>
"public"
</span>
</div>
<div
nz-col
[
nzSpan
]="
2
"
>
<span
class=
"main-color cursor"
(
click
)="
deleteMacro2
(
i
)"
>
移除
</span>
</div>
</div>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzOffset
]="
2
"
[
nzSpan
]="
6
"
>
<button
nz-button
(
click
)="
addMacro2
()"
nzType=
"default"
>
添加
</button>
</div>
</div>
</div>
</nz-collapse-panel>
</nz-collapse>
</nz-tab>
<!--<nz-tab nzTitle="加密">-->
<!--<form nz-form class="ant-advanced-search-form">-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="host">连接主机</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<nz-radio-group [(ngModel)] ="mainHost" name="mainHost">-->
<!--<label nz-radio-button nzValue="hostType1"><span>非加密</span></label>-->
<!--<label nz-radio-button nzValue="hostType2"><span>共享密钥(PSK)</span></label>-->
<!--<label nz-radio-button nzValue="hostType3"><span>证书</span></label>-->
<!--</nz-radio-group>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="host">从主机连接</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<nz-radio-group [(ngModel)]="otherHost" name="otherHost">-->
<!--<label nz-radio [ngStyle]="style" nzValue="A">非加密</label>-->
<!--<label nz-radio [ngStyle]="style" nzValue="B">共享密钥(PSK)</label>-->
<!--<label nz-radio [ngStyle]="style" nzValue="C">证书</label>-->
<!--</nz-radio-group>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--<ng-container *ngIf="mainHost == 'hostType2'">-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="tls_psk_identity">共享密钥一致性</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<input type="text" name="tls_psk_identity" nz-input [(ngModel)]="tls_psk_identity">-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="tls_psk">共享密钥(PSK)</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<input type="text" nz-input name="tls_psk" [(ngModel)]="tls_psk">-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--</ng-container>-->
<!--<ng-container *ngIf="mainHost == 'hostType3'">-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="tls_issuer">发行者</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<input type="text" name="tls_issuer" nz-input [(ngModel)]="tls_issuer">-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="tls_subject">主体</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<input type="text" name="tls_subject" nz-input [(ngModel)]="tls_subject">-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--</ng-container>-->
<!--</form>-->
<!--<div class="modal-footer-btn">-->
<!--<button nz-button (click)="handleEditCancel()" nzType="primary">取消</button>-->
<!--<button nz-button (click)="tabsChange(1)" nzType="primary">上一步</button>-->
<!--<button nz-button (click)="handEditleOk()" nzType="primary">完成</button>-->
<!--</div>-->
<!--</nz-tab>-->
<!-- <nz-tab nzTitle="资产登记">-->
<!-- <div nz-form class="ant-advanced-search-form form-select">-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">登记资产-->
<!-- </nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <button nz-button nzSize="small" [nzType]="isYesInVentory" (click)="checkChange('no')">不需要</button>-->
<!-- <button nz-button nzSize="small" [nzType]="isNOInVentory" (click)="checkChange('yes')">需要</button>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <ng-container *ngIf="isInVentory">-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称-->
<!-- </nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="资产名称" name="name" [(ngModel)]="validateForm.inventoryExtend.name">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6">负责人</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="负责人" name="person" [(ngModel)]="validateForm.inventoryExtend.person">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired >父分类-->
<!-- </nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <nz-select name="secondLevelType" nzPlaceHolder="选择父分类" [(ngModel)]="inventoryParentId" (ngModelChange)="getTypeByParent($event)">-->
<!-- <ng-container *ngFor="let item of parentTypeList">-->
<!-- <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>-->
<!-- </ng-container>-->
<!-- </nz-select>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6" nzRequired >子分类-->
<!-- </nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <nz-select name="secondLevelType" nzPlaceHolder="选择子分类" [(ngModel)]="validateForm.inventoryExtend.inventoryTypeid">-->
<!-- <ng-container *ngFor="let item of typeList">-->
<!-- <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>-->
<!-- </ng-container>-->
<!-- </nz-select>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="secondLevelType">资产数量-->
<!-- </nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="资产数量" name="inventorycount" [(ngModel)]="validateForm.inventoryExtend.inventorycount">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6" nzFor="invertoryname">品牌</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="品牌" name="invertoryname" [(ngModel)]="validateForm.inventoryExtend.invertoryname">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >库存</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="库存" name="stock" [(ngModel)]="validateForm.inventoryExtend.stock">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6" >型号</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="型号" name="serialnoA" [(ngModel)]="validateForm.inventoryExtend.serialnoA">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >使用</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="使用" name="usedcount" [(ngModel)]="validateForm.inventoryExtend.usedcount">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6" >MAC地址</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="MAC地址" name="mac" [(ngModel)]="validateForm.inventoryExtend.mac">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >借出</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="借出" name="lendcount" [(ngModel)]="validateForm.inventoryExtend.lendcount">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6">维保到期</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="维保到期" name="maintenanceExpiration" [(ngModel)]="validateForm.inventoryExtend.maintenanceExpiration" >-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >维修</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="维修" name="repaircount" [(ngModel)]="validateForm.inventoryExtend.repaircount">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzSpan]="6">存放地点</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="存放地点" name="storageLocation" [(ngModel)]="validateForm.inventoryExtend.storageLocation">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div nz-row [nzGutter]="24">-->
<!-- <div nz-col [nzSpan]="12">-->
<!-- <nz-form-item nzFlex>-->
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >报废</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="14">-->
<!-- <input nz-input placeholder="报废" name="scrapcount" [(ngModel)]="validateForm.inventoryExtend.scrapcount">-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- </div>-->
<!-- </ng-container>-->
<!-- </div>-->
<!-- </nz-tab>-->
</nz-tabset>
</nz-modal>
</nz-modal>
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
c1158be1
...
@@ -130,7 +130,7 @@ export class BasicEditComponent implements OnInit {
...
@@ -130,7 +130,7 @@ export class BasicEditComponent implements OnInit {
this
.
modalTitle
=
'编辑资源'
;
this
.
modalTitle
=
'编辑资源'
;
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
const
data
=
res
.
data
[
0
]
;
const
data
=
res
.
data
;
this
.
validateForm
.
name
=
data
.
name
;
this
.
validateForm
.
name
=
data
.
name
;
this
.
validateForm
.
host
=
data
.
host
;
this
.
validateForm
.
host
=
data
.
host
;
...
@@ -146,6 +146,13 @@ export class BasicEditComponent implements OnInit {
...
@@ -146,6 +146,13 @@ export class BasicEditComponent implements OnInit {
}
}
}
}
}
}
for
(
let
i
=
0
;
i
<
this
.
groupList
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
this
.
validateForm
.
groups
.
length
;
j
++
)
{
if
(
this
.
validateForm
.
groups
[
j
].
groupid
==
this
.
groupList
[
i
].
value
)
{
this
.
groupList
[
i
].
checked
=
true
;
}
}
}
}
}
//模版对象
//模版对象
...
@@ -162,7 +169,6 @@ export class BasicEditComponent implements OnInit {
...
@@ -162,7 +169,6 @@ export class BasicEditComponent implements OnInit {
if
(
data
.
interfaces
)
{
if
(
data
.
interfaces
)
{
this
.
interfaceslist
=
data
.
interfaces
;
this
.
interfaceslist
=
data
.
interfaces
;
this
.
interfaceslist
.
forEach
(
res
=>
{
this
.
interfaceslist
.
forEach
(
res
=>
{
res
.
main
=
res
.
main
+
''
;
res
.
type
=
res
.
type
+
''
;
res
.
type
=
res
.
type
+
''
;
});
});
}
}
...
@@ -187,7 +193,6 @@ export class BasicEditComponent implements OnInit {
...
@@ -187,7 +193,6 @@ export class BasicEditComponent implements OnInit {
if
(
data
.
inventory
)
{
if
(
data
.
inventory
)
{
this
.
validateForm
.
inventoryExtend
=
data
.
inventory
;
this
.
validateForm
.
inventoryExtend
=
data
.
inventory
;
this
.
inventoryParentId
=
data
.
inventory
.
typeparentid
;
this
.
inventoryParentId
=
data
.
inventory
.
typeparentid
;
this
.
getTypeByParent
(
this
.
inventoryParentId
);
this
.
isInVentory
=
true
;
this
.
isInVentory
=
true
;
this
.
isYesInVentory
=
'default'
;
this
.
isYesInVentory
=
'default'
;
this
.
isNOInVentory
=
'primary'
;
this
.
isNOInVentory
=
'primary'
;
...
...
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