def handle_range_params_at_loading(burst_config, all_range_parameters): param1, param2 = None, None if burst_config.range1: param1 = RangeParameter.from_json(burst_config.range1) param1.fill_from_default(all_range_parameters[param1.name]) if burst_config.range2 is not None: param2 = RangeParameter.from_json(burst_config.range2) param2.fill_from_default(all_range_parameters[param2.name]) return param1, param2
def handle_range_params_at_loading(burst_config, all_range_parameters): param1, param2 = None, None if burst_config.range1: param1 = RangeParameter.from_json(burst_config.range1) param1.fill_from_default( BurstService.get_range_param_by_name(param1.name, all_range_parameters)) if burst_config.range2 is not None: param2 = RangeParameter.from_json(burst_config.range2) param2.fill_from_default( BurstService.get_range_param_by_name( param2.name, all_range_parameters)) return param1, param2
def fill_operationgroup_name(self, entities_in_group): """ Display name for UI. """ new_name = "of " + entities_in_group + " varying " if self.range1 is not None: range_param1 = RangeParameter.from_json(self.range1) new_name += range_param1.name if self.range2 is not None: range_param2 = RangeParameter.from_json(self.range2) new_name += " x " + range_param2.name if self.range3 is not None: range_param3 = RangeParameter.from_json(self.range3) new_name += " x " + range_param3.name new_name += " - " + date2string(datetime.datetime.now(), date_format=LESS_COMPLEX_TIME_FORMAT) self.name = new_name