FIX: insert the passed timestamps into time inputs
FIX: Make labels clickable
use the location anchor to store the query
avoid reloading page reload on submit
use plain query params instead of serialized JSON
The prometheus endpoint and the query endpoint have the SAME parameters now. That means the query conditions can be used for prometheus export as well.
Coverage increased (+3.2%) to 24.015% when pulling 495a76e352d6aa32897bfb16ca8babe0ff624371 on query-refactoring into 57f7a5a40a32ba491028719637aef71afe302a40 on master.
Coverage increased (+2.8%) to 23.599% when pulling db4ca4767327d7ff362126f89141d6b4b87ff8e5 on query-refactoring into 57f7a5a40a32ba491028719637aef71afe302a40 on master.
The prometheus endpoint and the query endpoint have the SAME parameters now. That means the query conditions can be used for prometheus export as well.
Page before:
http://localhost:4444/?query=%7B%22Cond%22%3A%5B%7B%22Field%22%3A%22Timestamp%22%2C%22Operator%22%3A3%2C%22Operand%22%3A%221503609600%22%7D%2C%7B%22Field%22%3A%22Timestamp%22%2C%22Operator%22%3A2%2C%22Operand%22%3A%221503610500%22%7D%2C%7B%22Field%22%3A%22Router%22%2C%22Operator%22%3A0%2C%22Operand%22%3A%22192.168.3.252%22%7D%5D%2C%22Breakdown%22%3A%5B%22SrcAsn%22%2C%22DstAsn%22%5D%2C%22TopN%22%3A15%7D
Page after:
http://localhost:4444/#Timestamp.gt=1503609540&Timestamp.lt=1503610440&Router=192.168.3.252&TopN=15&Breakdown=SrcAsn,DstAsn
Prometheus After:
http://localhost:4444/metrics?Router=192.168.3.252&Breakdown=SrcAsn,DstAsn