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 1, 2017
1 parent b04212c commit b163a7b
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 255 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,53 +32,47 @@
}
</style>
<link media="screen" href="/style/rudder/rudder-tags.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="/javascript/rudder/tree-tag-plugin.js"></script>
<script type="text/javascript" src="/javascript/rudder/angular/filters.js"></script>
<script type="text/javascript" src="/javascript/rudder/directive.js"></script>
</head>

<div data-lift="configuration.DirectiveManagement.head"></div>

<div class="tw-bs col-sm directiveTree">
<div class="page-title">Directive Library
<lift:authz role="technique_write">
<a class="btn btn-primary btn-xs pull-right editTech" href="/secure/utilities/techniqueEditor">Edit Techniques</a>
</lift:authz></div>
<div id="activeTechniquesTree_actions_zone" ng-controller="filterTagDirectiveCtrl" ng-cloak>
<div class="tree">
<div class="filter-tree">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-sm btn-default" aria-label="Bold" onclick="toggleTree('#activeTechniquesTree', this);">
<span class="fa fa-folder fa-folder-open"></span>
</button>
</div>
<input class="form-control input-sm" placeholder="Filter" id="treeSearch" ng-model="searchStr" ng-keydown="refuseEnter($event)" ng-keyup="searchTree('#activeTechniquesTree')">
<div class="input-group-btn">
<button type="button" class="btn btn-default btn-sm" aria-label="Bold" ng-click="clearSearchFieldTree('#activeTechniquesTree');" >
<span class="fa fa-times"></span>
</button>
<div class="tw-bs no-background">
<div class="row col-small-padding">
<div class="col-xs-12 col-lg-3 col-md-4">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-filter" aria-hidden="true"></i>Filters</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>
</div>
<div class="clearfix "></div>
<div id="showFiltersDirective" class="filters">
<div class="filters-container">
<form class="filterTag">
<div class="panel-group" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" href="#form-tag" ng-click="toggleFilter('#stateFilterTag')" aria-expanded="true" aria-controls="form-tag">
<i class="fa fa-filter moreFilters" aria-hidden="true"></i> More filters
<span id="stateFilterTag" class="glyphicon glyphicon-chevron-down pull-right"></span>
</a>
</h4>
<div class="box-body">
<div id="activeTechniquesTree_actions_zone" ng-controller="filterTagDirectiveCtrl" ng-cloak>
<div class="tree">
<div class="filter-tree">
<div class="input-group search-addon">
<div class="input-group-btn">
<button type="button" class="btn btn-sm btn-default" aria-label="Bold" onclick="toggleTree('#activeTechniquesTree', this);">
<span class="fa fa-folder fa-folder-open"></span>
</button>
</div>
<input class="form-control input-sm" placeholder="Filter" id="treeSearch" ng-model="searchStr" ng-keydown="refuseEnter($event)" ng-keyup="searchTree('#activeTechniquesTree')">
<div class="input-group-btn">
<button type="button" class="btn btn-default btn-sm" aria-label="Bold" ng-click="clearSearchFieldTree('#activeTechniquesTree');" >
<span class="fa fa-times"></span>
</button>
</div>
</div>
<div id="form-tag" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
</div>
</div>
<div class="clearfix "></div>
<div id="showFiltersDirective" class="filters">
<div class="filters-container">
<form class="filterTag">
<div id="form-tag">
<div class="form-group">
<label>Tags</label>
<div class="input-group">
Expand All @@ -97,8 +91,6 @@ <h4 class="panel-title">
</button>
</div>
</div>
</div>
<div class="panel-footer">
<div class="tags-container" ng-show="tags.length>0">
<div class="btn-group btn-group-xs" role="group" ng-repeat="tag in tags track by $index">
<button class="btn btn-default tag" ng-class="{'onlyKey':only.key, 'onlyValue':only.value, 'already-exist':tag.alreadyExist}" ng-click="modifyTag($index,tag)" >
Expand All @@ -116,121 +108,135 @@ <h4 class="panel-title">
<span class="fa fa-times"></span>
</button>
</div>

</div>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="activeTechniquesTree_alert" style="display:none"><div class="alert alert-warning"><i class="fa fa-exclamation-triangle"></i>No directives match your filter.</div></div>
<hr class="separator-filter-tree">
<div data-lift="configuration.DirectiveManagement.userLibrary" ></div>
</div>

<div class="col col-xl" id="directiveDetails">

<div data-lift="configuration.DirectiveManagement.techniqueDetails">
<div id="techniqueDetails" ng-app="techniqueDetails" >
<div class="page-title">Technique information</div>
<div id="details">
<div id="directiveIntro">
The Directive <b class="directive">[Directive]</b> is based on following Technique:
</div>
</div>
<div>
<h3><span id="techniqueName">[Technique name]</span></h3>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-list" aria-hidden="true"></i>Directive library</h3>
<div class="box-tools pull-right">
<lift:authz role="technique_write">
<a class="new-icon btn btn-primary btn-xs" href="/secure/utilities/techniqueEditor">Edit Techniques</a>
</lift:authz>
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-chevron-down"></i></button>
</div>
</div><!-- /.box-header -->
<div class="box-body" style="padding-top:0">
<div id="activeTechniquesTree_alert" style="display:none">
<div class="alert alert-warning">
<i class="fa fa-exclamation-triangle"></i>
No directives match your filter.
</div>
</div>
<hr class="separator-filter-tree">
<div data-lift="configuration.DirectiveManagement.userLibrary" ></div>
</div>
<br/>
<fieldset class="deca">
<legend>Description</legend>
<span id="techniqueDescription">[technique.description]</span>
</fieldset>
<div class="groupDiv">
<fieldset class="deca">
<legend>Characteristics</legend>
<p id="techniqueLongDescription">[technique.longDescription]</p>
<p id="isSingle">[Unique Technique]</p>
<p><span id="compatibility">[Supported operating systems : debian-5]</span></p>
</fieldset>
</div>
</div>

<div id="directiveDetails" class="col-xs-12 col-lg-9 col-md-8">
<div data-lift="configuration.DirectiveManagement.techniqueDetails">
<div id="techniqueDetails" ng-app="techniqueDetails" class="rudder-jumbotron">
<div class="jumbotron">
<h2>Technique information</h2>
<div id="details">
<div id="directiveIntro">
The Directive <b class="directive">[Directive]</b> is based on following Technique:
</div>
<h3><span id="techniqueName">[Technique name]</span></h3>
<br/>
<fieldset class="deca">
<legend>Description</legend>
<span id="techniqueDescription">[technique.description]</span>
</fieldset>
<div class="groupDiv">
<fieldset class="deca">
<legend>Characteristics</legend>
<p id="techniqueLongDescription">[technique.longDescription]</p>
<p id="isSingle">[Unique Technique]</p>
<p><span id="compatibility">[Supported operating systems : debian-5]</span></p>
</fieldset>
</div>
<fieldset class="deca" id="techniqueVersion" ng-controller="techniqueVersion">
<legend>Available versions</legend>
<table id="versionTable">
<thead>
<tr>
<th>Version</th>
<th>Last updated on</th>
<lift:authz role="directive_write">
<th>Use this version</th>
</lift:authz>
</tr>
</thead>
<tbody>
<tr ng-repeat="technique in techniques" ng-hide="display(technique)">
<td>{{technique.version}}
<span ng-if="technique.isDeprecated" title="" tooltipid="version_{{$index}}" class="glyphicon glyphicon-info-sign text-danger deprecatedTechniqueIcon tooltipable"></span>
<div ng-if="technique.isDeprecated" class="tooltipContent" id="version_{{$index}}">
<div>Deprecated: {{technique.deprecationMessage}}</div>
</div>
</td>
<td>{{technique.acceptationDate}}</td>
<lift:authz role="directive_write">
<td> <input type="button" ng-click="technique.action()" value="Create Directive" class="btn btn-default btn-xs"/></td>
</lift:authz>
</tr>
</tbody>
</table>
<input id="displayDeprecation" type="checkbox" ng-model="displayDeprecated" /> <label for="displayDeprecation">Display deprecated Technique versions</label>
<div style="text-align: center;">
<lift:authz role="directive_write">
<span>
<input type="button" id="addButton" ng-click="techniques[techniques.length-1].action()" value="Create with latest version" class="btn btn-default"/>
</span>
</lift:authz>
</div>
</fieldset>
</div>
</div>
</div>
<fieldset class="deca" id="techniqueVersion" ng-controller="techniqueVersion">
<legend>Available versions</legend>
<table id="versionTable">
<thead>
<tr>
<th>Version</th>
<th>Last updated on</th>
<lift:authz role="directive_write">
<th>Use this version</th>
</lift:authz>
</tr>
</thead>
<tbody>
<tr ng-repeat="technique in techniques" ng-hide="display(technique)">
<td class="tw-bs">{{technique.version}}
<span ng-if="technique.isDeprecated" title="" tooltipid="version_{{$index}}" class="glyphicon glyphicon-info-sign text-danger deprecatedTechniqueIcon tooltipable"></span>
<div ng-if="technique.isDeprecated" class="tooltipContent" id="version_{{$index}}">
<div>Deprecated: {{technique.deprecationMessage}}</div>
</div>
</td>
<td>{{technique.acceptationDate}}</td>
<lift:authz role="directive_write">
<td class="tw-bs"> <input type="button" ng-click="technique.action()" value="Create Directive" class="btn btn-default btn-xs"/></td>
</lift:authz>
</tr>
</tbody>
</table>
<input id="displayDeprecation" type="checkbox" ng-model="displayDeprecated" /> <label for="displayDeprecation">Display deprecated Technique versions</label>
<div style="text-align: center;">
<lift:authz role="directive_write">
<span class="tw-bs">
<input type="button" id="addButton" ng-click="techniques[techniques.length-1].action()" value="Create with latest version" class="btn btn-default"/>
</span>
</lift:authz>
</div>
</fieldset>
</div>
</div>
</div>

<div class="directiveDetails">
<div data-lift="configuration.DirectiveManagement.showDirectiveDetails" ></div>
</div>
</div>

<div id="createDirectivePopup" class="nodisplay">
<lift:ignore>
This div gets the content of the createDirective injected within
</lift:ignore>
</div>
</div>

<div class="directiveDetails">
<div data-lift="configuration.DirectiveManagement.showDirectiveDetails" ></div>
</div>
</div>
</div>
<div id="createDirectivePopup" class="nodisplay">
<lift:ignore>
This div gets the content of the createDirective injected within
</lift:ignore>
</div>

<div class="tw-bs">
<div id="finishMigrationPopup" class="modal fade" data-keyboard="true" tabindex="-1">
<div class="modal-backdrop fade in" style="height: 100%;"></div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>Finish migration to a new version</h4>
</div>
<div class="modal-body">
<h4 class="col-lg-12 col-sm-12 col-xs-12 text-center">Edit and save the form!</h4>
<p class="col-lg-12 col-sm-12 col-xs-12">
To finish the Directive migration to the new version, you have to edit and save the Directive parameters.
</p>
<p class="col-lg-12 col-sm-12 col-xs-12">
You can cancel the migration by reloading the page or choosing an other Directive in the tree
without saving the form.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
<div class="modal-content">
<div class="modal-header">
<h4>Finish migration to a new version</h4>
</div>
<div class="modal-body">
<h4 class="col-lg-12 col-sm-12 col-xs-12 text-center">Edit and save the form!</h4>
<p class="col-lg-12 col-sm-12 col-xs-12">
To finish the Directive migration to the new version, you have to edit and save the Directive parameters.
</p>
<p class="col-lg-12 col-sm-12 col-xs-12">
You can cancel the migration by reloading the page or choosing an other Directive in the tree
without saving the form.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>

</lift:surround>

10 changes: 8 additions & 2 deletions rudder-web/src/main/webapp/style/rudder/rudder-menu.css
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit b163a7b

Please sign in to comment.