Commit ab0526c0 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

moved up menus

parent d1c2b55b
/*
FILE NAME : debugfs.js
DESCRIPTION: dynamic debug frontend
REVISION: 1.00
AUTHOR: Oleg Dzhimiev <oleg@elphel.com>
LICENSE: AGPL, see http://www.gnu.org/licenses/agpl.txt
Copyright (C) 2016 Elphel, Inc.
*/
var CUT_STRING_LIMIT = 20; var CUT_STRING_LIMIT = 20;
var NLINES = 30; var NLINES = 30;
...@@ -102,6 +111,7 @@ function init(){ ...@@ -102,6 +111,7 @@ function init(){
<tr>\ <tr>\
<th style='display:none;' class='hidden_rows'>Show</th>\ <th style='display:none;' class='hidden_rows'>Show</th>\
<th>File</th>\ <th>File</th>\
<th>Config</th>\
</tr>\ </tr>\
"); ");
...@@ -120,9 +130,11 @@ function init(){ ...@@ -120,9 +130,11 @@ function init(){
//file walk //file walk
for(var i=0;i<r.length;i++){ for(var i=0;i<r.length;i++){
l = init_ui_file(r[i],i); l = init_ui_file(r[i],i);
content = init_ui_content(r[i],i); t.append(l);
controls = init_ui_controls(r[i],i); controls = init_ui_controls(r[i],i);
t.append(l).append(controls).append(content); t.append(controls);
content = init_ui_content(r[i],i);
t.append(content);
j = init_ui_dropdown(r[i],i); j = init_ui_dropdown(r[i],i);
if (r[i].file=="drivers/elphel/framepars.c"){ if (r[i].file=="drivers/elphel/framepars.c"){
...@@ -280,6 +292,7 @@ function init_ui_file(record,index){ ...@@ -280,6 +292,7 @@ function init_ui_file(record,index){
<input id='cb_"+index+"' class='tp visibility_cb' type='checkbox' index='"+index+"' >\ <input id='cb_"+index+"' class='tp visibility_cb' type='checkbox' index='"+index+"' >\
</td>\ </td>\
<td class='special filename' id='header_"+index+"' index='"+index+"' >"+record.file+"</td>\ <td class='special filename' id='header_"+index+"' index='"+index+"' >"+record.file+"</td>\
<td class='special' id='conf_"+index+"' index='"+index+"' ></td>\
"); ");
if (record.state==0){ if (record.state==0){
...@@ -307,7 +320,7 @@ function init_ui_content(record,index){ ...@@ -307,7 +320,7 @@ function init_ui_content(record,index){
content.append( content.append(
$("<td>").addClass("hidden_rows").hide() $("<td>").addClass("hidden_rows").hide()
).append( ).append(
$("<td>",{id:"content_td"}) $("<td>",{id:"content_td",colspan:"2"})
); );
return content; return content;
...@@ -328,7 +341,7 @@ function init_ui_controls(record,index){ ...@@ -328,7 +341,7 @@ function init_ui_controls(record,index){
controls.append( controls.append(
$("<td>").addClass("hidden_rows").hide() $("<td>").addClass("hidden_rows").hide()
).append( ).append(
$("<td>",{id:"controls_td"}) $("<td>",{id:"controls_td",colspan:"2"})
); );
var bc0 = $("<button>",{ var bc0 = $("<button>",{
...@@ -381,7 +394,7 @@ function init_ui_controls(record,index){ ...@@ -381,7 +394,7 @@ function init_ui_controls(record,index){
}); });
}); });
var pre_bc1 = $("<span>",{title:"Current config name"}).html("&nbsp;&nbsp;config:&nbsp;"); var pre_bc1 = $("<span>",{title:"Current config name"}).html("");
var dc0_b = $("<button>",{ var dc0_b = $("<button>",{
class:"btn btn-default btn-sm btn-success dropdown-toggle", class:"btn btn-default btn-sm btn-success dropdown-toggle",
...@@ -452,7 +465,9 @@ function init_ui_controls(record,index){ ...@@ -452,7 +465,9 @@ function init_ui_controls(record,index){
var dc0 = $("<div>",{class:"btn-group",role:"group"}).append(dc0_b).append(dc0_ul); var dc0 = $("<div>",{class:"btn-group",role:"group"}).append(dc0_b).append(dc0_ul);
controls.find("#controls_td").append(bc0).append(pre_bc1).append(dc0); controls.find("#controls_td").append(bc0);//.append(pre_bc1).append(dc0);
$("#conf_"+index).append(pre_bc1).append(dc0);
return controls; return controls;
} }
...@@ -499,7 +514,8 @@ function dropdown_add_list_item(record,index,j){ ...@@ -499,7 +514,8 @@ function dropdown_add_list_item(record,index,j){
dropdown_select_config(index,confindex); dropdown_select_config(index,confindex);
}); });
$("#controls_"+index).find("ul").append(lentry); //$("#controls_"+index).find("ul").append(lentry);
$("#conf_"+index).find("ul").append(lentry);
} }
function dropdown_select_config(index,config_index){ function dropdown_select_config(index,config_index){
......
<?php <?php
/*
FILE NAME : debugfs.php
DESCRIPTION: dynamic debug backend
REVISION: 1.00
AUTHOR: Oleg Dzhimiev <oleg@elphel.com>
LICENSE: AGPL, see http://www.gnu.org/licenses/agpl.txt
Copyright (C) 2016 Elphel, Inc.
*/
//globals //globals
$config = "debugfs.json"; $config = "debugfs.json";
$tmp_config = "/tmp/$config"; $tmp_config = "/tmp/$config";
......
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