Skip to content
Snippets Groups Projects
Commit 9a9b7027 authored by David Schmitz's avatar David Schmitz
Browse files

live status: fix broken messages on adding of inactive rules (via REST API) as...

live status: fix broken messages on adding of inactive rules (via REST API) as well as on rules in PENDING state
parent 105fc2ab
Branches
No related tags found
No related merge requests found
...@@ -125,8 +125,11 @@ class RouteViewSet(viewsets.ModelViewSet): ...@@ -125,8 +125,11 @@ class RouteViewSet(viewsets.ModelViewSet):
elif requested_status == "INACTIVE": elif requested_status == "INACTIVE":
route.status = "INACTIVE" route.status = "INACTIVE"
route.save() route.save()
announce("[%s] new inactive Rule added: %s" % (route.applier_username_nice, route.name_visible), route.applier, route)
else: else:
route.save() route.save()
announce("[%s] new non-active Rule added: %s" % (route.applier_username_nice, route.name_visible), route.applier, route)
obj.data["status"] = route.status obj.data["status"] = route.status
logger.info("RouteViewSet::create(): => route="+str(route)) logger.info("RouteViewSet::create(): => route="+str(route))
logger.info("RouteViewSet::create(): => route.status="+str(route.status)) logger.info("RouteViewSet::create(): => route.status="+str(route.status))
......
...@@ -178,7 +178,7 @@ var updater = { ...@@ -178,7 +178,7 @@ var updater = {
updater.showMessage(messages[i], peerid); updater.showMessage(messages[i], peerid);
try { try {
body = messages[i].body body = messages[i].body
if (body.match(/Successfully committed$/) || body.match(/Deleting inactive/) || body.match(/NETCONF/) || body.match(/non-flowspec-params updated/)) { if (body.match(/Successfully committed$/) || body.match(/Deleting inactive/) || body.match(/NETCONF/) || body.match(/non-flowspec-params updated/) || body.match(/Rule/) || body.match(/Please wait/)) {
reloadContent = true; reloadContent = true;
} }
} catch (e) { } catch (e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment