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

def Nagstamon::nagstamonGUI::GUI::Downtime (   self,
  widget 
)

    schedule downtime for miserable host/service

Definition at line 512 of file nagstamonGUI.py.

00512                               :
        """
            schedule downtime for miserable host/service
        """
        
        # various parameters for the CGI request
        host = self.downtime_xml.get_widget("input_label_host").get_text()
        service = self.downtime_xml.get_widget("input_label_service").get_text()
        author = self.downtime_xml.get_widget("input_entry_author").get_text()
        comment = self.downtime_xml.get_widget("input_entry_comment").get_text()
        
        # start and end time
        start_time = self.downtime_xml.get_widget("input_entry_start_time").get_text()
        end_time = self.downtime_xml.get_widget("input_entry_end_time").get_text()
        # type of downtime - fixed or flexible
        if self.downtime_xml.get_widget("input_radiobutton_type_fixed").get_active() == True: fixed = 1
        else: fixed = 0
        # duration of downtime if flexible
        hours = self.downtime_xml.get_widget("input_spinbutton_duration_hours").get_value()
        minutes = self.downtime_xml.get_widget("input_spinbutton_duration_minutes").get_value()

        #execute POST request with cgi_data, in this case threaded
        downtime = nagstamonActions.Downtime(server=self.popwin.miserable_server, host=host, service=service, author=author, comment=comment, fixed=fixed, start_time=start_time, end_time=end_time, hours=int(hours), minutes=int(minutes))
        downtime.start()


    def AboutDialog(self):


Generated by  Doxygen 1.6.0   Back to index