www/js/list_onewire.js

changeset 731
8b7c63bddf75
parent 696
fe042f9484ac
equal deleted inserted replaced
730:6eba006ed8f5 731:8b7c63bddf75
29 datafields: [ 29 datafields: [
30 { name: 'address', type: 'string' }, 30 { name: 'address', type: 'string' },
31 { name: 'family', type: 'string' }, 31 { name: 'family', type: 'string' },
32 { name: 'value', type: 'int' }, 32 { name: 'value', type: 'int' },
33 { name: 'present', type: 'string' }, 33 { name: 'present', type: 'string' },
34 { name: 'rd_cache', type: 'int' },
35 { name: 'wr_cache', type: 'int' },
34 { name: 'timestamp', type: 'int' } 36 { name: 'timestamp', type: 'int' }
35 ], 37 ],
36 id: 'address', 38 id: 'address',
37 url: 'getonewire.php' 39 url: 'getonewire.php'
38 }, 40 },
55 }, 57 },
56 columns: [ 58 columns: [
57 { text: 'Address', datafield: 'address' }, 59 { text: 'Address', datafield: 'address' },
58 { text: 'Family', datafield: 'family', width: 100 }, 60 { text: 'Family', datafield: 'family', width: 100 },
59 { text: 'Present', datafield: 'present', width: 120 }, 61 { text: 'Present', datafield: 'present', width: 120 },
62 { text: 'Rd cache', datafield: 'rd_cache', width: 100 },
63 { text: 'Wr cache', datafield: 'wr_cache', width: 100 },
60 { text: 'Value', datafield: 'value', width: 100 }, 64 { text: 'Value', datafield: 'value', width: 100 },
61 { text: 'Last change', datafield: 'timestamp', width: 200, 65 { text: 'Last change', datafield: 'timestamp', width: 200,
62 cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { 66 cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) {
63 var date = new Date((value * 1000) - tzoffset).toISOString().slice(0, 19).replace("T", " "); 67 var date = new Date((value * 1000) - tzoffset).toISOString().slice(0, 19).replace("T", " ");
64 return '<span style="margin: 3px; margin-top: 6px; float: left;">' + date + '</span>'; 68 return '<span style="margin: 3px; margin-top: 6px; float: left;">' + date + '</span>';

mercurial