Skip to content

Commit dedfe3b

Browse files
committed
#248 Event and Method logs no longer sort by the formatted date CLOSE #248
1 parent 97f11b2 commit dedfe3b

2 files changed

Lines changed: 27 additions & 27 deletions

File tree

UI/Web/eventlogs.aspx.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Web;
5-
using System.Web.UI;
6-
using System.Web.UI.WebControls;
7-
using OSAE;
8-
9-
public partial class eventlogs : System.Web.UI.Page
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
using OSAE;
8+
9+
public partial class eventlogs : System.Web.UI.Page
1010
{
11-
private OSAE.General.OSAELog Log = new OSAE.General.OSAELog();
12-
13-
protected void Page_Load(object sender, EventArgs e)
14-
{
15-
if (!IsPostBack) BindData();
16-
}
17-
18-
private void BindData()
11+
private OSAE.General.OSAELog Log = new OSAE.General.OSAELog();
12+
13+
protected void Page_Load(object sender, EventArgs e)
14+
{
15+
if (!IsPostBack) BindData();
16+
}
17+
18+
private void BindData()
1919
{
2020
try
2121
{
22-
eventLogGridView.DataSource = OSAESql.RunSQL("SELECT DATE_FORMAT(log_time,'%m/%d %h:%i:%s %p') as log_time,object_name,event_label,parameter_1,parameter_2,from_object_name FROM osae_v_event_log ORDER BY log_time DESC LIMIT 500");
22+
eventLogGridView.DataSource = OSAESql.RunSQL("SELECT DATE_FORMAT(log_time,'%m/%d %h:%i:%s %p') as log_time,object_name,event_label,parameter_1,parameter_2,from_object_name FROM osae_v_event_log ORDER BY osae_v_event_log.log_time DESC LIMIT 500");
2323
eventLogGridView.DataBind();
2424
}
2525
catch (Exception ex)
2626
{
2727
Master.Log.Error("Error retreiving event log", ex);
28-
}
29-
}
30-
31-
protected void clearLogButton_Click(object sender, EventArgs e)
32-
{
33-
OSAE.General.OSAELog.EventLogClear();
34-
BindData();
35-
}
28+
}
29+
}
30+
31+
protected void clearLogButton_Click(object sender, EventArgs e)
32+
{
33+
OSAE.General.OSAELog.EventLogClear();
34+
BindData();
35+
}
3636
}

UI/Web/methodlog.aspx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private void BindData()
2222
{
2323
try
2424
{
25-
methodLogGridView.DataSource = OSAESql.RunSQL("SELECT DATE_FORMAT(entry_time,'%m/%d %h:%i:%s %p') as entry_time, osae_v_method_log.object_name, method_name, if(method_name='RUN SCRIPT', (select script_name from osae_script where script_id=parameter_1), parameter_1) as parameter_1, parameter_2, osae_object.object_name As from_object FROM osae_v_method_log join osae_object on (osae_v_method_log.from_object_id = osae_object.object_id) ORDER BY entry_time DESC, method_log_id DESC LIMIT 500");
25+
methodLogGridView.DataSource = OSAESql.RunSQL("SELECT DATE_FORMAT(entry_time,'%m/%d %h:%i:%s %p') as entry_time, osae_v_method_log.object_name, method_name, if(method_name='RUN SCRIPT', (select script_name from osae_script where script_id=parameter_1), parameter_1) as parameter_1, parameter_2, osae_object.object_name As from_object FROM osae_v_method_log join osae_object on (osae_v_method_log.from_object_id = osae_object.object_id) ORDER BY osae_v_method_log.entry_time DESC, method_log_id DESC LIMIT 500");
2626
methodLogGridView.DataBind();
2727
}
2828
catch (Exception ex)

0 commit comments

Comments
 (0)