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 2, 2017
1 parent b04212c commit 66a7d2f
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 271 deletions.
Expand Up @@ -236,9 +236,8 @@ class DirectiveManagement extends DispatchSnippet with Loggable {
def initTechniqueDetails(workflowEnabled: Boolean) : MemoizeTransform = SHtml.memoize {
"#techniqueDetails *" #> ( currentTechnique match {
case None =>
".page-title *" #> "Usage" &
"h3 *" #> "Usage" &
"#details *" #> {
<div class="tw-bs">
<div class="col-lg-12">
<div class="col-lg-12 callout-fade callout-warning">
<div class="marker">
Expand All @@ -265,7 +264,6 @@ class DirectiveManagement extends DispatchSnippet with Loggable {
</p>
</div>
</div>
</div>
}

case Some((fullActiveTechnique,version)) =>
Expand Down
13 changes: 1 addition & 12 deletions rudder-web/src/main/webapp/javascript/rudder/angular/filters.js
Expand Up @@ -374,16 +374,5 @@ app.config(function($locationProvider) {
enabled: true,
requireBase: false
});
})

// Adjust tree height
function adjustHeight(treeId){
var tree = $(treeId);
var treeOffset = tree.offset()
if(treeOffset){
var offsetTop = treeOffset.top + 10;
var maxHeight = 'calc(100vh - '+ offsetTop + 'px)';
tree.css('max-height',maxHeight);
}
}
});

12 changes: 7 additions & 5 deletions rudder-web/src/main/webapp/javascript/rudder/rudder.js
Expand Up @@ -650,10 +650,12 @@ function hideFileManager(){
}

//Adjust tree height
function adjustHeight(treeId, height){
function adjustHeight(treeId){
var tree = $(treeId);
var offsetTop = tree.offset().top + 12;
var maxHeight = 'calc(100vh - '+ offsetTop + 'px)';
var cssProp = height ? 'height' : 'max-height'
tree.css(cssProp,maxHeight);
var treeOffset = tree.offset()
if(treeOffset){
var offsetTop = treeOffset.top + 10;
var maxHeight = 'calc(100vh - '+ offsetTop + 'px)';
tree.css('max-height',maxHeight);
}
}

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions rudder-web/src/main/webapp/style/rudder/rudder-menu.css
Expand Up @@ -338,7 +338,7 @@ div.topQuickSearchResults.ac_results li {
.skin-yellow.sidebar-collapse div.topQuickSearchResults.ac_results,.skin-yellow div.topQuickSearchResults.ac_results, .skin-yellow.sidebar-open div.topQuickSearchResults.ac_results {
width: 120px !important;
}
}
}</div>
.tw-bs #searchInput::-webkit-input-placeholder {
color: #964;
-webkit-transition-duration:.3s;
Expand Down Expand Up @@ -1058,7 +1058,6 @@ table.tablewidth{
margin-top:0;
}
#directiveDetails{
border-left: 15px solid #ECF0F5;
max-height:88vh;
}
#directiveDetails{
Expand Down Expand Up @@ -2371,6 +2370,13 @@ ul > li.rudder-form > .input-group.disabled *{
margin-left: 7px;
top: 1px;
}

/* JUMBOTRON */
.rudder-jumbotron > .jumbotron{
background-color:transparent;
padding:60px;
}

@keyframes opacity-1 {
0% {opacity:0;visibility: visible;}
100% {opacity:1;visibility: visible;}
Expand Down
2 changes: 1 addition & 1 deletion rudder-web/src/main/webapp/style/rudder/rudder-tags.css
Expand Up @@ -68,7 +68,7 @@
overflow-y: auto;
overflow-x: hidden;
margin: 0 -10px;
padding: 0 15px;
padding: 0 30px 0 15px;
width: calc(100% + 20px);
}
.filterTag .panel-default{
Expand Down
Expand Up @@ -22,132 +22,136 @@
</component:body>

<component:form>
<div id="editForm">
<link rel="stylesheet" href="/style/rudder/rudder-filemanager.css" />
<script src="/javascript/rudder/angular/fileManager.js" ></script>
<script type="text/javascript" src="/javascript/rudder/angular/passwordForm.js" id="angular-passwordForm"></script>
<script type="text/javascript" src="/javascript/rudder/angular/textForm.js" id="angular-textForm"></script>
<script type="text/javascript" src="/javascript/rudder/angular/tags.js"></script>

<div id="directiveTitle" class="page-title">Directive</div>

<div class="tw-bs">
<link rel="stylesheet" href="/style/rudder/rudder-filemanager.css" />
<script src="/javascript/rudder/angular/fileManager.js" ></script>
<script type="text/javascript" src="/javascript/rudder/angular/passwordForm.js" id="angular-passwordForm"></script>
<script type="text/javascript" src="/javascript/rudder/angular/textForm.js" id="angular-textForm"></script>
<script type="text/javascript" src="/javascript/rudder/angular/tags.js"></script>

<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-cog" aria-hidden="true"></i><span id="directiveTitle">Directive</span></h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-chevron-down"></i></button>
</div>
</div>
<div class="box-body">
<div id="editForm">
<div class="bs-callout bs-callout-warning" id="deprecation-warning" role="alert">
<h4>Technique version deprecated</h4>
<div>This Directive uses a version of this Technique that is deprecated: <span id="deprecation-message"></span>.<br/>
Please upgrade to a new version: <span id="migrate-button"></span>
</div>
</div>
</div>

<lift:authz role="directive_edit">
<div id="pendingChangeRequestNotification">
<div class="page-title">Pending change requests</div>
<br />
<div>
<img src="/images/icWarn.png" alt="Warning!" height="32" width="32" class="warnicon"/>
<div style="float:left">
The following pending change requests affect this Directive, you should check that your modification is not already pending:
<ul id="changeRequestList"></ul>
<lift:authz role="directive_edit">
<div class="col-lg-12 callout-fade callout-warning" id="pendingChangeRequestNotification">
<div class="marker">
<span class="glyphicon glyphicon-info-sign"></span>
</div>
<h4>Pending change requests</h4>
<p>
The following pending change requests affect this Directive, you should check that your modification is not already pending:
</p>
<ul id="changeRequestList"></ul>
</div>
</div>
<hr class="spacer"/>
</lift:authz>

<div id="directiveInfoTab" class="unfoldedSection" onclick="$('#directiveInfo').toggle(400); $('#directiveInfoTab').toggleClass('foldedSection');$('#directiveInfoTab').toggleClass('unfoldedSection');">
<div class="section-title">Directive information</div>
</div>
<div id="directiveInfo" class="tw-bs">
<div id="nameField">
Here comes the name field
</div>
<div id="tagField">
Here comes the tag field
</div>
<div id="shortDescriptionField">
Here comes the shortDescription field
</div>
<div id="longDescriptionField">
Here comes the longDescription field
</div>
<div id="priority">
Here come the priority field
</div>
<div id="policyModes">
Here come the policy mode field
</div>
<div id="version">
Here come the version field
</div>
<div id="migrate">
Here come the migrate field
</div>
<div class="directiveTechnicalInfo" id="showTechnical"></div>
<div id="technicalDetails" style="display:none" class="well">
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Technique name</label>
<div id="techniqueName">
Technique name
</div>
</lift:authz>

<div id="directiveInfoTab" class="unfoldedSection" onclick="$('#directiveInfo').toggle(400); $('#directiveInfoTab').toggleClass('foldedSection');$('#directiveInfoTab').toggleClass('unfoldedSection');">
<div class="section-title">Directive information</div>
</div>
<div id="directiveInfo" class="tw-bs">
<div id="nameField">
Here comes the name field
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Technique description</label>
<div id="techniqueDescription" class="fake-form-control textarea readonly">
Technique description
</div>
<div id="tagField">
Here comes the tag field
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Technique unicity</label>
<div id="isSingle" class="fake-form-control readonly">
isSingle
</div>
<div id="shortDescriptionField">
Here comes the shortDescription field
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Supported operating systems</label>
<div id="compatibilityOs" class="fake-form-control readonly">
System Compatibility
</div>
<div id="longDescriptionField">
Here comes the longDescription field
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Supported agents</label>
<div id="compatibilityAgent" class="fake-form-control readonly">
System Compatibility
</div>
<div id="priority">
Here come the priority field
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Directive Rudder ID</label>
<div id="rudderID" class="fake-form-control readonly">
Here comes the rudder ID
<div id="policyModes">
Here come the policy mode field
</div>
<div id="version">
Here come the version field
</div>
<div id="migrate">
Here come the migrate field
</div>
<div class="directiveTechnicalInfo" id="showTechnical"></div>
<div id="technicalDetails" style="display:none" class="well">
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Technique name</label>
<div id="techniqueName">
Technique name
</div>
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Technique description</label>
<div id="techniqueDescription" class="fake-form-control textarea readonly">
Technique description
</div>
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Technique unicity</label>
<div id="isSingle" class="fake-form-control readonly">
isSingle
</div>
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Supported operating systems</label>
<div id="compatibilityOs" class="fake-form-control readonly">
System Compatibility
</div>
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Supported agents</label>
<div id="compatibilityAgent" class="fake-form-control readonly">
System Compatibility
</div>
</div>
<div class="directiveTechnicalInfo row wbBaseField form-group">
<label>Directive Rudder ID</label>
<div id="rudderID" class="fake-form-control readonly">
Here comes the rudder ID
</div>
</div>
</div>
</div>
</div>
<div id="directiveParametersTab" class="unfoldedSection" onclick="$('#parameters').toggle(400); $('#directiveParametersTab').toggleClass('foldedSection');$('#directiveParametersTab').toggleClass('unfoldedSection');">
<div class="section-title">Parameters</div>
<div id="notifications"></div>
</div>
<div id="parameters">Here goes the list of parameters</div>

<div id="ruleTargetSection" class="unfoldedSection" onclick="$('#directiveRulesTab').toggle(400); $('#ruleTargetSection').toggleClass('foldedSection');$('#ruleTargetSection').toggleClass('unfoldedSection');">
<div class="section-title">Target Rules</div>
<div id="directiveParametersTab" class="unfoldedSection" onclick="$('#parameters').toggle(400); $('#directiveParametersTab').toggleClass('foldedSection');$('#directiveParametersTab').toggleClass('unfoldedSection');">
<div class="section-title">Parameters</div>
<div id="notifications"></div>
</div>
<div id="directiveRulesTab" class="tw-bs"></div>

<lift:authz role="directive_edit">
<div class="fixed-footer directive-footer tw-bs">
<div id="removeAction" style="float:left">
<div id="parameters">Here goes the list of parameters</div>

<div id="ruleTargetSection" class="unfoldedSection" onclick="$('#directiveRulesTab').toggle(400); $('#ruleTargetSection').toggleClass('foldedSection');$('#ruleTargetSection').toggleClass('unfoldedSection');">
<div class="section-title">Target Rules</div>
</div>
<div id="directiveRulesTab" class="tw-bs"></div>

<lift:authz role="directive_edit">
<div class="fixed-footer directive-footer tw-bs">
<div id="removeAction" style="float:left">
</div>
<div id="desactivateAction" style="float:left; margin-left:20px;">
</div>
<button id="clone">[Clone]</button>
<div class="cpiefsave">
<button id="save">Save</button>
</div>
</div>
</lift:authz>
<br/>
</div>
<div id="desactivateAction" style="float:left; margin-left:20px;">
</div>
<button id="clone">[Clone]</button>
<div class="cpiefsave">
<button id="save">Save</button>
</div>
</div>
</lift:authz>
<br/>
</div>
<div class="tw-bs">
<div id="removeActionDialog" class="modal fade" data-keyboard="true" tabindex="-1"></div>
</div>
Expand Down
Expand Up @@ -24,7 +24,6 @@
margin-top:10px;
font-size:0.9em;
}

.editZone {
margin-top:30px;
}
Expand Down Expand Up @@ -126,8 +125,6 @@
</div>
</component:details>



<component:form>
<div class="object-details">

Expand Down

0 comments on commit 66a7d2f

Please sign in to comment.