After deleting the trunk, jump to the correct page
Closes-Bug:
deleteService.$inject = [
'$q',
+ '$location',
'horizon.app.core.openstack-service-api.neutron',
'horizon.app.core.openstack-service-api.policy',
'horizon.app.core.trunks.resourceType',
function deleteService(
$q,
+ $location,
neutron,
policy,
resourceType,
actionResult.failed(resourceType, item.context.id);
});
+ var path = "admin/trunks";
+ if ($location.url().indexOf("admin") === -1) {
+ path = "project/trunks";
+ }
+ if ($location.url() !== path && actionResult.result.failed.length === 0 &&
+ actionResult.result.deleted.length > 0) {
+ $location.path(path);
+ } else {
return actionResult.result;
}
}
+ }
function labelize(count) {
return {
