Introducing...
NagVis is a visualization addon for the well known network managment system Nagios.
NagVis can be used to visualize Nagios Data, e.g. to display IT processes like a mail system or a network infrastructure.
Useful Links:
NagVis is a visualization addon for the well known network managment system Nagios.
NagVis can be used to visualize Nagios Data, e.g. to display IT processes like a mail system or a network infrastructure.
These guidelines have been written to assist new developers by coding for or with NagVis. The guidelines have to be considered in NagVis 1.x by all developers to keep a clean codebase.
// my commentFor multi line comments use the following format:
/** * My multi * line comment */
if(...) {
...
} elseif() {
...
} else {
...
}
When there is only one command (not a whole block) after an if/else statement it is allowed to skip the brackets. But in many cases it is recommended to use the brackets because this makes the code easier to read for others.
Since NagVis 1.6x code NagVis uses 4 spaces for intending code (at line beginnings). Even if it is common to use the tabstop char as representative for 8 spaces we do not allow tabs as intend char. So please care about removing eventually tabstop chars from your code.
The first char has to be upper case. Each new word is upper case too.
We seperate classes in types using the leading grouping keywords like Core, Global, NagVis. Global classes are used by several components. The other classes are used in the seperate packets. Global-Classes are manly extended by local classes in NagVis or Wui. Example for class definition:
class GlobalCore {
...
}
$MAP = new NagVisMap(...);
function setRuntimeValue(...) {
...
}
Each method should have a multi line comment before it starts, like this example:
/**
*
* Gets an input row
*
* @param String $myString Description
* @return Boolean
* @author Lars Michelsen <lars@vertical-visions.de>
*/
function myMethod(...) {
...
}
You do not need to write all the above details down for each method. If it is not neccessary to write the
@returnor
@paramoptions bacause the code is that clear just skip these notes.
$correctExampleVar = TRUE;