未验证 提交 96441c0d 编写于 作者: 张乐 提交者: GitHub

Merge pull request #1898 from kezhenxu94/enhancement/delete-config-item

prompt current config item that is being deleted
......@@ -257,7 +257,7 @@
<deletenamespacemodal env="pageContext.env"></deletenamespacemodal>
<apolloconfirmdialog apollo-dialog-id="'deleteConfirmDialog'" apollo-title="'删除配置'"
apollo-detail="'确定要删除配置吗?'"
apollo-detail="'您正在删除 Key 为 <b>' + config.key + '</b> Value 为 <b>' + config.value + '</b> 的配置.<br>确定要删除配置吗?'"
apollo-show-cancel-btn="true" apollo-confirm="deleteItem"></apolloconfirmdialog>
<apolloconfirmdialog apollo-dialog-id="'releaseNoPermissionDialog'" apollo-title="'发布'"
......
......@@ -151,13 +151,14 @@ function controller($rootScope, $scope, toastr, AppUtil, EventManager, ConfigSer
var toDeleteItemId = 0;
function preDeleteItem(namespace, itemId) {
function preDeleteItem(namespace, item) {
if (!lockCheck(namespace)) {
return;
}
$scope.config = item;
$scope.toOperationNamespace = namespace;
toDeleteItemId = itemId;
toDeleteItemId = item.id;
$("#deleteConfirmDialog").modal("show");
}
......
......@@ -189,7 +189,7 @@
<img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-if="!config.isDeleted"
ng-click="preDeleteItem(namespace.branch, config.item.id)"
ng-click="preDeleteItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
......
......@@ -294,7 +294,7 @@
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-click="preDeleteItem(namespace, config.item.id)"
ng-click="preDeleteItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
......@@ -403,7 +403,7 @@
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-click="preDeleteItem(namespace, config.item.id)"
ng-click="preDeleteItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册