Skip to content

Commit 1d097db

Browse files
committedMar 23, 2015
broke out subheader and gave it plugin support
1 parent 3bad433 commit 1d097db

File tree

7 files changed

+319
-335
lines changed

7 files changed

+319
-335
lines changed
 

‎TODO

+15
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,18 @@ disable login flooding when installing...
9191

9292

9393

94+
//if we are on a page we need to figure it out
95+
if ( lastPart.indexOf("page=") > -1 ) {
96+
97+
//gives me plugin when no data is in header
98+
var MyString1=lastPart.substr(lastPart.lastIndexOf('=') + 1);
99+
console.log('1', MyString1);
100+
101+
//gives me plugin when data is in header
102+
var mySubString=lastPart.substr(lastPart.lastIndexOf('page=') );
103+
console.log('2', mySubString);
104+
105+
var MyString3=mySubString.substring(mySubString.indexOf("=")+1,mySubString.indexOf("&"));
106+
console.log('3', MyString3);
107+
108+
}

‎app/layout/subheader.php

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<?php
2+
/**
3+
* LoadAvg - Server Monitoring & Analytics
4+
* http://www.loadavg.com
5+
*
6+
* Subheader - used to add date selector to pages
7+
*
8+
* @link https://github.com/loadavg/loadavg
9+
* @author Karsten Becker
10+
* @copyright 2014 Sputnik7
11+
*
12+
* This file is licensed under the Affero General Public License version 3 or
13+
* later.
14+
*/
15+
?>
16+
17+
18+
<script type="text/javascript">
19+
//used to display browser time
20+
21+
//get the offset for the client timezone
22+
var currentTime = new Date();
23+
24+
//why doest this pull getItemTime from common.js ?
25+
//var browserTime = getItemTime(currentTime);
26+
27+
var hours = currentTime.getHours();
28+
var minutes = currentTime.getMinutes();
29+
var ampm = "";
30+
31+
if (minutes < 10)
32+
minutes = "0" + minutes;
33+
34+
if(hours > 12) { hours = hours - 12; ampm = "pm"; }
35+
else ampm = "am";
36+
37+
var browserTime = hours + ":" + minutes + " " + ampm;
38+
39+
//get the timezone offset
40+
var tz_offset = currentTime.getTimezoneOffset()/60;
41+
42+
</script>
43+
44+
45+
46+
<table class="well lh70 lh70-style" width="100%" border="0" cellspacing="1" cellpadding="3">
47+
<tr>
48+
<td width="30%">
49+
50+
<?php
51+
52+
echo '<strong>Server</strong> ' . LoadAvg::$_settings->general['settings']['title'] . "<br>";
53+
54+
//figure out the time first
55+
$chartTimezoneMode = LoadAvg::$_settings->general['settings']['timezonemode'];
56+
57+
if ($chartTimezoneMode == "UTC") {
58+
$gmtimenow = time() - (int)substr(date('O'),0,3)*60*60;
59+
$theTime = date("h:i a", $gmtimenow) . " UTC";
60+
}
61+
else if ($chartTimezoneMode == "Browser" || $chartTimezoneMode == "Override" ) {
62+
$theTime = '<script type="text/javascript">document.write(browserTime);</script>';
63+
}
64+
65+
66+
//Now let them know what data they are seeing
67+
68+
if ( ( isset($_GET['minDate']) && !empty($_GET['minDate']) ) &&
69+
( isset($_GET['maxDate']) && !empty($_GET['maxDate']) ) )
70+
{
71+
echo '<strong>Viewing</strong> ' . date("l, M. j", strtotime($_GET['minDate']));
72+
echo ' <strong>to</strong> ' . date("M. j", strtotime($_GET['maxDate']));
73+
}
74+
else if ( (isset($_GET['logdate'])) && !empty($_GET['logdate']) )
75+
{
76+
echo '<strong>Viewing </strong> ' . date("l, M. j", strtotime($_GET['logdate']));
77+
//echo date("l, M. j", strtotime($_GET['logdate']));
78+
}
79+
else
80+
{
81+
//echo '<strong>Viewing </strong>' . date("l, M. j ");
82+
echo date("l, M. j ") . " | " . $theTime;
83+
}
84+
85+
?>
86+
87+
</td>
88+
89+
<td width="70%" align="right">
90+
91+
<script type="text/javascript">
92+
// a dirty hack for our form/drop down menu as we need to hack the url for plugins
93+
//as plugins have a ? in the url and a form submit overwrites the ? with the base url
94+
function myfunction() {
95+
96+
//first we get the url
97+
//var url = window.location.href;
98+
var url = document.URL;
99+
var lastPart = url.substr(url.lastIndexOf('/') + 1);
100+
101+
102+
//this means that page is in the url so we are on a page
103+
//if we are on a page we need to add the plugin name back to the url here
104+
if ( lastPart.indexOf("page=") > -1 ) {
105+
106+
console.log('Page is in url!');
107+
108+
//get the modules
109+
var loadModules = [];
110+
loadModules = <?php print(json_encode(LoadPlugins::$_plugins)); ?>;
111+
console.log('loadModules', loadModules);
112+
113+
114+
for ( key in loadModules) {
115+
116+
if ( lastPart.indexOf(key) > -1 ) {
117+
118+
//we need to insert page if we are on a plugin here!!!
119+
var myin = document.createElement("input");
120+
myin.type='hidden';
121+
myin.name='page';
122+
myin.value=key;
123+
124+
//this would append at the end...
125+
//document.getElementById('form_id').appendChild(myin);
126+
//we insert at begining for eg index.php?page=alerts...
127+
document.getElementById('form_id').insertBefore(myin,document.getElementById('form_id').firstChild);
128+
break;
129+
}
130+
}
131+
}
132+
133+
//alert(url);
134+
135+
document.getElementById("form_id").action = "index.php"; // Setting form action to "success.php" page
136+
document.getElementById("form_id").submit(); // Submitting form
137+
138+
}
139+
</script>
140+
141+
<form id = "form_id" onsubmit="this.action=get_action();" method="get" class="margin-none form-horizontal">
142+
143+
<!-- Periods -->
144+
<div class="control-group margin-none">
145+
146+
<?php
147+
if ( isset($showCalendar) && ($showCalendar==true) )
148+
{
149+
?>
150+
151+
<label class="control-label"><b>Period:</b></label>
152+
<div class="controls">
153+
154+
<input type="hidden" id="minDateValue" value="<?php echo date("Y-m-d", strtotime("-". LoadAvg::$_settings->general['settings']['daystokeep'] ." days 00:00:00")); ?>">
155+
<input type="hidden" id="maxDateValue" value="<?php echo date("Y-m-d"); ?>">
156+
157+
<input type="text" id="minDate" name="minDate" value="<?php echo (isset($_GET['minDate']) && !empty($_GET['minDate'])) ? $_GET['minDate'] : ''; ?>" placeholder="Period from" style="width: 70px;height: 18px;">
158+
-
159+
<input type="text" id="maxDate" name="maxDate" value="<?php echo (isset($_GET['minDate']) && !empty($_GET['maxDate'])) ? $_GET['maxDate'] : ''; ?>" placeholder="Period to" style="width: 70px;height: 18px;">
160+
<?php
161+
}
162+
?>
163+
164+
<b class="innerL">Log file:</b>
165+
<select name="logdate" id="logdate" style="width: 110px;height: 28px;">
166+
<?php
167+
168+
$dates = LoadAvg::getDates();
169+
170+
$date_counter = 1;
171+
172+
$totalDates = (int)count($dates);
173+
174+
foreach ( $dates as $date ) {
175+
176+
if ( ($date_counter != $totalDates) )
177+
178+
{
179+
?><option<?php echo ((isset($_GET['logdate']) && !empty($_GET['logdate']) && $_GET['logdate'] == $date) || (!isset($_GET['logdate']) && $date == date('Y-m-d'))) ? ' selected="selected"' : ''; ?> value="<?php echo $date; ?>"><?php echo $date; ?></option><?php
180+
}
181+
else
182+
{
183+
//last date is todays date add for easy access
184+
?><option<?php echo ((isset($_GET['logdate']) && !empty($_GET['logdate']) && $_GET['logdate'] == $date) || (!isset($_GET['logdate']) && $date == date('Y-m-d'))) ? ' selected="selected"' : ''; ?> value="<?php echo $date; ?>"><?php echo 'Today'; ?></option><?php
185+
}
186+
187+
$date_counter++;
188+
}
189+
190+
?>
191+
192+
<input type="hidden" id="page" value="Alert">
193+
194+
</select>
195+
<input onclick="myfunction()" type="button" value="View" class="btn btn-primary" />
196+
</div>
197+
</div>
198+
<!-- End of Periods -->
199+
</form>
200+
201+
</td>
202+
203+
</tr>
204+
</table>
205+
206+

‎app/views/index.php

+11-117
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* LoadAvg - Server Monitoring & Analytics
44
* http://www.loadavg.com
55
*
6-
* Index - chart page interface
6+
* Index - main chart page interface
77
*
88
* @link https://github.com/loadavg/loadavg
99
* @author Karsten Becker
@@ -20,125 +20,14 @@
2020
&& ( $banned == false )
2121
)
2222
{
23-
?>
24-
25-
<script type="text/javascript">
26-
//used to display browser time
27-
28-
//get the offset for the client timezone
29-
var currentTime = new Date();
30-
31-
var tz_offset = currentTime.getTimezoneOffset()/60;
32-
33-
var hours = currentTime.getHours();
34-
var minutes = currentTime.getMinutes();
35-
var ampm = "";
36-
37-
if (minutes < 10) minutes = "0" + minutes;
38-
39-
if(hours > 12) { hours = hours - 12; ampm = "pm"; }
40-
else ampm = "am";
4123

42-
var browserTime = hours + ":" + minutes + " " + ampm;
24+
//grab the subheader
25+
$showCalendar = true;
4326

44-
</script>
45-
46-
<table class="well lh70 lh70-style" width="100%" border="0" cellspacing="1" cellpadding="3">
47-
<tr>
48-
<td width="30%">
49-
50-
<?php
51-
52-
//Let them know what log fiels they are seeing
53-
54-
if ( ( isset($_GET['minDate']) && !empty($_GET['minDate']) ) &&
55-
( isset($_GET['maxDate']) && !empty($_GET['maxDate']) ) )
56-
{
57-
echo '<strong>Viewing</strong> ' . date("l, M. j", strtotime($_GET['minDate']));
58-
echo ' <strong>to</strong> ' . date("M. j", strtotime($_GET['maxDate']));
59-
}
60-
else if ( (isset($_GET['logdate'])) && !empty($_GET['logdate']) )
61-
{
62-
echo '<strong>Viewing </strong> ' . date("l, M. j", strtotime($_GET['logdate']));
63-
}
64-
else
65-
{
66-
echo '<strong>Viewing </strong>' . date("l, M. j ");
67-
}
27+
include( APP_PATH . '/layout/subheader.php');
6828

69-
70-
//print time zone and local time
71-
72-
echo '<br>Server zone ' . LoadAvg::$_settings->general['settings']['timezone'];
73-
74-
$chartTimezoneMode = LoadAvg::$_settings->general['settings']['timezonemode'];
75-
76-
if ($chartTimezoneMode == "UTC") {
77-
$gmtimenow = time() - (int)substr(date('O'),0,3)*60*60;
78-
$theTime = date("h:i a", $gmtimenow) . " UTC";
79-
}
80-
else if ($chartTimezoneMode == "Browser" || $chartTimezoneMode == "Override" ) {
81-
$theTime = '<script type="text/javascript">document.write(browserTime);</script>';
82-
}
83-
84-
echo '<br>Local time ' . $theTime ;
85-
86-
?>
87-
88-
</td>
89-
<td width="70%" align="right">
90-
<form action="" method="get" class="margin-none form-horizontal">
91-
<!-- Periods -->
92-
<div class="control-group margin-none">
93-
<label class="control-label"><b>Period:</b></label>
94-
<div class="controls">
95-
<input type="hidden" id="minDateValue" value="<?php echo date("Y-m-d", strtotime("-". LoadAvg::$_settings->general['settings']['daystokeep'] ." days 00:00:00")); ?>">
96-
<input type="hidden" id="maxDateValue" value="<?php echo date("Y-m-d"); ?>">
97-
98-
<input type="text" id="minDate" name="minDate" value="<?php echo (isset($_GET['minDate']) && !empty($_GET['minDate'])) ? $_GET['minDate'] : ''; ?>" placeholder="Period from" style="width: 70px;height: 18px;">
99-
-
100-
<input type="text" id="maxDate" name="maxDate" value="<?php echo (isset($_GET['minDate']) && !empty($_GET['maxDate'])) ? $_GET['maxDate'] : ''; ?>" placeholder="Period to" style="width: 70px;height: 18px;">
101-
102-
103-
<b class="innerL">Log file:</b>
104-
<select name="logdate" onchange="this.submit()" style="width: 110px;height: 28px;">
105-
<?php
106-
107-
$dates = LoadAvg::getDates();
108-
109-
$date_counter = 1;
110-
111-
$totalDates = (int)count($dates);
112-
113-
foreach ( $dates as $date ) {
114-
115-
if ( ($date_counter != $totalDates) )
116-
117-
{
118-
?><option<?php echo ((isset($_GET['logdate']) && !empty($_GET['logdate']) && $_GET['logdate'] == $date) || (!isset($_GET['logdate']) && $date == date('Y-m-d'))) ? ' selected="selected"' : ''; ?> value="<?php echo $date; ?>"><?php echo $date; ?></option><?php
119-
}
120-
else
121-
{
122-
//last date is todays date add for easy access
123-
?><option<?php echo ((isset($_GET['logdate']) && !empty($_GET['logdate']) && $_GET['logdate'] == $date) || (!isset($_GET['logdate']) && $date == date('Y-m-d'))) ? ' selected="selected"' : ''; ?> value="<?php echo $date; ?>"><?php echo 'Today'; ?></option><?php
124-
}
125-
126-
$date_counter++;
127-
}
128-
129-
?>
130-
</select>
131-
<input type="submit" value="View" class="btn btn-primary" />
132-
</div>
133-
</div>
134-
<!-- End of Periods -->
135-
</form>
136-
</td>
137-
</tr>
138-
</table>
139-
<?php
140-
}
141-
?>
29+
}
30+
?>
14231

14332
<!--
14433
We render all the chart modules out here
@@ -207,6 +96,11 @@
20796
?>
20897

20998
</div>
99+
100+
<?php
101+
echo '<center><strong>Server Time Zone</strong> ' . LoadAvg::$_settings->general['settings']['timezone'] . ' | <strong>Local Time</strong> ' . $theTime . '</center>';
102+
?>
103+
210104
</div>
211105

212106

‎lib/charts/charts.js

+60
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,63 @@ $(function () {
5151
});
5252

5353

54+
/*
55+
* used to save status of accordions for the charting module
56+
* data is saved in a cookie
57+
*/
58+
59+
function storeState() {
60+
61+
62+
var loadCookie = "loadUIcookie";
63+
64+
var myCookie = [];
65+
var jsonObj = {};
66+
67+
//mine
68+
var toggled_div = $('#accordion');
69+
70+
$(toggled_div).children().each(function() {
71+
72+
var id = $(this).attr('id');
73+
if (id != 'separator' )
74+
{
75+
var moduleName = $(this).attr('data-collapse-closed');
76+
77+
//console.log("moduleName " + moduleName);
78+
79+
//if (moduleName != 'undefined' && (moduleName) )
80+
if ( (moduleName) )
81+
{
82+
var status = $(this).attr('cookie-closed');
83+
84+
if ( status == null || !status )
85+
status = "open";
86+
87+
//for when nothinbg has been set its open
88+
if ( status == "true" || status == "open" )
89+
status = "open";
90+
else
91+
status = "closed";
92+
93+
jsonObj[moduleName] = status;
94+
95+
}
96+
}
97+
98+
});
99+
100+
myCookie.push( jsonObj );
101+
102+
// then to get the JSON string
103+
myCookie = JSON.stringify(myCookie);
104+
105+
//get rid of extra brackets on string
106+
var newStr = myCookie.substring(1, myCookie .length-1);
107+
108+
$.cookie(loadCookie, newStr, {expires:365, path: '/'});
109+
110+
// console.log(check_open_divs);
111+
112+
}
113+

‎lib/modules/Apache/apache.js

-16
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@ if (typeof charts == "undefined") {
22
var charts = {};
33
}
44

5-
//needs to be updated to account for timezone overrides
6-
function getItemTime ($itemTime)
7-
{
8-
var hours = $itemTime.getHours()
9-
var minutes = $itemTime.getMinutes()
10-
var ampm = "";
11-
12-
if (minutes < 10) minutes = "0" + minutes
13-
14-
if(hours > 12) { hours = hours - 12; ampm = "pm"; }
15-
else ampm = "am";
16-
17-
$itemTime = hours + ":" + minutes + " " + ampm;
18-
19-
return $itemTime;
20-
}
215

226
charts.apache_usage =
237
{

‎lib/plugins/Alerts/Alerts.php

+4-131
Original file line numberDiff line numberDiff line change
@@ -20,140 +20,13 @@
2020
//open logged in
2121
if ( $loadavg->isLoggedIn() )
2222
{
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-
<script type="text/javascript">
48-
//used to display browser time
49-
50-
//get the offset for the client timezone
51-
var currentTime = new Date();
52-
53-
var tz_offset = currentTime.getTimezoneOffset()/60;
54-
55-
var hours = currentTime.getHours();
56-
var minutes = currentTime.getMinutes();
57-
var ampm = "";
58-
59-
if (minutes < 10) minutes = "0" + minutes;
60-
61-
if(hours > 12) { hours = hours - 12; ampm = "pm"; }
62-
else ampm = "am";
63-
64-
var browserTime = hours + ":" + minutes + " " + ampm;
65-
66-
</script>
67-
68-
<table class="well lh70 lh70-style" width="100%" border="0" cellspacing="1" cellpadding="3">
69-
<tr>
70-
<td width="30%">
71-
72-
<?php
73-
74-
//Let them know what log fiels they are seeing
75-
76-
if ( ( isset($_GET['minDate']) && !empty($_GET['minDate']) ) &&
77-
( isset($_GET['maxDate']) && !empty($_GET['maxDate']) ) )
78-
{
79-
echo '<strong>Viewing</strong> ' . date("l, M. j", strtotime($_GET['minDate']));
80-
echo ' <strong>to</strong> ' . date("M. j", strtotime($_GET['maxDate']));
81-
}
82-
else if ( (isset($_GET['logdate'])) && !empty($_GET['logdate']) )
83-
{
84-
echo '<strong>Viewing </strong> ' . date("l, M. j", strtotime($_GET['logdate']));
85-
}
86-
else
87-
{
88-
echo '<strong>Viewing </strong>' . date("l, M. j ");
89-
}
90-
91-
92-
//print time zone and local time
93-
94-
echo '<br>Server zone ' . LoadAvg::$_settings->general['settings']['timezone'];
95-
96-
$chartTimezoneMode = LoadAvg::$_settings->general['settings']['timezonemode'];
97-
98-
if ($chartTimezoneMode == "UTC") {
99-
$gmtimenow = time() - (int)substr(date('O'),0,3)*60*60;
100-
$theTime = date("h:i a", $gmtimenow) . " UTC";
101-
}
102-
else if ($chartTimezoneMode == "Browser" || $chartTimezoneMode == "Override" ) {
103-
$theTime = '<script type="text/javascript">document.write(browserTime);</script>';
104-
}
105-
106-
echo '<br>Local time ' . $theTime ;
107-
108-
?>
109-
110-
</td>
111-
<td width="70%" align="right">
112-
<form action="" method="get" class="margin-none form-horizontal">
113-
<!-- Periods -->
114-
<div class="control-group margin-none">
115-
<div class="controls">
116-
117-
118-
<b class="innerL">Log file:</b>
119-
<select name="logdate" onchange="this.submit()" style="width: 110px;height: 28px;">
120-
<?php
121-
122-
$dates = LoadAvg::getDates();
123-
124-
$date_counter = 1;
125-
126-
$totalDates = (int)count($dates);
127-
128-
foreach ( $dates as $date ) {
129-
130-
if ( ($date_counter != $totalDates) )
131-
132-
{
133-
?><option<?php echo ((isset($_GET['logdate']) && !empty($_GET['logdate']) && $_GET['logdate'] == $date) || (!isset($_GET['logdate']) && $date == date('Y-m-d'))) ? ' selected="selected"' : ''; ?> value="<?php echo $date; ?>"><?php echo $date; ?></option><?php
134-
}
135-
else
136-
{
137-
//last date is todays date add for easy access
138-
?><option<?php echo ((isset($_GET['logdate']) && !empty($_GET['logdate']) && $_GET['logdate'] == $date) || (!isset($_GET['logdate']) && $date == date('Y-m-d'))) ? ' selected="selected"' : ''; ?> value="<?php echo $date; ?>"><?php echo 'Today'; ?></option><?php
139-
}
140-
141-
$date_counter++;
142-
}
143-
144-
?>
145-
</select>
146-
<input type="submit" value="View" class="btn btn-primary" />
147-
</div>
148-
</div>
149-
<!-- End of Periods -->
150-
</form>
151-
</td>
152-
</tr>
153-
</table>
15423

24+
//grab the subheader
25+
$showCalendar = false;
15526

27+
include( APP_PATH . '/layout/subheader.php');
15628

29+
?>
15730

15831

15932
<!-- need to automate this include for all plugins js code -->

‎public/assets/theme/scripts/system/common.js

+23-71
Original file line numberDiff line numberDiff line change
@@ -3,89 +3,41 @@
33

44

55

6-
function storeState() {
6+
/*
7+
* time converter function - converts timestamps into hours and minutes
8+
*/
79

10+
function timeConverter ( ts ){
811

9-
var loadCookie = "loadUIcookie";
12+
//console.log ("data type : ", toType(ts));
13+
//console.log ("data : ", ts );
1014

11-
var myCookie = [];
12-
var jsonObj = {};
15+
//var timestamp = parseInt(ts);
16+
var timestamp = ts;
1317

14-
//mine
15-
var toggled_div = $('#accordion');
1618

17-
$(toggled_div).children().each(function() {
19+
var dt = new Date( timestamp );
20+
data = (dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds() + ' -- ' + dt );
21+
return data;
22+
};
1823

19-
var id = $(this).attr('id');
20-
if (id != 'separator' )
21-
{
22-
var moduleName = $(this).attr('data-collapse-closed');
24+
/*
25+
* type converter function - where is this used ???
26+
*/
2327

24-
//console.log("moduleName " + moduleName);
28+
function toType (obj) {
29+
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
30+
};
2531

26-
//if (moduleName != 'undefined' && (moduleName) )
27-
if ( (moduleName) )
28-
{
29-
var status = $(this).attr('cookie-closed');
3032

31-
if ( status == null || !status )
32-
status = "open";
33-
34-
//for when nothinbg has been set its open
35-
if ( status == "true" || status == "open" )
36-
status = "open";
37-
else
38-
status = "closed";
39-
40-
jsonObj[moduleName] = status;
41-
42-
}
43-
}
44-
45-
});
46-
47-
myCookie.push( jsonObj );
48-
49-
// then to get the JSON string
50-
myCookie = JSON.stringify(myCookie);
51-
52-
//get rid of extra brackets on string
53-
var newStr = myCookie.substring(1, myCookie .length-1);
54-
55-
$.cookie(loadCookie, newStr, {expires:365, path: '/'});
56-
57-
// console.log(check_open_divs);
58-
59-
}
60-
61-
62-
/////////////////////////////////////////////////////
63-
// functions
64-
////////////////////////////////////////////////////
65-
66-
function timeConverter ( ts ){
67-
68-
//console.log ("data type : ", toType(ts));
69-
//console.log ("data : ", ts );
70-
71-
//var timestamp = parseInt(ts);
72-
var timestamp = ts;
73-
74-
75-
var dt = new Date( timestamp );
76-
data = (dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds() + ' -- ' + dt );
77-
return data;
78-
};
79-
80-
function toType (obj) {
81-
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
82-
};
83-
84-
85-
//chart utility functions - but can be called from charts embedded in plugins
33+
/*
34+
* get the time in hh:mm am/pm format for a date/time object sent over
35+
*
36+
*/
8637

8738
//get item time in hh : mm : am/pm
8839
//needs to be updated to account for timezone overrides
40+
8941
function getItemTime ($itemTime)
9042
{
9143
var hours = $itemTime.getHours()

0 commit comments

Comments
 (0)
Please sign in to comment.