webui: Remove ifIndex from ports list and add debug button for data access (#5679)

This commit is contained in:
Neil Lathwood
2017-02-03 21:20:25 +00:00
committed by Tony Murray
parent bea8a14ad3
commit bc72ab916e
2 changed files with 24 additions and 7 deletions

View File

@ -1409,3 +1409,17 @@ function search_oxidized_config($search_in_conf_textbox)
$context = stream_context_create($opts);
return json_decode(file_get_contents($oxidized_search_url, false, $context), true);
}
/**
* @param $data
* @return bool|mixed
*/
function array_to_htmljson($data)
{
if (is_array($data)) {
$data = htmlentities(json_encode($data));
return str_replace(',', ',<br />', $data);
} else {
return false;
}
}