-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriveMap.page
More file actions
38 lines (38 loc) · 1.31 KB
/
Copy pathDriveMap.page
File metadata and controls
38 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Menu="Main:6"
Title="Drive Map"
Tag="th"
---
<?PHP
$plugin = '45d-drivemap';
$asset_root = "/plugins/$plugin/assets/45d";
$asset_base = "$asset_root/45drives-disks";
$api_base = "/plugins/$plugin/php/api.php";
$embedded_fs = "/usr/local/emhttp/plugins/$plugin/assets/45d/45drives-disks/index.html";
$use_embedded = is_file($embedded_fs);
?>
<?if ($use_embedded):?>
<style>
#drivemap-frame {
width: 100%;
height: 80vh;
min-height: 720px;
border: 0;
}
</style>
<iframe id="drivemap-frame" title="45D Drive Map" src="<?=$asset_base?>/index.html"></iframe>
<?else:?>
<link rel="stylesheet" href="<?=$asset_root?>/drivemap.css">
<div id="drive-map-app" class="drivemap" data-api="<?=$api_base?>" data-asset-base="<?=$asset_root?>">
<div class="drivemap-toolbar">
<div class="drivemap-title">45D Drive Map</div>
<div class="drivemap-meta">
<span id="drivemap-status">Loading map...</span>
<input id="drivemap-refresh" type="button" value="Refresh">
</div>
</div>
<div id="drivemap-error" class="drivemap-error" style="display:none;"></div>
<div id="drivemap-canvas" class="drivemap-canvas"></div>
<div id="drivemap-details" class="drivemap-details">Select a bay to see drive details.</div>
</div>
<script src="<?=$asset_root?>/drivemap.js"></script>
<?endif;?>