Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def to_json_data(self):
obj = {
"application": ZabbixTargetField(self.application),
"expr": self.expr,
"functions": self.functions,
"group": ZabbixTargetField(self.group),
"host": ZabbixTargetField(self.host),
"intervalFactor": self.intervalFactor,
"item": ZabbixTargetField(self.item),
"mode": self.mode,
"options": self.options,
"refId": self.refId,
}
if self.mode == ZABBIX_QMODE_SERVICES:
obj["slaProperty"] = self.slaProperty,
obj["itservice"] = {"name": self.itService}
if self.mode == ZABBIX_QMODE_TEXT:
obj["textFilter"] = self.textFilter
obj["useCaptureGroups"] = self.useCaptureGroups
def to_json_data(self):
obj = {
"application": ZabbixTargetField(self.application),
"expr": self.expr,
"functions": self.functions,
"group": ZabbixTargetField(self.group),
"host": ZabbixTargetField(self.host),
"intervalFactor": self.intervalFactor,
"item": ZabbixTargetField(self.item),
"mode": self.mode,
"options": self.options,
"refId": self.refId,
}
if self.mode == ZABBIX_QMODE_SERVICES:
obj["slaProperty"] = self.slaProperty,
obj["itservice"] = {"name": self.itService}
if self.mode == ZABBIX_QMODE_TEXT:
obj["textFilter"] = self.textFilter
obj["useCaptureGroups"] = self.useCaptureGroups
return obj
def to_json_data(self):
return {
"application": ZabbixTargetField(self.application),
"group": ZabbixTargetField(self.group),
"host": ZabbixTargetField(self.host),
"trigger": ZabbixTargetField(self.trigger),
}
def to_json_data(self):
obj = {
"application": ZabbixTargetField(self.application),
"expr": self.expr,
"functions": self.functions,
"group": ZabbixTargetField(self.group),
"host": ZabbixTargetField(self.host),
"intervalFactor": self.intervalFactor,
"item": ZabbixTargetField(self.item),
"mode": self.mode,
"options": self.options,
"refId": self.refId,
}
if self.mode == ZABBIX_QMODE_SERVICES:
obj["slaProperty"] = self.slaProperty,
obj["itservice"] = {"name": self.itService}
if self.mode == ZABBIX_QMODE_TEXT:
obj["textFilter"] = self.textFilter
obj["useCaptureGroups"] = self.useCaptureGroups
return obj
def to_json_data(self):
obj = {
"application": ZabbixTargetField(self.application),
"expr": self.expr,
"functions": self.functions,
"group": ZabbixTargetField(self.group),
"host": ZabbixTargetField(self.host),
"intervalFactor": self.intervalFactor,
"item": ZabbixTargetField(self.item),
"mode": self.mode,
"options": self.options,
"refId": self.refId,
}
if self.mode == ZABBIX_QMODE_SERVICES:
obj["slaProperty"] = self.slaProperty,
obj["itservice"] = {"name": self.itService}
if self.mode == ZABBIX_QMODE_TEXT:
obj["textFilter"] = self.textFilter
obj["useCaptureGroups"] = self.useCaptureGroups
return obj