Skip to content
Snippets Groups Projects
Commit dffdc9c2 authored by Robert Anderson's avatar Robert Anderson
Browse files

Fixed eventtimestamp filter and column display

Removed 'add port lock' button
parent 836add68
No related branches found
No related tags found
No related merge requests found
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
$res = new json_response; $res = new json_response;
$res->setID('ID'); $res->setID('ID');
$res->addField('ID','int'); $res->addField('ID','int');
$res->addField('EventTimestamp','int'); $res->addField('EventTimestamp','string');
$res->addField('AcctStatusType','int'); $res->addField('AcctStatusType','int');
$res->addField('ServiceType','int'); $res->addField('ServiceType','int');
$res->addField('FramedProtocol','int'); $res->addField('FramedProtocol','int');
......
...@@ -83,7 +83,12 @@ function getAdminUserLogs($params) { ...@@ -83,7 +83,12 @@ function getAdminUserLogs($params) {
$item = array(); $item = array();
$item['ID'] = $row->id; $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['AcctStatusType'] = $row->acctstatustype;
$item['ServiceType'] = $row->servicetype; $item['ServiceType'] = $row->servicetype;
$item['FramedProtocol'] = $row->framedprotocol; $item['FramedProtocol'] = $row->framedprotocol;
......
...@@ -27,7 +27,7 @@ function showAdminUserLogsWindow(id) { ...@@ -27,7 +27,7 @@ function showAdminUserLogsWindow(id) {
frame: true, frame: true,
defaultType: 'datefield', defaultType: 'datefield',
height: 180, height: 180,
width: 300, width: 320,
labelWidth: 100, labelWidth: 100,
items: [ items: [
{ {
...@@ -35,17 +35,17 @@ function showAdminUserLogsWindow(id) { ...@@ -35,17 +35,17 @@ function showAdminUserLogsWindow(id) {
name: 'after', name: 'after',
width: 180, width: 180,
fieldLabel: 'From', fieldLabel: 'From',
// vtype: 'daterange', vtype: 'daterange',
format: 'Y-m-d', format: 'Y-m-d',
value: firstOfMonth, value: firstOfMonth,
endDateField: 'before', endDateField: 'before'
}, },
{ {
id: 'before', id: 'before',
name: 'before', name: 'before',
width: 180, width: 180,
fieldLabel: 'To', fieldLabel: 'To',
// vtype: 'daterange', vtype: 'daterange',
format: 'Y-m-d', format: 'Y-m-d',
value: firstOfNext, value: firstOfNext,
startDateField: 'after' startDateField: 'after'
...@@ -101,8 +101,8 @@ function showAdminUserLogsWindow(id) { ...@@ -101,8 +101,8 @@ function showAdminUserLogsWindow(id) {
id: 'summaryTotal', id: 'summaryTotal',
name: 'summaryTotal', name: 'summaryTotal',
readOnly: true, readOnly: true,
height: 135, height: 139,
width: 200, width: 275,
fieldLabel: 'Summary', fieldLabel: 'Summary',
fieldClass: 'font-family: monospace; font-size: 10px;', fieldClass: 'font-family: monospace; font-size: 10px;',
value: '' value: ''
...@@ -116,13 +116,6 @@ function showAdminUserLogsWindow(id) { ...@@ -116,13 +116,6 @@ function showAdminUserLogsWindow(id) {
region: 'south', region: 'south',
width: 700, width: 700,
border: true, border: true,
tbar: [
{
text: 'Add Port Lock',
tooltip: 'Add port lock',
iconCls: 'add'
}
],
// Column model // Column model
colModel: new Ext.grid.ColumnModel([ colModel: new Ext.grid.ColumnModel([
{ {
...@@ -206,14 +199,15 @@ function showAdminUserLogsWindow(id) { ...@@ -206,14 +199,15 @@ function showAdminUserLogsWindow(id) {
{ {
filters: [ filters: [
{type: 'numeric', dataIndex: 'ID'}, {type: 'numeric', dataIndex: 'ID'},
/*{ {
type: 'date', type: 'date',
format: 'Y-m-d H:i:s',
dataIndex: 'EventTimestamp', dataIndex: 'EventTimestamp',
value: { value: {
after: firstOfMonth, after: firstOfMonth,
before: firstOfNext before: firstOfNext
} }
},*/ },
{type: 'numeric', dataIndex: 'AcctStatusType'}, {type: 'numeric', dataIndex: 'AcctStatusType'},
{type: 'numeric', dataIndex: 'ServiceType'}, {type: 'numeric', dataIndex: 'ServiceType'},
{type: 'numeric', dataIndex: 'FramedProtocol'}, {type: 'numeric', dataIndex: 'FramedProtocol'},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment