Commit ff0eaf22 by Jason Song Committed by GitHub

Merge pull request #454 from lepdou/abtest

bugfix: modify item dont need select cluster
parents dc4d0c37 e0111635
......@@ -26,11 +26,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
function doItem() {
if (selectedClusters.length == 0) {
toastr.error("请选择集群");
return;
}
if (!scope.item.value) {
scope.item.value = "";
}
......@@ -68,6 +63,11 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
toastr.error(AppUtil.errorMsg(result), "添加失败");
});
} else {
if (selectedClusters.length == 0) {
toastr.error("请选择集群");
return;
}
selectedClusters.forEach(function (cluster) {
ConfigService.create_item(scope.appId,
cluster.env,
......@@ -113,8 +113,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
AppUtil.hideModal('#itemModal');
toastr.success("更新成功, 如需生效请发布");
}, function (result) {
toastr.error(AppUtil.errorMsg(result), "更新失败");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment