mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bitbake: toaster: toaster table add raw data
We add in a JSON response both the raw data and the rendered version for display. The rendered fields start with "static:" to mark a different "namespace". The toaster.js is updated to always display the "static:" version of a field, if it exists (and ignore the raw data unless the static rendering is missing). (Bitbake rev: 928ee3fd4b52ea14b7eb704f1f27351362a9d27a) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4a2a057130
commit
58600cf8e7
@@ -113,8 +113,20 @@ function tableInit(ctx){
|
||||
for (var i in tableData.rows){
|
||||
var row = $("<tr></tr>");
|
||||
for (var key_j in tableData.rows[i]){
|
||||
/* if we have a static: version of a key, prefer the static: version for rendering */
|
||||
var orig_key_j = key_j;
|
||||
|
||||
if (key_j.indexOf("static:") === 0) {
|
||||
if (key_j.substr("static:".length) in tableData.rows[i]) {
|
||||
continue;
|
||||
}
|
||||
orig_key_j = key_j.substr("static:".length)
|
||||
} else if (("static:" + key_j) in tableData.rows[i]) {
|
||||
key_j = "static:" + key_j;
|
||||
}
|
||||
|
||||
var td = $("<td></td>");
|
||||
td.prop("class", key_j);
|
||||
td.prop("class", orig_key_j);
|
||||
if (tableData.rows[i][key_j]){
|
||||
td.html(tableData.rows[i][key_j]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user