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 20, 2019
1 parent 749187f commit ca83ac3
Show file tree
Hide file tree
Showing 24 changed files with 429 additions and 1,474 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ class RuleCompliance (
<div class="section-title">Recent changes</div>
</div>
<div id="recentChanges">
<div class="alert alert-info " style="font-size: 14px">
<div style="width:90%;display:inline-block;">
<span class="glyphicon glyphicon-info-sign"></span>
Details of changes for each period are displayed below the graph. Click to change the selected period.
</div>
<div class="recentChange_refresh">
{SHtml.ajaxButton(<i class="fa fa-refresh"></i>, () => refresh() , ("class","btn btn-primary btn-refresh") , ("title","Refresh"))}
<div class="alert alert-info">
<div>
<span class="glyphicon glyphicon-info-sign"></span>
Details of changes for each period are displayed below the graph. Click to change the selected period.
</div>
<div class="recentChange_refresh">
{SHtml.ajaxButton(<i class="fa fa-refresh"></i>, () => refresh() , ("class","btn btn-primary btn-refresh") , ("title","Refresh"))}
</div>
</div>

<div id="changesChartContainer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ object DisplayNode extends Loggable {
},
"bAutoWidth": false,
"aoColumns": [ {"sWidth": "200px"},{"sWidth": "150px"},{"sWidth": "350px"}],
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>',
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>',
"lengthMenu": [ [10, 25, 50, 100, 500, 1000, -1], [10, 25, 50, 100, 500, 1000, "All"] ],
"pageLength": 25
});
Expand All @@ -133,7 +133,7 @@ object DisplayNode extends Loggable {
val detailsId = htmlId(jsId,"details_")
val softGridDataId = htmlId(jsId,"soft_grid_data_")
val softPanelId = htmlId(jsId,"sd_soft_")
val eltIdswidth = List( ("process",List("50","50","50","60","120","50","100","850"),1),("var",List("200","800"),0))
val eltIdswidth = List( ("process",List("50","50","70","85","120","50","100","850"),1),("var",List("200","800"),0))
val eltIds = List( "vm", "fs", "net","bios", "controllers", "memories", "ports", "processors", "slots", "sounds", "storages", "videos")

JsRaw("var "+softGridDataId +"= null") &
Expand Down Expand Up @@ -161,7 +161,7 @@ object DisplayNode extends Loggable {
"bPaginate": true,
"bAutoWidth": false,
"bInfo":true,
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>',
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>',
"lengthMenu": [ [10, 25, 50, 100, 500, 1000, -1], [10, 25, 50, 100, 500, 1000, "All"] ],
"pageLength": 25
});
Expand Down Expand Up @@ -194,7 +194,7 @@ object DisplayNode extends Loggable {
},
"bAutoWidth": false,
"bInfo":true,
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>',
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>',
"lengthMenu": [ [10, 25, 50, 100, 500, 1000, -1], [10, 25, 50, 100, 500, 1000, "All"] ],
"pageLength": 25
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ class EventListDisplayer(
eventId match {
case None => NodeSeq.Empty
case Some(id) =>
<h4 id={"showParameters%s".format(id)} class="curspoint showParameters" onclick={"showParameters(%s)".format(id)}>
Raw Technical Details
</h4>
<button id={"showParameters%s".format(id)} class="btn btn-default showParameters" onclick={"showParameters(event, %s)".format(id)}>
<b class="action">Show</b> raw technical details
</button>
<pre id={"showParametersInfo%s".format(id)} style="display:none;" class="technical-details">{ event.details.map { n =>xmlPretty.format(n) + "\n"} }</pre>
}
}
Expand Down Expand Up @@ -1628,7 +1628,7 @@ class EventListDisplayer(
, { "sWidth": "100px" }
, { "sWidth": "100px" }
],
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>'
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>'
});
"""))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class NodeGrid(
],
"lengthMenu": [ [10, 25, 50, 100, 500, 1000, -1], [10, 25, 50, 100, 500, 1000, "All"] ],
"pageLength": 25 ,
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>'
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>'
});
"""
) &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class ReportDisplayer(
"oLanguage": {
"sSearch": ""
},
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>',
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>',
"aaSorting": [[ 0, "asc" ]],
"aoColumns": [
${colums}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class TechniqueLibraryManagement extends DispatchSnippet with Loggable {
showTechniqueDetails()
case _ =>
<div id={htmlId_bottomPanel}>
<div class="centertext">
<div class="text-center">
Click on a Technique or a category from user library to
display its details.</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class ParameterManagement extends DispatchSnippet with Loggable {
{ "sWidth": "600px" },
{ "sWidth": "140px" }
],
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>',
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>',
"lengthMenu": [ [10, 25, 50, 100, 500, 1000, -1], [10, 25, 50, 100, 500, 1000, "All"] ],
"pageLength": 25
});
Expand All @@ -190,7 +190,9 @@ class ParameterManagement extends DispatchSnippet with Loggable {
jTr.prop("open", "closed");
$(this).find("td.listclose").removeClass("listclose").addClass("listopen");
#table_var#.fnClose(this);
$(this).removeClass("opened");
} else {
$(this).addClass("opened");
jTr.prop("open", "opened");
$(this).find("td.listopen").removeClass("listopen").addClass("listclose");
var jsid = jTr.attr("jsuuid");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ object PendingHistoryGrid extends Loggable {
},
"aaSorting": [[ 0, "desc" ]],
"sPaginationType": "full_numbers",
"sDom": '<"dataTables_wrapper_top"fl>rt<"dataTables_wrapper_bottom"ip>'
"sDom": '<"dataTables_wrapper_top"f>rt<"dataTables_wrapper_bottom"lip>'
});
$('.dataTables_filter input').attr("placeholder", "Filter");
$("#new_servers_tab").tabs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,6 @@ function createRuleTable(gridId, data, checkboxColumn, actionsColumn, compliance
}
var table = createTable(gridId,data,columns, params, contextPath, refresh, "rules", isPopup);
table.search("").columns().search("");
if(isPopup){
$('#'+gridId).addClass("table table-hover table-striped table-bordered");
}

// Add callback to checkbox column
$("#checkAll").prop("checked", false);
Expand Down Expand Up @@ -1115,9 +1112,6 @@ function createNodeTable(gridId, data, contextPath, refresh) {
var el = '<span>'+sData+state+'</span>';
var nodeLink = $(el);
link.append(nodeLink);
var icon = $("<i>");
icon.addClass("fa fa-search space-left node-details");
link.append(icon);
$(nTd).empty();
$(nTd).append(link);
}
Expand All @@ -1130,7 +1124,7 @@ function createNodeTable(gridId, data, contextPath, refresh) {
, "mDataProp": "osName"
, "sTitle": "OS name"
} , {
"sWidth": "5%"
"sWidth": "7%"
, "mDataProp": "osVersion"
, "sTitle": "OS version"
} , {
Expand Down Expand Up @@ -1161,7 +1155,7 @@ function createNodeTable(gridId, data, contextPath, refresh) {
$(nTd).prepend(link);
}
} , {
"sWidth": "12%"
"sWidth": "10%"
, "mDataProp": "lastReport"
, "sTitle": "Last seen"
} ];
Expand Down Expand Up @@ -1382,7 +1376,9 @@ function createEventLogTable(gridId, data, contextPath, refresh, pickEventLogsIn
var IdTd = tableRow.find("td.eventId");
if (IdTd.hasClass("listclose")) {
myTable.fnClose(this);
tableRow.removeClass("opened");
} else {
tableRow.addClass("opened");
// Set details
var detailsId = 'details-'+fnData.id;
// First open the row an d set the id
Expand Down Expand Up @@ -1710,6 +1706,7 @@ function createInnerTable(myTable, createFunction, contextPath, kind) {
}
detailsId += "-details";
if ( i === -1 ) {
$(this).addClass("opened");
$(this).find("td.listopen").removeClass("listopen").addClass("listclose");
var table = $("<table></table>");
var tableId = fnData.jsid;
Expand All @@ -1730,6 +1727,7 @@ function createInnerTable(myTable, createFunction, contextPath, kind) {
$('#'+detailsId).slideDown(300);
anOpen.push( this );
} else {
$(this).removeClass("opened");
$(this).find("td.listclose").removeClass("listclose").addClass("listopen");
$('#'+detailsId).slideUp(300, function () {
myTable.fnClose( this );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,27 +208,6 @@ function moveFilterAndPaginateArea(tableId) {
}
}



/**
* Move the filter and paginate zones in the location described by tableId_paginate_area and tableId_filter_area
* move the info (1 to 10) to the info area
* @param tableId
* @return
*/
function moveFilterAndFullPaginateArea(tableId) {
$(tableId+"_paginate_area").append($(tableId+"_paginate"));
$(tableId+"_info_area").append($(tableId+"_info"));
if ($(tableId+"_filter_area")) {
$(tableId+"_filter_area").append($(tableId+"_filter"));
}
if ($(tableId+"_length")) {
$(tableId+"_info_area").append($(tableId+"_length"));
}

}


function dropFilterArea(tableId) {
$(tableId+"_info").remove();
$(tableId+"_filter").remove();
Expand Down Expand Up @@ -358,11 +337,12 @@ if ((version >= 5.5) && (filters))
}
}

function showParameters(s){
if(document.getElementById("showParametersInfo" + s).style.display == "none")
document.getElementById("showParametersInfo" + s).style.display = "block";
else
document.getElementById("showParametersInfo" + s).style.display = "none";
function showParameters(e, s){
var btn = $(e.target)
var txt = btn.find(".action").text();
btn.find(".action").text(txt=="Show" ? "Hide" : "Show");
$("#showParametersInfo" + s).toggle();

}

function redirectTo(url,event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
.btn.delete-button{
margin-left:10px;
}
#newAccount-expiration {
width:100%
.clearfix {
margin-left: -15px;
}
.toggle.btn {
min-width: 94px !important;
}
#newAccount-expiration {
margin-top: 6px;
margin-bottom: 12px;
width:100%
}
</style>
<script data-lift="with-cached-resource" src="/javascript/rudder/angular/apiAccount.js" ></script>
Expand Down Expand Up @@ -73,7 +74,7 @@
</div>
<button class="btn btn-box-tool btn-blue pull-right space-top space-bottom" ng-click="getAccounts()">Refresh <span class="fa fa-refresh"></span></button>
</div>
<table datatable="ng" dt-options="options" dt-column-defs="columns" class="table-striped table-hover table-bordered table" id="accountGrid" >
<table datatable="ng" dt-options="options" dt-column-defs="columns" id="accountGrid" >
<thead>
<tr class="head tablewidth">
<th >Account Name</th>
Expand All @@ -83,7 +84,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="account in accounts | filter:filterAccount track by $index">
<tr ng-repeat="account in accounts | filter:filterAccount track by $index" ng-class="{'color1': $index%2!=0, 'color2': $index%2==0}">
<td class="align-middle">
{{account.name}}
<span ng-if="account.description" data-toggle="tooltip" data-placement="top" data-html="true" title={{account.description}} class="bsTooltip fa fa-question-circle info-icon ruddericon tooltipable"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
<title>Rudder - Parameters Management</title>
<style type="text/css">
.portlet-content{
padding:0 15px;
}
.inner-portlet{
padding-top: 2px;
float: left;
width: 100%;
padding:0 15px 15px 15px;
}
.btn.space-bottom{
margin-bottom:15px;
Expand Down Expand Up @@ -55,7 +54,6 @@
</div>
</lift:authz>
</div>
<hr class="spacer" />
<lift:authz role="directive_write">
<div id="globalParameterForm"></div>
</lift:authz>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#filterLogs{
margin-bottom:12px;
}
.btn.showParameters{
margin-bottom: 10px;
min-width: 195px;
}
</style>
</head>

Expand Down
Loading

0 comments on commit ca83ac3

Please sign in to comment.