feat(api): add Grafana test endpoint for table format
Add `/api/v2/test/grafana-table` endpoint to validate Grafana table format compatibility before implementing the full time range API. - Create server/grafana.go with table format structures - Add structured logging and OpenTelemetry tracing - Include realistic NTP Pool sample data with null handling - Set proper CORS and cache headers for testing - Update implementation plan with Phase 0 completion status Ready for Grafana JSON API data source integration testing.
This commit is contained in:
@@ -179,7 +179,7 @@ func (srv *Server) Run() error {
|
||||
|
||||
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
|
||||
AllowOrigins: []string{
|
||||
"http://localhost", "http://localhost:5173", "http://localhost:8080",
|
||||
"http://localhost", "http://localhost:5173", "http://localhost:5174", "http://localhost:8080",
|
||||
"https://www.ntppool.org", "https://*.ntppool.org",
|
||||
"https://web.beta.grundclock.com", "https://manage.beta.grundclock.com",
|
||||
"https:/*.askdev.grundclock.com",
|
||||
@@ -208,6 +208,7 @@ func (srv *Server) Run() error {
|
||||
e.GET("/api/server/dns/answers/:server", srv.dnsAnswers)
|
||||
e.GET("/api/server/scores/:server/:mode", srv.history)
|
||||
e.GET("/api/dns/counts", srv.dnsQueryCounts)
|
||||
e.GET("/api/v2/test/grafana-table", srv.testGrafanaTable)
|
||||
|
||||
if len(ntpconf.WebHostname()) > 0 {
|
||||
e.POST("/api/server/scores/:server/:mode", func(c echo.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user