Skip to content

Commit ff0eaf2

Browse files
authored
Merge pull request apolloconfig#454 from lepdou/abtest
bugfix: modify item dont need select cluster
2 parents dc4d0c3 + e011163 commit ff0eaf2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
2626

2727
function doItem() {
2828

29-
if (selectedClusters.length == 0) {
30-
toastr.error("请选择集群");
31-
return;
32-
}
33-
3429
if (!scope.item.value) {
3530
scope.item.value = "";
3631
}
@@ -68,6 +63,11 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
6863
toastr.error(AppUtil.errorMsg(result), "添加失败");
6964
});
7065
} else {
66+
if (selectedClusters.length == 0) {
67+
toastr.error("请选择集群");
68+
return;
69+
}
70+
7171
selectedClusters.forEach(function (cluster) {
7272
ConfigService.create_item(scope.appId,
7373
cluster.env,
@@ -113,8 +113,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
113113
AppUtil.hideModal('#itemModal');
114114

115115
toastr.success("更新成功, 如需生效请发布");
116-
117-
118116
}, function (result) {
119117
toastr.error(AppUtil.errorMsg(result), "更新失败");
120118
});

0 commit comments

Comments
 (0)