forked from loadavg/loadavg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
155 lines (95 loc) · 3.67 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
TODO
clean up and test logUpdateCheck in class.loadavg
SSH
//need to save timestamp with offset
//so we can add support for journalctl
>> API
fix API to authentice when sending data ?
>> all charts run to end of time except for disk data ?
>> activeate eth0 or default primary inet device by default please
not lo0
>> when i activate network adapter for the first time - new logs arent created unless i save settings twice - due to function call
$loadavg->rebuildLogs();
moving
/* //CODE to get variables out of javascript
$todayminval = '<script type="text/javascript">document.write(today_min);</script>';
echo "MIN " . $todayminval . "\n";
$todaymaxval = '<script type="text/javascript">document.write(today_max);</script>';
echo "MAX " . $todaymaxval . "\n";
*/
ssh mdule gives erros when less than 3 datasets in log files
//echo '<pre>'; var_dump($charts); echo '</pre>';
//install error
disable login flooding when installing...
//javascript foreach loop
$.each(alertData, function(k, v) {
//display the key and value pair
//console.log(k + ' is now currently: ' + v); console.log(" ");
for (var i = 0; i < alertData[k].length; ++i) {
getTime = alertData[k][i][0];
console.log (getTime + ' ' + alertData[k][i][1] + ' ' + alertData[k][i][2] );
}
});
//javascript key loop
for (key in array) {
if (key=="module") {
console.log("module: ", array[key]);
console.log("module : ", array['module']);
logIt = array['module']
console.log("module : ", logIt );
if (typeof logIt['Cpu'] != 'undefined') {
console.log("cpu : ", logIt['Cpu'] );
}
}
if (array.hasOwnProperty(key)) size++;
}
//get date starting at 00:00 !!!
/*
var date = new Date();
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
console.log(date.getTime());
*/
//if we are on a page we need to figure it out
if ( lastPart.indexOf("page=") > -1 ) {
//gives me plugin when no data is in header
var MyString1=lastPart.substr(lastPart.lastIndexOf('=') + 1);
console.log('1', MyString1);
//gives me plugin when data is in header
var mySubString=lastPart.substr(lastPart.lastIndexOf('page=') );
console.log('2', mySubString);
var MyString3=mySubString.substring(mySubString.indexOf("=")+1,mySubString.indexOf("&"));
console.log('3', MyString3);
}
//some mobile detectaion code for bootstrap
<script type="text/javascript">
function findBootstrapEnvironment() {
var envs = ['phone', 'tablet', 'desktop'];
$el = $('<div>');
$el.appendTo($('body'));
for (var i = envs.length - 1; i >= 0; i--) {
var env = envs[i];
$el.addClass('hidden-'+env);
if ($el.is(':hidden')) {
$el.remove();
return env
}
};
}
var theEnv = findBootstrapEnvironment();
if (theEnv == 'tablet')
theEnv = 'desktop';
console.log ("The env: ", theEnv);
//if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
if( theEnv == 'phone' ) {
document.write ('<div class="<div class="container fixed">">');
} else
{
//document.write ('<div class="container-fluid">');
document.write ('<div class="container fixed">');
}
</script>
rewrite all mobile code to be properly dynamic via bootstrap when we move to bootstrap 3
- but at least we have a basic working implementation at the moment