Example #1
0
 def __init__(self, user, log_type):
     if log_type is None:
         self.log_type = DEFAULT_LOG_TYPE
     else:
         self.log_type = log_type
     self.log_file_name = ""
     self.file_content = ""
     AdminConsoleRulesetBuilder.__init__(self, user)
 def __init__(self, user, visible_data):
     self.environment_data = visible_data
     self.country_data = CountriesBuilder(
         countries=Country.objects.all()).get_data()
     self.mail_content_types = MailContentTypesBuilder(
         MailContentType.objects.all()).get_data()
     self.frequency_types = FrequencyTypesBuilder(
         FrequencyType.objects.all()).get_data()
     AdminConsoleRulesetBuilder.__init__(self, user)
Example #3
0
 def __init__(self, user, sync_from_environments, sync_to_environments):
     self.git_environment = Environment.objects.get(name=GIT_NAME)
     self.int2_environment = Environment.objects.get(name=INT2_NAME)
     self.countries = Country.objects.all()
     self.action_list = RULESET_SYNC_UP_ACTION
     self.frequency_types = FrequencyType.objects.all()
     self.sync_from_environments = sync_from_environments
     self.sync_to_environments = sync_to_environments
     AdminConsoleRulesetBuilder.__init__(self, user)
Example #4
0
    def __init__(self, user, parser, ruleset_log_list):
        try:
            self.user = user
            self.parser = parser
            self.ruleset_log_list = ruleset_log_list
            self.enable_environment_ids = enable_environments(
                self.user.id, KEY_F_RULESET_LOG, KEY_M_RULESET)

            AdminConsoleRulesetBuilder.__init__(self, user)
        except Exception as e:
            raise e
Example #5
0
 def __init__(self, user, data):
     try:
         self.user = user
         self.data = data
         self.ruleset_log_group_id = data.get(KEY_RULESET_LOG_GROUP_ID)
         self.ruleset_log_group = RulesetLogGroup.objects.filter(id=self.ruleset_log_group_id).values()[0]
         self.ruleset_log_obj = RulesetLogGroupBuilder(self.ruleset_log_group).get_data()
         self.action_id = data.get(KEY_ACTION_ID)
         self.action = RulesetAction.objects.get(id=self.action_id)
         self.ruleset_name = data.get(KEY_RULESET_NAME)
         self.status = data.get(KEY_STATUS)
         self.exception = data.get(KEY_EXCEPTION)
         self.update_time = get_frontend_format_time(self.data.get(KEY_UPDATE_TIME))
         self.backup_key = self.data.get(KEY_BACKUP_KEY)
         AdminConsoleRulesetBuilder.__init__(self, user)
     except Exception as e:
         raise e
 def __init__(self, user, log_group_list, log_list):
     self.log_group_list = log_group_list
     self.log_list = log_list
     AdminConsoleRulesetBuilder.__init__(self, user)
Example #7
0
 def __init__(self, user, environment_ids):
     self.environment_ids = environment_ids
     AdminConsoleRulesetBuilder.__init__(self, user)
Example #8
0
 def __init__(self, user, country_ids):
     self.country_ids = country_ids
     AdminConsoleRulesetBuilder.__init__(self, user)
 def __init__(self, user, schedulers):
     self.schedulers = schedulers
     AdminConsoleRulesetBuilder.__init__(self, user)
 def __init__(self, user, scheduler):
     ReportSchedulerBuilder.__init__(self, scheduler)
     AdminConsoleRulesetBuilder.__init__(self, user)
     self.countries = self.scheduler.country_list.all()
     self.mail_content_types = self.scheduler.mail_content_type_list.all()
     self.skip_rulesets = self.scheduler.skip_rulesets.all()