diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-01-14 12:46:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-16 08:25:31 +0000 |
commit | 025533d90b694ed37278c8f5be85afbd05857971 (patch) | |
tree | 51bb70fa2873285e1e6d716cf637d78ccb538317 /bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |
parent | 2a6f739f1d3a0383d849cb2944c69797b4b3e437 (diff) | |
download | poky-025533d90b694ed37278c8f5be85afbd05857971.tar.gz |
bitbake: toaster: Add layer details page feature
This commit adds the layer details page which shows the metadata for the
layer such as layer description, machines associated with the layer as well
as the targets provided.
If the layer is an imported layer this page also allows you to update
the layer's configuration.
>From this page you can add/remove the layer from the current project
(Bitbake rev: c1442bc68ad8ba20c37b1a7cde1400297f4be811)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/libtoaster.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/libtoaster.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index a2a0abd45b..04264cd8ba 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |||
@@ -161,6 +161,39 @@ var libtoaster = (function (){ | |||
161 | }); | 161 | }); |
162 | }; | 162 | }; |
163 | 163 | ||
164 | /* parses the query string of the current window.location to an object */ | ||
165 | function _parseUrlParams() { | ||
166 | string = window.location.search | ||
167 | string = string.substr(1); | ||
168 | stringArray = string.split ("&"); | ||
169 | obj = {}; | ||
170 | |||
171 | for (i in stringArray) { | ||
172 | keyVal = stringArray[i].split ("="); | ||
173 | obj[keyVal[0]] = keyVal[1]; | ||
174 | } | ||
175 | |||
176 | return obj; | ||
177 | }; | ||
178 | |||
179 | /* takes a flat object and outputs it as a query string | ||
180 | * e.g. the output of dumpsUrlParams | ||
181 | */ | ||
182 | function _dumpsUrlParams(obj) { | ||
183 | var str = "?"; | ||
184 | |||
185 | for (key in obj){ | ||
186 | if (!obj[key]) | ||
187 | continue; | ||
188 | |||
189 | str += key+ "="+obj[key].toString(); | ||
190 | str += "&"; | ||
191 | } | ||
192 | |||
193 | return str; | ||
194 | }; | ||
195 | |||
196 | |||
164 | return { | 197 | return { |
165 | reload_params : reload_params, | 198 | reload_params : reload_params, |
166 | startABuild : _startABuild, | 199 | startABuild : _startABuild, |
@@ -169,6 +202,8 @@ var libtoaster = (function (){ | |||
169 | getLayerDepsForProject : _getLayerDepsForProject, | 202 | getLayerDepsForProject : _getLayerDepsForProject, |
170 | editProject : _editProject, | 203 | editProject : _editProject, |
171 | debug: false, | 204 | debug: false, |
205 | parseUrlParams : _parseUrlParams, | ||
206 | dumpsUrlParams : _dumpsUrlParams, | ||
172 | } | 207 | } |
173 | })(); | 208 | })(); |
174 | 209 | ||