private static final String WEB_ID = "flows";
private static final short WEB_ORDER = 2;
+ private final Gson gson;
+
public Flows() {
ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
+ gson = new Gson();
}
@Override
return null;
}
- Gson gson = new Gson();
FlowConfig flow = gson.fromJson(body, FlowConfig.class);
+
Node node = Node.fromString(nodeId);
flow.setNode(node);
Status result = new Status(StatusCode.BADREQUEST, "Invalid request");
return "Forwarding Rules Manager is not available";
}
- Gson gson = new Gson();
List<Map<String, String>> flowList = new ArrayList<Map<String, String>>();
flowList = gson.fromJson(body, flowList.getClass());
Status result = new Status(StatusCode.BADREQUEST, "Invalid request");
var flows = one.f.flows.registry.flows;
var flow;
$(flows).each(function(index, value) {
- if (value['name'] == id) {
- flow = value;
- }
+ if (value.name == id && value.nodeId == node) {
+ flow = value;
+ }
});
if (one.f.flows.registry.privilege === 'WRITE') {
// remove button
// activate first tab on each dashlet
$('.dash .nav').each(function(index, value) {
$($(value).find('li')[0]).find('a').click();
-});
\ No newline at end of file
+});