Root Cause: Whenever user edits a flow entry, page.js file passes the value of installInHw as true always (line ). If the flow is not installed in the hardware, this reverts the value of installInHw from false to true causing this issue.
Fix: Changes Done:
1. In page.js file, On edit click button a new variable install is defined, which is assigned to the value of installInHw(true/false) in respect to a flow entry.
2. The variable install is passed to the edit function instead of passing the value as true always
Change-Id: I4e0df2a3061d165b8ab534dff44d4c196e7d9872
Signed-off-by: deepankar <deepankar.gupta@tcs.com>
var editButton = one.lib.dashlet.button.single("Edit Flow", one.f.flows.id.dashlet.edit, "btn-primary", "btn-mini");
var $editButton = one.lib.dashlet.button.button(editButton);
$editButton.click(function() {
var editButton = one.lib.dashlet.button.single("Edit Flow", one.f.flows.id.dashlet.edit, "btn-primary", "btn-mini");
var $editButton = one.lib.dashlet.button.button(editButton);
$editButton.click(function() {
- var $modal = one.f.flows.modal.initialize(true);
+ var install = flow['flow']['installInHw'];
+ var $modal = one.f.flows.modal.initialize(true,install);
$modal.modal().on('shown',function(){
var $port = $('#'+one.f.flows.id.modal.form.port);
$('#'+one.f.flows.id.modal.form.nodes).trigger("change");
$modal.modal().on('shown',function(){
var $port = $('#'+one.f.flows.id.modal.form.port);
$('#'+one.f.flows.id.modal.form.nodes).trigger("change");
- initialize : function(edit) {
+ initialize : function(edit,install) {
var h3;
if(edit) {
h3 = "Edit Flow Entry";
var h3;
if(edit) {
h3 = "Edit Flow Entry";
if (edit) {
// bind edit flow button
$('#'+one.f.flows.id.modal.edit, $modal).click(function() {
if (edit) {
// bind edit flow button
$('#'+one.f.flows.id.modal.edit, $modal).click(function() {
- one.f.flows.modal.save($modal, 'true', true);
+ one.f.flows.modal.save($modal, install, true);
});
} else {
// bind add flow button
});
} else {
// bind add flow button