www-thermferm/js/maintenance_panel.js

changeset 130
25158b08843f
parent 129
2817c65fba89
child 131
528dc0bb81ab
equal deleted inserted replaced
129:2817c65fba89 130:25158b08843f
19 * along with ThermFerm; see the file COPYING. If not, write to the Free 19 * along with ThermFerm; see the file COPYING. If not, write to the Free
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 *****************************************************************************/ 21 *****************************************************************************/
22 22
23 $(document).ready(function () { 23 $(document).ready(function () {
24 var source_bus = { 24 /*
25 * 1-Wire bus
26 */
27 var source_bus = {
25 datatype: "json", 28 datatype: "json",
26 datafields: [ 29 datafields: [
27 { name: 'Address', type: 'string' }, 30 { name: 'Address', type: 'string' },
28 { name: 'Refcnt', type: 'int' }, 31 { name: 'Refcnt', type: 'int' },
29 { name: 'Chip', type: 'string' }, 32 { name: 'Chip', type: 'string' },
42 { text: 'References', datafield: 'Refcnt', width: 100 }, 45 { text: 'References', datafield: 'Refcnt', width: 100 },
43 { text: 'Chipset', datafield: 'Chip', width: 120 }, 46 { text: 'Chipset', datafield: 'Chip', width: 120 },
44 { text: 'Description', datafield: 'Description', minwidth: 120 } 47 { text: 'Description', datafield: 'Description', minwidth: 120 }
45 ] 48 ]
46 }); 49 });
50
51 /*
52 * Profiles
53 */
54 var source_profiles = {
55 datatype: "json",
56 datafields: [
57 { name: 'Id', type: 'int' },
58 { name: 'UUID', type: 'string' },
59 { name: 'Name', type: 'string' },
60 { name: 'Steps', type: 'int' }
61 ],
62 url: 'getprofiles.php'
63 };
64 var dataAdapter_profiles = new $.jqx.dataAdapter(source_profiles);
65 $("#jqxgrid_profiles").jqxGrid( {
66 width: 770, height: 280,
67 source: dataAdapter_profiles,
68 theme: 'ui-redmond',
69 columnsresize: true,
70 columns: [
71 { text: 'Id', datafield: 'Id', width: 40 },
72 { text: 'UUID', datafield: 'UUID', width: 280 },
73 { text: 'Name', datafield: 'Name', minwidth: 120 },
74 { text: 'Steps', datafield: 'Steps', width: 50 }
75 ]
76 });
77
78 /*
79 * Units
80 */
81 var source_units = {
82 datatype: "json",
83 datafields: [
84 { name: 'Id', type: 'int' },
85 { name: 'UUID', type: 'string' },
86 { name: 'Name', type: 'string' },
87 { name: 'Mode', type: 'string' }
88 ],
89 url: 'getunits.php'
90 };
91 var dataAdapter_units = new $.jqx.dataAdapter(source_units);
92 $("#jqxgrid_units").jqxGrid( {
93 width: 770, height: 280,
94 source: dataAdapter_units,
95 theme: 'ui-redmond',
96 columnsresize: true,
97 columns: [
98 { text: 'Id', datafield: 'Id', width: 40 },
99 { text: 'UUID', datafield: 'UUID', width: 280 },
100 { text: 'Name', datafield: 'Name', minwidth: 120 },
101 { text: 'Mode', datafield: 'Mode', width: 70 }
102 ]
103 });
47 }); 104 });

mercurial