Skip to content

Commit

Permalink
improve repots view
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Kueng committed Oct 10, 2023
1 parent 0a56f75 commit f0fc714
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 29 deletions.
4 changes: 2 additions & 2 deletions app/reports/static/reports/js/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,8 @@ function showPassword(reason) {
success: function(data) {
var html = data + ' <button type="button" class="btn btn-default btn-xs" onclick="copyTextToClipboard(\'' + data + '\');"><i class="fa fa-clipboard" aria-hidden="true"></i></button>'
$("#password").html( html );
$("#reasonForm").addClass("hidden")
$("#showPassTable").removeClass("hidden")
$("#reasonForm").addClass("d-none")
$("#showPassTable").removeClass("d-none")
passwordAccessTable.ajax.reload();
},
error: function(jqXHR, textStatus, errorThrown) {
Expand Down
62 changes: 36 additions & 26 deletions app/reports/templates/reports/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
<div class="modal-dialog modal-xl modal-dialog-scrollable modal-fullscreen-xl-down">
<div class="modal-content">
<div class="modal-header {% if report_plist.Errors %}client-error{% elif report_plist.Warnings %}client-warning{% endif %}">
<div class="col-sm-3 text-center machineIcon">
<div class="col-sm-3 machineIcon">
<img id="iconDetail" src='{{ machine.img_url }}' alt="" width="100" />
{% if perms.reports.delete_machine and perms.manifests.delete_manifests %}
<div class="overlay"></div>
<div class="button" data-toggle="modal" data-target="#deleteConfirmationModal"><i class="fas fa-trash"></i></div>
{% endif %}
</div>
<div class="col-sm-6">
<h2>{% if machine.hostname %}{{ machine.hostname.strip }}{% else %}{{ machine.serial_number.strip }}{% endif %}
<button type="button" class="btn btn-link" onclick="copyTextToClipboard('{% if machine.hostname %}{{ machine.hostname.strip }}{% else %}{{ machine.serial_number.strip }}{% endif %}');"><i class="fas fa-copy"></i></button>
<h2>
{% if machine.hostname %}{{ machine.hostname.strip }}{% else %}{{ machine.serial_number.strip }}{% endif %}
</h2>
<h4>
<h4 class="d-none d-sm-block">
<small>
<b id="machineModel">{{ machine.machine_model }}</b> | {{ report_plist.MachineInfo.SystemProfile.0.SPHardwareDataType.0.machine_model }}
</small>
</h4>
</div>
{% if machine.hostname %}
<div class="pull-left hidden-xs" style="margin-top:15px;">
<a type="button" class="btn btn-link" href="vnc://{{ machine.hostname.strip }}">ScreenSharing <i class="far fa-clone"></i></a>
<a type="button" class="btn btn-link" href="ssh://{{ vault_username }}@{{ machine.hostname.strip }}">SSH <i class="fas fa-terminal"></i></a>
<div class="d-none d-sm-block">
<a type="button" class="btn btn-secondary" href="vnc://{{ machine.hostname.strip }}">ScreenSharing <i class="far fa-clone"></i></a>
<a type="button" class="btn btn-secondary" href="ssh://{{ vault_username }}@{{ machine.hostname.strip }}">SSH <i class="fas fa-terminal"></i></a>
</div>
{% endif %}
</div>
Expand Down Expand Up @@ -60,14 +60,18 @@ <h4>
<div class='col-md-6'>
<div class="section_label"><h4>Included Manifests</h4></div>
<div id='included_manifests' class='included_manifests_section list-group'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
<!-- Catalogs -->
<div class='col-md-6'>
<div class="section_label"><h4>Catalogs</h4></div>
<div id='catalogs' class='list-group'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
</div>
Expand All @@ -77,32 +81,35 @@ <h4>
<div class="section_label"><h4>Managed Installs</h4></div>
<div class='list-group'>
<div id='managed_installs'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div id='managed_installs_remote'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
</div>
</div>
</div>
<div class='col-md-12'>
<div class="section_label"><h4>Managed Uninstalls</h4></div>
<div class='list-group'>
<div id='managed_uninstalls'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div id='managed_uninstalls_remote'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
</div>
</div>
</div>
<div class='col-md-12'>
<div class="section_label"><h4>Optional Installs</h4></div>
<div class='list-group'>
<div id='optional_installs'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div id='optional_installs_remote'>
<i class="fas fa-spinner fa-pulse fa-1x"></i>
</div>
</div>
</div>
Expand Down Expand Up @@ -482,13 +489,21 @@ <h5 style="margin-top: 0px">{{ partition.partitionName }}</h5>
</div>
</div>
</div>
{% if perms.vault.view_passwordAccess %}
{% if perms.vault.view_passwordAccess %}
<div class="tab-pane show tabDetail" id="admintab-pane" role="tabpanel" aria-labelledby="admintab" tabindex="0">
<div class="panel-body">
<div class="row">
<div class="row mb-3">
<div class='col-md-12' id="showPass">
<h4>Admin login</h4>
<table id="showPassTable" class='table table-bordered hidden'>
<form id="reasonForm">
<div class="input-group mb-2">
<span class="input-group-text">Reason</span>
<textarea class="form-control" aria-label="Reason"></textarea>
</div>
<button type="submit" class="btn btn-primary" id="showPassButton">Show</button>
</form>

<table id="showPassTable" class='table table-bordered d-none'>
<tbody>
<tr>
<td style='width: 90px;'><b>User</b></td>
Expand All @@ -500,14 +515,9 @@ <h4>Admin login</h4>
</tr>
</tbody>
</table>
<form id="reasonForm">
<div class="form-group">
<label for="comment">Reason:</label>
<textarea class="form-control" rows="2"></textarea>
</div>
<button type="submit" class="btn btn-primary pull-right" id="showPassButton">Show</button>
</form>
</div>
</div>
</div>
<div class="row">
<div class='col-md-12'>
<div class="section_label"><h4>Admin access</h4></div>
<table id="passwordAccess" class="table table-striped table-bordered" width="100%">
Expand Down
4 changes: 3 additions & 1 deletion app/reports/templates/reports/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{% endblock java_script %}

{% block content %}

<!--
<div class="btn-group" role="group">
<button class="btn btn-default mac filterDevices {% if 'mac' in filterDevices %}active{% endif %}">Mac</button>
<button class="btn btn-default macbook filterDevices {% if 'macbook' in filterDevices %}active{% endif %}">MacBook</button>
Expand All @@ -26,7 +28,7 @@
<div class="btn-group pull-right" role="group">
<button class="grid grid_list btn btn-default active"><i class="fa fa-th" aria-hidden="true"></i></button>
<button class="list fix-margin-list-btn grid_list btn btn-default"><i class="fa fa-list" aria-hidden="true"></i></button>
</div>
</div> -->

<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
Expand Down

0 comments on commit f0fc714

Please sign in to comment.