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
b7778e5f
Commit
b7778e5f
authored
Jul 19, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加图形化灰度发布功能
parent
a91c16dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
11 deletions
+95
-11
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/controller/ServiceController.java
+3
-0
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/RouterTopology.java
+10
-1
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/ServiceTopology.java
+80
-8
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale.properties
+1
-1
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale_zh_CN.properties
+1
-1
No files found.
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/controller/ServiceController.java
View file @
b7778e5f
...
...
@@ -186,6 +186,9 @@ public class ServiceController {
try
{
return
JacksonSerializer
.
fromJson
(
result
,
typeReference
);
}
catch
(
Exception
e
)
{
ServiceErrorHandler
errorHandler
=
(
ServiceErrorHandler
)
restTemplate
.
getErrorHandler
();
result
=
errorHandler
.
getCause
();
throw
new
IllegalArgumentException
(
result
);
}
}
...
...
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/RouterTopology.java
View file @
b7778e5f
...
...
@@ -53,6 +53,7 @@ import com.nepxion.swing.button.JBasicButton;
import
com.nepxion.swing.button.JBasicToggleButton
;
import
com.nepxion.swing.button.JClassicButton
;
import
com.nepxion.swing.combobox.JBasicComboBox
;
import
com.nepxion.swing.dialog.JExceptionDialog
;
import
com.nepxion.swing.handle.HandleManager
;
import
com.nepxion.swing.listener.DisplayAbilityListener
;
import
com.nepxion.swing.locale.SwingLocale
;
...
...
@@ -256,7 +257,15 @@ public class RouterTopology extends AbstractTopology {
return
;
}
RouterEntity
routerEntity
=
ServiceController
.
routes
(
instance
,
routerPath
);
RouterEntity
routerEntity
=
null
;
try
{
routerEntity
=
ServiceController
.
routes
(
instance
,
routerPath
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
RouterTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
return
;
}
route
(
routerEntity
);
layoutActionListener
.
actionPerformed
(
null
);
...
...
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/ServiceTopology.java
View file @
b7778e5f
...
...
@@ -728,7 +728,16 @@ public class ServiceTopology extends AbstractTopology {
if
(
group
!=
null
)
{
String
serviceId
=
(
String
)
group
.
getUserObject
();
List
<
ResultEntity
>
results
=
ServiceController
.
versionUpdate
(
serviceId
,
dynamicVersion
);
List
<
ResultEntity
>
results
=
null
;
try
{
results
=
ServiceController
.
versionUpdate
(
serviceId
,
dynamicVersion
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
group
);
return
;
}
showResult
(
results
);
...
...
@@ -736,7 +745,16 @@ public class ServiceTopology extends AbstractTopology {
}
else
if
(
node
!=
null
)
{
InstanceEntity
instance
=
(
InstanceEntity
)
node
.
getUserObject
();
String
result
=
ServiceController
.
versionUpdate
(
instance
,
dynamicVersion
);
String
result
=
null
;
try
{
result
=
ServiceController
.
versionUpdate
(
instance
,
dynamicVersion
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
node
);
return
;
}
showResult
(
result
);
...
...
@@ -755,7 +773,16 @@ public class ServiceTopology extends AbstractTopology {
public
void
execute
(
ActionEvent
e
)
{
if
(
group
!=
null
)
{
String
serviceId
=
(
String
)
group
.
getUserObject
();
List
<
ResultEntity
>
results
=
ServiceController
.
versionClear
(
serviceId
);
List
<
ResultEntity
>
results
=
null
;
try
{
results
=
ServiceController
.
versionClear
(
serviceId
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
group
);
return
;
}
showResult
(
results
);
...
...
@@ -763,7 +790,16 @@ public class ServiceTopology extends AbstractTopology {
}
else
if
(
node
!=
null
)
{
InstanceEntity
instance
=
(
InstanceEntity
)
node
.
getUserObject
();
String
result
=
ServiceController
.
versionClear
(
instance
);
String
result
=
null
;
try
{
result
=
ServiceController
.
versionClear
(
instance
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
node
);
return
;
}
showResult
(
result
);
...
...
@@ -789,7 +825,16 @@ public class ServiceTopology extends AbstractTopology {
if
(
group
!=
null
)
{
String
serviceId
=
(
String
)
group
.
getUserObject
();
List
<
ResultEntity
>
results
=
ServiceController
.
configUpdate
(
serviceId
,
dynamicRule
);
List
<
ResultEntity
>
results
=
null
;
try
{
results
=
ServiceController
.
configUpdate
(
serviceId
,
dynamicRule
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
group
);
return
;
}
showResult
(
results
);
...
...
@@ -797,7 +842,16 @@ public class ServiceTopology extends AbstractTopology {
}
else
if
(
node
!=
null
)
{
InstanceEntity
instance
=
(
InstanceEntity
)
node
.
getUserObject
();
String
result
=
ServiceController
.
configUpdate
(
instance
,
dynamicRule
);
String
result
=
null
;
try
{
result
=
ServiceController
.
configUpdate
(
instance
,
dynamicRule
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
node
);
return
;
}
showResult
(
result
);
...
...
@@ -816,7 +870,16 @@ public class ServiceTopology extends AbstractTopology {
public
void
execute
(
ActionEvent
e
)
{
if
(
group
!=
null
)
{
String
serviceId
=
(
String
)
group
.
getUserObject
();
List
<
ResultEntity
>
results
=
ServiceController
.
configClear
(
serviceId
);
List
<
ResultEntity
>
results
=
null
;
try
{
results
=
ServiceController
.
configClear
(
serviceId
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
group
);
return
;
}
showResult
(
results
);
...
...
@@ -824,7 +887,16 @@ public class ServiceTopology extends AbstractTopology {
}
else
if
(
node
!=
null
)
{
InstanceEntity
instance
=
(
InstanceEntity
)
node
.
getUserObject
();
String
result
=
ServiceController
.
configClear
(
instance
);
String
result
=
null
;
try
{
result
=
ServiceController
.
configClear
(
instance
);
}
catch
(
Exception
ex
)
{
JExceptionDialog
.
traceException
(
HandleManager
.
getFrame
(
ServiceTopology
.
this
),
ConsoleLocale
.
getString
(
"query_data_failure"
),
ex
);
refreshGrayState
(
node
);
return
;
}
showResult
(
result
);
...
...
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale.properties
View file @
b7778e5f
...
...
@@ -16,7 +16,7 @@ clear_router=清除路由
router_path_invalid
=
路由路径不能为空
get_service_instances_failure
=
获取服务和实例列表失败
query_data_failure
=
查询数据失败,可能
该
实例已下线
query_data_failure
=
查询数据失败,可能
相关
实例已下线
select_a_group
=
请选择一个服务集群
select_a_node
=
请选择一个服务
...
...
discovery-console-desktop/src/main/resources/com/nepxion/discovery/console/desktop/locale/Locale_zh_CN.properties
View file @
b7778e5f
...
...
@@ -16,7 +16,7 @@ clear_router=\u6e05\u9664\u8def\u7531
router_path_invalid
=
\u
8def
\u7531\u
8def
\u
5f84
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
get_service_instances_failure
=
\u
83b7
\u
53d6
\u
670d
\u
52a1
\u
548c
\u
5b9e
\u
4f8b
\u5217\u8868\u5931\u
8d25
query_data_failure
=
\u
67e5
\u
8be2
\u6570\u
636e
\u5931\u
8d25
\u
ff0c
\u
53ef
\u
80fd
\u
8be5
\u
5b9e
\u
4f8b
\u
5df2
\u
4e0b
\u
7ebf
query_data_failure
=
\u
67e5
\u
8be2
\u6570\u
636e
\u5931\u
8d25
\u
ff0c
\u
53ef
\u
80fd
\u
76f8
\u5173
\u
5b9e
\u
4f8b
\u
5df2
\u
4e0b
\u
7ebf
select_a_group
=
\u
8bf7
\u9009\u
62e9
\u
4e00
\u
4e2a
\u
670d
\u
52a1
\u
96c6
\u
7fa4
select_a_node
=
\u
8bf7
\u9009\u
62e9
\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