Archive

Controlling the width of views in a panel

Path Finder

I have found a couple of posts that indicate there is a way to have a measure of control the width of views in a panel. My understanding is that I create a style sheet containing the following:

.panelrow1col .layoutCell {
width:25% !important;
}
.panelrow1col .firstCell {
width:75% !important;
}

Named custom_width.css and store it in /appserver/static. In this example, I understand that column 1 will have 25% of the width and column 2 will have 75%. I then have to reference the style sheet in the view. Here is the xml I am testing:






*
False
1


Previous week

index = internal
<module name="SimpleResultsTable" layoutPanel="panel
row1col1">
raw

_raw

<!-- End HiddenSearch-->
<!-- End TimeRangePicker-->

I have restarted splunk before testing this, but it is not working as expected. Does anyone know if this will actually work of if I have missed something?

Thanks

Tags (2)
0 Karma

New Member

I know this an old post, but since there is no reply I would like to contribute my 2 cents. Hope this is helpful for someone.

I had a similar requirement for adjusting the panel width, but for a specific view. When I tried the above solution as suggested by few posts, including this one: http://answers.splunk.com/answers/63707/how-to-control-the-width-of-a-panel, it did not give the results I was looking for.

A small adjustment to the above solution worked for me:
1) Did not add any reference to a stylesheet in my XML (Defaulted to application.css)
2) Clicked on "view source" for my Dashboard and noted the view name within the class. ".splView-ViewName"
3) Added the following lines to my application.css:

.splView-ViewName .panelrow1col .layoutCell {
width:25% !important;
}
.splView-ViewName .panelrow1col .firstCell {
width:75% !important;
}

0 Karma