Merge "Wrong success url for instance floatingip related actions"
This commit is contained in:
commit
029ac1a2b8
@ -537,9 +537,10 @@ class AssociateIP(policy.PolicyTargetMixin, tables.LinkAction):
|
|||||||
|
|
||||||
def get_link_url(self, datum):
|
def get_link_url(self, datum):
|
||||||
base_url = urlresolvers.reverse(self.url)
|
base_url = urlresolvers.reverse(self.url)
|
||||||
next = urlresolvers.reverse("horizon:project:instances:index")
|
next_url = self.table.get_full_url()
|
||||||
params = {"instance_id": self.table.get_object_id(datum),
|
params = {
|
||||||
workflows.IPAssociationWorkflow.redirect_param_name: next}
|
"instance_id": self.table.get_object_id(datum),
|
||||||
|
workflows.IPAssociationWorkflow.redirect_param_name: next_url}
|
||||||
params = urlencode(params)
|
params = urlencode(params)
|
||||||
return "?".join([base_url, params])
|
return "?".join([base_url, params])
|
||||||
|
|
||||||
@ -570,7 +571,7 @@ class SimpleAssociateIP(policy.PolicyTargetMixin, tables.Action):
|
|||||||
except Exception:
|
except Exception:
|
||||||
exceptions.handle(request,
|
exceptions.handle(request,
|
||||||
_("Unable to associate floating IP."))
|
_("Unable to associate floating IP."))
|
||||||
return shortcuts.redirect("horizon:project:instances:index")
|
return shortcuts.redirect(request.get_full_path())
|
||||||
|
|
||||||
|
|
||||||
class SimpleDisassociateIP(policy.PolicyTargetMixin, tables.Action):
|
class SimpleDisassociateIP(policy.PolicyTargetMixin, tables.Action):
|
||||||
@ -610,7 +611,7 @@ class SimpleDisassociateIP(policy.PolicyTargetMixin, tables.Action):
|
|||||||
except Exception:
|
except Exception:
|
||||||
exceptions.handle(request,
|
exceptions.handle(request,
|
||||||
_("Unable to disassociate floating IP."))
|
_("Unable to disassociate floating IP."))
|
||||||
return shortcuts.redirect("horizon:project:instances:index")
|
return shortcuts.redirect(request.get_full_path())
|
||||||
|
|
||||||
|
|
||||||
def instance_fault_to_friendly_message(instance):
|
def instance_fault_to_friendly_message(instance):
|
||||||
|
Loading…
Reference in New Issue
Block a user