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
3fa2485e
Commit
3fa2485e
authored
Dec 26, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f69592c7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
117 additions
and
9 deletions
+117
-9
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+3
-1
home.component.ts
src/main/webapp/app/home/home.component.ts
+1
-0
layout.service.ts
src/main/webapp/app/layouts/layout.service.ts
+5
-0
navbar.component.html
src/main/webapp/app/layouts/navbar/navbar.component.html
+4
-1
navbar.component.ts
src/main/webapp/app/layouts/navbar/navbar.component.ts
+7
-0
alarm-modal.component.html
...n/webapp/app/modal/alarm-modal/alarm-modal.component.html
+2
-1
modify-password.component.html
.../app/modal/modify-password/modify-password.component.html
+18
-0
modify-password.component.ts
...pp/app/modal/modify-password/modify-password.component.ts
+74
-0
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+1
-1
power.component.ts
src/main/webapp/app/system/power/power.component.ts
+1
-4
system.service.ts
src/main/webapp/app/system/system.service.ts
+1
-1
No files found.
src/main/webapp/app/app.main.module.ts
View file @
3fa2485e
...
@@ -92,6 +92,7 @@ import {PararmsComponent} from './work/pararms/pararms.component';
...
@@ -92,6 +92,7 @@ import {PararmsComponent} from './work/pararms/pararms.component';
import
{
ParamsTypeComponent
}
from
'./work/modal/params-type/params-type.component'
;
import
{
ParamsTypeComponent
}
from
'./work/modal/params-type/params-type.component'
;
import
{
HomeComponent
}
from
'./home/home.component'
;
import
{
HomeComponent
}
from
'./home/home.component'
;
import
{
SelectGroupComponent
}
from
'./modal/select-group/select-group.component'
;
import
{
SelectGroupComponent
}
from
'./modal/select-group/select-group.component'
;
import
{
ModifyPasswordComponent
}
from
'./modal/modify-password/modify-password.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -184,7 +185,8 @@ import {SelectGroupComponent} from './modal/select-group/select-group.component'
...
@@ -184,7 +185,8 @@ import {SelectGroupComponent} from './modal/select-group/select-group.component'
AnalysisStatusComponent
,
AnalysisStatusComponent
,
PararmsComponent
,
PararmsComponent
,
ParamsTypeComponent
,
ParamsTypeComponent
,
SelectGroupComponent
SelectGroupComponent
,
ModifyPasswordComponent
],
],
providers
:[
providers
:[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/app/home/home.component.ts
View file @
3fa2485e
...
@@ -510,6 +510,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -510,6 +510,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
pageNum
:
this
.
pageNum
,
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
pageCount
:
this
.
pageCount
,
obj
:{
obj
:{
isWaring
:
'yes'
,
groupid
:
this
.
obj
.
alarmGroupId
,
groupid
:
this
.
obj
.
alarmGroupId
,
}
}
};
};
...
...
src/main/webapp/app/layouts/layout.service.ts
View file @
3fa2485e
...
@@ -19,6 +19,11 @@ export class LayoutService {
...
@@ -19,6 +19,11 @@ export class LayoutService {
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
"/resources/getAll"
);
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
"/resources/getAll"
);
}
}
//修改密码
modifyPassword
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
"/modifyPassword"
,
data
);
}
//首页
//首页
//主机组中的主机数量统计
//主机组中的主机数量统计
findGroupCount
():
Observable
<
any
>
{
findGroupCount
():
Observable
<
any
>
{
...
...
src/main/webapp/app/layouts/navbar/navbar.component.html
View file @
3fa2485e
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<a
nz-dropdown
>
{{user.loginName}}
<i
class=
"anticon anticon-down"
></i>
<a
nz-dropdown
>
{{user.loginName}}
<i
class=
"anticon anticon-down"
></i>
</a>
</a>
<ul
nz-menu
>
<ul
nz-menu
>
<li
nz-menu-item
>
设置
</li>
<li
(
click
)="
showPasswordModal
()"
nz-menu-item
>
修改密码
</li>
<li
(
click
)="
showSeparationModal
()"
nz-menu-item
>
三员分立
</li>
<li
(
click
)="
showSeparationModal
()"
nz-menu-item
>
三员分立
</li>
<li
nz-menu-item
(
click
)="
logout
()"
>
退出
</li>
<li
nz-menu-item
(
click
)="
logout
()"
>
退出
</li>
</ul>
</ul>
...
@@ -29,5 +29,7 @@
...
@@ -29,5 +29,7 @@
<smart-separation
#
smartSeparation
></smart-separation>
<smart-separation
#
smartSeparation
></smart-separation>
<!-- 添加资源-->
<!-- 添加资源-->
<smart-basic-edit
#
basicEdit
></smart-basic-edit>
<smart-basic-edit
#
basicEdit
></smart-basic-edit>
<!--修改密码-->
<smart-modify-password
#
smartModifyPassword
></smart-modify-password>
<!--添加分组-->
<!--添加分组-->
<smart-create-group
#
smartCreateGroup
></smart-create-group>
<smart-create-group
#
smartCreateGroup
></smart-create-group>
\ No newline at end of file
src/main/webapp/app/layouts/navbar/navbar.component.ts
View file @
3fa2485e
...
@@ -10,6 +10,7 @@ import {LocalStorageService} from 'ngx-webstorage';
...
@@ -10,6 +10,7 @@ import {LocalStorageService} from 'ngx-webstorage';
import
{
SeparationComponent
}
from
'../../system/modal/separation/separation.component'
;
import
{
SeparationComponent
}
from
'../../system/modal/separation/separation.component'
;
import
{
BasicEditComponent
}
from
'../../modal/basic-edit/basic-edit.component'
;
import
{
BasicEditComponent
}
from
'../../modal/basic-edit/basic-edit.component'
;
import
{
CreateGroupComponent
}
from
'../../modal/create-group/create-group.component'
;
import
{
CreateGroupComponent
}
from
'../../modal/create-group/create-group.component'
;
import
{
ModifyPasswordComponent
}
from
'../../modal/modify-password/modify-password.component'
;
@
Component
({
@
Component
({
selector
:
'jhi-navbar'
,
selector
:
'jhi-navbar'
,
...
@@ -24,6 +25,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
...
@@ -24,6 +25,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
@
ViewChild
(
"smartSeparation"
)
smartSeparation
:
SeparationComponent
;
@
ViewChild
(
"smartSeparation"
)
smartSeparation
:
SeparationComponent
;
@
ViewChild
(
'basicEdit'
)
basicEdit
:
BasicEditComponent
;
@
ViewChild
(
'basicEdit'
)
basicEdit
:
BasicEditComponent
;
@
ViewChild
(
'smartCreateGroup'
)
smartCreateGroup
:
CreateGroupComponent
;
@
ViewChild
(
'smartCreateGroup'
)
smartCreateGroup
:
CreateGroupComponent
;
@
ViewChild
(
'smartModifyPassword'
)
smartModifyPassword
:
ModifyPasswordComponent
;
inProduction
:
boolean
;
inProduction
:
boolean
;
isNavbarCollapsed
:
boolean
;
isNavbarCollapsed
:
boolean
;
...
@@ -90,6 +92,11 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
...
@@ -90,6 +92,11 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
}
}
}
}
//修改密码
showPasswordModal
(){
this
.
smartModifyPassword
.
showModal
();
}
//三员分立
//三员分立
showSeparationModal
(){
showSeparationModal
(){
this
.
smartSeparation
.
showModal
(
"三员分立"
);
this
.
smartSeparation
.
showModal
(
"三员分立"
);
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.html
View file @
3fa2485e
...
@@ -190,6 +190,7 @@
...
@@ -190,6 +190,7 @@
<nz-option
*
ngFor=
"let option of objList"
[
nzLabel
]="
option
.
alias
"
<nz-option
*
ngFor=
"let option of objList"
[
nzLabel
]="
option
.
alias
"
[
nzValue
]="
option
.
userid
"
></nz-option>
[
nzValue
]="
option
.
userid
"
></nz-option>
</nz-select>
</nz-select>
<input
nzPlaceholder=
"手机号码或邮箱"
type=
"text"
nz-input
name=
"host1"
[(
ngModel
)]="
validateForm
.
r_longdata
"
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
...
@@ -218,7 +219,7 @@
...
@@ -218,7 +219,7 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"serviceid"
>
恢复信息
</nz-form-label>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"serviceid"
>
恢复信息
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<textarea
nz-input
p
laceholder=
"恢复信息"
[
nzAutosize
]="{
minRows:
4
,
maxRows:
4
}"
[(
ngModel
)]="
validateForm
.
r_shortdata
"
></textarea>
<textarea
nz-input
nzP
laceholder=
"恢复信息"
[
nzAutosize
]="{
minRows:
4
,
maxRows:
4
}"
[(
ngModel
)]="
validateForm
.
r_shortdata
"
></textarea>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</div>
</div>
...
...
src/main/webapp/app/modal/modify-password/modify-password.component.html
0 → 100644
View file @
3fa2485e
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"password"
>
密码
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"password"
nz-input
formControlName=
"password"
placeholder=
"密码"
>
<nz-form-explain
*
ngIf=
"validateForm.get('password').dirty && validateForm.get('password').errors"
>
请输入密码
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"realPassword"
>
确认密码
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"password"
nz-input
formControlName=
"realPassword"
placeholder=
"确认密码"
>
<nz-form-explain
*
ngIf=
"validateForm.get('realPassword').dirty && validateForm.get('realPassword').errors"
>
请输入确认密码
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
src/main/webapp/app/modal/modify-password/modify-password.component.ts
0 → 100644
View file @
3fa2485e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
OverAllService
}
from
'../../overAll/overAll.service'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
import
{
NzMessageComponent
,
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
LayoutService
}
from
'../../layouts/layout.service'
;
@
Component
({
selector
:
'smart-modify-password'
,
templateUrl
:
'./modify-password.component.html'
,
styles
:
[]
})
export
class
ModifyPasswordComponent
implements
OnInit
{
isVisible
=
false
;
title
=
'修改密码'
;
validateForm
:
FormGroup
;
groupid
;
constructor
(
private
fb
:
FormBuilder
,
private
layoutSer
:
LayoutService
,
private
message
:
NzMessageService
)
{}
ngOnInit
()
{
this
.
initForm
();
}
showModal
():
void
{
this
.
isVisible
=
true
;
}
handleOk
()
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
if
(
this
.
validateForm
.
invalid
)
{
return
false
;
}
if
(
this
.
validateForm
.
value
.
password
!=
this
.
validateForm
.
value
.
realPassword
){
this
.
message
.
error
(
"两次输入密码不一致"
);
return
false
;
}
this
.
update
();
}
update
()
{
let
formData
=
new
FormData
();
formData
.
append
(
'password'
,
this
.
validateForm
.
value
.
password
);
this
.
layoutSer
.
modifyPassword
(
formData
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
success
(
'修改成功'
);
this
.
isVisible
=
false
;
this
.
initForm
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
);
}
handleCancel
():
void
{
this
.
isVisible
=
false
;
this
.
initForm
();
}
//初始化
initForm
()
{
this
.
validateForm
=
this
.
fb
.
group
({
password
:
[
null
,
[
Validators
.
required
]],
realPassword
:
[
null
,
[
Validators
.
required
]],
});
}
}
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
3fa2485e
...
@@ -424,7 +424,7 @@ export class BasicComponent implements OnInit {
...
@@ -424,7 +424,7 @@ export class BasicComponent implements OnInit {
}
}
this
.
loading
=
true
;
this
.
loading
=
true
;
const
data
=
{
const
data
=
{
type
:
item
.
equipmentType
i
d
type
:
item
.
equipmentType
I
d
};
};
this
.
overAllSer
.
findHostByType
(
data
).
subscribe
(
this
.
overAllSer
.
findHostByType
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
...
src/main/webapp/app/system/power/power.component.ts
View file @
3fa2485e
...
@@ -90,10 +90,7 @@ export class PowerComponent implements OnInit {
...
@@ -90,10 +90,7 @@ export class PowerComponent implements OnInit {
nzOkText
:
'确定'
,
nzOkText
:
'确定'
,
nzOkType
:
'danger'
,
nzOkType
:
'danger'
,
nzOnOk
:()
=>
{
nzOnOk
:()
=>
{
const
data
=
{
this
.
systemSer
.
deleteRole
(
item
.
id
).
subscribe
(
id
:
item
.
id
}
this
.
systemSer
.
deleteRole
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"删除成功"
);
this
.
message
.
success
(
"删除成功"
);
...
...
src/main/webapp/app/system/system.service.ts
View file @
3fa2485e
...
@@ -37,7 +37,7 @@ export class SystemService {
...
@@ -37,7 +37,7 @@ export class SystemService {
//删除角色
//删除角色
deleteRole
(
params
):
Observable
<
any
>
{
deleteRole
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/role/deleteRoleById
?'
+
this
.
commonSer
.
toQuery
(
params
)
);
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/role/deleteRoleById
/'
+
params
);
}
}
//用户列表
//用户列表
...
...
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