diff --git a/admin/app/com/lucidchart/piezo/admin/controllers/TriggerHelper.scala b/admin/app/com/lucidchart/piezo/admin/controllers/TriggerHelper.scala index bc1d27b..a328e9a 100644 --- a/admin/app/com/lucidchart/piezo/admin/controllers/TriggerHelper.scala +++ b/admin/app/com/lucidchart/piezo/admin/controllers/TriggerHelper.scala @@ -54,7 +54,7 @@ object TriggerHelper { trigger.getKey, ).map { monitoringRecord => (monitoringRecord.priority, monitoringRecord.maxSecondsInError) - }.getOrElse((TriggerMonitoringPriority.Medium, 300)) + }.getOrElse((TriggerMonitoringPriority.Low, 300)) val jobDataMap = trigger.getJobDataMap val job = trigger.getJobKey Json.obj( @@ -65,7 +65,7 @@ object TriggerHelper { "name" -> triggerKey.getName, "description" -> trigger.getDescription, "job-data-map" -> JsObject(jobDataMap.getKeys.toSeq.map(key => key -> JsString(jobDataMap.getString(key)))), - "triggerMonitoringPriority" -> monitoringPriority.toString, + "triggerMonitoringPriority" -> monitoringPriority.name, "triggerMaxErrorTime" -> maxSecondsInError ) ++ schedule } diff --git a/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala b/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala index 65615b7..bfa9322 100644 --- a/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala +++ b/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala @@ -73,10 +73,10 @@ class Triggers(schedulerFactory: WorkerSchedulerFactory, cc: ControllerComponent triggerDetail.getKey ).map { triggerMonitoringRecord => (triggerMonitoringRecord.priority, triggerMonitoringRecord.maxSecondsInError) - }.getOrElse((TriggerMonitoringPriority.Medium, 300)) + }.getOrElse((TriggerMonitoringPriority.Low, 300)) }.getOrElse { logger.error("Failed to get trigger monitoring info") - (TriggerMonitoringPriority.Medium, 300) + (TriggerMonitoringPriority.Low, 300) } Ok( @@ -149,9 +149,7 @@ class Triggers(schedulerFactory: WorkerSchedulerFactory, cc: ControllerComponent jobGroup: String = "", jobName: String = "", templateGroup: Option[String] = None, - templateName: Option[String] = None, - triggerMonitoringPriority: TriggerMonitoringPriority.Value = TriggerMonitoringPriority.Medium, - triggerMaxErrorTime: Int = 300 + templateName: Option[String] = None ) = Action { implicit request => templateGroup match { case Some(group) => getEditTrigger(group, templateName.get, true) @@ -161,7 +159,7 @@ class Triggers(schedulerFactory: WorkerSchedulerFactory, cc: ControllerComponent case "simple" => new DummySimpleTrigger(jobGroup, jobName) } val newTriggerForm = triggerFormHelper.buildTriggerForm.fill( - (dummyTrigger, TriggerMonitoringPriority.Medium, 300) + (dummyTrigger, TriggerMonitoringPriority.Low, 300) ) Ok( com.lucidchart.piezo.admin.views.html.editTrigger( @@ -189,10 +187,10 @@ class Triggers(schedulerFactory: WorkerSchedulerFactory, cc: ControllerComponent triggerDetail.getKey, ).map { triggerMonitoringRecord => (triggerMonitoringRecord.priority, triggerMonitoringRecord.maxSecondsInError) - }.getOrElse((TriggerMonitoringPriority.Medium, 300)) + }.getOrElse((TriggerMonitoringPriority.Low, 300)) }.getOrElse { logger.error("Failed to get trigger monitoring info") - (TriggerMonitoringPriority.Medium, 300) + (TriggerMonitoringPriority.Low, 300) } val editTriggerForm = triggerFormHelper.buildTriggerForm.fill( (triggerDetail, triggerMonitoringPriority, triggerMaxErrorTime) diff --git a/admin/app/com/lucidchart/piezo/admin/views/editTrigger.scala.html b/admin/app/com/lucidchart/piezo/admin/views/editTrigger.scala.html index c217831..a10f1af 100644 --- a/admin/app/com/lucidchart/piezo/admin/views/editTrigger.scala.html +++ b/admin/app/com/lucidchart/piezo/admin/views/editTrigger.scala.html @@ -66,7 +66,7 @@