On Sat, Jan 30, 2021 at 05:53:26PM +0800, Li Yuanchao wrote:
Query the new_refs count data from es, and format it as echart needs, with 'x_params' and 'y_params'. Return it to webapi.
Signed-off-by: Li Yuanchao lyc163mail@163.com
container/web-backend/web-backend | 13 +++++++++++ src/lib/web_backend.rb | 39 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+)
diff --git a/container/web-backend/web-backend b/container/web-backend/web-backend index ff8fcff..6f85f35 100755 --- a/container/web-backend/web-backend +++ b/container/web-backend/web-backend @@ -133,3 +133,16 @@ end get '/get_tbox_state' do get_tbox_state(params) end
+# GET /get_repo_statistics?git_repo=$git_repo +# Response: +# - { +# "title": "new refs statistics", +# "unit": "times", +# "x_name": "date", +# "x_params": [$date1, ..., $date_today], +# "y_params": [$times_1, ..., $times_today]
how about y_params => $git_repo_times ?
"x_params": [$date1, ..., $date_today], "y_params": [$times_1, ..., $times_today] it's better => "source": [ ["x_params", $date1, ..., $date_today], ["git_repo_1_times", $times_1, ..., $times_today] ] web page can use the "source" directly
Thanks, Weitao