Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelGauthier committed Feb 17, 2017
1 parent 370e4f8 commit a9634be
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,37 @@ object DisplayDirectiveTree extends Loggable {
)
}
}

def isDeprecated = {
activeTechnique.techniques.values.forall { t => t.deprecrationInfo.isDefined }
}
def deprecatedIcon = {
if(!isDeprecated){
<span class="fa fa-exclamation text-danger deprecatedTechniqueIcon tooltipable"></span>
}else{
NodeSeq.Empty
}
}
def deprecatedInfo = {
if(!isDeprecated){
<div class="deprecated-info"><span class="fa fa-exclamation text-danger deprecatedTechniqueIcon tooltipable"></span>All versions of this technique are deprecated.</div>
}else{
NodeSeq.Empty
}
}
override def body = {
val tooltipId = Helpers.nextFuncName

//display information (name, etc) relative to last technique version

val xml = activeTechnique.newestAvailableTechnique match {
case Some(technique) =>
<span class="treeActiveTechniqueName tooltipable" tooltipid={tooltipId} title="">{technique.name}
<span class="treeActiveTechniqueName tooltipable" tooltipid={tooltipId} title="">
{technique.name}
{deprecatedIcon}
</span>
<div class="tooltipContent" id={tooltipId}>
<h3>{technique.name}</h3>
<div>{technique.description}</div>
{deprecatedInfo}
</div>
case None =>
<span class="error">The technique with id ''{activeTechnique.techniqueName}'' is missing from repository</span>
Expand Down
7 changes: 7 additions & 0 deletions rudder-web/src/main/webapp/style/rudder/rudder-directives.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,11 @@
padding:10px;
overflow-y:auto;
overflow-x:hidden;
}
.deprecated-info{
color:#a94442;
margin-top:5px;
}
.deprecated-info .deprecatedTechniqueIcon{
margin-right:5px;
}

0 comments on commit a9634be

Please sign in to comment.