Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelGauthier committed Aug 9, 2017
1 parent 9bf513a commit 4d04eb6
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 5 deletions.
Expand Up @@ -71,7 +71,8 @@ class AsyncDeployment extends CometActor with CometListener with Loggable {
private[this] val eventList = RudderConfig.eventListDisplayer
private[this] val uuidGen = RudderConfig.stringUuidGenerator
private[this] val clearCache = new ClearCache()

private[this] val updatePTLibService = RudderConfig.updateTechniqueLibrary
private[this] val updateDynamicGroups = RudderConfig.updateDynamicGroups
//current states of the deployment
private[this] var deploymentStatus = DeploymentStatus(NoStatus, IdleDeployer)

Expand Down Expand Up @@ -218,13 +219,50 @@ class AsyncDeployment extends CometActor with CometListener with Loggable {
val callback = JsRaw("$('#generatePoliciesDialog').bsModal('show');")
<lift:authz role="deployment_write"> {
SHtml.a(
Text("Regenerate all policies")
<span>Regenerate all policies</span><i class="icon-popover fa fa-info-circle" data-original-title="Regenerate all policies" data-content="This technique is using at least one deprecated generic method." rel="popover" data-placement="bottom" data-html="true" data-trigger="hover" data-container="body"></i>
, callback
, ("class","regeneratePolicies")
)
}
</lift:authz>
}
private[this] def reloadTechniques : NodeSeq = {
def process = {
updatePTLibService.update(ModificationId(uuidGen.newUuid), CurrentUser.getActor, Some("Technique library reloaded by user")) match {
case Full(x) =>
//S.notice("updateLib", "The Technique library was successfully reloaded")
case e:EmptyBox =>
val error = e ?~! "An error occured when updating the Technique library from file system"
logger.debug(error.messageChain, e)
//S.error("updateLib", error.msg)
}
}
<lift:authz role="deployment_write"> {
SHtml.a( {
() =>
process _
Noop
}
, <span>Reload Techniques</span><i class="fa fa-info-circle"></i>
)
}
</lift:authz>
}
private[this] def reloadDynamicGroups : NodeSeq = {
def process = {
updateDynamicGroups.startManualUpdate
}
<lift:authz role="deployment_write"> {
SHtml.a( {
() =>
process _
Noop
}
, <span>Reload dynamic groups</span><i class="fa fa-info-circle"></i>
)
}
</lift:authz>
}
private[this] def layout = {
<lift:authz role="deployment_read">
<li class="dropdown notifications-menu">
Expand All @@ -242,6 +280,13 @@ class AsyncDeployment extends CometActor with CometListener with Loggable {
<li class="footer">
{showGeneratePoliciesPopup}
</li>
<li class="separator"></li>
<li class="footer">
{reloadTechniques}
</li>
<li class="footer">
{reloadDynamicGroups}
</li>
</ul>
</li>
{errorPopup}
Expand Down
16 changes: 13 additions & 3 deletions rudder-web/src/main/webapp/style/rudder/rudder-menu.css
Expand Up @@ -671,6 +671,18 @@ a.sidebar-toggle{
color:#fff;
height: 100%;
}
ul.dropdown-menu li.footer > a > i.fa{
position: relative;
top: 1px;
left: 8px;
color:#999;
font-size: 16px;
margin: 0;
transition-duration:.2s;
}
ul.dropdown-menu li.footer > a > i.fa:hover{
color:#777;
}
.tw-bs .navbar-nav li.dropdown {
height: 50px;
}
Expand Down Expand Up @@ -1467,9 +1479,7 @@ form .tooltip-content p {
transform:rotate(-45deg);
transition-duration:.2s;
}
.callout-fade:hover div.marker span.glyphicon,.callout-fade:hover div.marker span.fa{
transform:rotate(-65deg);
}

/* --- SUCCESS --- */
.callout-fade.callout-success{
border-left-color: #9bc832;
Expand Down

0 comments on commit 4d04eb6

Please sign in to comment.