Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #16133: Missing diffDisplayer service in 6.0 #2573

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class EventLogDetailsGenerator(
, modificationService : ModificationService
, personIdentService : PersonIdentService
, linkUtil : LinkUtil
, diffDisplayer : DiffDisplayer
) extends Loggable {

private[this] val xmlPretty = new scala.xml.PrettyPrinter(80, 2)
Expand Down Expand Up @@ -302,7 +303,6 @@ class EventLogDetailsGenerator(
xml }

case mod:ModifyRule =>
val diffDisplayer = new DiffDisplayer(linkUtil)
"*" #> { val xml : NodeSeq = logDetailsService.getRuleModifyDetails(mod.details) match {
case Full(modDiff) =>
<div class="evloglmargin">
Expand Down Expand Up @@ -1044,7 +1044,6 @@ class EventLogDetailsGenerator(
}

private[this] def ruleDetails(xml:NodeSeq, rule:Rule, groupLib: FullNodeGroupCategory, rootRuleCategory: RuleCategory) = {
val diffDisplayer = new DiffDisplayer(linkUtil)
(
"#ruleID" #> rule.id.value &
"#ruleName" #> rule.name &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ object RudderConfig extends Loggable {
)
val workflowEventLogService = new WorkflowEventLogServiceImpl(eventLogRepository,uuidGen)
val diffService: DiffService = new DiffServiceImpl()
lazy val diffDisplayer = new DiffDisplayer(linkUtil)
lazy val commitAndDeployChangeRequest : CommitAndDeployChangeRequestService =
new CommitAndDeployChangeRequestServiceImpl(
uuidGen
Expand Down Expand Up @@ -1357,6 +1358,7 @@ object RudderConfig extends Loggable {
, modificationService
, personIdentServiceImpl
, linkUtil
, diffDisplayer
)
private[this] lazy val fileManagerImpl = new FileManager(UPLOAD_ROOT_DIRECTORY)
private[this] lazy val databaseManagerImpl = new DatabaseManagerImpl(reportsRepositoryImpl, updateExpectedRepo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ import com.normation.errors.RudderError
import com.normation.errors.SystemError
import _root_.zio._
import _root_.zio.syntax._
import _root_.zio.clock._
import _root_.zio.random._
import _root_.zio.blocking._
import _root_.zio.console._
import _root_.zio.system.{System => ZSystem}
import _root_.zio.internal._
import com.normation.zio.ZioRuntime
import org.slf4j.Logger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,6 @@ import _root_.zio.internal._
def time = (System.currentTimeMillis()-start).toString


import cats._
import cats.syntax._
import _root_.zio.interop.catz._


Expand Down