fix(ui): fix `remove` in caching resources policy not working
MODIFY
manager/ui/war/plugins/api-manager/html/policyForms/caching-resources.include
manager/ui/war/plugins/api-manager/html/policyForms/caching-resources.include
<td>{{ item.httpMethod }}</td>
<td>{{ item.statusCode}}</td>
<td>
- <button ng-click="remove(item)" class="btn btn-default" ng-disabled="isEntityDisabled()"><i class="fa fa-times fa-fw"></i></button>
+ <button ng-click="remove($index)" class="btn btn-default" ng-disabled="isEntityDisabled()"><i class="fa fa-times fa-fw"></i></button>
</td>
</tr>
<tr>

MODIFY
manager/ui/war/plugins/api-manager/ts/policies.ts
manager/ui/war/plugins/api-manager/ts/policies.ts
@@ -725,8 +725,8 @@ _module.controller('Apiman.CachingResourcesFormController',
$scope.statusCodeCaching = undefined;
};
- $scope.remove = function (cachingResourceSetting) {
- $scope.config.cachingResourcesSettingsEntries.remove(cachingResourceSetting);
+ $scope.remove = function (idx: number) {
+ $scope.config.cachingResourcesSettingsEntries.splice(idx, 1);
};
$scope.isEntityDisabled = EntityStatusSvc.isEntityDisabled;

fix(ui): fix `remove` in caching resources policy not working