Commit e0111635 by lepdou

bugfix: modify item dont need select cluster

parent dc4d0c37
...@@ -26,11 +26,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) { ...@@ -26,11 +26,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
function doItem() { function doItem() {
if (selectedClusters.length == 0) {
toastr.error("请选择集群");
return;
}
if (!scope.item.value) { if (!scope.item.value) {
scope.item.value = ""; scope.item.value = "";
} }
...@@ -68,6 +63,11 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) { ...@@ -68,6 +63,11 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
toastr.error(AppUtil.errorMsg(result), "添加失败"); toastr.error(AppUtil.errorMsg(result), "添加失败");
}); });
} else { } else {
if (selectedClusters.length == 0) {
toastr.error("请选择集群");
return;
}
selectedClusters.forEach(function (cluster) { selectedClusters.forEach(function (cluster) {
ConfigService.create_item(scope.appId, ConfigService.create_item(scope.appId,
cluster.env, cluster.env,
...@@ -113,8 +113,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) { ...@@ -113,8 +113,6 @@ function itemModalDirective(toastr, AppUtil, EventManager, ConfigService) {
AppUtil.hideModal('#itemModal'); AppUtil.hideModal('#itemModal');
toastr.success("更新成功, 如需生效请发布"); toastr.success("更新成功, 如需生效请发布");
}, function (result) { }, function (result) {
toastr.error(AppUtil.errorMsg(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