From d9341d1a774ccea25e64583f9adc61b163fb1f95 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 3 Jun 2015 12:36:30 +0100 Subject: bitbake: toaster: toastertables REST refactoring This patch refactors the ToasterTables to bring them in line with REST principles - - all table pages now support the "format=json" GET parameter that returns the data in JSON format - the tables themselves This cleans up the URL namespace by aleviating the need to have two URLS for each table (one for the template and one for the data loading), and fixes minor things in the ToasterTable implementation. (Bitbake rev: 1778dac9fd39dae75c55bf2cf836cdd488dbc265) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/table.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/static/js/table.js') diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index 2e35e3871c..7588a4ab9a 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -383,12 +383,13 @@ function tableInit(ctx){ */ var params = { 'name' : filterName, - 'search': tableParams.search + 'search': tableParams.search, + 'cmd': 'filterinfo', }; $.ajax({ type: "GET", - url: ctx.url + 'filterinfo', + url: ctx.url, data: params, headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, success: function (filterData) { -- cgit v1.2.3-54-g00ecf