From 54bf7cce48547289489203812f2e01cb755f0db4 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 16 May 2016 14:50:40 +0100 Subject: bitbake: toaster: toastertables: Clean up and fix up a number of items - Remove the unused 'computation' field - Remove the code to try to make the tables behave like an api - Remove custom JSON encoder in favour of DjangoJSONEncoder - Simplify get_data and add comments - Add exception type instead of using generic Exception - Clean up python style warnings (Bitbake rev: 16d8198e8f6668c5fa5467ff4bda86c5d66a6cad) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/table.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/static') diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index f738144ae5..7f76f555fc 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -101,27 +101,8 @@ function tableInit(ctx){ var row = $(""); column_index = -1; 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; - } - - /* we skip over un-displayable column entries */ - column_index += 1; - if (! tableData.columns[column_index].displayable) { - continue; - } - var td = $(""); - td.prop("class", orig_key_j); + td.prop("class", key_j); if (tableData.rows[i][key_j]){ td.html(tableData.rows[i][key_j]); } -- cgit v1.2.3-54-g00ecf