User Tools

Site Tools


bigsister:howto:views

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
bigsister:howto:views [2017/06/05 21:05]
bigsister:howto:views [2017/06/06 10:04]
Thomas Aeby
Line 1: Line 1:
 +====== Using Views ======
 +
 +A view is
 +
 +  * a section within the BigSister configuration (bb-display.cfg) started with the keyword ''​%View''​
 +  * a sub directory within the web status directory containing only the information referenced in the respective configuration section
 +  * a means for providing users a tailored entry point 
 +  * a means for restricting access to status information
 +
 +===== Creating a View =====
 +
 +In order to create a view you just insert a %View statement into bb-display.cfg. Everything after this statement up to the next %View statement is considered as belonging to this view:
 +
 +<​code>​
 +%View testlab
 +</​code>​
 +
 +The view testlab is automatically correlated to a directory named ''​testlab''​ below your www directory. In order to populate the view you can use the usual statements for creating content:
 +
 +<​code>​
 +%Group
 +srv1(Lab Server 1)  LAB
 +srv2(Lab Server 2)  LAB
 +
 +%View testlab
 +
 +%skin static_lamps techie
 +%Logskin static_lamps techie
 +%Page top Overview
 +%title auto
 +%refto none
 +%refto srv1.disk html/​srv1.disk.html
 +%refto srv1.http html/​srv1.http.html
 +%itemref html
 +%image lab/​display-map.cfg
 +%sort severity
 +%table LAB
 +
 +%Section Summaries
 +%Page errors Problem_Hosts
 +%title All_Hosts_with_Problems
 +%refto none
 +%itemref html
 +%sort severity
 +%select <green
 +%table LAB
 +
 +%Frameset index top Test_Lab
 +</​code>​
 +
 +===== CGI troubles =====
 +
 +Each view requires its own CGI directory, thus, the web server needs to know that it needs to map and actually execute the CGIs. When using Apache you will need i.e.:
 +
 +<​code>​
 +ScriptAliasMatch ^/​bigsis/​.*/​cgi/​(.*) /​usr/​share/​bigsister/​cgi/​$1
 +</​code>​
 +
 +in your Apache configuration.
 +===== Limitting access =====
 +
 +BigSister by itself does not serve content to a user's browser and thus does not itself provide means for authentication and access. In order to limit access to views, you need to configure your web server to do so. An example configuration for Apache might look like:
 +
 +<​code>​
 +<​Location /​bigsis/​lab>​
 +AuthUserFile /​etc/​apache2/​users/​passwd
 +AuthGroupFile /​etc/​apache2/​users/​group
 +AuthType Basic
 +AuthName BigSister
 +Require group labstaff
 +</​Location>​
 +</​code>​
 +
 +Usually, you will also want to limit access to the BigSister base directory, since therein you still find everything. Thus, you will probably add another access limitation like this one:
 +
 +<​code>​
 +<​Location /bigsis>
 +AuthUserFile /​etc/​apache2/​users/​passwd
 +AuthGroupFile /​etc/​apache2/​users/​group
 +AuthType Basic
 +AuthName BigSister
 +Require group itstaff
 +</​Location>​
 +</​code>​
  
bigsister/howto/views.txt ยท Last modified: 2017/06/05 21:05 (external edit)