Browse Source

Software Up to Date Status Graphs

v0.0.12
John Haverlack 3 years ago
parent
commit
d8e391c35d
  1. 8
      web/root/docs/charts.md
  2. 155
      web/root/docs/js/skq-it-am.js
  3. 12
      web/root/docs/stats.md
  4. 237
      web/root/site/charts.html
  5. 155
      web/root/site/js/skq-it-am.js
  6. 2
      web/root/site/search/search_index.json
  7. BIN
      web/root/site/sitemap.xml.gz
  8. 15
      web/root/site/stats.html

8
web/root/docs/charts.md

@ -1,8 +0,0 @@
# Stats
<!-- <canvas id="myChart" width="600" height="200"></canvas> -->
## Operating Systems
<canvas id="stats_kernels" width="200" height="100"></canvas>
## Operating System Versions
<canvas id="stats_os_vers" width="600" height="200"></canvas>

155
web/root/docs/js/skq-it-am.js

@ -467,7 +467,7 @@ load_webconf.get('api/data/proc/stats.json', function(response) {
data: {
labels: labels,
datasets: [{
label: 'Software Age (Days)',
label: 'Number of Software Installations',
data: data,
backgroundColor: [
'rgba(75, 192, 192, 0.2)'
@ -479,6 +479,85 @@ load_webconf.get('api/data/proc/stats.json', function(response) {
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Software Installed/Updated (Days Ago)'
}
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
// y: {
// type: 'logarithmic',
// }
}
}
});
}
// SW Up to date per App
if (document.getElementById("stats_sw_utd_per_app")) {
let labels = Object.keys(stats['HISTOGRAMS']['SW_PER_APP_LATEST_VERSION_SCORES'])
let data = []
for (k in labels) {
// console.log(k + ' ' + stats['HISTOGRAMS']['OS_VERSIONS'][k]);
data.push(stats['HISTOGRAMS']['SW_PER_APP_LATEST_VERSION_SCORES'][labels[k]])
}
// console.log(JSON.stringify(labels, null, 2))
// console.log(JSON.stringify(data, null, 2))
var canvas = document.getElementById('stats_sw_utd_per_app');
var plot = new Chart(canvas, {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Number of Application',
data: data,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(75, 192, 192, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 159, 64, 1)',
'rgba(255, 159, 64, 1)',
'rgba(54, 162, 235, 1)',
'rgba(54, 162, 235, 1)',
'rgba(75, 192, 192, 1)',
'rgba(75, 192, 192, 1)'
],
borderWidth: 1
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Software Updated To Latest Known Version by Application (0 to 1)'
}
},
scales: {
yAxes: [{
ticks: {
@ -493,6 +572,80 @@ load_webconf.get('api/data/proc/stats.json', function(response) {
});
}
// SW Up to date per Hosts
if (document.getElementById("stats_sw_utd_per_hst")) {
let labels = Object.keys(stats['HISTOGRAMS']['SW_PER_HOST_LATEST_VERSION_SCORES'])
let data = []
for (k in labels) {
// console.log(k + ' ' + stats['HISTOGRAMS']['OS_VERSIONS'][k]);
data.push(stats['HISTOGRAMS']['SW_PER_HOST_LATEST_VERSION_SCORES'][labels[k]])
}
// console.log(JSON.stringify(labels, null, 2))
// console.log(JSON.stringify(data, null, 2))
var canvas = document.getElementById('stats_sw_utd_per_hst');
var plot = new Chart(canvas, {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Number of Hosts',
data: data,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(75, 192, 192, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 159, 64, 1)',
'rgba(255, 159, 64, 1)',
'rgba(54, 162, 235, 1)',
'rgba(54, 162, 235, 1)',
'rgba(75, 192, 192, 1)',
'rgba(75, 192, 192, 1)'
],
borderWidth: 1
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Software Updated To Latest Known Version by Host (0 to 1)'
}
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
// y: {
// type: 'logarithmic',
// }
}
}
});
}
}) // End load_webconf

12
web/root/docs/stats.md

@ -17,7 +17,7 @@
## Systems Installed by Year
<canvas id="stats_os_inst_yyyy" width="600" height="200"></canvas>
## Software Summary
<!-- ## Software Summary
<div class="row">
<div class="col-sm-4">
<canvas id="stats_sw" width="200" height="200" style="max-width: 300px; max-height: 300px;"></canvas>
@ -25,7 +25,13 @@
<div class="col-sm-4">
<div id="stats_sw_summary"></div>
</div>
</div>
</div> -->
## Software Age (Days)
## Software Installed/Updated (Days Ago)
<canvas id="stats_sw_age_days" width="600" height="200"></canvas>
## Software Up to Date per Application
<canvas id="stats_sw_utd_per_app" width="600" height="200"></canvas>
## Software Up to Date per Host
<canvas id="stats_sw_utd_per_hst" width="600" height="200"></canvas>

237
web/root/site/charts.html

@ -1,237 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="John Haverlack (jehaverlack@alaska.edu)">
<link rel="shortcut icon" href="img/favicon.ico">
<title>Stats - Sikuliaq IT Asset Manager</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/base.css" rel="stylesheet">
<link href="js/styles/default.css" rel="stylesheet">
<link href="css/all.min.css" rel="stylesheet">
<link href="css/satnag-icons.css" rel="stylesheet">
<link href="css/uaf.css" rel="stylesheet">
<link href="css/cfos.css" rel="stylesheet">
<link href="css/cfos-theme.css" rel="stylesheet">
<link href="css/jquery.json-viewer.css" rel="stylesheet">
<link href="css/jjsonviewer.css" rel="stylesheet">
<link href="css/cfosgroups.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="js/jquery-1.10.2.min.js" defer></script>
<script src="js/bootstrap.min.js" defer></script>
</head>
<body>
<div id="banner" style="position: relative; top: -70px; width: 100%; z-index:100;">
<div class="row">
<div id="banner-bar" class="col-sm-12">
<div style="width: 100%; padding: 10px;">
<a href="http://uaf.edu/"><img class="uaflogo" alt="UAF logo" src="img/uaflogoBlue.png"></a>
<a class="text-white" style="font-weight: bold; margin-top: auto; margin-bottom: 10px;" href="https://uaf.edu">UNIVERSITY OF ALASKA FAIRBANKS</a>
</div>
</div>
</div>
<div class="row" style="background: #007682; height: 8px;"></div>
<div class="row">
<div id="banner-logo" class="col-sm-12">
<div id="banner-title">
<div class="cfostitle">
<!-- <a href="https://www.sikuliaq.alaska.edu/"><i>R/V Sikuliaq</i></a> -->
<a href="https://www.sikuliaq.alaska.edu/" title="R/V Sikuliaq"><img alt="R/V Sikuliaq" src="img/SKQShipLogo-White.png"> <span style="font-weight: bold; font-style: italic; margin-top: auto; margin-bottom: auto;"></span></a> R/V <i>Sikuliaq</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="navbar navbar-expand-lg navbar-dark bg-primary" style="top: -70px;">
<div class="container">
<a class="navbar-brand" href=".">Sikuliaq IT Asset Manager</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href="index.html" class="nav-link"><span class="fas fa-home"></span></a>
</li>
<li class="navitem">
<a href="stats.html" class="nav-link">Stats</a>
</li>
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">About <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="contact.html" class="dropdown-item">Contact</a>
</li>
<li>
<a href="license.html" class="dropdown-item">License</a>
</li>
<li>
<a href="versions.html" class="dropdown-item">Changelog</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a href="https://github.alaska.edu/skq/skq-it-am.git" class="nav-link"><span class="fab fa-git-square"></span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<!-- <div class="col-md-3"></div> -->
<div class="col-md-12" role="main" style="top: -50px;">
<h1 id="stats">Stats</h1>
<!-- <canvas id="myChart" width="600" height="200"></canvas> -->
<h2 id="operating-systems">Operating Systems</h2>
<p><canvas id="stats_kernels" width="200" height="100"></canvas></p>
<h2 id="operating-system-versions">Operating System Versions</h2>
<p><canvas id="stats_os_vers" width="600" height="200"></canvas></p></div>
</div>
</div>
<!-- style="position: relative; top: -100px;" -->
<!-- <div class="alert alert-danger" role="alert">
<p><span class="fas fa-exclamation-circle"></span>
This website is an incomplete and active work in progress. Please send feedback to <a href="mailto:jehaverlack@alaska.edu">jehaverlack@alaska.edu</a>
</p>
</div> -->
<footer class="col-md-12 footer" >
<p class="small">The University of Alaska Fairbanks is <a target="_blank" href="https://uaf.edu/accreditation/">accredited</a> by the Northwest Commission on Colleges and Universities.<br>UAF is an AA/EO employer and educational institution and prohibits illegal discrimination against any individual. Learn more about UA's <a target="_blank" href="https://www.alaska.edu/nondiscrimination" >notice of nondiscrimination</a>.<br>UA is committed to providing accessible websites. Learn more about UA's <a target="_blank" href="https://www.alaska.edu/webaccessibility" >notice of web accessibility</a>.<br><a target="_blank" href="https://www.alaska.edu/records/compliance/gdpr/ua-privacy-statement/index.xml" >Privacy Statement</a></p>
<p class="small"><p class="small">Copyright &copy; 2021 <a target="_blank" href="https://www.uaf.edu">University of Alaska Fairbanks</a> <a target="_blank" href="https://www.uaf.edu/cfos">College of Fisheries and Ocean Sciences</a> - <a target="_blank" href="https://www.sikuliaq.alaska.edu"><i>R/V Sikuliaq</i></a></p></p>
<p class="small">For questions or comments regarding this page, contact <a href="mailto:uaf-skq-science-support@alaska.edu">uaf-skq-science-support@alaska.edu</a></p>
<p class="small">Version: 0.0.12 2021-06-29 (Beta)</p>
<p class="small">Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<div class="row" style="margin-right: 20px;">
<div class="col-sm-12" style="text-align: right; valign: middle;">
<a target="_blank" href="https://www.uaf.edu/"><img alt="University of Alaska Fairbanks" title="University of Alaska Fairbanks" style="max-height: 50px;" src="img/UAF.png"></a>
<a target="_blank" href="https://www.uaf.edu/cfos/"><img alt="UAF College of Fisheries and Ocean Sciences" title="UAF College of Fisheries and Ocean Sciences" style="max-height: 50px;" src="img/SMALL-CFOS.jpg"></a>
<a target="_blank" href="https://www.sikuliaq.alaska.edu/"><img alt="R/V Sikuliaq" title="R/V Sikuliaq" style="max-height: 50px;" src="img/sikuliaqlogo.png"></a>
<a target="_blank" href="https://www.unols.org/"><img alt="University-National Laboratory System" title="University-National Laboratory System" style="max-height: 50px;" src="img/unols-logo.png"></a>
<a target="_blank" href="https://www.nsf.gov/"><img alt="National Science Foundation" title="National Science Foundation" style="max-height: 65px;" src="img/NSF.png"></a>
</div>
</div>
<script>
var base_url = ".",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="js/base.js" defer></script>
<script src="js/highlight.pack.js" defer></script>
<script src="js/highlightinit.js" defer></script>
<script src="js/jquery.json-viewer.js" defer></script>
<script src="js/jquery.event.move.js" defer></script>
<script src="js/jquery.event.swipe.js" defer></script>
<script src="js/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
<script src="js/swipenav.js" defer></script>
<script src="js/hometitle.js" defer></script>
<script src="js/clipboard.min.js" defer></script>
<script src="js/chart.min.js" defer></script>
<script src="js/skq-it-am.js" defer></script>
<script src="search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>

155
web/root/site/js/skq-it-am.js

@ -467,7 +467,7 @@ load_webconf.get('api/data/proc/stats.json', function(response) {
data: {
labels: labels,
datasets: [{
label: 'Software Age (Days)',
label: 'Number of Software Installations',
data: data,
backgroundColor: [
'rgba(75, 192, 192, 0.2)'
@ -479,6 +479,85 @@ load_webconf.get('api/data/proc/stats.json', function(response) {
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Software Installed/Updated (Days Ago)'
}
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
// y: {
// type: 'logarithmic',
// }
}
}
});
}
// SW Up to date per App
if (document.getElementById("stats_sw_utd_per_app")) {
let labels = Object.keys(stats['HISTOGRAMS']['SW_PER_APP_LATEST_VERSION_SCORES'])
let data = []
for (k in labels) {
// console.log(k + ' ' + stats['HISTOGRAMS']['OS_VERSIONS'][k]);
data.push(stats['HISTOGRAMS']['SW_PER_APP_LATEST_VERSION_SCORES'][labels[k]])
}
// console.log(JSON.stringify(labels, null, 2))
// console.log(JSON.stringify(data, null, 2))
var canvas = document.getElementById('stats_sw_utd_per_app');
var plot = new Chart(canvas, {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Number of Application',
data: data,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(75, 192, 192, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 159, 64, 1)',
'rgba(255, 159, 64, 1)',
'rgba(54, 162, 235, 1)',
'rgba(54, 162, 235, 1)',
'rgba(75, 192, 192, 1)',
'rgba(75, 192, 192, 1)'
],
borderWidth: 1
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Software Updated To Latest Known Version by Application (0 to 1)'
}
},
scales: {
yAxes: [{
ticks: {
@ -493,6 +572,80 @@ load_webconf.get('api/data/proc/stats.json', function(response) {
});
}
// SW Up to date per Hosts
if (document.getElementById("stats_sw_utd_per_hst")) {
let labels = Object.keys(stats['HISTOGRAMS']['SW_PER_HOST_LATEST_VERSION_SCORES'])
let data = []
for (k in labels) {
// console.log(k + ' ' + stats['HISTOGRAMS']['OS_VERSIONS'][k]);
data.push(stats['HISTOGRAMS']['SW_PER_HOST_LATEST_VERSION_SCORES'][labels[k]])
}
// console.log(JSON.stringify(labels, null, 2))
// console.log(JSON.stringify(data, null, 2))
var canvas = document.getElementById('stats_sw_utd_per_hst');
var plot = new Chart(canvas, {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Number of Hosts',
data: data,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(75, 192, 192, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 159, 64, 1)',
'rgba(255, 159, 64, 1)',
'rgba(54, 162, 235, 1)',
'rgba(54, 162, 235, 1)',
'rgba(75, 192, 192, 1)',
'rgba(75, 192, 192, 1)'
],
borderWidth: 1
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Software Updated To Latest Known Version by Host (0 to 1)'
}
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
// y: {
// type: 'logarithmic',
// }
}
}
});
}
}) // End load_webconf

2
web/root/site/search/search_index.json
File diff suppressed because it is too large
View File

BIN
web/root/site/sitemap.xml.gz

15
web/root/site/stats.html

@ -140,17 +140,22 @@
<p><canvas id="stats_os_vers" width="600" height="200"></canvas></p>
<h2 id="systems-installed-by-year">Systems Installed by Year</h2>
<p><canvas id="stats_os_inst_yyyy" width="600" height="200"></canvas></p>
<h2 id="software-summary">Software Summary</h2>
<p><div class="row">
<!-- ## Software Summary
<div class="row">
<div class="col-sm-4">
<canvas id="stats_sw" width="200" height="200" style="max-width: 300px; max-height: 300px;"></canvas>
</div>
<div class="col-sm-4">
<div id="stats_sw_summary"></div>
</div>
</div></p>
<h2 id="software-age-days">Software Age (Days)</h2>
<p><canvas id="stats_sw_age_days" width="600" height="200"></canvas></p></div>
</div> -->
<h2 id="software-installedupdated-days-ago">Software Installed/Updated (Days Ago)</h2>
<p><canvas id="stats_sw_age_days" width="600" height="200"></canvas></p>
<h2 id="software-up-to-date-per-application">Software Up to Date per Application</h2>
<p><canvas id="stats_sw_utd_per_app" width="600" height="200"></canvas></p>
<h2 id="software-up-to-date-per-host">Software Up to Date per Host</h2>
<p><canvas id="stats_sw_utd_per_hst" width="600" height="200"></canvas></p></div>
</div>
</div>

Loading…
Cancel
Save