CDAP-735: Update visualization of Spark job metrics

if (totalStages) {...}