Hi,
The server variables are not configurable because of javascript.
The Jquery's .text() function is not useable in this HTML structure because it will collect all '\n's and spaces which are inside the tr element with 'class=.var-name'. This is why varName will be "
____________
____________slow_query_log________
________"
POST request:
ajax_request=true&type=setval&varName=%0A____________%0A____________slow_query_log________%0A________&varValue=off&_nocache=1465473774538469936
Query SHOW GLOBAL VARIABLES WHERE Variable_name='
____________
____________slow_query_log________
________'
My solution is find the span element inside the tr and use title of this span.
/js/server_variables.js
function editVariable(link) {
var $cell = $(link).parent();
var $valueCell = $(link).parents('.var-row').find('.var-value');
-- var varName = $cell.parent().find('.var-name').text().replace(/ /g, '_');
++ var TvarName = $cell.parent().find('.var-name');
++ var varName = TvarName[0].children[0].title.replace(/ /g, '_');
var $mySaveLink = $saveLink.clone().show();
Query SHOW GLOBAL VARIABLES WHERE Variable_name='slow_query_log'
POST request:
ajax_request=true&type=setval&varName=slow_query_log&varValue=on&_nocache=1465473600358154148
Regards,
Szabolcs