After deleting the trunk, jump to the correct page
Change-Id: Ie1835e67d7c5e0879cd372cee996853c4d7a36bc Closes-Bug: #1821835
This commit is contained in:
parent
1d2145b888
commit
0d8fba2a3d
|
@ -23,6 +23,7 @@
|
|||
|
||||
deleteService.$inject = [
|
||||
'$q',
|
||||
'$location',
|
||||
'horizon.app.core.openstack-service-api.neutron',
|
||||
'horizon.app.core.openstack-service-api.policy',
|
||||
'horizon.app.core.trunks.resourceType',
|
||||
|
@ -32,6 +33,7 @@
|
|||
|
||||
function deleteService(
|
||||
$q,
|
||||
$location,
|
||||
neutron,
|
||||
policy,
|
||||
resourceType,
|
||||
|
@ -81,7 +83,16 @@
|
|||
actionResult.failed(resourceType, item.context.id);
|
||||
});
|
||||
|
||||
return actionResult.result;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue