초기화
var option = {
url: '../mok/data.{s}.json'
, checkbox: {
enable: true
}
, multipleSort: false
, searchOption: {
pageSize: 0
}
, showIndex: true
, table: {
scrollXEnable: false
, dragColumn: {
enable: true
}
}
, columnOptions: [
FirstGrid.makeColumnOption("time", "time", 180, true, Renderers.timeItemRender)
, FirstGrid.makeColumnOption("name", "name", 50, false)
, FirstGrid.makeColumnOption("port_name", "port", 50, true)
, FirstGrid.makeColumnOption("protocol", "protocol", 60, true)
, FirstGrid.makeColumnOption("src_mac", "sourceMac", 120, true)
, FirstGrid.makeColumnOption("dst_mac", "destinationMac", 120, true)
, FirstGrid.makeColumnOption("src_ip", "sourceIp", 110, true)
, FirstGrid.makeColumnOption("dst_ip", "destinationIp", 110, true)
, FirstGrid.makeColumnOption("count", "count", 50, true)
, FirstGrid.makeColumnOption("action", "action", 50, true)
, FirstGrid.makeColumnOption("state", "status", 50, true)
, FirstGrid.makeColumnOption("timatrix_event_id", "timatrixEventId", 50, true)
]
};
var grid = new FirstGrid.Grid(document.getElementById("list_area"), option);
grid.init();
var sortOptions = [{"field": "time", "sort": FirstGrid.SORT.DESC}];
grid.setSort(sortOptions);