diff --git a/webgui/ajax.php b/webgui/ajax.php index acc9632d02d9de3426d09126791036c5b7625bfe..fb31692cb568ff1ccb687d138698fdbdc68bf040 100644 --- a/webgui/ajax.php +++ b/webgui/ajax.php @@ -198,7 +198,7 @@ $res = new json_response; $res->setID('ID'); $res->addField('ID','int'); - $res->addField('EventTimestamp','int'); + $res->addField('EventTimestamp','string'); $res->addField('AcctStatusType','int'); $res->addField('ServiceType','int'); $res->addField('FramedProtocol','int'); diff --git a/webgui/include/ajax/functions/AdminUserLogs.php b/webgui/include/ajax/functions/AdminUserLogs.php index c8d5e288adbb926b79bd71979d18447b4427b56b..f6b5beb0808a64accc0b4beb2db23adbafed2e9e 100644 --- a/webgui/include/ajax/functions/AdminUserLogs.php +++ b/webgui/include/ajax/functions/AdminUserLogs.php @@ -83,7 +83,12 @@ function getAdminUserLogs($params) { $item = array(); $item['ID'] = $row->id; - $item['EventTimestamp'] = $row->eventtimestamp; + + # Convert to ISO format + $date = new DateTime($row->eventtimestamp); + $value = $date->format("Y-m-d H:i:s"); + $item['EventTimestamp'] = $value; + $item['AcctStatusType'] = $row->acctstatustype; $item['ServiceType'] = $row->servicetype; $item['FramedProtocol'] = $row->framedprotocol; diff --git a/webgui/js/app/windows/AdminUserLogs.js b/webgui/js/app/windows/AdminUserLogs.js index a694d591ad002ad81e239fc0528b6b374e06bf1c..80ddb0547011b0a4a768e5a88e7b74e6201e1792 100644 --- a/webgui/js/app/windows/AdminUserLogs.js +++ b/webgui/js/app/windows/AdminUserLogs.js @@ -27,7 +27,7 @@ function showAdminUserLogsWindow(id) { frame: true, defaultType: 'datefield', height: 180, - width: 300, + width: 320, labelWidth: 100, items: [ { @@ -35,17 +35,17 @@ function showAdminUserLogsWindow(id) { name: 'after', width: 180, fieldLabel: 'From', -// vtype: 'daterange', + vtype: 'daterange', format: 'Y-m-d', value: firstOfMonth, - endDateField: 'before', + endDateField: 'before' }, { id: 'before', name: 'before', width: 180, fieldLabel: 'To', -// vtype: 'daterange', + vtype: 'daterange', format: 'Y-m-d', value: firstOfNext, startDateField: 'after' @@ -101,8 +101,8 @@ function showAdminUserLogsWindow(id) { id: 'summaryTotal', name: 'summaryTotal', readOnly: true, - height: 135, - width: 200, + height: 139, + width: 275, fieldLabel: 'Summary', fieldClass: 'font-family: monospace; font-size: 10px;', value: '' @@ -116,13 +116,6 @@ function showAdminUserLogsWindow(id) { region: 'south', width: 700, border: true, - tbar: [ - { - text: 'Add Port Lock', - tooltip: 'Add port lock', - iconCls: 'add' - } - ], // Column model colModel: new Ext.grid.ColumnModel([ { @@ -206,14 +199,15 @@ function showAdminUserLogsWindow(id) { { filters: [ {type: 'numeric', dataIndex: 'ID'}, - /*{ + { type: 'date', + format: 'Y-m-d H:i:s', dataIndex: 'EventTimestamp', value: { after: firstOfMonth, before: firstOfNext } - },*/ + }, {type: 'numeric', dataIndex: 'AcctStatusType'}, {type: 'numeric', dataIndex: 'ServiceType'}, {type: 'numeric', dataIndex: 'FramedProtocol'},