Datatables and chosen install

This commit is contained in:
Eduardo Silva 2024-04-15 10:48:11 -03:00
parent 04ff4f97cf
commit 869646f298
33 changed files with 13451 additions and 17 deletions

View file

@ -14,7 +14,7 @@
{% include 'backup/backup_nav_tabs.html' %}
<div class="row">
<div class="col-lg-12">
<table class="table table-hover">
<table class="table table-hover datatables-no-export">
<thead>
<tr>
<th class="min-width">ID</th>

View file

@ -14,7 +14,7 @@
{% include 'backup/backup_nav_tabs.html' %}
<div class="row">
<div class="col-lg-12">
<table class="table table-hover">
<table class="table table-hover datatables-no-export">
<thead>
<tr>
<th>Name</th>

View file

@ -9,6 +9,10 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<!-- Font Awesome -->
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/fontawesome-free/css/all.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- Tempusdominus Bootstrap 4 -->
@ -23,11 +27,16 @@
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/daterangepicker/daterangepicker.css">
{% comment %}<!-- summernote -->
<link rel="stylesheet" href="/static/AdminLTE-3.2.0/plugins/summernote/summernote-bs4.min.css">
{% endcomment %}
<!-- chosen -->
<link rel="stylesheet" href="/static/plugins/chosen/bootstrap-chosen.css">
<style>
.dataTables_filter, .dataTables_length{
padding-top: 10px;
}
.datatables-with-export, .datatables-no-export{
display: none;
}
.min-width {
width: 1%;
white-space: nowrap;
@ -241,10 +250,48 @@
{% endcomment %}
<!-- overlayScrollbars -->
<script src="/static/AdminLTE-3.2.0/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<!-- DataTables & Plugins -->
<script src="/static/AdminLTE-3.2.0/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/jszip/jszip.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/pdfmake/pdfmake.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/pdfmake/vfs_fonts.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="/static/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="/static/AdminLTE-3.2.0/dist/js/adminlte.js"></script>
<script src="/static/AdminLTE-3.2.0/dist/js/pages/dashboard.js"></script>
<!-- chosen -->
<script src="/static/plugins/chosen/chosen.jquery.min.js"></script>
{% comment %}<script src="/static/AdminLTE-3.2.0/dist/js/pages/dashboard.js"></script>{% endcomment %}
<script>
$('.selectmultiple').chosen();
$('.select').chosen();
</script>
<script>
$(function () {
$(".datatables-with-export").DataTable({
"responsive": true, "lengthChange": false, "autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
$('.datatables-no-export').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"order": [],
"info": true,
"autoWidth": false,
"responsive": true,
});
});
$('.datatables-with-export').show();
$('.datatables-no-export').show();
</script>
<script>
$(document).ready(function() {
const webadminVersion = '{{ webadmin_version.current_version }}';

View file

@ -132,7 +132,7 @@
</div>
<div class="card-body row">
<div class="col-lg-12">
<table class="table">
<table class="table table-hover datatables-no-export" >
<thead>
<tr>
<th>ID</th>

View file

@ -14,7 +14,7 @@
{% include 'router_manager/router_nav_tabs.html' %}
<div class="row">
<div class="col-lg-12">
<table class="table table-hover">
<table class="table table-hover datatables-no-export">
<thead>
<th>Name</th>
<th>Default</th>

View file

@ -14,7 +14,7 @@
{% include 'router_manager/router_nav_tabs.html' %}
<div class="row">
<div class="col-lg-12">
<table class="table table-hover">
<table class="table table-hover datatables-no-export">
<thead>
<tr>
<th>Name</th>
@ -40,9 +40,9 @@
<td>
{% if router.monitoring %}
{% if router.routerstatus.status_online %}
<i class="far fa-check-circle text-success" title="Host is Online"></i>
<span style="display: none">online</span><i class="far fa-check-circle text-success" title="Host is Online"></i>
{% else %}
<i class="far fa-times-circle text-danger" title="Host is unavailable"></i>
<span style="display: none">offline</span><i class="far fa-times-circle text-danger" title="Host is unavailable"></i>
{% endif %}
{% else %}
---
@ -57,16 +57,15 @@
{% endif %}
{% endif %}
</td>
<td>
{{ router.routergroup_set.count }}
</td>
<td class="min-width">
{% if router.router_type != 'monitoring' %}
{% if router.ssh_key %}
<i class="fas fa-key" title="SSH Key: {{ router.ssh_key }}"></i>
<span style="display: none">sshkey</span><i class="fas fa-key" title="SSH Key: {{ router.ssh_key }}"></i>
{% elif router.password %}
<i class="fas fa-keyboard" title="Password Authentication"></i>
<span style="display: none">password</span><i class="fas fa-keyboard" title="Password Authentication"></i>
{% else %}
<i class="fas fa-exclamation-triangle text-warning" title="Missing authentication"></i>
{% endif %}
@ -93,4 +92,7 @@
</div>
</div>
</div>
{% endblock %}
{% block custom_page_scripts %}
{% endblock %}

View file

@ -13,7 +13,7 @@
{% include 'router_manager/router_nav_tabs.html' %}
<div class="row">
<div class="col-lg-12">
<table class="table table-hover">
<table class="table table-hover datatables-no-export">
<thead>
<th>Name</th>
<th>Public Key</th>