Skip to content

Commit

Permalink
Dashboard: N/A instead of NULL readiness while assessment job hasn't …
Browse files Browse the repository at this point in the history
…yet provided any data (#1910)
  • Loading branch information
asnare authored Jun 14, 2024
1 parent 425c49f commit b80a7e1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- viz type=counter, name=Workspace UC readiness, counter_label=UC readiness, value_column=readiness
-- widget row=1, col=0, size_x=1, size_y=3
WITH raw AS (
SELECT object_type, object_id, IF(failures == '[]', 1, 0) AS ready
SELECT object_type, object_id, IF(failures == '[]', 1, 0) AS ready
FROM $inventory.objects
)
SELECT CONCAT(ROUND(SUM(ready) / COUNT(*) * 100, 1), '%') AS readiness FROM raw
SELECT COALESCE(CONCAT(ROUND(SUM(ready) / COUNT(*) * 100, 1), '%'), 'N/A') AS readiness FROM raw

0 comments on commit b80a7e1

Please sign in to comment.