Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
monitor-ui
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
linlong
8 years ago
Commit
a58941b21be25a278b97ead9b8e4a2907b63b66c
1 parent
209c1419
redis排序
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
monitor-ui-ctrl/src/main/java/com/ui/ctrl/RedisMonitorCtrl.java
monitor-ui-ctrl/src/main/java/com/ui/ctrl/RedisMonitorCtrl.java
View file @
a58941b
...
...
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
import
org.springframework.web.servlet.ModelAndView
;
import
java.util.*
;
import
java.util.logging.Logger
;
/**
* Created by yoho on 2016/9/21.
...
...
@@ -75,11 +76,11 @@ public class RedisMonitorCtrl {
Collections
.
sort
(
result
,
new
Comparator
<
LinkedHashMap
>()
{
@Override
public
int
compare
(
LinkedHashMap
o1
,
LinkedHashMap
o2
)
{
String
type1
=
(
String
)
o1
.
get
(
"type"
);
String
type2
=
(
String
)
o2
.
get
(
"type"
);
if
(
type1
.
compareTo
(
type2
)>
0
)
{
String
network1
=
(
String
)
o1
.
get
(
"network"
);
String
network2
=
(
String
)
o2
.
get
(
"network"
);
if
(
network1
.
compareTo
(
network2
)>
0
)
{
return
1
;
}
else
if
(
type1
.
compareTo
(
type
2
)<
0
){
}
else
if
(
network1
.
compareTo
(
network
2
)<
0
){
return
-
1
;
}
return
0
;
...
...
Please
register
or
login
to post a comment