diff --git a/admin/app/com/lucidchart/piezo/admin/controllers/Jobs.scala b/admin/app/com/lucidchart/piezo/admin/controllers/Jobs.scala
index 89851956..deb75b31 100644
--- a/admin/app/com/lucidchart/piezo/admin/controllers/Jobs.scala
+++ b/admin/app/com/lucidchart/piezo/admin/controllers/Jobs.scala
@@ -485,24 +485,14 @@ class Jobs(
)
}
- def jobGroupTypeAhead(sofar: String): Action[AnyContent] = Action { request =>
- val groups = scheduler.getJobGroupNames().asScala.toList
-
- Ok(Json.obj("groups" -> groups.filter { group =>
- group.toLowerCase.contains(sofar.toLowerCase)
- }))
- }
-
- def jobNameTypeAhead(group: String, sofar: String): Action[AnyContent] =
+ def jobNameTypeAhead(group: String): Action[AnyContent] =
Action { request =>
val jobs =
scheduler.getJobKeys(GroupMatcher.jobGroupEquals(group)).asScala.toSet
Ok(
- Json.obj(
- "jobs" -> jobs
- .filter(_.getName.toLowerCase.contains(sofar.toLowerCase))
- .map(_.getName),
+ Json.toJson(
+ jobs.map(_.getName),
),
)
}
diff --git a/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala b/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala
index c4adc9b0..a67bec16 100644
--- a/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala
+++ b/admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala
@@ -181,6 +181,7 @@ class Triggers(
Ok(
com.lucidchart.piezo.admin.views.html.editTrigger(
TriggerHelper.getTriggersByGroup(scheduler),
+ scheduler.getJobGroupNames().asScala,
monitoringTeams.value,
newTriggerForm,
formNewAction,
@@ -225,6 +226,7 @@ class Triggers(
Ok(
com.lucidchart.piezo.admin.views.html.editTrigger(
TriggerHelper.getTriggersByGroup(scheduler),
+ scheduler.getJobGroupNames().asScala,
monitoringTeams.value,
editTriggerForm,
formNewAction,
@@ -236,6 +238,7 @@ class Triggers(
Ok(
com.lucidchart.piezo.admin.views.html.editTrigger(
TriggerHelper.getTriggersByGroup(scheduler),
+ scheduler.getJobGroupNames().asScala,
monitoringTeams.value,
editTriggerForm,
formEditAction(group, name),
@@ -259,6 +262,7 @@ class Triggers(
BadRequest(
com.lucidchart.piezo.admin.views.html.editTrigger(
TriggerHelper.getTriggersByGroup(scheduler),
+ scheduler.getJobGroupNames().asScala,
monitoringTeams.value,
formWithErrors,
formEditAction(group, name),
@@ -289,6 +293,7 @@ class Triggers(
BadRequest(
com.lucidchart.piezo.admin.views.html.editTrigger(
TriggerHelper.getTriggersByGroup(scheduler),
+ scheduler.getJobGroupNames().asScala,
monitoringTeams.value,
formWithErrors,
formNewAction,
@@ -316,6 +321,7 @@ class Triggers(
Ok(
com.lucidchart.piezo.admin.views.html.editTrigger(
TriggerHelper.getTriggersByGroup(scheduler),
+ scheduler.getJobGroupNames().asScala,
monitoringTeams.value,
form,
formNewAction,
@@ -329,14 +335,6 @@ class Triggers(
)
}
- def triggerGroupTypeAhead(sofar: String): Action[AnyContent] = Action { implicit request =>
- val groups = scheduler.getTriggerGroupNames().asScala.toList
-
- Ok(Json.obj("groups" -> groups.filter { group =>
- group.toLowerCase.contains(sofar.toLowerCase)
- }))
- }
-
def triggerJob(group: String, name: String): Action[AnyContent] = Action { request =>
val jobKey = new JobKey(name, group)
diff --git a/admin/app/com/lucidchart/piezo/admin/views/Icon.scala b/admin/app/com/lucidchart/piezo/admin/views/Icon.scala
new file mode 100644
index 00000000..eae9c9b2
--- /dev/null
+++ b/admin/app/com/lucidchart/piezo/admin/views/Icon.scala
@@ -0,0 +1,93 @@
+package com.lucidchart.piezo.admin.views
+
+import play.twirl.api.Html
+
+object Icon {
+ private def icon(name: String, body: String): Html =
+ Html(
+ s"""""",
+ )
+
+ // The content for these SVGs was taken from https://icons.getbootstrap.com/
+ // But only the body of the svg was kept, to factor out the boilerplate
+ //
+ // They are licensed under the following terms:
+ // The MIT License (MIT)
+ //
+ // Copyright (c) 2019-2024 The Bootstrap Authors
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
+ // of this software and associated documentation files (the "Software"), to deal
+ // in the Software without restriction, including without limitation the rights
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ // copies of the Software, and to permit persons to whom the Software is
+ // furnished to do so, subject to the following conditions:
+ //
+ // The above copyright notice and this permission notice shall be included in
+ // all copies or substantial portions of the Software.
+ //
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ // THE SOFTWARE.
+
+ val download: Html = icon(
+ "download",
+ """
+
Piezo was created by Lucid Software, Inc. to provide management tools for quartz scheduler clusters. -