diff options
author | Clark Laughlin <clark.laughlin@linaro.org> | 2015-07-06 11:13:57 -0400 |
---|---|---|
committer | Clark Laughlin <clark.laughlin@linaro.org> | 2015-07-06 11:17:30 -0400 |
commit | ed5a00bb42fdb24045c8610f27d52b36c39ea362 (patch) | |
tree | 7c10268c0e927a7b4b5872cf67b0fa704fe3e3b0 | |
parent | 7d55e23cb4489709efe1b52b758c4b32afaa702b (diff) |
web app: additional data in change result set
-rw-r--r-- | web-app/server.go | 13 | ||||
-rw-r--r-- | web-app/static/diff.html | 3 |
2 files changed, 11 insertions, 5 deletions
diff --git a/web-app/server.go b/web-app/server.go index adc6cac..c34100f 100644 --- a/web-app/server.go +++ b/web-app/server.go @@ -452,6 +452,7 @@ func Results_Tempest_Changes(w http.ResponseWriter, r *http.Request) { Ref_LAVA_Job int32 `json:"ref_lavajob"` Ref_Status string `json:"ref_status"` Test_Name string `json:"test_name"` + Change_Desc string `json:"change_desc"` Other_Status string `json:"other_status"` Other_LAVA_Job int32 `json:"other_lavajob"` }{} @@ -459,7 +460,9 @@ func Results_Tempest_Changes(w http.ResponseWriter, r *http.Request) { cq := neoism.CypherQuery{ Statement: `MATCH (ref:Tempest:Run)-[refr:HAS_TEST]-(test:Test)-[otherr:HAS_TEST]-(other:Tempest:Run) WHERE ref.lava_job = {ref} AND other.lava_job = {other} AND refr.status <> otherr.status - RETURN ref.lava_job as ref_lavajob, refr.status as ref_status, test.full_name as test_name, otherr.status as other_status, other.lava_job as other_lavajob + RETURN ref.lava_job as ref_lavajob, refr.status as ref_status, test.full_name as test_name, + otherr.status as other_status, other.lava_job as other_lavajob, + refr.status + " -> " + otherr.status as change_desc UNION ALL MATCH (other:Tempest:Run)-[otherr:HAS_TEST]-(test2:Test) WHERE other.lava_job = {other} @@ -468,7 +471,9 @@ func Results_Tempest_Changes(w http.ResponseWriter, r *http.Request) { WHERE ref.lava_job = {ref} WITH ref, refr, test1 WHERE NOT (test1 IN other_tests) - RETURN ref.lava_job as ref_lavajob, refr.status as ref_status, test1.full_name as test_name, null as other_status, null as other_lavajob + RETURN ref.lava_job as ref_lavajob, refr.status as ref_status, test1.full_name as test_name, + null as other_status, null as other_lavajob, + refr.status + " -> Not Present" as change_desc UNION ALL MATCH (ref:Tempest:Run)-[refr:HAS_TEST]-(test1:Test) WHERE ref.lava_job = {ref} @@ -477,7 +482,9 @@ func Results_Tempest_Changes(w http.ResponseWriter, r *http.Request) { WHERE other.lava_job = {other} WITH other, otherr, test2 WHERE NOT (test2 IN ref_tests) - RETURN null as ref_lavajob, null as ref_status, test2.full_name as test_name, otherr.status as other_status, other.lava_job as other_lavajob`, + RETURN null as ref_lavajob, null as ref_status, test2.full_name as test_name, + otherr.status as other_status, other.lava_job as other_lavajob, + "Not Present -> " + otherr.status as change_desc`, Parameters: neoism.Props{ "ref": ref, "other": other, diff --git a/web-app/static/diff.html b/web-app/static/diff.html index da32d74..55496a8 100644 --- a/web-app/static/diff.html +++ b/web-app/static/diff.html @@ -54,9 +54,8 @@ $(function() { "lengthMenu" : [ [-1, 25, 50, 100], ["All", 25, 50, 100] ], "ajax" : { dataSrc: "", url: get_url() }, "columns": [ - { "title" : "Reference Status", "data" : "ref_status" }, { "title" : "Test Name", "data" : "test_name" }, - { "title" : "Compare To Status", "data" : "other_status" }, + { "title" : "Change", "data" : "change_data" }, ] }); }); |