diff options
| author | Michael Wood <michael.g.wood@intel.com> | 2016-05-16 14:50:40 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-17 14:43:30 +0100 |
| commit | 54bf7cce48547289489203812f2e01cb755f0db4 (patch) | |
| tree | b744123fed2c7e15ab4d1a45c1dce988d3dd4a58 /bitbake/lib/toaster/toastergui/static | |
| parent | a906a09c730683ee14b84fd890d109f52c9e3b02 (diff) | |
| download | poky-54bf7cce48547289489203812f2e01cb755f0db4.tar.gz | |
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 <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/table.js | 21 |
1 files changed, 1 insertions, 20 deletions
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){ | |||
| 101 | var row = $("<tr></tr>"); | 101 | var row = $("<tr></tr>"); |
| 102 | column_index = -1; | 102 | column_index = -1; |
| 103 | for (var key_j in tableData.rows[i]){ | 103 | for (var key_j in tableData.rows[i]){ |
| 104 | |||
| 105 | /* if we have a static: version of a key, prefer the static: version for rendering */ | ||
| 106 | var orig_key_j = key_j; | ||
| 107 | |||
| 108 | if (key_j.indexOf("static:") === 0) { | ||
| 109 | if (key_j.substr("static:".length) in tableData.rows[i]) { | ||
| 110 | continue; | ||
| 111 | } | ||
| 112 | orig_key_j = key_j.substr("static:".length) | ||
| 113 | } else if (("static:" + key_j) in tableData.rows[i]) { | ||
| 114 | key_j = "static:" + key_j; | ||
| 115 | } | ||
| 116 | |||
| 117 | /* we skip over un-displayable column entries */ | ||
| 118 | column_index += 1; | ||
| 119 | if (! tableData.columns[column_index].displayable) { | ||
| 120 | continue; | ||
| 121 | } | ||
| 122 | |||
| 123 | var td = $("<td></td>"); | 104 | var td = $("<td></td>"); |
| 124 | td.prop("class", orig_key_j); | 105 | td.prop("class", key_j); |
| 125 | if (tableData.rows[i][key_j]){ | 106 | if (tableData.rows[i][key_j]){ |
| 126 | td.html(tableData.rows[i][key_j]); | 107 | td.html(tableData.rows[i][key_j]); |
| 127 | } | 108 | } |
