Skip to content

Commit

Permalink
Add detail widget
Browse files Browse the repository at this point in the history
  • Loading branch information
bochoven committed Sep 21, 2019
1 parent 0a8519b commit fef70eb
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
6 changes: 6 additions & 0 deletions provides.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?php

return array(
'detail_widgets' => [
'machine_info_1' => ['view' => 'machine_detail_widget1'],
'machine_info_2' => ['view' => 'machine_detail_widget2'],
'hardware_detail' => ['view' => 'hardware_detail_widget'],
'software_detail' => ['view' => 'software_detail_widget'],
],
'listings' => array(
'hardware' => array('view' => 'hardware_listing', 'i18n' => 'machine.hardware'),
),
Expand Down
23 changes: 23 additions & 0 deletions views/hardware_detail_widget.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="col-lg-4">
<h4 data-i18n="hardware.hardware"></h4>
<table>
<tr>
<th data-i18n="serial"></th><td class="mr-serial_number"></td>
</tr>
<tr>
<th data-i18n="cpu.cpu"></th><td class="mr-cpu"></td>
</tr>
<tr>
<th data-i18n="cpu.type"></th><td><span class="mr-number_processors"></span> <span data-i18n="cpu.core"></span></td>
</tr>
<tr>
<th data-i18n="physical_memory"></th><td><span class="mr-physical_memory"></span> GB</td>
</tr>
<tr>
<th data-i18n="hardware.uuid"></th><td class="mr-platform_UUID"></td>
</tr>
<tr>
<th data-i18n="model"></th><td class="mr-machine_model"></td>
</tr>
</table>
</div>
14 changes: 14 additions & 0 deletions views/machine_detail_widget1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="col-lg-4">
<div class="row">
<div class="col-xs-6">
<img class="img-responsive" src="<?php printf(conf('apple_hardware_icon_url'), substr($serial_number, 8)); ?>" />
</div>
<div class="col-xs-6" style="font-size: 1.4em; overflow: hidden">
<span class="label label-info">macOS <span class="mr-os_version"></span></span><br>
<span class="label label-info"><span class="mr-physical_memory"></span> GB</span><br>
<span class="label label-info"><span class="mr-serial_number"></span></span><br>
<span class="label label-info"><span class="mr-remote_ip"></span></span><br>
</div>
</div>
<span class="mr-machine_desc"></span> <a class="mr-refresh-desc" href=""><i class="fa fa-refresh"></i></a>
</div>
17 changes: 17 additions & 0 deletions views/machine_detail_widget2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="col-lg-4">
<h4 class="mr-computer_name"></h4>
<table>
<tr>
<th data-i18n="last_seen"></th><td class="mr-check-in_date"></td>
</tr>
<tr>
<th data-i18n="uptime"></th><td class="mr-uptime"></td>
</tr>
<tr>
<th data-i18n="business_unit.machine_group"></th><td class="mr-machine_group"></td>
</tr>
<tr>
<th data-i18n="reg_date"></th><td class="mr-reg_date"></td>
</tr>
</table>
</div>
20 changes: 20 additions & 0 deletions views/software_detail_widget.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div class="col-lg-4">
<h4 data-i18n="software.software"></h4>
<table>
<tr>
<th data-i18n="os.version"></th><td>macOS <span class="mr-os_version"></span></td>
</tr>
<tr>
<th data-i18n="buildversion"></th><td class="mr-buildversion"></td>
</tr>
<tr>
<th data-i18n="cpu.arch"></th><td class="mr-cpu_arch"></td>
</tr>
<tr>
<th data-i18n="software.smc_version"></th><td><span class="mr-SMC_version_system"></span></td>
</tr>
<tr>
<th data-i18n="software.boot_rom_version"></th><td class="mr-boot_rom_version"></td>
</tr>
</table>
</div>

0 comments on commit fef70eb

Please sign in to comment.