CDAP-735: Update visualization of Spark job metrics

why wrap this in a function?