return status text in json for tenant views
diff --git a/planetstack/core/dashboard/views/tenant.py b/planetstack/core/dashboard/views/tenant.py
index a541ed9..9066a2b 100644
--- a/planetstack/core/dashboard/views/tenant.py
+++ b/planetstack/core/dashboard/views/tenant.py
@@ -31,7 +31,7 @@
addOrModifyPorts(networkPorts,sliceName)
if privateVolume=="true":
privateVolForSlice(request.user,sliceName)
- return HttpResponse("Slice created")
+ return HttpResponse(json.dumps("Slice created"), mimetype='application/javascript')
def privateVolForSlice(user,sliceName):
if not hasPrivateVolume(sliceName):
@@ -64,7 +64,7 @@
addOrModifyPorts(networkPorts,sliceName)
if privateVolume=="true":
privateVolForSlice(request.user,sliceName)
- return HttpResponse("Slice updated")
+ return HttpResponse(json.dumps("Slice updated"), mimetype='application/javascript')
def addNetwork(name,template,sliceName):
networkTemplate=NetworkTemplate.objects.get(name=template)
@@ -237,7 +237,7 @@
#print slice, slice.id
sliceToDel=Slice(name=sliceName, id=slice.id)
sliceToDel.delete()
- return HttpResponse("Slice deleted")
+ return HttpResponse(json.dumps("Slice deleted"), mimetype='application/javascript')
class TenantAddOrRemoveSliverView(View):
""" Add or remove slivers from a Slice