Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
discovery
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢捷峰
discovery
Commits
31672cea
Commit
31672cea
authored
Jul 20, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加图形化灰度发布功能
parent
a0a1bac3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/RouterTopology.java
+5
-3
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/ServiceTopology.java
+5
-9
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale.properties
+2
-0
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale_zh_CN.properties
+2
-0
No files found.
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/RouterTopology.java
View file @
31672cea
...
@@ -32,6 +32,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -32,6 +32,7 @@ import org.apache.commons.lang3.StringUtils;
import
com.nepxion.cots.twaver.element.TElementManager
;
import
com.nepxion.cots.twaver.element.TElementManager
;
import
com.nepxion.cots.twaver.element.TLink
;
import
com.nepxion.cots.twaver.element.TLink
;
import
com.nepxion.cots.twaver.element.TNode
;
import
com.nepxion.cots.twaver.element.TNode
;
import
com.nepxion.cots.twaver.graph.TGraphBackground
;
import
com.nepxion.cots.twaver.graph.TGraphControlBar
;
import
com.nepxion.cots.twaver.graph.TGraphControlBar
;
import
com.nepxion.cots.twaver.graph.TGraphManager
;
import
com.nepxion.cots.twaver.graph.TGraphManager
;
import
com.nepxion.cots.twaver.graph.TLayoutPanel
;
import
com.nepxion.cots.twaver.graph.TLayoutPanel
;
...
@@ -61,13 +62,12 @@ import com.nepxion.swing.textfield.JBasicTextField;
...
@@ -61,13 +62,12 @@ import com.nepxion.swing.textfield.JBasicTextField;
public
class
RouterTopology
extends
AbstractTopology
{
public
class
RouterTopology
extends
AbstractTopology
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
100
,
150
,
200
,
0
);
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
100
,
200
,
200
,
0
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
true
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
true
);
private
TGraphBackground
background
;
private
JBasicTextField
textField
=
new
JBasicTextField
();
private
JBasicTextField
textField
=
new
JBasicTextField
();
private
JBasicComboBox
comboBox
=
new
JBasicComboBox
();
private
JBasicComboBox
comboBox
=
new
JBasicComboBox
();
private
ActionListener
layoutActionListener
;
private
ActionListener
layoutActionListener
;
private
InstanceEntity
instance
;
private
InstanceEntity
instance
;
...
@@ -98,6 +98,8 @@ public class RouterTopology extends AbstractTopology {
...
@@ -98,6 +98,8 @@ public class RouterTopology extends AbstractTopology {
}
}
private
void
initializeTopology
()
{
private
void
initializeTopology
()
{
background
=
graph
.
getGraphBackground
();
background
.
setTitle
(
ConsoleLocale
.
getString
(
"title_service_gray_router"
));
graph
.
setElementStateOutlineColorGenerator
(
new
Generator
()
{
graph
.
setElementStateOutlineColorGenerator
(
new
Generator
()
{
public
Object
generate
(
Object
object
)
{
public
Object
generate
(
Object
object
)
{
return
null
;
return
null
;
...
...
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/ServiceTopology.java
View file @
31672cea
...
@@ -77,26 +77,19 @@ import com.nepxion.swing.textfield.number.JNumberTextField;
...
@@ -77,26 +77,19 @@ import com.nepxion.swing.textfield.number.JNumberTextField;
public
class
ServiceTopology
extends
AbstractTopology
{
public
class
ServiceTopology
extends
AbstractTopology
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
String
NO_FILTER
=
"[No filter]"
;
private
static
final
String
NO_FILTER
=
"[No filter]"
;
private
LocationEntity
groupLocationEntity
=
new
LocationEntity
(
120
,
250
,
280
,
0
);
private
LocationEntity
groupLocationEntity
=
new
LocationEntity
(
120
,
250
,
280
,
0
);
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
0
,
0
,
120
,
100
);
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
0
,
0
,
120
,
100
);
private
TopologyEntity
serviceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
true
);
private
TopologyEntity
serviceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
true
);
private
TopologyEntity
notServiceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
MQ
,
true
,
true
);
private
TopologyEntity
notServiceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
MQ
,
true
,
true
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
false
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
false
);
private
TopologyEntity
notServiceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
MQ
,
true
,
false
);
private
TopologyEntity
notServiceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
MQ
,
true
,
false
);
private
Map
<
String
,
List
<
InstanceEntity
>>
globalInstanceMap
;
private
String
globalFilter
;
private
Map
<
String
,
Point
>
groupLocationMap
=
new
HashMap
<
String
,
Point
>();
private
Map
<
String
,
Point
>
groupLocationMap
=
new
HashMap
<
String
,
Point
>();
private
JBasicMenuItem
executeGrayReleaseMenuItem
;
private
JBasicMenuItem
executeGrayReleaseMenuItem
;
private
JBasicMenuItem
refreshGrayStateMenuItem
;
private
JBasicMenuItem
refreshGrayStateMenuItem
;
private
JBasicMenuItem
executeGrayRouterMenuItem
;
private
JBasicMenuItem
executeGrayRouterMenuItem
;
private
TGraphBackground
background
;
private
TGraphBackground
background
;
private
JBasicComboBox
filterComboBox
;
private
JBasicComboBox
filterComboBox
;
private
GrayPanel
grayPanel
;
private
GrayPanel
grayPanel
;
...
@@ -104,6 +97,9 @@ public class ServiceTopology extends AbstractTopology {
...
@@ -104,6 +97,9 @@ public class ServiceTopology extends AbstractTopology {
private
RouterTopology
routerTopology
;
private
RouterTopology
routerTopology
;
private
LayoutDialog
layoutDialog
;
private
LayoutDialog
layoutDialog
;
private
Map
<
String
,
List
<
InstanceEntity
>>
globalInstanceMap
;
private
String
globalFilter
;
public
ServiceTopology
()
{
public
ServiceTopology
()
{
initializeToolBar
();
initializeToolBar
();
initializeTopology
();
initializeTopology
();
...
@@ -281,8 +277,8 @@ public class ServiceTopology extends AbstractTopology {
...
@@ -281,8 +277,8 @@ public class ServiceTopology extends AbstractTopology {
for
(
String
service
:
services
)
{
for
(
String
service
:
services
)
{
TGroup
group
=
getGroup
(
service
);
TGroup
group
=
getGroup
(
service
);
// node.getParent() != group 表示自己不能路由自己
,暂时不禁止
// node.getParent() != group 表示自己不能路由自己
if
(
group
!=
null
&&
isPlugin
(
group
))
{
if
(
group
!=
null
&&
isPlugin
(
group
)
&&
node
.
getParent
()
!=
group
)
{
filterServices
.
add
(
service
);
filterServices
.
add
(
service
);
}
}
}
}
...
...
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale.properties
View file @
31672cea
...
@@ -12,6 +12,8 @@ refresh_gray_state=刷新灰度状态
...
@@ -12,6 +12,8 @@ refresh_gray_state=刷新灰度状态
title_service_cluster_gray_release
=
服务集群灰度发布
title_service_cluster_gray_release
=
服务集群灰度发布
service_cluster_filter
=
服务集群过滤
service_cluster_filter
=
服务集群过滤
title_service_gray_router
=
服务灰度路由
service_list
=
服务列表
service_list
=
服务列表
add_service
=
添加一个服务
add_service
=
添加一个服务
delete_service
=
删除一个服务
delete_service
=
删除一个服务
...
...
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale_zh_CN.properties
View file @
31672cea
...
@@ -12,6 +12,8 @@ refresh_gray_state=\u5237\u65b0\u7070\u5ea6\u72b6\u6001
...
@@ -12,6 +12,8 @@ refresh_gray_state=\u5237\u65b0\u7070\u5ea6\u72b6\u6001
title_service_cluster_gray_release
=
\u
670d
\u
52a1
\u
96c6
\u
7fa4
\u7070\u
5ea6
\u
53d1
\u
5e03
title_service_cluster_gray_release
=
\u
670d
\u
52a1
\u
96c6
\u
7fa4
\u7070\u
5ea6
\u
53d1
\u
5e03
service_cluster_filter
=
\u
670d
\u
52a1
\u
96c6
\u
7fa4
\u
8fc7
\u
6ee4
service_cluster_filter
=
\u
670d
\u
52a1
\u
96c6
\u
7fa4
\u
8fc7
\u
6ee4
title_service_gray_router
=
\u
670d
\u
52a1
\u7070\u
5ea6
\u
8def
\u7531
service_list
=
\u
670d
\u
52a1
\u5217\u8868
service_list
=
\u
670d
\u
52a1
\u5217\u8868
add_service
=
\u
6dfb
\u
52a0
\u
4e00
\u
4e2a
\u
670d
\u
52a1
add_service
=
\u
6dfb
\u
52a0
\u
4e00
\u
4e2a
\u
670d
\u
52a1
delete_service
=
\u5220\u9664\u
4e00
\u
4e2a
\u
670d
\u
52a1
delete_service
=
\u5220\u9664\u
4e00
\u
4e2a
\u
670d
\u
52a1
...
...
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