Commit a74fee6d authored by Mihai Patrascoiu's avatar Mihai Patrascoiu
Browse files

FTS-1687: Introduce mechanism to enable/disable streaming transfer per VO in...

FTS-1687: Introduce mechanism to enable/disable streaming transfer per VO in Server Global configuration
parent 20beb590
Pipeline #2132995 passed with stage
in 2 minutes and 2 seconds
......@@ -98,6 +98,7 @@ class ServerConfig(Base):
global_timeout = Column(Integer, default=0)
sec_per_mb = Column(Integer, default=0)
vo_name = Column(String(100), primary_key=True)
no_streaming = Column(Flag(negative='off', positive='on'), default='off')
show_user_dn = Column(Flag(negative='off', positive='on'), default='off')
......
......@@ -39,6 +39,12 @@ var globalConfigRowHtml = '\
<td> \
<input type="number" name="sec_per_mb" class="form-control" min="0"/> \
</td> \
<td> \
<select name="no_streaming" id="no_streaming" class="form-control"> \
<option value="true">Yes</option> \
<option value="false">No</option> \
</select> \
</td> \
<td> \
<select name="show_user_dn" id="show_user_dn" class="form-control"> \
<option value="true">Yes</option> \
......@@ -69,19 +75,17 @@ function refreshVoConfigList()
tr.find(".vo_name").text(vo_name);
$.each(vo, function(op_name, op_value) {
tr.attr('name',vo.vo_name);
tr.find("button[id='button_delete_global']").attr('name', vo.vo_name);
tr.find("input[name='" + op_name + "']").each(function(){
$(this).attr('value',op_value);
tr.attr('name', vo.vo_name);
tr.find("button[id='button_delete_global']").attr('name', vo.vo_name);
tr.find("input[name='" + op_name + "']").each(function() {
$(this).attr('value', op_value);
});
tr.find("select[name='" + op_name + "']").each(function(){
$(this).attr('value',op_value.toString());
tr.find("select[name='" + op_name + "']").val(op_value.toString());
tr.find("select[name='" + op_name + "']").each(function() {
$(this).attr('value', op_value.toString());
tr.find("select[name='" + op_name + "']").val(op_value.toString());
});
});
tr.find(".bt-delete").click(function() {
tr.css("background", "#d9534f");
$.ajax({
......@@ -107,8 +111,12 @@ function refreshVoConfigList()
tr.find("select").prop("disabled", true);
tr.css("background", "#3c763d");
if ((tr.find("input[name='retry']").val() > 10)||(tr.find("input[name='retry']").val() < 0) ||(tr.find("input[name='max_time_queue']").val() < 0)||(tr.find("input[name='global_timeout']").val() < 0)||(tr.find("input[name='sec_per_mb']").val() < 0)){
errorMessage(jqXHR);
if ((tr.find("input[name='retry']").val() > 10) ||
(tr.find("input[name='retry']").val() < 0) ||
(tr.find("input[name='max_time_queue']").val() < 0) ||
(tr.find("input[name='global_timeout']").val() < 0) ||
(tr.find("input[name='sec_per_mb']").val() < 0)) {
errorMessage(jqXHR);
tr.find("input").prop("disabled", false);
tr.find("select").prop("disabled", false);
tr.css("background", "#ffffff");
......@@ -116,8 +124,7 @@ function refreshVoConfigList()
max_wrong.val(encodeURIComponent(vo.max_time_queue));
glo_wrong.val(encodeURIComponent(vo.global_timeout));
sec_wrong.val(encodeURIComponent(vo.sec_per_mb));
}
else{
} else {
$.ajax({
url: "/config/global?",
type: "POST",
......@@ -129,6 +136,7 @@ function refreshVoConfigList()
max_time_queue: tr.find("input[name='max_time_queue']").val(),
global_timeout: tr.find("input[name='global_timeout']").val(),
sec_per_mb: tr.find("input[name='sec_per_mb']").val(),
no_streaming: tr.find("select[name='no_streaming']").val(),
show_user_dn: tr.find("select[name='show_user_dn']").val()
})
})
......
......@@ -18,18 +18,14 @@
Retries
<i class="glyphicon glyphicon-question-sign"></i>
</th>
<th>
Global transfer timeout
</th>
<th>
Queue timeout
</th>
<th>
Add seconds/MB
</th>
<th>
Show user DN
<th>Global transfer timeout</th>
<th>Queue timeout</th>
<th>Add seconds/MB</th>
<th title="If set, allow only transfers that can be handled entierly by a Gfal2 plugin. Most of the time, this means same-protocol or TPC.">
Disable streaming
<i class="glyphicon glyphicon-question-sign"></i>
</th>
<th>Show user DN</th>
</tr>
</thead>
<tbody id="vo-config-list">
......@@ -59,6 +55,12 @@
<td>
<input type="number" id="sec_per_mb" name="sec_per_mb" class="form-control" min="0"/>
</td>
<td>
<select name="no_streaming" id="no_streaming" class="form-control">
<option value="true">Yes</option>
<option value="false" selected>No</option>
</select>
</td>
<td>
<select name="show_user_dn" id="show_user_dn" class="form-control">
<option value="true" selected>Yes</option>
......
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