Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1431572
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 18, 6:13 PM
Size
5 KB
Mime Type
text/x-diff
Expires
Tue, Jan 20, 6:13 PM (20 h, 43 m)
Engine
blob
Format
Raw Data
Handle
326899
Attached To
rARCHIVING archiving
View Options
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index c95b4f4..bb7db36 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -1,95 +1,111 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery.min
//= require jquery_ujs
//= require jquery-ui.min
//= require bootstrap.min
//= require jstree
//= require chosen.jquery.min
//= require jquery.dataTables.min
//= require dataTables.bootstrap.min
//= require_tree .
//= require highcharts
//= require jobs
//= require filesets
//= require clients
$(document).ready(function() {
if ($('.schedule_run_form_plus').size() > 0) {
$(".schedule_run_form_plus").click(function() {
addScheduleRun();
return false;
});
};
if ($('.schedule_run_form_remove').size() > 0) {
$(".schedule_run_form_remove").click(function() {
removeScheduleRun();
return false;
});
};
if ($('.schedule_run_form').size() > 1) {
$('.schedule_run_form_remove').show();
};
+ if ($('table#admin_clients').size() > 0) {
+ $('table#admin_clients').DataTable({
+ paging: false,
+ columnDefs: [
+ {
+ targets: 'neither-search-nor-order',
+ orderable: false,
+ searchable: false
+ },
+ {
+ targets: 'no-search',
+ orderable: true,
+ searchable: false
+ }],
+ });
+ };
});
function addScheduleRun() {
var count = $('.schedule_run_form').size();
var scheduleRun = $('.schedule_run_form:last').clone();
$(scheduleRun).find('label').each(function() {
var newLabel, oldLabel;
oldLabel = $(this).attr('for');
newLabel = oldLabel.replace(new RegExp(/_[0-9]+_/), "_" + count + "_");
$(this).attr('for', newLabel);
});
$(scheduleRun).find('select, input').each(function() {
var newId, oldId, newName, oldName;
oldId = $(this).attr('id');
newId = oldId.replace(new RegExp(/_[0-9]+_/), "_" + count + "_");
$(this).attr('id', newId);
oldName = $(this).attr('name');
newName = oldName.replace(new RegExp(/[0-9]+/), "[" + count + "]");
$(this).attr('name', newName);
});
scheduleRun.insertAfter('.schedule_run_form:last');
$('.schedule_run_form:last input').val('');
if (count > 0) {
$(".schedule_run_form_remove").show();
};
$('.destroyer:last').remove();
}
function removeScheduleRun() {
var count = $('.schedule_run_form').size();
if (count > 1) {
var last_id = count - 1;
$('<input>').attr({
type: 'hidden',
class: 'destroyer',
id: 'schedule_schedule_runs_attributes_' + last_id + '__destroy',
name: 'schedule[schedule_runs_attributes][' + last_id + '][_destroy]',
value: '1'
}).appendTo('form');
$('.schedule_run_form:last').remove();
if ($('.schedule_run_form').size() == 1) {
$(".schedule_run_form_remove").hide();
};
}
else {
alert('nothing to remove');
};
}
diff --git a/app/views/admin/clients/index.html.erb b/app/views/admin/clients/index.html.erb
index 98e580f..9e687e7 100644
--- a/app/views/admin/clients/index.html.erb
+++ b/app/views/admin/clients/index.html.erb
@@ -1,24 +1,26 @@
<h1>Bacula Clients</h1>
-<div class="table-responsive">
- <table class="table table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th>ClientId</th>
- <th>Name</th>
- <th>Uname</th>
- <th>Active Jobs</th>
- <th>Last Backup</th>
- <th>FileRetention (days)</th>
- <th>JobRetention (days)</th>
- <th>Space Used</th>
- <th>File count</th>
- <th>AutoPrune</th>
- </tr>
- </thead>
+<div class="datatable-wrapper">
+ <div class="table-responsive">
+ <table id="admin_clients" class="table table-striped table-bordered table-condensed">
+ <thead>
+ <tr>
+ <th class="no-search">ClientId</th>
+ <th>Name</th>
+ <th>Uname</th>
+ <th class="no-search">Active Jobs</th>
+ <th class="no-search">Last Backup</th>
+ <th class="no-search">FileRetention (days)</th>
+ <th class="no-search">JobRetention (days)</th>
+ <th class="no-search">Space Used</th>
+ <th class="no-search">File count</th>
+ <th class="neither-search-nor-order">AutoPrune</th>
+ </tr>
+ </thead>
- <tbody>
- <%= render partial: 'client', collection: @clients %>
- </tbody>
- </table>
+ <tbody>
+ <%= render partial: 'client', collection: @clients %>
+ </tbody>
+ </table>
+ </div>
</div>
Event Timeline
Log In to Comment