Refactoring change for the graphs, stats, monitoring data

Review Request #654 — Created Feb. 13, 2025 and submitted

apoorva.sn
AMP
amp_3_7
AA-2611
pmurugaiyan, prajesh, shuinvy

Problem

The data for graphs, stats, monitoring data sent back to UI contains many details of the DB. So refactoring changes to send the required data back to UI. Also the graphs data was showing float values for hits and connections, need changes to convert it to int and also restrict the float value for bandwidth in and out to 2 decimals.

Solution

Am massaging the data as before sending the response to UI

Attached Doc for testing done


Description From Last Updated

https://192.168.85.47:8888/llb/stats -- attributes are duplicated even though its common across the LLB's. https://192.168.85.47:8888/llb/graph_data -- can we change the endpoint from …

pmurugaiyanpmurugaiyan

Thats where models help. Models should be the contract between DB and service layer.

prajeshprajesh

Should this be a part of db layer?

prajeshprajesh
pmurugaiyan
  1. 
      
  2. https://192.168.85.47:8888/llb/stats

    -- attributes are duplicated even though its common across the LLB's.

    https://192.168.85.47:8888/llb/graph_data

    -- can we change the endpoint from 'graph_data' to something relevant like '/llb/metrics-series' or '/llb/device-metrics'

    1. renamed the URL to /llb/stats/historical.

      The attributes are not duplicated for other URL's as attrbutes will differ for one data poin to another sometimes.
      Better to keep the structure same for all URL's from API point.

  3. 
      
prajesh
  1. 
      
  2. Thats where models help. Models should be the contract between DB and service layer.

    1. Yes agree. But for now most of the api's have a very different structure.
      Need to check the data for all API's and then model the data.
      For now I dint want to return the response directly from DB as there are many info related to that, so am massaging data before sending response

  3. Should this be a part of db layer?

    1. Will be taking it as a single story when we have to remodel SLB API's and also introduce GSLB. By that time we would know what will be the generic structure for the data

  4. 
      
apoorva.sn
shuinvy
  1. Ship It!
  2. 
      
prajesh
  1. Ship It!
  2. 
      
apoorva.sn
pmurugaiyan
  1. Ship It!
  2. 
      
apoorva.sn
Review request changed

Status: Closed (submitted)

Loading...