Logo Search packages:      
Sourcecode: nagstamon version File versions  Download package

def Nagstamon::nagstamonGUI::GUI::__init__ (   self,
  kwds 
)

    some fundamental preliminaries

Definition at line 47 of file nagstamonGUI.py.

00047                               :
        """
            some fundamental preliminaries
        """
        # add all keywords to object
        for k in kwds: self.__dict__[k] = kwds[k]
        
        # Meta
        self.name = "nagstamon"
        self.version = "0.9.2"
        self.website = "http://nagstamon.sourceforge.net/"
        self.copyright = "©2008-2010 Henri Wahl\nh.wahl@ifw-dresden.de"
        self.comments = "Nagios status monitor for your desktop"
        
        # get resources directory from current directory - only if not being set before by pkg_resources
        if self.Resources == "": self.Resources = os.path.normcase(os.getcwd() + "/resources")
            
        # get and store local username for use with acknowledge + downtime actions
        if platform.system() == "Windows":
            self.username = os.environ["USERNAME"]
        else:
            self.username = pwd.getpwuid(os.getuid())[0]

        # initialize overall status flag
        self.status_ok = True
        
        # if run first it is impossible to refresh the display with
        # non-existent settings so there has to be extra treatment 
        # at the second run nagstamon will be configured and so no first run
        if self.conf.unconfigured:
            self.firstrun = True
        else:
            self.firstrun = False
            
        # font size, later adjusted by StatusBar
        self.fontsize = 10000
            
        # store information about monitors
        self.monitors = dict()
        self.current_monitor = 0
        
        # create all GUI widgets
        self.CreateOutputVisuals()

        # set size of popup-window
        self.popwin.Resize()
        
        # define colors for detailed status table in dictionaries
        self.tab_bg_colors = { "UNKNOWN":"orange", "CRITICAL":"red", "WARNING":"yellow", "DOWN":"black", "UNREACHABLE":"darkred"  }
        self.tab_fg_colors = { "UNKNOWN":"black", "CRITICAL":"white", "WARNING":"black", "DOWN":"white", "UNREACHABLE":"white" }
    
        # flag which is set True if already notifying
        self.Notifying = False
        
        # flag if settings dialog is already open to omit various open settings dialogs after systray icon context menu click
        self.SettingsDialogOpen = False
        

    def __del__(self):


Generated by  Doxygen 1.6.0   Back to index