Skip to content

Execution run diff

The backend supports a new endpoint /executions/{name}/diff that calculates differences between KPI execution runs.

Allowed query string parameters:

  • days: number (optional) number of days from today or to: Date for which to generate the diff
  • to: Date (optional) the latest date
  • from: Date (optional) the earliest date

QS params combinations:

  • days (today is assumed for to value)
  • or days + to
  • or from + to

The resulting JSON is a map where the key is the date of the run and value contains List<Observation> where values have changed.

Tabs

Add UI to display the differences: I suggest that two tabs are introduced after "KPI Parameter" and "Dimensions" section:

  • Runs
  • Changes

The "Runs" tab should be the default and it should display current components.

The "Changes" tab should render a small form with "To date" (today) and "Days" (10) and "From date" (blank) + "Display changes" button. On click, it should fetch data for specified values.

Displaying changes

The server response contains data by execution run date. This key should be rendered as a <h3> heading.

Rename <RunTable component to <ObservationsTable and change it to accept observations: Observation[] instead of runInfo: ExecutionRun. Update to accept executionType: string instead of execution: Execution.

Add a "highlight" flag to <ObservationsTable highlight ... that then

  • displays negative observation values in red (#ff0000)
  • displays positive values with a + sign and in green (#00ff00)

Display changes using the new <ObservationsTable.

Object.keys(diffs).map(date => {
 <div>
  <h3><PrettyDate value={ date } /></h3>
  <ObservationsTable executionType="COUNT" observations={ diffs[date] } />
 </div>
}
Edited by Matija Obreza
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information