HAAGE&PARTNER Computer GmbH  HAAGE&PARTNER

Sawmill Analytics

Analyse und Reporting
für Web | Netzwerk | Sicherheit

Zugriffs- und Datenanalyse von Server-Logs (Proxy, Mailserver, Firewall, Webserver) und Überwachung der Sicherheit & Performance, Schwachstellenanalyse.

Sawmill Analytics 8 | Loganalyse

Sawmill-Tutorial

Customizing the Web Interface


Sawmill's default web interface looks like this:

Standard Admin GUI

The Standard Sawmill Admin Web Interface


Standard Report Web Interface

The Standard Sawmill Reporting Web Interface


The standard web interface is fine for most applications, but in situations where Sawmill is embedded as part of a larger environment, Sawmill's default interface may not align well with the rest of the interface. Fortunately, Sawmill provides many ways of customizing its user interface.


I. Customizing the Colors

Sawmill's web interface is written in HTML (generated by Salang; see below), and uses Cascading Style Sheets (CSS). The CSS files are in LogAnalysisInfo\WebServerRoot\css (the css folder, in the WebServerRoot folder, in the LogAnalysisInfo folder of your installation). By editing these files, you can customize the colors, fonts, and other style attributes of the Sawmill web interface, in any way you choose. This customization is permitted for any tier of Sawmill: Enterprise, Professional, or Lite. The simplest, and most common customization of the Sawmill web interface is modification of the CSS files, to change the colors of the interface from the standard purple to some other theme.

Changing the colors requires several edits to CSS files, which must be done with a text editor. The exact edits are documented in the FAQ entry Customizing the CSS in Sawmill ( http://sawmill.net/cgi-bin/sawmill7/docs/sawmill.cgi?dp+docs.faq.entry+webvars.entry+customize_css ), and may vary between versions of Sawmill. This discusses the changes required for Sawmill 7.2.11. See the FAQ of your own installation of Sawmill, for up-to-date information about customizing it.

Let's change Sawmill to a blue theme. As described in the FAQ entry referenced above, the first change is to change the background color of the top bar. This is in LogAnalysisInfo\WebServerRoot\css\header.css, and we need to change this:


  table.top-bar td {
    background-color: #6A317A;
    white-space: nowrap;
  }



to this:


  table.top-bar td {
    background-color: #31317A;
    white-space: nowrap;
  }


Changing 6A317A to 31317A changes the top bar from purple to dark blue. 31317A is a CSS color code, composed of three hexadecimal one-byte components, for red, green, and blue; so in this case this is red=31, green=31, blue=7A, which is a dark blue. Many tools exist for selecting hexadecimal web colors graphically, including online tools.

After making this change, if you reload, you will see the top bar of the Admin page turn purple. Now, we proceed with the remainder of the changes from the FAQ:
With these changes, all aspects of the web interface will be blue when you reload:

Blue Admin GUI

The Sawmill Admin Web Interface (Customized to Blue)


Blue Report GUI

The Sawmill Reporting Web Interface (Customized to Blue)


II. Customizing the Logo

If you're using Sawmill to deliver reports to your customers or clients, you may not want the upper left logo to say "Sawmill." If you're the owner of Bob's Web Hosting Company, you might want to have the logo show your logo, and "Bob's Reports."

Assuming you have a license which allows modification of the logo of your installation (see below), the logo can be modified by replacing the transparent PNG file at LogAnalysisInfo\WebServerRoot\picts\sawmill_logo.png . Once you have replaced that file with another PNG file (ideally, with transparency, to let the header bar background color show through), reload the web browser page, and the new logo should appear.

WARNING: Customizing the logo is a violation of standard licensing, as described in the End User License Agreement (EULA) for Sawmill. Regardless of which tier you use (Lite, Professional, or Enterprise), you may not remove or change the Sawmill logo without written permission from Flowerfire. If you want to change this logo, you must contact Flowerfire for a license which allows it.


III. Renaming the Product

Beyond changing the logo, you can also modify Sawmill to change the name of the product from "Sawmill" to something else (like "Bob's Reports"). This is a simple one-line change to a single text file, to change the name of the product in all locations in the web interface, the command line, and the documentation. Exact instructions for changing the product name are available through Flowerfire, if you have a license which permits it.

WARNING
: Renaming the product is a violation of the standard licensing, as described in the EULA. Permission to rename must be negotiated separately with Flowerfire.

WARNING
: The Flowerfire copyright notice, which appears at the bottom of every page in the web interface, may never be changed or removed.


IV. Advanced Customization of the Web Interface

If you have Enterprise licensing, there is almost no limit to the customization you can do, provided you stay within the terms of the EULA (don't change the logo, the product name, or the copyright notice, unless you have written permission). That's because Sawmill's web interface is written entirely in Salang, the Sawmill Language, and the source code of the web interface is contained in the LogAnalysisInfo\templates folder. In an Enterprise installation, the source code is open to be modified using a text editor. Salang is an interpreted language with some similarity to perl and C, and an experienced web programmer can modify the Salang source code to change anything in the web interface. If you want to change the location of components of the GUI, add new functionality, or completely change the way existing functionality works, you can do it by developing in Salang. However, the templates cannot be changed in Professional or Lite installations of Sawmill; if templates are changed, Sawmill will cease to function, giving an error when the template is accessed, until it is restored to its original content.

If you make significant modifications to the templates, you should seriously consider using a version control system. Each release of Sawmill, including minor releases, includes some changes to the templates, and if the changes affect files you have modified, you will have to choose between getting the new changes, keeping your own changes, or re-patching your changes into the new versions of the files. The last option, which is the best one, is made trivial by a version control system, which will allow you to monitor changes to the basic Sawmill distribution, and overlay your own changes over the distribution with each release. This can also be done with a diff-and-patch approach, but version control is generally more flexible.





Professionelle Dienstleistungen

Sollten Sie die Anpassung von Sawmill Analytics nicht selbst vornehmen wollen, können wir Ihnen dies als Dienstleisung anbieten. Unsere Experten setzen sich gerne mit Ihnen in Verbindung, um die Reports oder sonstige Aspekte von Sawmill Analytics an Ihre Gegebenheiten und Wünsche anzupassen. Kontakt

Zur Tutorial-Übersicht

Weitere Informationen

      Live-Demonstrationen »    
© 1995-2011 HAAGE & PARTNER Computer GmbH · Impressum · Datenschutz · www.haage-partner.de