Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-control
Overview
Overview
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
常超
xzxt-control
Commits
81fb9758
Commit
81fb9758
authored
Sep 18, 2018
by
chang_chao@founder.com.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cpu性能开发
parent
e589cfa9
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
202 additions
and
7 deletions
+202
-7
src/main/java/com/cc/config/MyMvcConfig.java
+1
-0
src/main/java/com/cc/controller/ServiceController.java
+11
-1
src/main/java/com/cc/mapper/ServiceMapper.java
+3
-1
src/main/java/com/cc/service/ServiceService.java
+1
-0
src/main/java/com/cc/service/serviceimpl/ServiceIServiceImpl.java
+14
-0
src/main/resources/mybatis/mapper/ServiceMapper.xml
+14
-0
src/main/resources/resources/fwq.png
+0
-0
src/main/webapp/WEB-INF/common/index.jsp
+3
-3
src/main/webapp/WEB-INF/view/serviceCapability.jsp
+153
-0
src/main/webapp/WEB-INF/view/servicefenye.jsp
+2
-2
No files found.
src/main/java/com/cc/config/MyMvcConfig.java
View file @
81fb9758
...
...
@@ -19,5 +19,6 @@ public class MyMvcConfig extends WebMvcConfigurerAdapter {
registry
.
addViewController
(
"/servicesfenye"
).
setViewName
(
"servicefenye"
);
registry
.
addViewController
(
"/serviceform"
).
setViewName
(
"servicefrom"
);
registry
.
addViewController
(
"/serviceupdate"
).
setViewName
(
"serviceupdate"
);
registry
.
addViewController
(
"/serviceCapability"
).
setViewName
(
"serviceCapability"
);
}
}
src/main/java/com/cc/controller/ServiceController.java
View file @
81fb9758
...
...
@@ -35,7 +35,7 @@ public class ServiceController {
/*
获取服务list
*/
@GetMapping
(
"/services"
)
@GetMapping
(
"/services
list
"
)
@ResponseBody
public
ResultMap
serviceslist
(
Model
model
,
Services
services
){
ResultMap
resultMap
=
new
ResultMap
();
...
...
@@ -43,6 +43,16 @@ public class ServiceController {
return
resultMap
;
}
/*
获取服务器list
*/
@GetMapping
(
"/services"
)
@ResponseBody
public
ResultMap
services
(
Model
model
,
Services
services
){
ResultMap
resultMap
=
new
ResultMap
();
resultMap
=
serviceService
.
Services
(
services
);
return
resultMap
;
}
/*
修改服务页面
*/
@GetMapping
(
"/services/{id}"
)
...
...
src/main/java/com/cc/mapper/ServiceMapper.java
View file @
81fb9758
...
...
@@ -5,8 +5,10 @@ import java.util.List;
public
interface
ServiceMapper
{
List
<
Services
>
selectPageList
(
Services
service
);
List
<
Services
>
selectServiceList
();
int
selectPageCount
(
Services
service
);
List
<
Services
>
selectServicesPageList
(
Services
service
);
int
selectServicesPageCount
(
Services
service
);
List
<
Services
>
selectServiceList
();
Services
selectServices
(
int
id
);
int
saveService
(
Services
service
);
int
updateService
(
Services
service
);
...
...
src/main/java/com/cc/service/ServiceService.java
View file @
81fb9758
...
...
@@ -19,6 +19,7 @@ public interface ServiceService {
* @return
*/
ResultMap
ServiceAll
(
Services
service
);
ResultMap
Services
(
Services
service
);
XzxtRestResult
SelectServiceList
();
XzxtRestResult
SelectServices
(
int
id
);
XzxtRestResult
SaveService
(
Services
service
);
...
...
src/main/java/com/cc/service/serviceimpl/ServiceIServiceImpl.java
View file @
81fb9758
...
...
@@ -37,6 +37,20 @@ public class ServiceIServiceImpl implements ServiceService {
}
@Override
public
ResultMap
Services
(
Services
service
)
{
List
<
Services
>
serviceslist
=
serviceMapper
.
selectServicesPageList
(
service
);
ResultMap
resultMap
=
new
ResultMap
();
resultMap
.
setData
(
serviceslist
);
/* if (!StringUtils.isEmpty(serviceslist)) {
int totals=serviceMapper.selectServicesPageCount(service);
resultMap.setCount(totals);
resultMap.setData(serviceslist);
return resultMap;
}*/
return
resultMap
;
}
@Override
public
XzxtRestResult
SelectServiceList
()
{
List
<
Services
>
serviceslist
=
serviceMapper
.
selectServiceList
();
if
(!
StringUtils
.
isEmpty
(
serviceslist
)){
...
...
src/main/resources/mybatis/mapper/ServiceMapper.xml
View file @
81fb9758
...
...
@@ -48,6 +48,20 @@
<include
refid=
"queryWhere"
/>
</select>
<!-- 通过条件分页查询,返回数据集 服务器-->
<select
id=
"selectServicesPageList"
parameterType=
"com.cc.bean.Services"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from service
GROUP BY service_ip
order by id
</select>
<!-- 通过条件分页查询,返回总记录数 服务器-->
<select
id=
"selectServicesPageCount"
parameterType=
"com.cc.bean.Services"
resultType=
"java.lang.Integer"
>
select count(1) from (select * from service GROUP BY service_ip) service
</select>
<select
id=
"selectServices"
parameterType=
"java.lang.Integer"
resultType=
"com.cc.bean.Services"
>
select
<include
refid=
"Base_Column_List"
/>
from service
...
...
src/main/resources/resources/fwq.png
0 → 100644
View file @
81fb9758
268 KB
src/main/webapp/WEB-INF/common/index.jsp
View file @
81fb9758
...
...
@@ -101,7 +101,7 @@
</a>
<ul
class=
"sub-menu"
>
<li>
<a
href=
"
servicefenye
"
>
<a
href=
"
/serviceCapability
"
>
<i
class=
"iconfont"
>

</i>
性能监控
</a>
...
...
@@ -137,7 +137,7 @@
</li>
</ul>
</li>
<li
class=
"list"
>
<
%
--
<
li
class=
"list"
>
<a
href=
"javascript:;"
>
<i
class=
"iconfont"
>

</i>
资源管理
...
...
@@ -151,7 +151,7 @@
</a>
</li>
</ul>
</li>
</li>
--%>
<li
class=
"list"
>
<a
href=
"javascript:;"
>
<i
class=
"iconfont"
>

</i>
...
...
src/main/webapp/WEB-INF/view/serviceCapability.jsp
0 → 100644
View file @
81fb9758
<
%
--
Created
by
IntelliJ
IDEA
.
User:
changc
Date:
2018
/
9
/
6
Time:
14:37
To
change
this
template
use
File
|
Settings
|
File
Templates
.
--
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
layui
</title>
<meta
name=
"renderer"
content=
"webkit"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<link
rel=
"stylesheet"
href=
"/layui/css/layui.css"
media=
"all"
>
<link
rel=
"stylesheet"
href=
"/css/xadmin.css"
>
<link
rel=
"stylesheet"
href=
"/fenye/fenye.css"
media=
"all"
>
<link
rel=
"stylesheet"
href=
"/fenye/font-awesome.min.css"
media=
"all"
>
<script
type=
"text/javascript"
src=
"/jquery/jquery.min.js"
></script>
<!-- 引入公共js-->
<script
type=
"text/javascript"
src=
"/js/common.js"
></script>
<!-- 引入公共页面-->
<jsp:include
page=
"../common/index.jsp"
></jsp:include>
<style
type=
"text/css"
>
table
{
border-collapse
:
collapse
;
width
:
100%
;
overflow
:
hidden
;
text-align
:
center
;
margin
:
10px
auto
;}
table
td
,
th
{
border
:
1px
solid
#ccc
;}
thead
tr
{
background
:
rgba
(
0
,
0
,
0
,
0.4
);
height
:
40px
;
line-height
:
40px
;}
tbody
tr
{
background
:
rgba
(
255
,
255
,
255
,
0.3
);}
.fwq-img
{
height
:
100px
;}
.rel-td
{
position
:
relative
;}
.magnifier
{
position
:
absolute
;
top
:
0
;
line-height
:
100px
;
cursor
:
pointer
;
color
:
#fff
;
background
:
-moz-linear-gradient
(
45deg
,
rgba
(
0
,
0
,
0
,
0.85
)
0%
,
rgba
(
0
,
0
,
0
,
0
)
100%
);
background
:
-webkit-linear-gradient
(
45deg
,
rgba
(
0
,
0
,
0
,
0.85
)
0%
,
rgba
(
0
,
0
,
0
,
0
)
100%
);
background
:
linear-gradient
(
45deg
,
rgba
(
0
,
0
,
0
,
0.85
)
0%
,
rgba
(
0
,
0
,
0
,
0
)
100%
);
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#a6000000'
,
endColorstr
=
'#00000000'
,
GradientType
=
1
);
left
:
0
;
bottom
:
0
;
right
:
0
;
z-index
:
1
;
zoom
:
1
;
filter
:
alpha
(
opacity
=
0
);
opacity
:
0
;
-webkit-transition
:
all
.3s
ease-in-out
;
-moz-transition
:
all
.3s
ease-in-out
;
-ms-transition
:
all
.3s
ease-in-out
;
-o-transition
:
all
.3s
ease-in-out
;
transition
:
all
.3s
ease-in-out
;}
.rel-td
:hover
.magnifier
{
zoom
:
1
;
filter
:
alpha
(
opacity
=
100
);
opacity
:
1
;
}
.fwq-p
{
margin-top
:
5px
;
margin-bottom
:
44px
;}
.fwq-btn
{
position
:
absolute
;
bottom
:
10px
;
left
:
50%
;
margin-left
:
-48px
;}
</style>
</head>
<body>
<div
class=
"page-content"
style=
"display: none"
>
<div
class=
"content"
>
<div
class=
"layui-btn-container"
>
<button
class=
"layui-btn layui-btn-sm"
lay-event=
"insertService"
onclick=
"connect()"
>
服务器控制台
</button>
</div>
<
%
--
<
table
class=
"layui-hide"
id=
"test"
lay-filter=
"test"
width=
"100%"
></table>
--%>
<table
class=
"serviceslist"
>
<
%
--
<
thead
>
<tr>
<td>
图片1
</td>
<td>
图片2
</td>
<td>
图片3
</td>
<td>
图片4
</td>
</tr>
</thead>
--%>
<
%
--
<
tbody
>
--%>
<
%
--
<
tr
>
<td
class=
"rel-td"
><img
src=
"fwq.png"
class=
"fwq-img"
/><p
class=
"fwq-p"
>
192.168.193.133
</p><div
class=
"magnifier"
>
192.168.2.110
<a
class=
"layui-btn layui-btn-xs fwq-btn"
lay-event=
"start"
onclick=
"fwq(this)"
>
性能分析
</a></div></td>
<td
class=
"rel-td"
><img
src=
"fwq.png"
class=
"fwq-img"
/><p
class=
"fwq-p"
>
192.168.193.134
</p><div
class=
"magnifier"
>
192.168.2.110
<a
class=
"layui-btn layui-btn-xs fwq-btn"
lay-event=
"start"
onclick=
"fwq(this)"
>
性能分析
</a></div></td>
<td
class=
"rel-td"
><img
src=
"fwq.png"
class=
"fwq-img"
/><p
class=
"fwq-p"
>
192.168.193.134
</p><div
class=
"magnifier"
>
192.168.2.110
<a
class=
"layui-btn layui-btn-xs fwq-btn"
lay-event=
"start"
onclick=
"fwq(this)"
>
性能分析
</a></div></td>
<td
class=
"rel-td"
><img
src=
"fwq.png"
class=
"fwq-img"
/><p
class=
"fwq-p"
>
192.168.193.133
</p><div
class=
"magnifier"
>
192.168.2.110
<a
class=
"layui-btn layui-btn-xs fwq-btn"
lay-event=
"start"
onclick=
"fwq(this)"
>
性能分析
</a></div></td>
</tr>
--%>
<
%
--
</
tbody
>
--%>
</table>
</div>
</div>
<script
type=
"text/html"
id=
"toolbarDemo"
>
<
div
class
=
"layui-btn-container"
>
<
button
class
=
"layui-btn layui-btn-sm"
lay
-
event
=
"insertService"
>
服务器控制台
<
/button
>
<
/div
>
</script>
<script
type=
"text/html"
id=
"barDemo"
>
<
a
class
=
"layui-btn layui-btn-xs"
lay
-
event
=
"start"
>
性能分析
<
/a
>
</script>
<script
src=
"/layui/layui.js"
charset=
"utf-8"
></script>
<!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->
<script>
function
fwq
(
obj
)
{
var
ip
=
$
(
obj
).
parent
(
".magnifier"
).
prev
(
"p"
).
text
()
//http://192.168.193.133:90/#/system-status
window
.
open
(
"http://"
+
ip
+
":90"
);
}
function
connect
()
{
window
.
open
(
"http://192.168.193.134:3001/"
);
}
$
(
function
(){
$
.
ajax
({
type
:
"GET"
,
url
:
"/services"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
var
servicelist
=
data
.
data
;
var
trs
=
""
;
trs
+=
"<tbody><tr>"
$
.
each
(
servicelist
,
function
(
n
,
value
)
{
trs
+=
"<td class=
\"
rel-td
\"
><img src=
\"
fwq.png
\"
class=
\"
fwq-img
\"
/>"
;
trs
+=
"<p class=
\"
fwq-p
\"
>"
+
value
.
serviceIp
+
"</p>"
;
trs
+=
"<div class=
\"
magnifier
\"
>"
+
value
.
applyName
+
"<a class=
\"
layui-btn layui-btn-xs fwq-btn
\"
lay-event=
\"
start
\"
onclick=
\"
fwq(this)
\"
>性能分析</a></div></td>"
});
trs
+=
"</tr></tbody>"
$
(
".serviceslist "
).
append
(
trs
);
}
})
})
</script>
</body>
</html>
src/main/webapp/WEB-INF/view/servicefenye.jsp
View file @
81fb9758
...
...
@@ -89,7 +89,7 @@
table
.
render
({
elem
:
'#test'
,
url
:
'/services'
,
url
:
'/services
list
'
,
toolbar
:
'#toolbarDemo'
,
title
:
'用户数据表'
,
page
:
true
...
...
@@ -291,7 +291,7 @@
//window.location.reload();
//当前页的刷新
$
(
".layui-laypage-btn"
).
click
();
},
3
000
);
},
60
000
);
});
</script>
...
...
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