hi,
is it possible to remove column names from a table?
i dont want to rename it, just want it to be removed
can i?
please help
Thanks for your time
With css yes :
table.splTable th {
display: none;
}
or with js :
$("th:contains('Property')").empty();
If you want to maintain the sorting ability but remove the label :
$("th:contains('Property')>a>.sortLabel").html(" ");
You need to put this js in a ajaxComplete handler
Edit
# cat application.js
$(document).ajaxComplete( function() {
$("th:contains('Property')>a>.sortLabel").html(" ");
});
typically you would use the fields command in either the base search or in a postProcess search,
`your existing search | fields - unwanted_field`
If on the other hand the field in question is important for drilldown configurations, but you don't want to actually display it to the end user, you can use the Table module from Sideview Utils, which has a hiddenFields
param. Fields hidden with the hiddenFields
param are still there and referenceable in drilldown logic, but are not displayed to the end-user as a column.
It sounds like maybe you don't want a table at all. Check out the documentation for the HTML module in Sideview Utils. If you know in advance what the fields and values are that you want to display, you can replace the whole thing with a piece of static HTML into which little dynamic $foo$ tokens are embedded. There's a whole docs page jn there specifically about "using HTML module to replace SingleValue", and you can render all these key value pairs into any arbitrary HTML.
i just want to skip the column name but i want to retain the values in it,
as i am using many table with transpose i am getting row1,column1 and i renamed it to property value, but a number of propert , value is making my dashboard dirty.
please, any other go?
With css yes :
table.splTable th {
display: none;
}
or with js :
$("th:contains('Property')").empty();
If you want to maintain the sorting ability but remove the label :
$("th:contains('Property')>a>.sortLabel").html(" ");
You need to put this js in a ajaxComplete handler
Edit
# cat application.js
$(document).ajaxComplete( function() {
$("th:contains('Property')>a>.sortLabel").html(" ");
});
If you want to hide an entire column worth of data, you should look at using the Sideview Table module, because it has a "hiddenFields" param. Setting fields in that param makes those fields hidden from the screen, but the dashboard still has access to all the hidden values for drilldown searches and drilldown logic.
What about a piece of JS to hide TDs from HTML tables?
Thankss jonuwz,, is it possible to empty the space for heading also?
next time, post your application.js. updated answer.
i tried second option, i didn't find any difference.
cleared cache as well as restarted splunk instance .
updated answer
thanks jonuwz, but wthat if i want certain column names to be skipped
say skip all column names called Property??
shall i use table.splTable th.Property{display:none;}
please help