awx icon indicating copy to clipboard operation
awx copied to clipboard

Enhance the dashboard job summary endpoint

Open jamestalton opened this issue 2 years ago • 3 comments

SUMMARY

Enhance the dashboard job summary endpoint to contain canceled and error job counts.

Jobs have 4 completion states successful, failed, canceled, and error.

The dashboard api endpoint only gives successful and failed, which makes the user think there is something wrong with the dashboard because jobs with an error status do not show up. This PR adds those counts to the dashboard API.

We see this on the new dashboard, where the recent jobs card shows errors but the chart shows none.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API

This PR: https://github.com/ansible/ansible-ui/pull/477 Adds support to the Ansible-UI to use the updated API payload.

This is an example screenshot of what the customer sees without this PR. Notice no red in the graph. :( Screenshot 2023-04-27 at 8 59 32 AM

jamestalton avatar Apr 27 '23 20:04 jamestalton

jmack slack comment Looks good. The query filtering and data extraction operations are the same code repeated so that could probably be consolidated since were doing it four times now

jamestalton avatar May 03 '23 13:05 jamestalton

from alancoding in slack Strictly from the API side, we should expand tests to check the new fields you're adding, we probably already have some dashboard tests for counts, so I think it's unlikely this would be new tests, just expanding what's there well I'm coming up with a surprising shortage of dashboard tests... Since this gives global counts, I think the best format for the test would be an API unit test for the view.

jamestalton avatar May 03 '23 13:05 jamestalton

Let's make sure those 3 merge commits don't make their way into devel. Either rebase this manually prior to, or choose the squash option when clicking the merge button.

shanemcd avatar May 03 '23 15:05 shanemcd