Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #7207: Select and display agent mode (verify/enforce)
- Loading branch information
1 parent
71a5bfe
commit 9859b6b
Showing
37 changed files
with
2,363 additions
and
612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
rudder-web/src/main/scala/com/normation/rudder/web/components/AgentPolicyModeEditForm.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.normation.rudder.web.components | ||
|
||
import net.liftweb.http.DispatchSnippet | ||
import net.liftweb.common._ | ||
import net.liftweb.http.{SHtml,S} | ||
import scala.xml._ | ||
import net.liftweb.http.js._ | ||
import JsCmds._ | ||
import JE._ | ||
import net.liftweb.util.Helpers | ||
import net.liftweb.util.Helpers._ | ||
import net.liftweb.http.Templates | ||
|
||
class AgentPolicyModeEditForm extends DispatchSnippet with Loggable { | ||
|
||
// Html template | ||
def templatePath = List("templates-hidden", "components", "ComponentAgentPolicyMode") | ||
def template() = Templates(templatePath) match { | ||
case Empty | Failure(_,_,_) => | ||
sys.error("Template for Agent Policy Mode configuration not found. I was looking for %s.html" | ||
.format(templatePath.mkString("/"))) | ||
case Full(n) => n | ||
} | ||
def agentPolicyModeTemplate = chooseTemplate("agentpolicymode", "form", template) | ||
|
||
def dispatch = { | ||
case "cfagentPolicyModeConfiguration" => (xml) => cfagentPolicyModeConfiguration | ||
} | ||
|
||
def cfagentPolicyModeConfiguration = { | ||
agentPolicyModeTemplate ++ Script(OnLoad(JsRaw("angular.bootstrap('#auditMode', ['auditmode']);"))) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.