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
38452f18
Commit
38452f18
authored
Dec 23, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e6f0f69c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
98 additions
and
91 deletions
+98
-91
home.component.html
src/main/webapp/app/home/home.component.html
+23
-20
home.component.ts
src/main/webapp/app/home/home.component.ts
+4
-1
layout.service.ts
src/main/webapp/app/layouts/layout.service.ts
+1
-1
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+0
-2
audit.component.html
src/main/webapp/app/system/audit/audit.component.html
+1
-1
examine.component.html
src/main/webapp/app/system/examine/examine.component.html
+2
-2
examine.component.ts
src/main/webapp/app/system/examine/examine.component.ts
+8
-1
group.component.html
src/main/webapp/app/system/group/group.component.html
+1
-5
group.component.ts
src/main/webapp/app/system/group/group.component.ts
+57
-57
system.service.ts
src/main/webapp/app/system/system.service.ts
+1
-1
No files found.
src/main/webapp/app/home/home.component.html
View file @
38452f18
...
@@ -92,29 +92,32 @@
...
@@ -92,29 +92,32 @@
</tbody>
</tbody>
</nz-table>
</nz-table>
<p
(
click
)="
showAddFollow
()"
>
添加关注
</p>
<p
(
click
)="
showAddFollow
()"
>
添加关注
</p>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
>
<ng-container
*
ngFor=
"let item of followList"
>
<div>
<div
nz-col
nzSpan=
"12"
style=
"padding: 5px;"
>
<div>
<div
style=
"border: 1px solid #ddd;"
>
<p></p>
<div
style=
"border-bottom: 1px solid #ddd;padding: 10px 5px;background-color:#eee;"
>
<p>
所在分组
</p>
<div>
</div>
<p>
{{item.name}}
<span
style=
"margin-left: 10px"
>
IP:{{item.host}}
</span></p>
</div>
<p>
所在分组
</p>
<div
nz-row
>
</div>
<div
nz-col
nzSpan=
"12"
>
<div>
<p>
监测点
</p>
<p>
监测点
</p>
</div>
</div>
<div>
<div
nz-row
>
PING值
<div
nz-col
nzSpan=
"12"
>
<div
style=
"padding: 10px;"
>
<p>
监测点
</p>
<p>
{{item.high}} {{item.warning}}
</p>
</div>
<div
style=
"padding: 10px;display: flex;align-items: center"
>
<p>
PING值:{{item.lose}}
</p>
</div>
</div>
<div
nz-col
nzSpan=
"12"
echarts
[
options
]="
item
.
option
"
></div>
</div>
</div>
</div>
</div>
<div
nz-col
nzSpan=
"12"
></div>
</div>
</div>
<div
nz-col
nzSpan=
"12"
>
</div>
</ng-container>
</div>
</div>
</div>
<smart-select-group
#
smartSelectGroup
(
done
)="
getItem
($
event
)"
></smart-select-group>
<smart-select-group
#
smartSelectGroup
(
done
)="
getItem
($
event
)"
></smart-select-group>
src/main/webapp/app/home/home.component.ts
View file @
38452f18
...
@@ -60,6 +60,9 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -60,6 +60,9 @@ export class HomeComponent implements OnInit,AfterViewInit {
rightTotal
=
0
;
rightTotal
=
0
;
//我的关注
followList
;
constructor
(
constructor
(
private
overAllSer
:
OverAllService
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
,
private
message
:
NzMessageService
,
private
alarmSer
:
AlarmService
,
private
renderer
:
Renderer2
,
private
alarmSer
:
AlarmService
,
private
renderer
:
Renderer2
,
...
@@ -89,7 +92,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
...
@@ -89,7 +92,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
getMyFollow
(){
getMyFollow
(){
this
.
layoutSer
.
myFollow
().
subscribe
(
this
.
layoutSer
.
myFollow
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
followList
=
res
.
data
;
}
}
)
)
}
}
...
...
src/main/webapp/app/layouts/layout.service.ts
View file @
38452f18
...
@@ -52,7 +52,7 @@ export class LayoutService {
...
@@ -52,7 +52,7 @@ export class LayoutService {
//我的关注
//我的关注
myFollow
():
Observable
<
any
>
{
myFollow
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
"/userFollow/myFollow"
);
return
this
.
http
.
get
(
SERVER_API_URL
+
"/userFollow/myFollow
Detail
"
);
}
}
}
}
src/main/webapp/app/overAll/basic/basic.component.html
View file @
38452f18
...
@@ -311,7 +311,6 @@
...
@@ -311,7 +311,6 @@
</td>
</td>
<td>
<td>
<ng-container
*
ngIf=
"item.level"
>
<ng-container
*
ngIf=
"item.available == 0"
>
<ng-container
*
ngIf=
"item.available == 0"
>
<nz-tag>
AGENT
</nz-tag>
<nz-tag>
AGENT
</nz-tag>
</ng-container>
</ng-container>
...
@@ -351,7 +350,6 @@
...
@@ -351,7 +350,6 @@
<ng-container
*
ngIf=
"item.ipmi_available == 2"
>
<ng-container
*
ngIf=
"item.ipmi_available == 2"
>
<nz-tag
[
nzColor
]="
color
.
red
"
>
IPMI
</nz-tag>
<nz-tag
[
nzColor
]="
color
.
red
"
>
IPMI
</nz-tag>
</ng-container>
</ng-container>
</ng-container>
</td>
</td>
<td
class=
"handle"
>
<td
class=
"handle"
>
<span
(
click
)="
showBasicCheckModal
(
item
.
hostid
,
item
.
host
)"
>
添加监测点
</span>
<span
(
click
)="
showBasicCheckModal
(
item
.
hostid
,
item
.
host
)"
>
添加监测点
</span>
...
...
src/main/webapp/app/system/audit/audit.component.html
View file @
38452f18
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</div>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<input
[(
ngModel
)]="
obj
.
content
"
nz-input
placeholder=
"角色/权限模块/资源权限"
>
<input
[(
ngModel
)]="
obj
.
content
"
nz-input
placeholder=
"角色/权限模块/资源权限"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
<button
(
click
)="
getList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
</div>
</div>
</div>
</div>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNumber
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNumber
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
...
...
src/main/webapp/app/system/examine/examine.component.html
View file @
38452f18
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
<button
(
click
)="
approvalUnPass
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-close-circle-o"
></i>
退回
</button>
<button
(
click
)="
approvalUnPass
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-close-circle-o"
></i>
退回
</button>
</div>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<input
nz-input
placeholder=
"
角色/权限模块/资源权限
"
[(
ngModel
)]="
name
"
>
<input
nz-input
placeholder=
"
操作用户
"
[(
ngModel
)]="
name
"
>
<button
(
click
)="
search
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
<button
(
click
)="
search
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
</div>
</div>
</div>
</div>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tabset
nzSelectedIndex
]="
tabNum
"
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"待审批"
>
<nz-tab
nzTitle=
"待审批"
>
<nz-table
#
basicTable
[
nzData
]="
noList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNumNo
"
[
nzPageIndex
]="
pageNoNo
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changeNoPage
($
event
)"
>
<nz-table
#
basicTable
[
nzData
]="
noList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNumNo
"
[
nzPageIndex
]="
pageNoNo
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changeNoPage
($
event
)"
>
<thead>
<thead>
...
...
src/main/webapp/app/system/examine/examine.component.ts
View file @
38452f18
...
@@ -14,6 +14,8 @@ export class ExamineComponent implements OnInit {
...
@@ -14,6 +14,8 @@ export class ExamineComponent implements OnInit {
pageSize
=
pageSize
;
pageSize
=
pageSize
;
name
;
name
;
tabNum
=
0
;
//已审批
//已审批
pageNoAlready
=
1
;
pageNoAlready
=
1
;
totalNumAlready
;
totalNumAlready
;
...
@@ -183,7 +185,12 @@ export class ExamineComponent implements OnInit {
...
@@ -183,7 +185,12 @@ export class ExamineComponent implements OnInit {
}
}
search
(){
search
(){
this
.
getListAlready
();
if
(
this
.
tabNum
==
0
){
this
.
getListNo
();
}
if
(
this
.
tabNum
==
1
){
this
.
getListAlready
();
}
}
}
}
}
src/main/webapp/app/system/group/group.component.html
View file @
38452f18
...
@@ -55,11 +55,7 @@
...
@@ -55,11 +55,7 @@
<button
nz-button
nzType=
"default"
>
导入组织
</button>
<button
nz-button
nzType=
"default"
>
导入组织
</button>
<button
nz-button
nzType=
"default"
>
导入用户
</button>
<button
nz-button
nzType=
"default"
>
导入用户
</button>
</div>
</div>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
(
nzCurrentPageDataChange
)="
currentPageDataChange
($
event
)"
(
nzPageIndexChange
)="
refreshStatus
()"
(
nzPageSizeChange
)="
refreshStatus
()"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
>
<thead>
<thead>
<tr>
<tr>
...
...
src/main/webapp/app/system/group/group.component.ts
View file @
38452f18
...
@@ -13,7 +13,7 @@ import {pageSize} from '../../app.constants';
...
@@ -13,7 +13,7 @@ import {pageSize} from '../../app.constants';
styles
:
[]
styles
:
[]
})
})
export
class
GroupComponent
implements
OnInit
{
export
class
GroupComponent
implements
OnInit
{
@
ViewChild
(
"smartSelectRole"
)
smartSelectRole
:
SelectRoleComponent
;
@
ViewChild
(
'smartSelectRole'
)
smartSelectRole
:
SelectRoleComponent
;
@
ViewChild
(
'power'
)
power
;
@
ViewChild
(
'power'
)
power
;
@
ViewChild
(
'smartUser'
)
smartUser
:
UserComponent
;
@
ViewChild
(
'smartUser'
)
smartUser
:
UserComponent
;
@
ViewChild
(
'smartGroupModal'
)
smartGroupModal
:
GroupModalComponent
;
@
ViewChild
(
'smartGroupModal'
)
smartGroupModal
:
GroupModalComponent
;
...
@@ -50,17 +50,17 @@ export class GroupComponent implements OnInit {
...
@@ -50,17 +50,17 @@ export class GroupComponent implements OnInit {
this
.
dataSet
=
$event
;
this
.
dataSet
=
$event
;
}
}
selectItem
(
item
,
e
)
{
selectItem
(
item
,
e
)
{
if
(
e
)
{
if
(
e
)
{
this
.
selectList
.
push
(
item
);
this
.
selectList
.
push
(
item
);
}
else
{
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
)
{
if
(
value
.
id
==
item
.
id
)
{
this
.
selectList
.
splice
(
index
,
1
)
this
.
selectList
.
splice
(
index
,
1
);
}
}
});
});
}
}
this
.
refreshStatus
()
this
.
refreshStatus
()
;
}
}
refreshStatus
():
void
{
refreshStatus
():
void
{
...
@@ -83,10 +83,8 @@ export class GroupComponent implements OnInit {
...
@@ -83,10 +83,8 @@ export class GroupComponent implements OnInit {
getUser
()
{
getUser
()
{
const
data
=
{
const
data
=
{
'userBo'
:
{
'search'
:
this
.
name
=
this
.
name
==
''
?
null
:
this
.
name
,
search
:
this
.
name
=
this
.
name
==
""
?
null
:
this
.
name
,
'organizationId'
:
this
.
organizationId
=
this
.
organizationId
==
''
?
null
:
this
.
organizationId
,
organizationId
:
this
.
organizationId
=
this
.
organizationId
==
""
?
null
:
this
.
organizationId
},
'pageNum'
:
this
.
pageNum
,
'pageNum'
:
this
.
pageNum
,
'pageSize'
:
this
.
pageSize
'pageSize'
:
this
.
pageSize
};
};
...
@@ -98,12 +96,12 @@ export class GroupComponent implements OnInit {
...
@@ -98,12 +96,12 @@ export class GroupComponent implements OnInit {
);
);
}
}
changePage
(
e
){
changePage
(
e
)
{
this
.
pageNum
=
e
;
this
.
pageNum
=
e
;
this
.
getUser
();
this
.
getUser
();
}
}
getOrg
(
e
){
getOrg
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
this
.
organizationId
=
e
.
node
.
key
;
this
.
organizationId
=
e
.
node
.
key
;
this
.
getUser
();
this
.
getUser
();
...
@@ -147,12 +145,12 @@ export class GroupComponent implements OnInit {
...
@@ -147,12 +145,12 @@ export class GroupComponent implements OnInit {
//新增用户
//新增用户
showUserModal
()
{
showUserModal
()
{
this
.
smartUser
.
showAddModal
(
this
.
groupList
,
"新增用户"
);
this
.
smartUser
.
showAddModal
(
this
.
groupList
,
'新增用户'
);
}
}
//编辑用户
//编辑用户
showEditModal
(
item
){
showEditModal
(
item
)
{
this
.
smartUser
.
showEditModal
(
this
.
groupList
,
"编辑用户"
,
item
.
id
);
this
.
smartUser
.
showEditModal
(
this
.
groupList
,
'编辑用户'
,
item
.
id
);
}
}
//删除用户--单个
//删除用户--单个
...
@@ -164,11 +162,11 @@ export class GroupComponent implements OnInit {
...
@@ -164,11 +162,11 @@ export class GroupComponent implements OnInit {
nzCancelText
:
'取消'
,
nzCancelText
:
'取消'
,
nzOnOk
:
()
=>
{
nzOnOk
:
()
=>
{
const
data
=
{
const
data
=
{
id
:
item
.
id
id
:
item
.
id
};
};
this
.
systemSer
.
deleteUser
(
data
).
subscribe
(
this
.
systemSer
.
deleteUser
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
if
(
res
.
data
==
1
)
{
this
.
getUser
();
this
.
getUser
();
}
}
}
}
...
@@ -180,32 +178,32 @@ export class GroupComponent implements OnInit {
...
@@ -180,32 +178,32 @@ export class GroupComponent implements OnInit {
}
}
//删除用户-- 批量
//删除用户-- 批量
batchDelete
(){
batchDelete
()
{
let
bool
=
false
;
let
bool
=
false
;
this
.
dataSet
.
forEach
(
e
=>
{
this
.
dataSet
.
forEach
(
e
=>
{
if
(
e
.
checked
)
{
if
(
e
.
checked
)
{
bool
=
true
;
bool
=
true
;
}
}
});
});
if
(
!
bool
)
{
if
(
!
bool
)
{
this
.
message
.
warning
(
"请选择需要删除的用户"
);
this
.
message
.
warning
(
'请选择需要删除的用户'
);
return
false
;
return
false
;
}
}
let
arr
=
[];
let
arr
=
[];
this
.
dataSet
.
forEach
(
e
=>
{
this
.
dataSet
.
forEach
(
e
=>
{
if
(
e
.
checked
)
{
if
(
e
.
checked
)
{
arr
.
push
(
e
.
user
.
id
);
arr
.
push
(
e
.
user
.
id
);
}
}
});
});
this
.
commonSer
.
confirmThing
(
"删除"
,
"确定删除选择的用户"
,()
=>
{
this
.
commonSer
.
confirmThing
(
'删除'
,
'确定删除选择的用户'
,
()
=>
{
this
.
systemSer
.
batchDeleteUser
(
arr
).
subscribe
(
this
.
systemSer
.
batchDeleteUser
(
arr
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
getUser
();
this
.
getUser
();
}
}
}
}
);
);
})
})
;
}
}
//新增部门
//新增部门
...
@@ -214,65 +212,67 @@ export class GroupComponent implements OnInit {
...
@@ -214,65 +212,67 @@ export class GroupComponent implements OnInit {
}
}
//编辑部门
//编辑部门
editGroup
(
item
){}
editGroup
(
item
)
{
}
//删除部门
//删除部门
deleteGroup
(
item
){}
deleteGroup
(
item
)
{
}
//授予角色
//授予角色
grantRole
(
data
){
grantRole
(
data
)
{
this
.
setType
=
"单个"
;
this
.
setType
=
'单个'
;
this
.
userId
=
data
.
id
;
this
.
userId
=
data
.
id
;
this
.
smartSelectRole
.
showModal
(
"选择角色"
,
this
.
userId
);
this
.
smartSelectRole
.
showModal
(
'选择角色'
,
this
.
userId
);
}
}
//设置用户角色
//设置用户角色
setRole
(
event
){
setRole
(
event
)
{
if
(
this
.
setType
==
"批量"
)
{
if
(
this
.
setType
==
'批量'
)
{
const
data
=
{
const
data
=
{
userId
:
this
.
selectList
.
map
(
userId
:
this
.
selectList
.
map
(
e
=>
{
e
=>
{
return
e
.
id
;
return
e
.
id
;
}
}
),
),
roles
:
event
.
map
(
e
=>
{
roles
:
event
.
map
(
e
=>
{
return
e
.
id
;
return
e
.
id
;
}),
}),
};
};
this
.
systemSer
.
batchUserToAuth
(
data
).
subscribe
(
this
.
systemSer
.
batchUserToAuth
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
getUser
();
this
.
getUser
();
this
.
message
.
success
(
"授予角色成功"
);
this
.
message
.
success
(
'授予角色成功'
);
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
}
)
)
;
}
}
if
(
this
.
setType
==
"单个"
)
{
if
(
this
.
setType
==
'单个'
)
{
const
data
=
{
const
data
=
{
userId
:
this
.
userId
,
userId
:
this
.
userId
,
roles
:
event
.
map
(
e
=>
{
roles
:
event
.
map
(
e
=>
{
return
e
.
id
;
return
e
.
id
;
}),
}),
};
};
this
.
systemSer
.
aloneUserToAuth
(
data
).
subscribe
(
this
.
systemSer
.
aloneUserToAuth
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
getUser
();
this
.
getUser
();
this
.
message
.
success
(
"授予角色成功"
);
this
.
message
.
success
(
'授予角色成功'
);
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
}
)
)
;
}
}
}
}
selectRoleModal
(){
selectRoleModal
()
{
this
.
setType
=
"批量"
;
this
.
setType
=
'批量'
;
this
.
smartSelectRole
.
showModal
(
"选择角色"
,
null
);
this
.
smartSelectRole
.
showModal
(
'选择角色'
,
null
);
}
}
}
}
src/main/webapp/app/system/system.service.ts
View file @
38452f18
...
@@ -37,7 +37,7 @@ export class SystemService {
...
@@ -37,7 +37,7 @@ export class SystemService {
//用户列表
//用户列表
user
(
data
):
Observable
<
any
>
{
user
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
'/user/getUserList
?
'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
'/user/getUserList'
,
data
);
}
}
//新增用户
//新增用户
...
...
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