Seite wählen

NETWAYS Blog

Weekly Snap: IPMI Sensor v2, Multi-Tech iSMS 1.47, OSDC 20% off & SASS for CSS

24 – 28 January announced two new hardware monitoring plugin and firmware releases, introduced Becky and a SASSy solution for CSS topped off with a special 20% off OSDC tickets.
Jannis found a way to make working with CSS fun with SASS stylesheets. A simple colour change need not consume a day, because SASS uses variables that are much easier to alter. And with the help of a compiler the variables, definitions functions and more, turn magically into CSS. Best of all, if you know CSS there is not much more to learn – check out the homepage to test if for yourself.
Following on, Rebecca our events apprentice introduced herself and her impressions of her first few months on board. Working hard on the OSMC of 2010, helping Manuela with everything from invoicing and program planning to interviewing attendees for live testimonials and marketing presentations streamed live, Becky gladly took on responsibility. So much in fact, that she is now organising Nagios, Puppet and Jasper training courses. With 2 years to go in her apprenticeship, she looks to be on the right path with the right attitude – we look forward to more updates along the way.
Becky continued to forward news of the IPMI sensor monitoring plugin v2 release for Nagios/Icinga. The Thomas Krenn plugin monitors the status of hardware such as fan speed, temperature, voltage, power input and more. To these ends it combines with Nagios or Icinga, FreeIPMI (as of v.0.5.1) and Gawk. The plugin is available for free download, with more information on Thomas Krenn’s wiki and exchange.nagios.org or available through special announcement and user mailing lists.
On the topic of hardware monitoring, Martin announced Multi-Tech iSMS’ new firmware 1.47 and plugin. Multi-Tech iSMS‚ new release brings new bug fixes and the ability to enter SIM card PINs in the web interface, removing the need to deactivate them in advance. View the changelog or download the firmware from Multitech. The updated monitoring plugin is available at www.netways.org.
Manuela reminded us to book before 28 Feb and save 20% on the Open Source Data Center Conference. Alongside high calibre presentations the 3rd OSDC will feature Puppet and Jasper workshops on the conference eve. To be sure you know what to expect, she threw in 2 videos of speeches from 2010 on Monitoring with Icinga (Bernd Erk) and Java Monitoring and Troubleshooting (Rainer Jung). And if one event isn’t enough, Manuela also offered an OSMC + OSDC special that saves up to €400. Register now and we’ll see you on 6 -7 April in Nuremberg!

SASS – so macht CSS wieder Spaß

Keiner weiß, wie viele Entwickler schon aus dem Fenster gesprungen sind, weil sie „mal eben schnell“ alle Vorkommnisse eines Grautons und dessen Abstufungen leicht ins bläuliche Färben sollten. CSS wird zwar um viele Features erweitert, doch die Auzeichnungssprache an sich hat sich seit 1998 kaum geändert. Features wie Variablen sucht man vergebens, was einem bleibt ist viel doppelte Arbeit.
Doch bevor nun alle Entwicklungsabteilungen ins Erdgeschoß verlegt werden, möchte ich den Ausweg aus der misere Vorstellen: SASS.
*.sass Dateien sind spezielle Stylesheets, die über einen Compiler einfach in CSS umwandelt werden. Man kann so Variablen, verschachtelte Definitionen, Funktionen und vieles mehr in sein Stylesheet einbauen – der Compiler erstellt daraus dann eine valide CSS-Datei.
Und das beste: Wer CSS kann, muss kaum Neues lernen. Eigentlich kann man damit sofort produktiv loslegen.
Nehmen wir mal ein einfaches Stylesheet:

div.header {
   background-color: #ababab; /*dunkelgrauer Rand*/
   border: 1px solid #dedede; /*grauer Rand*/
}

Mit SASS würde dies wie folgt aussehen:

$theme_color1: rgb(222,222,222) /*Variable mit Farbwert*/
div.header
   background-color: darken($theme_color1, 20%) /*Rand, dank Funktion 20% dunkler als $theme_color*/
   border: $theme_color1 /*grauer Rand*/

Der Vorteil ist sofort ersichtlich: Muss man bei einem neuen Grauton das CSS  an zwei Stellen ändern und sogar den neuen Farbwert des Randes per Hand ausrechen, reicht bei der .sass Datei lediglich eine Änderung in der Variable $theme_color – den Rest erledigt SASS.
Das CSS erstellt man einfach via

sass --watch %sass-quelle%:%ziel-datei% 

Durch den –watch Parameter erkennt SASS, wenn sich Änderungen an der *.sass Datei ergeben haben und aktualisiert das CSS. So kann man direkt am SASS Entwurf arbeiten und sieht das Ergebnis sofort.
Natürlich ist das nur ein kleiner Einblick in die Möglichkeiten. Am besten einfach mal auf die Homepage gehen, ausprobieren und begeistert sein.