re-factor how metric thresholds. add continuousQueries to UI.