Commit 4824dc14 authored by Mihai Patrascoiu's avatar Mihai Patrascoiu
Browse files

FTS-1682: Introduce no_delegation variable in LinkConfig model.

Also, modify the config/links page to allow setting this variable via the UI.
parent 738d4040
Pipeline #2110348 passed with stage
in 2 minutes and 19 seconds
......@@ -46,10 +46,10 @@ class LinkConfig(Base):
symbolicname = Column(String(255), unique=True, name='symbolic_name')
min_active = Column(Integer)
max_active = Column(Integer)
optimizer_mode = Column (Integer)
optimizer_mode = Column(Integer)
tcp_buffer_size = Column(Integer)
nostreams = Column(Integer)
no_delegation = Column(Flag(negative='off', positive='on'), default='off')
def __str__(self):
return "%s => %s" % (self.source, self.destination)
......
......@@ -72,7 +72,12 @@ function refreshLinks()
.append($("<td></td>")
.append($("<input type='number' name='optimizer_mode_"+link.symbolicname+"' min='0' max='3' class='form-control'/>").val(link.optimizer_mode)))
.append($("<td></td>")
.append($("<input type='number' name='tcp_buffer_size_"+link.symbolicname+"' class='form-control'/>").val(link.tcp_buffer_size)));
.append($("<input type='number' name='tcp_buffer_size_"+link.symbolicname+"' class='form-control'/>").val(link.tcp_buffer_size)))
.append($("<td></td>")
.append($("<select name='no_delegation_"+link.symbolicname+"' class='form-control'>" +
"<option value='true'>Yes</option>" +
"<option value='false'>No</option>>" +
"</select>").val(link.no_delegation.toString())));
tbody.append(tr);
updateBtn.click(function() {
......@@ -85,7 +90,8 @@ function refreshLinks()
min_active: tr.find("input[name='min_active_"+link.symbolicname+"']").val(),
max_active: tr.find("input[name='max_active_"+link.symbolicname+"']").val(),
optimizer_mode: tr.find("input[name='optimizer_mode_"+link.symbolicname+"']").val(),
tcp_buffer_size: tr.find("input[name='tcp_buffer_size_"+link.symbolicname+"']").val()
tcp_buffer_size: tr.find("input[name='tcp_buffer_size_"+link.symbolicname+"']").val(),
no_delegation: tr.find("select[name='no_delegation_"+link.symbolicname+"']").val()
};
console.log(saveload);
$.ajax({
......@@ -271,6 +277,7 @@ function setupLinks()
max_active: addFrm.find("[name=max_active]").val(),
optimizer_mode: addFrm.find("[name=optimizer_mode]").val(),
tcp_buffer_size: addFrm.find("[name=tcp_buffer_size]").val(),
no_delegation: addFrm.find("[name=no_delegation]").val(),
};
console.log(payload);
......
......@@ -21,6 +21,7 @@
<th>Max Actives</th>
<th>Optimizer Mode</th>
<th>TCP buffer size</th>
<th>Disable delegation</th>
</tr>
</thead>
<tbody id="link-config-list">
......@@ -63,7 +64,12 @@
<input class="form-control" type="number" placeholder="TCP buffer size" name="tcp_buffer_size"
min="0" max="999999" value="0"/>
</td>
<td>
<select class="form-control" name="no_delegation">
<option value="true">Yes</option>
<option value="false" selected>No</option>
</select>
</td>
</tr>
</tbody>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment