www-thermferm/js/maintenance_panel.js

changeset 130
25158b08843f
parent 129
2817c65fba89
child 131
528dc0bb81ab
--- a/www-thermferm/js/maintenance_panel.js	Wed Jul 23 21:34:02 2014 +0200
+++ b/www-thermferm/js/maintenance_panel.js	Thu Jul 24 17:42:34 2014 +0200
@@ -21,7 +21,10 @@
  *****************************************************************************/
 
 $(document).ready(function () {
-   var source_bus = {
+    /*
+     * 1-Wire bus
+     */
+    var source_bus = {
      	datatype: "json",
      	datafields: [
        	    { name: 'Address', type: 'string' },
@@ -44,4 +47,58 @@
 	    { text: 'Description', datafield: 'Description', minwidth: 120 }
 	]
     });
+
+    /*
+     * Profiles
+     */
+    var source_profiles = {
+        datatype: "json",
+        datafields: [
+            { name: 'Id', type: 'int' },
+            { name: 'UUID', type: 'string' },
+            { name: 'Name', type: 'string' },
+            { name: 'Steps', type: 'int' }
+        ],
+        url: 'getprofiles.php'
+    };
+    var dataAdapter_profiles = new $.jqx.dataAdapter(source_profiles);
+    $("#jqxgrid_profiles").jqxGrid( {
+        width: 770, height: 280,
+        source: dataAdapter_profiles,
+        theme: 'ui-redmond',
+        columnsresize: true,
+        columns: [
+            { text: 'Id', datafield: 'Id', width: 40 },
+            { text: 'UUID', datafield: 'UUID', width: 280 },
+            { text: 'Name', datafield: 'Name', minwidth: 120 },
+            { text: 'Steps', datafield: 'Steps', width: 50 }
+        ]
+    });
+
+    /*
+     * Units
+     */
+    var source_units = {
+        datatype: "json",
+        datafields: [
+            { name: 'Id', type: 'int' },
+            { name: 'UUID', type: 'string' },
+            { name: 'Name', type: 'string' },
+            { name: 'Mode', type: 'string' }
+        ],
+        url: 'getunits.php'
+    };
+    var dataAdapter_units = new $.jqx.dataAdapter(source_units);
+    $("#jqxgrid_units").jqxGrid( {
+        width: 770, height: 280,
+        source: dataAdapter_units,
+        theme: 'ui-redmond',
+        columnsresize: true,
+        columns: [
+            { text: 'Id', datafield: 'Id', width: 40 },
+            { text: 'UUID', datafield: 'UUID', width: 280 },
+            { text: 'Name', datafield: 'Name', minwidth: 120 },
+            { text: 'Mode', datafield: 'Mode', width: 70 }
+        ]
+    });
 });

mercurial