-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from gavsto/dev
NEW FEATURE: Azure AD Device List + Version Number Add
- Loading branch information
Showing
4 changed files
with
197 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<main> | ||
<header class="page-header page-header-compact page-header-light border-bottom bg-white mb-4"> | ||
<div class="container-fluid px-4"> | ||
<div class="page-header-content"> | ||
<div class="row align-items-center justify-content-between pt-3"> | ||
<div class="col-auto mb-3"> | ||
<h1 class="page-header-title"> | ||
<div class="page-header-icon"><i data-feather="user"></i></div> | ||
Azure AD Device List | ||
</h1> | ||
</div> | ||
<div class="col-12 col-xl-auto mb-3"> | ||
<a class="btn btn-sm btn-light text-primary" href="index.html?page=users.html"> | ||
<i class="me-1" data-feather="users"></i> | ||
Manage Users | ||
</a> | ||
<a class="btn btn-sm btn-light text-primary" href="index.html?page=users.html"> | ||
<i class="me-1" data-feather="user-plus"></i> | ||
Manage Groups | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
<!-- Main page content--> | ||
<div class="container-fluid px-4"> | ||
<div><label for="exampleDataList" class="form-label">Tenant Selector</label> | ||
<input class="form-control" list="datalistOptions" id="exampleDataList" placeholder="Type to search..." | ||
style="width: 50%;" oninput='onInput()'> | ||
<datalist id="datalistOptions"> | ||
<option value="Select a tenant" text="Select a tenant"> | ||
</datalist> | ||
</div><br> | ||
<div class="card"> | ||
<div class="card-header">Azure AD Device List</div> | ||
<div class="card-body"> | ||
<table id="datatablesSimple"> | ||
<table cellpadding="0" cellspacing="0" class="datatable-1 table table-striped" width="100%"> | ||
<thead> | ||
<tr> | ||
<th>Display Name</th> | ||
<th>Enabled</th> | ||
<th>Compliant</th> | ||
<th>Manufacturer</th> | ||
<th>Model</th> | ||
<th>Operating System</th> | ||
<th>Operating System Version</th> | ||
<th>Created</th> | ||
<th>Approx Last SignIn</th> | ||
<th>Ownership</th> | ||
<th>Enrollment Type</th> | ||
<th>Management Type</th> | ||
<th>On-Premises Sync Enabled</th> | ||
<th>Trust Type</th> | ||
</tr> | ||
</thead> | ||
<tbody id='AccountTable'> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th>Display Name</th> | ||
<th>Enabled</th> | ||
<th>Compliant</th> | ||
<th>Manufacturer</th> | ||
<th>Model</th> | ||
<th>Operating System</th> | ||
<th>Operating System Version</th> | ||
<th>Created</th> | ||
<th>Approx Last SignIn</th> | ||
<th>Ownership</th> | ||
<th>Enrollment Type</th> | ||
<th>Management Type</th> | ||
<th>On-Premises Sync Enabled</th> | ||
<th>Trust Type</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
<script src="js/datatables/jquery.dataTables.js"></script> | ||
<script src="js/tenantlist.js"></script> | ||
<script src="js/datatables/datatablesDevices.js"></script> | ||
|
||
</body> | ||
|
||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
$(document).ready(function () { | ||
let searchParams = new URLSearchParams(window.location.search) | ||
var TenantID = ''; | ||
if (searchParams.has('Tenantfilter')) { | ||
TenantID = searchParams.get('Tenantfilter') | ||
} | ||
|
||
var todayDate = new Date().toISOString().slice(0, 10); | ||
if (TenantID !== '') { | ||
$('.datatable-1').dataTable( | ||
{ | ||
language: { | ||
paginate: { | ||
next: '<i class="fas fa-arrow-right"></i>', | ||
previous: '<i class="fas fa-arrow-left"></i>' | ||
} | ||
}, | ||
"columnDefs": [ | ||
{ "className": "dt-center", "targets": [-1] }, | ||
|
||
], | ||
"deferRender": true, | ||
"pageLength": 25, | ||
responsive: true, | ||
"ajax": { | ||
|
||
"url": "/api/ListDevices?Tenantfilter=" + TenantID, | ||
"dataSrc": "" | ||
}, | ||
dom: 'fBlrtip', | ||
"columns": [ | ||
{ "data": "displayName" }, | ||
{ | ||
"data": "accountEnabled", | ||
"render": function (data, type, row) { | ||
if (type === "export" || type === "sort" || type === "filter") { | ||
return data; | ||
} | ||
if (data === true) { | ||
return '<i class="fas fa-check-circle text-success fa-2x"></i>'; | ||
} else { | ||
return '<i class="fas fa-times-circle text-danger fa-2x"></i></a>'; | ||
} | ||
} | ||
}, | ||
{ | ||
"data": "isCompliant", | ||
"render": function (data, type, row) { | ||
if (type === "export" || type === "sort" || type === "filter") { | ||
return data; | ||
} | ||
if (data === true) { | ||
return '<i class="fas fa-check-circle text-success fa-2x"></i>'; | ||
} else { | ||
return '<i class="fas fa-times-circle text-danger fa-2x"></i></a>'; | ||
} | ||
} | ||
}, | ||
{ "data": "manufacturer" }, | ||
{ "data": "model" }, | ||
{ "data": "operatingSystem" }, | ||
{ "data": "operatingSystemVersion" }, | ||
{ "data": "createdDateTime" }, | ||
{ "data": "approximateLastSignInDateTime" }, | ||
{ "data": "deviceOwnership" }, | ||
{ "data": "enrollmentType" }, | ||
{ "data": "managementType" }, | ||
{ | ||
"data": "onPremisesSyncEnabled", | ||
"render": function (data, type, row) { | ||
if (type === "export" || type === "sort" || type === "filter") { | ||
return data; | ||
} | ||
if (data === true) { | ||
return '<i class="fas fa-check-circle text-success fa-2x"></i>'; | ||
} else { | ||
return '<i class="fas fa-times-circle text-danger fa-2x"></i></a>'; | ||
} | ||
} | ||
}, | ||
{ "data": "trustType" } | ||
], | ||
'columnDefs': [ | ||
{ | ||
"targets": [1, 2, 3, 4, 5, 9, 11, 12, 13], // your case first column | ||
"className": "text-center" | ||
} | ||
], | ||
buttons: [ | ||
{ extend: 'copyHtml5', className: 'btn btn-primary btn-sm' }, | ||
{ extend: 'excelHtml5', className: 'btn btn-primary btn-sm', title: 'Device List - ' + TenantID + " - " + todayDate, exportOptions: {orthogonal: "export"} }, | ||
{ extend: 'csvHtml5', className: 'btn btn-primary btn-sm', title: 'Device List - ' + TenantID + " - " + todayDate, exportOptions: {orthogonal: "export"} }, | ||
{ extend: 'pdfHtml5', className: 'btn btn-primary btn-sm', pageSize: 'A2', orientation: 'landscape', title: 'Device List - ' + TenantID + " - " + todayDate, exportOptions: { columns: [0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], orthogonal: "export" } }, | ||
], | ||
"order": [[0, "asc"]], | ||
} | ||
); | ||
} | ||
else { | ||
$("#AccountTable").append("<tr><td colspan='8'>Select a Tenant to get started.</td></tr>") | ||
} | ||
|
||
$('.dataTables_paginate').addClass("btn-group datatable-pagination"); | ||
$('.dataTables_paginate > a').wrapInner('<span />'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.1.4 | ||
1.1.5 |