Ejemplo n.º 1
0
 def format_config_string(self, attrs):
     """
         Formats and returns a config string.
         Attrs is a list of attributes on the path to the element in config
         tree.
     """
     val = log_config_get(self.log_type, attrs)
     return self.format_string(val)
Ejemplo n.º 2
0
 def format_config_string(self, attrs):
     """
         Formats and returns a config string.
         Attrs is a list of attributes on the path to the element in config
         tree.
     """
     val = log_config_get(self.log_type, attrs)
     return self.format_string(val)
Ejemplo n.º 3
0
 def get_box(self):
     """
         Returns a dictionary of values used in filling the updates box
         entry.
     """
     val = {
         'Title': self.format_config_string(['Box_entry', 'Title']),
         'Text': self.format_config_string(['Box_entry', 'Text']),
         'Image_url': self.format_config_string(['Box_entry', 'Image_url']),
         'By': self.format_config_string(['Box_entry', 'By']),
         'By_id': log_config_get(self.log_type, ['Box_entry', 'By_id']),
         'Job_id': self.job_id,
     }
     return val
Ejemplo n.º 4
0
 def get_box(self):
     """
         Returns a dictionary of values used in filling the updates box
         entry.
     """
     val = {
         'Title': self.format_config_string(['Box_entry', 'Title']),
         'Text': self.format_config_string(['Box_entry', 'Text']),
         'Image_url': self.format_config_string(['Box_entry', 'Image_url']),
         'By': self.format_config_string(['Box_entry', 'By']),
         'By_id': log_config_get(self.log_type, ['Box_entry', 'By_id']),
         'Job_id': self.job_id,
     }
     return val
Ejemplo n.º 5
0
 def is_visible_to_users(self):
     """
         Returns whether given entry is visible to users (via alerts or
         updates box)
     """
     return log_config_get(self.log_type, ['Show_users'])
Ejemplo n.º 6
0
 def is_visible_to_users(self):
     """
         Returns whether given entry is visible to users (via alerts or
         updates box)
     """
     return log_config_get(self.log_type, ['Show_users'])