Hi, My table has 7 fields, but I want to hide one of them which is Database ID. However, I still want Database ID to appear in the row expansion. Here's my JS code: var search2 = new SearchManager({
id: "search2",
preview: true,
cache: true,
search: "index=assets_py asset_type=database | rename database_id as \"Database ID\" data_source as \"Data Source\" source_type as \"Source Type\" anomaly_count as \"Anomaly Count\" data_source as \"Data Source\" hostname as \"Host Name\" ip as IP port as Port | fields \"Database ID\", \"Data Source\", \"Source Type\", \"Anomaly Count\", \"Host Name\", IP, Port| fields - _time _bkt _cd _indextime _kv _raw _serial _si _sourcetype"
});
// Create a table for a custom row expander
var mycustomrowtable = new TableView({
id: "table-customrow",
managerid: "search2",
drilldown: "none",
fields: ["Data Source", "Source Type", "Anomaly Count", "Host Name", "IP", "Port"],
el: $("#table-customrow")
});
var CustomRowRenderer = TableView.BaseRowExpansionRenderer.extend({
canRender: function(rowData) {
console.log("RowData: ", rowData);
return true;
},
render: function($container, rowData) {
// Print the rowData object to the console
console.log("RowData: ", rowData);
// Display some of the rowData in the expanded row
$container.append("<div>"
+ "<b>Database ID</b>: " + rowData.values[0]
+ "</div>");
}
}); Attached file is what it looks like on UI. Instead of Database ID: FinanceDB, I want the row expansion to show the real Database ID for this database, but it seems like the hidden Database ID is not in fields. Could someone guide me through this? Thank you!
... View more