Commit 88994978f2bc579192a1ae9a8fa680ec48a2d62d
- Diff rendering mode:
- inline
- side by side
webroot/js/dss/dss-setup-interface/dSS/util/DSMStatisticsWindow.js
(1 / 1)
|   | |||
| 39 | 39 | return n < 10 ? '0' + n: n | |
| 40 | 40 | } | |
| 41 | 41 | ||
| 42 | param_time = "time=" + d.getUTCFullYear() + pad(d.getUTCMonth() + 1) + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + pad(d.getUTCMinutes()) + pad(d.getUTCSeconds()) + 'Z' + ";"; | ||
| 42 | param_time = "time=" + d.getFullYear() + pad(d.getMonth() + 1) + pad(d.getDate()) + 'T' + pad(d.getHours()) + pad(d.getMinutes()) + pad(d.getSeconds()) + (d.getTimezoneOffset() / 60) + ";"; | ||
| 43 | 43 | } | |
| 44 | 44 | ||
| 45 | 45 | var param = param_time + "delay=" + this.form.getForm().getValues().delay + ";repeat=" + this.form.getForm().getValues().repeat + ";dsm=" + this.dsm; |
webroot/js/dss/dss-setup-interface/dSS/util/DeviceStatisticsWindow.js
(1 / 1)
|   | |||
| 39 | 39 | return n < 10 ? '0' + n: n | |
| 40 | 40 | } | |
| 41 | 41 | ||
| 42 | param_time = "time=" + d.getUTCFullYear() + pad(d.getUTCMonth() + 1) + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + pad(d.getUTCMinutes()) + pad(d.getUTCSeconds()) + 'Z' + ";"; | ||
| 42 | param_time = "time=" + d.getFullYear() + pad(d.getMonth() + 1) + pad(d.getDate()) + 'T' + pad(d.getHours()) + pad(d.getMinutes()) + pad(d.getSeconds()) + (d.getTimezoneOffset() / 60) + ";"; | ||
| 43 | 43 | } | |
| 44 | 44 | ||
| 45 | 45 | var param = param_time + "delay=" + this.form.getForm().getValues().delay + ";repeat=" + this.form.getForm().getValues().repeat + ";dsid=" + this.dsids; |
webroot/js/dss/dss-setup-interface/dSS/util/ExtendedPingWindow.js
(1 / 2)
|   | |||
| 22 | 22 | var param_time = ""; | |
| 23 | 23 | ||
| 24 | 24 | if (this.form.getForm().getValues().time != undefined) { | |
| 25 | |||
| 26 | 25 | var current = new Date(); | |
| 27 | 26 | var d = new Date(); | |
| 28 | 27 | var hours = parseInt(this.form.getForm().getValues().time.split(':')[0]); | |
| … | … | ||
| 38 | 38 | return n < 10 ? '0' + n: n | |
| 39 | 39 | } | |
| 40 | 40 | ||
| 41 | param_time = "time=" + d.getUTCFullYear() + pad(d.getUTCMonth() + 1) + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + pad(d.getUTCMinutes()) + pad(d.getUTCSeconds()) + 'Z' + ";"; | ||
| 41 | param_time = "time=" + d.getFullYear() + pad(d.getMonth() + 1) + pad(d.getDate()) + 'T' + pad(d.getHours()) + pad(d.getMinutes()) + pad(d.getSeconds()) + (d.getTimezoneOffset() / 60) + ";"; | ||
| 42 | 42 | } | |
| 43 | 43 | ||
| 44 | 44 | var param = param_time + "delay=" + this.form.getForm().getValues().delay + ";repeat=" + this.form.getForm().getValues().repeat + ";dsid=" + this.dsids; |
webroot/js/dss/dss-setup-interface/dSS/util/TimeInfo.js
(9 / 13)
|   | |||
| 1 | function dateprint(date, month, year, hour, minute | ||
| 2 | /*, second */ | ||
| 3 | ) { | ||
| 1 | Ext.namespace('dSS', 'dSS.time'); | ||
| 2 | |||
| 3 | dSS.time.dateprint = function(date, month, year, hour, minute) { | ||
| 4 | 4 | switch (month) { | |
| 5 | 5 | case 0: | |
| 6 | 6 | month = "Jan"; | |
| … | … | ||
| 46 | 46 | if (hour < 10) hour = ('0' + hour); | |
| 47 | 47 | ||
| 48 | 48 | if (minute < 10) minute = ('0' + minute); | |
| 49 | /* | ||
| 50 | if (second < 10) | ||
| 51 | second = ('0' + second); | ||
| 52 | */ | ||
| 53 | return month + ' ' + date + ' ' + hour + ':' + minute + ', ' + year; // + '.' + second; | ||
| 49 | |||
| 50 | return month + ' ' + date + ' ' + hour + ':' + minute + ', ' + year; | ||
| 54 | 51 | } | |
| 55 | 52 | ||
| 56 | function updateDSSTime() { | ||
| 57 | var t = new Date(new Date().getTime() - dSS.config.dSSTimeDiff); | ||
| 58 | Ext.get('dssTime').update(dateprint(t.getUTCDate(), t.getUTCMonth(), t.getUTCFullYear(), t.getUTCHours(), t.getUTCMinutes() | ||
| 59 | /*, t.getUTCSeconds() */ | ||
| 53 | dSS.time.update = function() { | ||
| 54 | var t = new Date(Date.now() - dSS.config.dSSTimeDiff); | ||
| 55 | Ext.get('dssTime').update(dSS.time.dateprint(t.getDate(), t.getMonth(), t.getFullYear(), t.getHours(), t.getMinutes() | ||
| 60 | 56 | )); | |
| 61 | setTimeout('updateDSSTime()', 1000); | ||
| 57 | setTimeout('dSS.time.update', 1000); | ||
| 62 | 58 | } |
webroot/js/dss/dss-setup-interface/dss-overview-page.js
(2 / 2)
|   | |||
| 54 | 54 | if (data.ok === false) { | |
| 55 | 55 | throw new Ext.Error(_("Could not get dSS time!"), data.error); | |
| 56 | 56 | } | |
| 57 | dSS.config.dSSTimeDiff = (new Date().getTime() - (parseInt(data.message, 10) * 1000)); | ||
| 58 | updateDSSTime(); | ||
| 57 | dSS.config.dSSTimeDiff = (Date.now() - (parseInt(data.message, 10) * 1000)); | ||
| 58 | dSS.time.update(); | ||
| 59 | 59 | ||
| 60 | 60 | } catch(error) {} | |
| 61 | 61 | }, |
webroot/js/dss/dss-setup-interface/dss-setup-interface.js
(3 / 2)
|   | |||
| 12 | 12 | ||
| 13 | 13 | Ext.onReady(function() { | |
| 14 | 14 | Ext.get('start').remove(); | |
| 15 | dSS.config.dSSTimeDiff = 0; | ||
| 15 | 16 | ||
| 16 | 17 | var viewport = new Ext.Viewport({ | |
| 17 | 18 | layout: 'border', | |
| … | … | ||
| 86 | 86 | if (data.ok === false) { | |
| 87 | 87 | throw new Ext.Error(_("Could not get dSS time!"), data.error); | |
| 88 | 88 | } | |
| 89 | dSS.config.dSSTimeDiff = (new Date().getTime() - (parseInt(data.message, 10) * 1000)); | ||
| 90 | updateDSSTime(); | ||
| 89 | dSS.config.dSSTimeDiff = (Date.now() - (parseInt(data.message, 10) * 1000)); | ||
| 90 | dSS.time.update(); | ||
| 91 | 91 | ||
| 92 | 92 | } catch(error) {} | |
| 93 | 93 | }, |

