A Task is always associated to a resource and it can be identified by
the target_uri parameter.
That way we can properly get tasks related to a specific resource type.
Example:
GET /tasks?target_uri=^/debugreports will return all the tasks
associated to a debug report.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.api.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js
index 5fc456d..6f12455 100644
--- a/ui/js/src/kimchi.api.js
+++ b/ui/js/src/kimchi.api.js
@@ -533,6 +533,18 @@ var kimchi = {
});
},
+ getTasksByFilter : function(filter, suc, err, sync) {
+ kimchi.requestJSON({
+ url : kimchi.url + 'tasks?' + filter,
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ async : !sync,
+ success : suc,
+ error : err
+ });
+ },
+
login : function(settings, suc, err) {
$.ajax({
url : "/login",
--
1.9.3