Skip to content

Adding a new Datasource

JayWebz edited this page Jul 1, 2021 · 8 revisions

Alberto mentioned in a meeting on 1 July 2021 -

It would be useful in the graphs to have 4 lines instead of 3. Modifying only the xy plot call to get 4 datasources. That means the api would return 4 for the xy plot only, and not necessarily for the tables.

New datasource checklist

ETA with completing this list for a new datasource would be ~ 1-3 days.

Entity.js

  • constructor()
    • new state items for
      • rawRegionalSignalsRaw
      • rawRegionalSignalsProcessed
      • rawAsnSignalsRaw
      • rawAsnSignalsProcessed
      • rawRegionalSignalsLoaded
      • rawAsnSignalsLoaded
      • additionalRawSignalRequested
  • componentDidUpdate()
    • Raw Signals data comes in by each data source, update api call to cycle through what returns in the datasources api call.
    • Will need to merge componentDidUpdate raw signals for each datasource ~291
      • Search for this.props.rawRegionalSignalsPingSlash24
    • Will need to update componentDidUpdate additional raw signals for each datasource right below the above item.
      • Search for this.props.additionalRawSignals
  • createXyVizDataObject()
    • when converting values for Xy Plot, a new case will need to be added to process the plotted coordinates
  • convertValuesForXyViz()
    • It takes each datasource as a parameter and uses that to populate color/line information, which will need to be preset.
    • Returns each datasource item in an array.
    • when converting values for Xy Plot, a new case will need to be added to process the plotted coordinates and find min/max values.
    • Additional legend text will need to be added. near the bottom of the function, a switch statement that depicts which legend text to populate.
    • set the data object with additional datasource to populate in the xy plot, last line in function before callback.
  • genEntityRelatedRow()
    • add parameter for raw Regional and ASN signals as well as additionaRawSignalRequested
  • getSignalsHtsDataEvents()
    • at datasource in switch case to create datasource-specific api call for both regions and asns
  • combineValuesForSignalsTable()
    • add function call for telling the api which datasource to call for
  • convertValuesForHtsViz()
    • Add switch case for setting state of datasource data
    • Add switch case for setting state with new array that dictates what populates
  • populateHtsChart()
    • add switch case for setting variables
    • add switch case for tracking loading status, additional loading states
  • toggleEntityVisibilityInHtsViz()
    • switch statement to call convertValuesForHtsViz again will need additional call for new datasource
    • new state boolean for additionalRawSignalRequested on new datasource
  • handleSelectAndDeselectAllButtons()
    • add new call for calling convertValuesForHtsViz on new datasource in all four conditionals in the function
  • handleCheckboxEventLoading()
    • set state on additionalRawSignalRequested boolean for new datasource

SummaryTableRow.js

  • constructor()
    • new state for datasourceAvailable
  • componentDidMount()
    • add switch case for if scores are available on new datasource
  • render()
    • add new element to ui for populating summary table outage block to the right of the score
    • will need to add new color to the table css file as well

ActionSignals.js

  • Add unique new action function for new datasource

DataReducer.js

  • Add new initial state item for asn/region
  • Add new Reducer case for asn/region