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
8ed9b8ac
Commit
8ed9b8ac
authored
Nov 14, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete log
parent
de8f8c7d
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
44 deletions
+86
-44
analysis.service.ts
src/main/webapp/app/analysis/analysis.service.ts
+9
-0
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+3
-3
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+34
-37
pause.component.ts
src/main/webapp/app/modal/pause/pause.component.ts
+7
-3
operation.service.ts
src/main/webapp/app/operation/operation.service.ts
+9
-0
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+1
-1
smart.service.ts
src/main/webapp/app/smart/smart.service.ts
+9
-0
work.service.ts
src/main/webapp/app/work/work.service.ts
+9
-0
documentation.css
src/main/webapp/content/css/documentation.css
+5
-0
No files found.
src/main/webapp/app/analysis/analysis.service.ts
0 → 100644
View file @
8ed9b8ac
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
AnalysisService
{
constructor
()
{
}
}
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
8ed9b8ac
...
...
@@ -253,7 +253,7 @@
<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
>
<
!--<label nz-radio-button nzValue="macroExpand"><span>继承以及主机宏</span></label>--
>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
...
...
@@ -271,13 +271,13 @@
<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
placeholder=
"{$SNMP_COMMUNITY}"
value=
"{{item.macro}}"
>
<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
placeholder=
"public"
value=
"{{item.value}}
"
>
<input
nz-input
[(
ngModel
)]="
item
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<span
(
click
)="
deleteMacro1
(
i
)"
>
移除
</span>
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
8ed9b8ac
...
...
@@ -49,34 +49,8 @@ export class BasicEditComponent implements OnInit {
ngOnInit
()
{
this
.
tabNum
=
0
;
this
.
initForm
();
this
.
getTemplate
();
this
.
validateForm
=
{
groups
:
[],
hostExtend
:
{
equipmentType
:
null
,
secondLevelType
:
null
,
serviceid
:
''
},
macros
:
this
.
macroList1
,
interfaces
:
this
.
interfaceslist
,
//接口
inventory
:
{
os
:
null
,
name
:
null
,
serialno_a
:
null
},
templates
:
[],
name
:
null
,
host
:
null
,
ipmi_authtype
:
null
,
ipmi_username
:
null
,
ipmi_privilege
:
null
,
ipmi_password
:
null
,
tls_psk_identity
:
null
,
tls_issuer
:
null
,
tls_subject
:
null
,
tls_psk
:
null
,
};
this
.
overAllSer
.
getgroups
({}).
subscribe
(
(
res
)
=>
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
...
...
@@ -103,19 +77,39 @@ export class BasicEditComponent implements OnInit {
this
.
modalTitle
=
'编辑资源'
;
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
validateForm
=
res
.
data
[
0
];
this
.
validateForm
.
ipmi_authtype
=
res
.
data
[
0
].
ipmi_authtype
+
''
;
this
.
validateForm
.
ipmi_privilege
=
res
.
data
[
0
].
ipmi_privilege
+
''
;
this
.
validateForm
.
groups
=
res
.
data
[
0
].
groups
;
this
.
interfaceslist
=
res
.
data
[
0
].
interfaces
;
if
(
res
.
data
[
0
].
macros
)
{
this
.
validateForm
.
macros
=
res
.
data
([
0
]).
macros
;
}
const
data
=
res
.
data
[
0
];
this
.
validateForm
.
name
=
data
.
name
;
this
.
validateForm
.
host
=
data
.
host
;
this
.
validateForm
.
ipmi_authtype
=
data
.
ipmi_authtype
+
''
;
this
.
validateForm
.
ipmi_username
=
data
.
ipmi_username
+
''
;
this
.
validateForm
.
ipmi_privilege
=
data
.
ipmi_privilege
+
''
;
this
.
validateForm
.
ipmi_password
=
data
.
ipmi_password
+
''
;
this
.
validateForm
.
tls_psk_identity
=
data
.
tls_psk_identity
+
''
;
this
.
validateForm
.
tls_issuer
=
data
.
tls_issuer
+
''
;
this
.
validateForm
.
tls_subject
=
data
.
tls_subject
+
''
;
this
.
validateForm
.
tls_psk
=
data
.
tls_psk
+
''
;
this
.
validateForm
.
inventory
.
os
=
data
.
inventory
.
os
;
this
.
validateForm
.
inventory
.
name
=
data
.
inventory
.
name
;
this
.
validateForm
.
inventory
.
serialno_a
=
data
.
inventory
.
serialno_a
;
this
.
validateForm
.
hostExtend
.
equipmentType
=
data
.
hostExtend
.
equipmentType
+
''
;
this
.
validateForm
.
hostExtend
.
secondLevelType
=
data
.
hostExtend
.
secondLevelType
+
''
;
this
.
validateForm
.
hostExtend
.
serviceid
=
data
.
hostExtend
.
serviceid
+
''
;
this
.
validateForm
.
groups
=
data
.
groups
;
const
tempArr
=
data
.
parentTemplates
.
map
(
res
=>
{
return
res
.
templateid
;
});
this
.
validateForm
.
templates
=
tempArr
;
this
.
interfaceslist
=
data
.
interfaces
;
this
.
interfaceslist
.
forEach
(
res
=>
{
res
.
main
=
res
.
main
+
''
;
res
.
type
=
res
.
type
+
''
;
});
if
(
data
.
macros
)
{
this
.
macroList1
=
data
.
macros
;
}
for
(
let
i
=
0
;
i
<
this
.
validateForm
.
groups
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
this
.
groupList
.
length
;
j
++
)
{
if
(
this
.
validateForm
.
groups
[
i
].
groupid
==
this
.
groupList
[
j
].
value
)
{
...
...
@@ -169,14 +163,17 @@ export class BasicEditComponent implements OnInit {
if
(
this
.
macroTYpe
==
'macroExpand'
)
{
this
.
validateForm
.
macros
=
this
.
macroList2
;
}
this
.
validateForm
.
hostid
=
this
.
hostId
;
this
.
validateForm
.
interfaces
=
this
.
interfaceslist
;
this
.
validateForm
.
macros
=
this
.
macroList1
;
this
.
overAllSer
.
updateHost
(
this
.
validateForm
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
isBasicEdit
=
false
;
}
this
.
done
.
emit
();
this
.
message
.
info
(
res
.
errMsg
);
this
.
initForm
();
}
this
.
message
.
info
(
res
.
errMsg
);
},
(
err
)
=>
{
this
.
message
.
info
(
'系统错误'
);
...
...
src/main/webapp/app/modal/pause/pause.component.ts
View file @
8ed9b8ac
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
OverAllService
}
from
'../../overAll/overAll.service'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
@
Component
({
selector
:
'smart-pause'
,
...
...
@@ -16,7 +17,8 @@ export class PauseComponent implements OnInit {
time
:
''
};
hostId
;
//主机id
constructor
(
public
overAllSer
:
OverAllService
,
public
datePipe
:
DatePipe
)
{
constructor
(
public
overAllSer
:
OverAllService
,
public
datePipe
:
DatePipe
,
public
message
:
NzMessageService
)
{
}
ngOnInit
()
{
...
...
@@ -39,8 +41,10 @@ export class PauseComponent implements OnInit {
};
this
.
overAllSer
.
tempStop
(
data
).
subscribe
(
(
res
)
=>
{
// this.isShow = false;
if
(
res
.
errCode
==
10000
){
this
.
isShow
=
false
;
}
this
.
message
.
info
(
res
.
errMsg
);
}
);
...
...
src/main/webapp/app/operation/operation.service.ts
0 → 100644
View file @
8ed9b8ac
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
OperationService
{
constructor
()
{
}
}
src/main/webapp/app/overAll/overAll.service.ts
View file @
8ed9b8ac
...
...
@@ -181,7 +181,7 @@ export class OverAllService {
//临时暂停
tempStop
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/host/temp
-s
top'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/host/temp
S
top'
,
data
);
}
//查询报警主机 和报警数量 以及最高报警级别
...
...
src/main/webapp/app/smart/smart.service.ts
0 → 100644
View file @
8ed9b8ac
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
SmartService
{
constructor
()
{
}
}
src/main/webapp/app/work/work.service.ts
0 → 100644
View file @
8ed9b8ac
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
WorkService
{
constructor
()
{
}
}
src/main/webapp/content/css/documentation.css
View file @
8ed9b8ac
...
...
@@ -95,3 +95,7 @@
left
:
auto
;
height
:
220%
;
}
.ant-checkbox-group
label
:first-child
{
margin-left
:
8px
;
}
\ No newline at end of file
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