www/set_devices.php

Fri, 19 Apr 2024 20:56:55 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 19 Apr 2024 20:56:55 +0200
changeset 689
f94b525f7563
parent 687
www/devices.php@f5d05b420732
child 699
35382668a140
permissions
-rw-r--r--

Create global_json() for all and expanded the data to the complete setup. Added design for the global setup.

685
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 <?php
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
689
f94b525f7563 Create global_json() for all and expanded the data to the complete setup. Added design for the global setup.
Michiel Broek <mbroek@mbse.eu>
parents: 687
diff changeset
3 page_header('Sensor devices', 'set_devices');
685
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 ?>
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 <div id="jqxgrid"></div>
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 <div style="margin-top: 30px;">
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 <div id="cellbegineditevent"></div>
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 <div style="margin-top: 10px;" id="cellendeditevent"></div>
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 </div>
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
12 <!-- Popup editor window. -->
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
13 <div id="popupWindow">
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
14 <div>Edit device</div>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
15 <div style="overflow: hidden;">
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
16 <table style="width: 100%;">
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
17 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
18 <td style="vertical-align: top; float: right; padding: 3px;">Uuid:</td>
687
f5d05b420732 Devices edit popup layout ready.
Michiel Broek <mbroek@mbse.eu>
parents: 686
diff changeset
19 <td align="left" colspan="5" style="vertical-align: top; padding: 3px;"><input id="dev_uuid" readonly /></td>
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
20 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
21 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
22 <td style="vertical-align: top; float: right; padding: 3px;">Description:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
23 <td align="left" colspan="5" style="vertical-align: top; padding: 3px;"><input id="dev_description" /></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
24 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
25 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
26 <td colspan="6"><hr></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
27 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
28 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
29 <td style="vertical-align: top; float: right; padding: 3px;">Device type:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
30 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_type"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
31 <td style="vertical-align: top; float: right; padding: 3px;">I/O direction:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
32 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_direction"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
33 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
34 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
35 <td style="vertical-align: top; float: right; padding: 3px;">Device value:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
36 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_value"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
37 <td style="vertical-align: top; float: right; padding: 3px;">Value offset:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
38 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_offset"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
39 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
40 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
41 <td style="vertical-align: top; float: right; padding: 3px;">Address:</td>
687
f5d05b420732 Devices edit popup layout ready.
Michiel Broek <mbroek@mbse.eu>
parents: 686
diff changeset
42 <td align="left" colspan="2" style="vertical-align: top; padding: 3px;"><input id="dev_address" /></td>
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
43 <td style="vertical-align: top; float: right; padding: 3px;">Subdevice:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
44 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_subdevice"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
45 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
46 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
47 <td style="vertical-align: top; float: right; padding: 3px;">Present:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
48 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_present"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
49 <td style="vertical-align: top; float: right; padding: 3px;">GPIO pin:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
50 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_gpiopin"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
51 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
52 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
53 <td style="vertical-align: top; float: right; padding: 3px;">In use:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
54 <td colspan="2" style="padding: 3px;"><div style="float: left;" id="dev_inuse"></div></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
55 <td style="vertical-align: top; float: right; padding: 3px;">Last change:</td>
687
f5d05b420732 Devices edit popup layout ready.
Michiel Broek <mbroek@mbse.eu>
parents: 686
diff changeset
56 <td align="left" colspan="2" style="vertical-align: top; padding: 3px;"><input id="dev_timestamp" readonly /></td>
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
57 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
58 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
59 <td style="vertical-align: top; float: right; padding: 3px;">Comment:</td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
60 <td align="left" colspan="5" style="vertical-align: top; padding: 3px;"><input id="dev_comment" /></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
61 </tr>
687
f5d05b420732 Devices edit popup layout ready.
Michiel Broek <mbroek@mbse.eu>
parents: 686
diff changeset
62 <tr><td colspan="6"></td></tr>
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
63 <tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
64 <td style="padding-top: 20px;" align="right"><input type="button" id="Delete" value="Delete" /></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
65 <td></td>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
66 <td></td><td></td>
687
f5d05b420732 Devices edit popup layout ready.
Michiel Broek <mbroek@mbse.eu>
parents: 686
diff changeset
67 <td style="padding-top: 20px;" align="right"><input style="margin-right: 5px;" type="button" id="Save" value="Save" /></td>
f5d05b420732 Devices edit popup layout ready.
Michiel Broek <mbroek@mbse.eu>
parents: 686
diff changeset
68 <td style="padding-top: 20px;" align="left"><input id="Cancel" type="button" value="Cancel" /></td>
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
69 </tr>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
70 </table>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
71 <div style="float: right; margin-top: 290px; margin-bottom: 10px;">
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
72 <input style="margin-right: 595px;" type="button" id="Save" value="Save" />
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
73 </div>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
74 </div>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
75 </div>
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
76
685
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 <?php
686
372b2442a30f More work for devices list and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 685
diff changeset
78 confirm_delete();
685
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 page_footer();
819553a2b97e Devices list grid added.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 ?>

mercurial