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)
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)
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
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
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'])
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'])