Skip to content

Commit

Permalink
#1478 Remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 13, 2020
1 parent 241c0be commit 3c86297
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions migration/src/main/scala/org/thp/thehive/migration/Migrate.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.thp.thehive.migration

import java.io.File
import java.text.SimpleDateFormat
import java.util.Date

import akka.actor.ActorSystem
import akka.stream.Materializer
Expand Down Expand Up @@ -76,11 +74,11 @@ object Migrate extends App with MigrationOps {
opt[String]("case-from-date")
.valueName("<date>")
.text("migrate only cases created from <date>")
.action((v, c) => addConfig(c, "input.filter.caseFromDate" -> v.toString)),
.action((v, c) => addConfig(c, "input.filter.caseFromDate" -> v)),
opt[String]("case-until-date")
.valueName("<date>")
.text("migrate only cases created until <date>")
.action((v, c) => addConfig(c, "input.filter.caseUntilDate" -> v.toString)),
.action((v, c) => addConfig(c, "input.filter.caseUntilDate" -> v)),
/* case number */
opt[Duration]("case-from-number")
.valueName("<number>")
Expand All @@ -102,11 +100,11 @@ object Migrate extends App with MigrationOps {
opt[String]("alert-from-date")
.valueName("<date>")
.text("migrate only alerts created from <date>")
.action((v, c) => addConfig(c, "input.filter.alertFromDate" -> v.toString)),
.action((v, c) => addConfig(c, "input.filter.alertFromDate" -> v)),
opt[String]("alert-until-date")
.valueName("<date>")
.text("migrate only alerts created until <date>")
.action((v, c) => addConfig(c, "input.filter.alertUntilDate" -> v.toString)),
.action((v, c) => addConfig(c, "input.filter.alertUntilDate" -> v)),
/* audit age */
opt[Duration]("max-audit-age")
.valueName("<duration>")
Expand All @@ -119,11 +117,11 @@ object Migrate extends App with MigrationOps {
opt[String]("audit-from-date")
.valueName("<date>")
.text("migrate only audits created from <date>")
.action((v, c) => addConfig(c, "input.filter.auditFromDate" -> v.toString)),
.action((v, c) => addConfig(c, "input.filter.auditFromDate" -> v)),
opt[String]("audit-until-date")
.valueName("<date>")
.text("migrate only audits created until <date>")
.action((v, c) => addConfig(c, "input.filter.auditUntilDate" -> v.toString)),
.action((v, c) => addConfig(c, "input.filter.auditUntilDate" -> v)),
note("Accepted date formats are \"yyyyMMdd[HH[mm[ss]]]\" and \"MMdd\""),
note(
"The Format for duration is: <length> <unit>.\n" +
Expand Down

0 comments on commit 3c86297

Please # to comment.