From 5611ad8b7e56503da9cf6deea7b3222829c3c780 Mon Sep 17 00:00:00 2001 From: Steve Kueng Date: Sun, 15 Oct 2023 22:17:52 +0200 Subject: [PATCH] design updates and fixes --- app/icons/static/icons/js/icons.js | 33 ++-- app/icons/templates/icons/icons.html | 28 ++- app/inventory/static/js/items.js | 40 ++-- app/inventory/templates/inventory/index.html | 3 +- .../templates/inventory/item_detail.html | 2 +- app/inventory/templates/inventory/items.html | 30 +-- .../templates/inventory/machinetable.html | 1 - .../static/manifests/js/manifests.js | 27 ++- .../templates/manifests/manifests.html | 42 ++-- .../static/css/munkiwebadmin.css | 21 +- app/munkiwebadmin/templates/base.html | 15 +- app/pkgsinfo/static/pkgsinfo/js/pkgsinfo.js | 15 +- app/pkgsinfo/templates/pkgsinfo/pkgsinfo.html | 77 ++++---- app/reports/static/reports/js/dashboard.js | 3 + app/reports/static/reports/js/reports.js | 30 ++- app/reports/templates/reports/dashboard.html | 183 ++++++++---------- app/reports/templates/reports/index.html | 59 +++--- 17 files changed, 305 insertions(+), 304 deletions(-) diff --git a/app/icons/static/icons/js/icons.js b/app/icons/static/icons/js/icons.js index d899e594..33e24eec 100644 --- a/app/icons/static/icons/js/icons.js +++ b/app/icons/static/icons/js/icons.js @@ -62,29 +62,26 @@ function initIconsTable() { }, complete: function(jqXHR, textStatus){ window.clearInterval(poll_loop); - $('#process_progress').modal('hide'); + $("#item-count-badge").text(jqXHR.responseJSON.length); }, global: false, }, - columnDefs: [ - { "targets": 0, - "width": "60px", + columnDefs: [{ + "targets": 0, "render": render_icon, "searchable": false, - }, - { + }, + { "targets": 1, - //"width": "40%", "render": render_name, - },], - "sDom": "", - "bPaginate": false, - //"scrollY": "100vh", - "bInfo": false, - "autoWidth": false, - "bFilter": true, - "bStateSave": false, - "aaSorting": [[1,'asc']] + },], + 'sDom': '"top"i', + "paging":false, + "scrollY": 'calc(100vh - 350px)', + "scrollCollapse": true, + "bFilter": true, + "bStateSave": true, + "aaSorting": [[0,'asc']] }); // start our monitoring timer loop monitor_icon_list(); @@ -94,16 +91,12 @@ function initIconsTable() { searchField.keyup(function(){ thisTable.search($(this).val()).draw(); }); - //searchField.trigger('keyup'); } function cancelEdit() { - //$('#cancelEditConfirmationModal').modal('hide'); hideSaveOrCancelBtns(); $("#iconItem").modal("hide"); - //$('.modal-backdrop').remove(); - //getIconItem(current_pathname); } diff --git a/app/icons/templates/icons/icons.html b/app/icons/templates/icons/icons.html index 4debc658..f85ce2e8 100755 --- a/app/icons/templates/icons/icons.html +++ b/app/icons/templates/icons/icons.html @@ -11,21 +11,29 @@ {% endblock java_script %} +{% block page_title %}Icons 0{% endblock %} + {% block content %}
-
-
- {% if perms.pkgsinfo.add_pkginfofile %} -
- -
- {% endif %} +
+
+ +
-
+
+
+ +
+
+
+
diff --git a/app/inventory/static/js/items.js b/app/inventory/static/js/items.js index 24fc8483..d4dfc35a 100755 --- a/app/inventory/static/js/items.js +++ b/app/inventory/static/js/items.js @@ -4,14 +4,11 @@ original version by Joe Wollard; this version by Greg Neagle */ -$(document).ready(function() -{ +$(document).ready(function() { // Perform the json call and format the results so that DataTables will // understand it. - var process_json = function( sSource, aoData, fnCallback ) - { - $.getJSON( sSource, function(json, status, jqXHR) - { + var process_json = function( sSource, aoData, fnCallback ) { + $.getJSON( sSource, function(json, status, jqXHR) { // update the count info badge $("#item-count-badge").text(json.length); @@ -21,17 +18,14 @@ $(document).ready(function() } - var version_count_template = function(name, version, count) - { + var version_count_template = function(name, version, count) { return "" + version - + "" + count + "" + + " " + count + "" + "
"; } - - var format_versions_column = function(data, type, rowObject) - { + var format_versions_column = function(data, type, rowObject) { out = '' for(var i = 0; i < data.length; i++) { @@ -46,21 +40,20 @@ $(document).ready(function() return out; } - - var format_name_column = function(data, type, rowObject) - { + var format_name_column = function(data, type, rowObject) { return '' + data + ""; } - oTable = $("#inventory-items-table").dataTable({ "sAjaxSource": window.location.href + ".json", "fnServerData": process_json, "paging":false, 'sDom': '"top"i', + "scrollY": 'calc(100vh - 270px)', + "scrollCollapse": true, "bStateSave": true, - "aaSorting": [[1,'desc']], + "aaSorting": [[0,'asc']], "aoColumns": [ {'mData': 'name', 'mRender': format_name_column @@ -68,21 +61,24 @@ $(document).ready(function() {'mData': 'versions', 'mRender': format_versions_column } - ] + ], + responsive: { + details: false + } }); - $('#listSearchField').keyup(function(){ + $('#listSearchField').keyup(function() { oTable.fnFilter( $(this).val() ); }); - $('#SearchFieldMobile').keyup(function(){ + $('#SearchFieldMobile').keyup(function() { oTable.fnFilter( $(this).val() ); }); - $('#listSearchField').change(function(){ + $('#listSearchField').change(function() { $('#listSearchField').keyup(); }); - $('#SearchFieldMobile').change(function(){ + $('#SearchFieldMobile').change(function() { $('#SearchFieldMobile').keyup(); }); }); \ No newline at end of file diff --git a/app/inventory/templates/inventory/index.html b/app/inventory/templates/inventory/index.html index 66e7b9ff..e9e35d90 100755 --- a/app/inventory/templates/inventory/index.html +++ b/app/inventory/templates/inventory/index.html @@ -1,7 +1,6 @@ {% extends 'base.html' %} - -{% block page_title %}Inventory{% endblock %} +{% block page_title %}Inventory{% endblock %} {% block content %} {% with machine_list=machines list_title='Inventory Clients' %} diff --git a/app/inventory/templates/inventory/item_detail.html b/app/inventory/templates/inventory/item_detail.html index 54f4b9c8..bb11215e 100755 --- a/app/inventory/templates/inventory/item_detail.html +++ b/app/inventory/templates/inventory/item_detail.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} -{% block page_title %}Inventory{% endblock %} +{% block page_title %}Inventory{% endblock %} {% block content %} {% with inventory_items=item_detail.instances list_title='Machines' %} diff --git a/app/inventory/templates/inventory/items.html b/app/inventory/templates/inventory/items.html index 3adf49f1..da683601 100755 --- a/app/inventory/templates/inventory/items.html +++ b/app/inventory/templates/inventory/items.html @@ -5,17 +5,25 @@ {% endblock %} - -{% block page_title %}Inventory{% endblock %} + +{% block page_title %}Inventory 0{% endblock %} {% block content %} -
IconName
- - - - - - - -
NameVersion(s)
+
+
+
+
+ + + + + + + +
NameVersion(s)
+
+
+
+
+ {% endblock %} \ No newline at end of file diff --git a/app/inventory/templates/inventory/machinetable.html b/app/inventory/templates/inventory/machinetable.html index 9469699e..41360e90 100755 --- a/app/inventory/templates/inventory/machinetable.html +++ b/app/inventory/templates/inventory/machinetable.html @@ -1,5 +1,4 @@ {% if machine_list|length %} -

diff --git a/app/manifests/static/manifests/js/manifests.js b/app/manifests/static/manifests/js/manifests.js index e0e86939..b0cb54a1 100644 --- a/app/manifests/static/manifests/js/manifests.js +++ b/app/manifests/static/manifests/js/manifests.js @@ -121,24 +121,21 @@ function initManifestsTable() { }, complete: function(jqXHR, textStatus) { window.clearInterval(poll_loop); - $('#process_progress').modal('hide'); + $("#item-count-badge").text(jqXHR.responseJSON.length); }, global: false, }, - "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - $('td', nRow).addClass('table-list-item'); - }, - "columnDefs": [ - { "targets": 0, - "render": render_name, - }], - "sDom": "", - "bPaginate": false, - "bInfo": false, - "autoWidth": false, - "bFilter": true, - "bStateSave": false, - "aaSorting": [[0,'asc']] + "columnDefs": [{ + "targets": 0, + "render": render_name, + }], + 'sDom': '"top"i', + "paging":false, + "scrollY": 'calc(100vh - 350px)', + "scrollCollapse": true, + "bFilter": true, + "bStateSave": true, + "aaSorting": [[0,'asc']] }); // start our monitoring timer loop monitor_manifest_list(); diff --git a/app/manifests/templates/manifests/manifests.html b/app/manifests/templates/manifests/manifests.html index 19cc4bad..c420fe5f 100644 --- a/app/manifests/templates/manifests/manifests.html +++ b/app/manifests/templates/manifests/manifests.html @@ -19,25 +19,32 @@ {% endblock %} +{% block page_title %}Manifests 0{% endblock %} + {% block content %}
-
-
-
-
- -
- {% if perms.manifests.add_manifestfile %} -
- -
- {% endif %} -
+
+
+
+ +
+
+
+
+ +
+
+
+
@@ -46,7 +53,8 @@
Name
- +

+
diff --git a/app/munkiwebadmin/static/css/munkiwebadmin.css b/app/munkiwebadmin/static/css/munkiwebadmin.css index 2decebca..d2f3591a 100644 --- a/app/munkiwebadmin/static/css/munkiwebadmin.css +++ b/app/munkiwebadmin/static/css/munkiwebadmin.css @@ -41,7 +41,7 @@ h4 { max-width: var(--sidebar-size); min-width: var(--sidebar-size); transition: all 0.35s ease-in-out; - border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color); } .main { @@ -52,6 +52,7 @@ h4 { overflow: hidden; transition: all 0.35s ease-in-out; width: 100%; + background-color: var(--bs-secondary-bg); } /* Sidebar Elements Style */ @@ -74,7 +75,6 @@ h4 { } .sidebar-header { - color: var(--bs-body-color); font-size: .75rem; padding: 1.5rem 1.5rem .375rem; } @@ -89,6 +89,10 @@ a.sidebar-link { width: 38px; } +.navbar { + background-color: var(--bs-body-bg); +} + .navbar-expand .navbar-nav { margin-left: auto; } @@ -102,16 +106,25 @@ a.sidebar-link { .content { flex: 1; max-width: 100vw; + height: calc(100vh - 98px); + overflow: auto; } + /* Footer and Nav */ +.footer { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color); + height: 20px; +} + @media (max-width:767.98px) { .content { max-width: auto; - width: auto; + width: 100vw; } .navbar, footer { width: 100vw; } -} \ No newline at end of file +} + diff --git a/app/munkiwebadmin/templates/base.html b/app/munkiwebadmin/templates/base.html index fdc42d5f..7920b43c 100755 --- a/app/munkiwebadmin/templates/base.html +++ b/app/munkiwebadmin/templates/base.html @@ -175,7 +175,16 @@
- {% block content %}{% endblock %} +
+
+

{% block page_title %}{% endblock %}

+
+
+
+
+ {% block content %}{% endblock %} +
+
@@ -184,14 +193,14 @@
-
    +
    • github.com/SteveKueng
    • diff --git a/app/pkgsinfo/static/pkgsinfo/js/pkgsinfo.js b/app/pkgsinfo/static/pkgsinfo/js/pkgsinfo.js index dac1fec3..9c548dd9 100644 --- a/app/pkgsinfo/static/pkgsinfo/js/pkgsinfo.js +++ b/app/pkgsinfo/static/pkgsinfo/js/pkgsinfo.js @@ -206,14 +206,13 @@ function initPkginfoTable() { "searchable": false, "orderable": false, },], - "sDom": "", - "bPaginate": false, - //"scrollY": "100vh", - "bInfo": false, - "autoWidth": false, - "bFilter": true, - "bStateSave": false, - "aaSorting": [[0,'asc']] + 'sDom': '"top"i', + "paging":false, + "scrollY": 'calc(100vh - 350px)', + "scrollCollapse": true, + "bFilter": true, + "bStateSave": true, + "aaSorting": [[0,'asc']] }); // start our monitoring timer loop monitor_pkgsinfo_list(); diff --git a/app/pkgsinfo/templates/pkgsinfo/pkgsinfo.html b/app/pkgsinfo/templates/pkgsinfo/pkgsinfo.html index 3ff88a7a..b3d82f38 100755 --- a/app/pkgsinfo/templates/pkgsinfo/pkgsinfo.html +++ b/app/pkgsinfo/templates/pkgsinfo/pkgsinfo.html @@ -17,52 +17,55 @@ {% endblock java_script %} +{% block page_title %}Package Info 0{% endblock %} + {% block content %}
      -
      -
-
- +
+
-
+
-
-
-
-

OS breakdown

+
+
+
+ OS breakdown
-
-
-
-

Hardware breakdown

+ +
+
+
+ Hardware breakdown
+
+
+
+
+ Check-ins by day +
+
+
+
+
+ + {% endblock %} diff --git a/app/reports/templates/reports/index.html b/app/reports/templates/reports/index.html index f7c41ac3..40b31eb7 100644 --- a/app/reports/templates/reports/index.html +++ b/app/reports/templates/reports/index.html @@ -10,45 +10,30 @@ {% endblock java_script %} -{% block content %} - - +{% block page_title %}Computer 0{% endblock %} +{% block content %}
-
-
- - - - - - - - - - - - - - - -
IconHostnameSerial NumberOSUsernameModelCPU
+
+
+
+ + + + + + + + + + + + + + + +
IconHostnameSerial NumberOSUsernameModelCPU
+