|
|
|
@ -128,12 +128,16 @@ class ThresholdIRCNetworkRelayDel(SuperUserRequiredMixin, APIView):
|
|
|
|
|
message = deleted["reason"]
|
|
|
|
|
message_class = "danger"
|
|
|
|
|
relays = threshold.get_irc_relays(net)
|
|
|
|
|
sinst = threshold.get_irc_sinst(net)
|
|
|
|
|
context = {
|
|
|
|
|
"net": net,
|
|
|
|
|
"message": message,
|
|
|
|
|
"class": message_class,
|
|
|
|
|
"relays": relays["relays"],
|
|
|
|
|
}
|
|
|
|
|
if sinst:
|
|
|
|
|
if sinst["success"]:
|
|
|
|
|
context["sinst"] = sinst["sinst"]
|
|
|
|
|
return render(request, self.template_name, context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -153,12 +157,16 @@ class ThresholdIRCNetworkRelayProvision(SuperUserRequiredMixin, APIView):
|
|
|
|
|
message = provisioned["reason"]
|
|
|
|
|
message_class = "danger"
|
|
|
|
|
relays = threshold.get_irc_relays(net)
|
|
|
|
|
sinst = threshold.get_irc_sinst(net)
|
|
|
|
|
context = {
|
|
|
|
|
"net": net,
|
|
|
|
|
"message": message,
|
|
|
|
|
"class": message_class,
|
|
|
|
|
"relays": relays["relays"],
|
|
|
|
|
}
|
|
|
|
|
if sinst:
|
|
|
|
|
if sinst["success"]:
|
|
|
|
|
context["sinst"] = sinst["sinst"]
|
|
|
|
|
return render(request, self.template_name, context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -178,12 +186,16 @@ class ThresholdIRCNetworkRelayAuth(SuperUserRequiredMixin, APIView):
|
|
|
|
|
message = provisioned["reason"]
|
|
|
|
|
message_class = "danger"
|
|
|
|
|
relays = threshold.get_irc_relays(net)
|
|
|
|
|
sinst = threshold.get_irc_sinst(net)
|
|
|
|
|
context = {
|
|
|
|
|
"net": net,
|
|
|
|
|
"message": message,
|
|
|
|
|
"class": message_class,
|
|
|
|
|
"relays": relays["relays"],
|
|
|
|
|
}
|
|
|
|
|
if sinst:
|
|
|
|
|
if sinst["success"]:
|
|
|
|
|
context["sinst"] = sinst["sinst"]
|
|
|
|
|
return render(request, self.template_name, context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -205,11 +217,15 @@ class ThresholdIRCNetworkRelayStatus(SuperUserRequiredMixin, APIView):
|
|
|
|
|
message = "Error updating status"
|
|
|
|
|
message_class = "danger"
|
|
|
|
|
relays = threshold.get_irc_relays(net)
|
|
|
|
|
sinst = threshold.get_irc_sinst(net)
|
|
|
|
|
context = {
|
|
|
|
|
"relays": relays["relays"],
|
|
|
|
|
"message": message,
|
|
|
|
|
"class": message_class,
|
|
|
|
|
}
|
|
|
|
|
if sinst:
|
|
|
|
|
if sinst["success"]:
|
|
|
|
|
context["sinst"] = sinst["sinst"]
|
|
|
|
|
return render(request, self.template_name, context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|