[Why]
wrong number of arguments (given 3, expected 4)
2021-01-18 11:49:46.000000000 +0800 web-backend: 172.17.0.1 - - [18/Jan/2021:03:49:44 UTC] "GET /compare?suite=iperf&dimension=os HTTP/1.1" 500 13
Signed-off-by: Lu Weitao <luweitaobe(a)163.com>
---
src/lib/web_backend.rb | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/lib/web_backend.rb b/src/lib/web_backend.rb
index ea67064..61e3334 100644
--- a/src/lib/web_backend.rb
+++ b/src/lib/web_backend.rb
@@ -186,15 +186,15 @@ end
def do_get_groups_matrices(must, dimension, total, size, from)
job_list = get_dimension_job_list(dimension, must, size, from)
- matrices, suites_hash = combine_group_query_data(job_list, dimension)
+ matrices, suites_hash, latest_jobs_hash = combine_group_query_data(job_list, dimension)
while matrices.empty?
from += size
break if from > total
job_list = get_dimension_job_list(dimension, must, size, from)
- matrices, suites_hash = combine_group_query_data(job_list, dimension)
+ matrices, suites_hash, latest_jobs_hash = combine_group_query_data(job_list, dimension)
end
- [matrices, suites_hash]
+ [matrices, suites_hash, latest_jobs_hash]
end
def get_groups_matrices(conditions, dimension, must, size, from)
@@ -209,11 +209,12 @@ end
def get_compare_body(params)
dimension, conditions = get_dimension_conditions(params)
must = get_es_must(params)
- groups_matrices, suites_hash = get_groups_matrices(conditions, dimension, must, COMPARE_RECORDS_NUMBER, 0)
+ groups_matrices, suites_hash, latest_jobs_hash =
+ get_groups_matrices(conditions, dimension, must, COMPARE_RECORDS_NUMBER, 0)
if !groups_matrices || groups_matrices.empty?
body = 'No Data.'
else
- body = compare_group_matrices(groups_matrices, suites_hash, { no_print: true })
+ body = compare_group_matrices(groups_matrices, suites_hash, latest_jobs_hash, { no_print: true })
body = 'No Difference.' if !body || body.empty?
end
return body
--
2.23.0