Change name and add skip for uptime
This commit is contained in:
parent
7d49ce1ce3
commit
5165f9d704
@ -232,9 +232,9 @@ class ActionModule(ActionBase):
|
|||||||
"target": dns_target,
|
"target": dns_target,
|
||||||
"state": state,
|
"state": state,
|
||||||
})
|
})
|
||||||
|
if not uptime_raw_config.get('skip', False):
|
||||||
results['uptime_config'].append({
|
results['uptime_config'].append({
|
||||||
"name": main_hostname,
|
"name": '{0}.{1}'.format(main_hostname, domain),
|
||||||
"url": 'https://{0}.{1}/{2}'.format(main_hostname, domain, uptime_raw_config.get("endpoint", "")),
|
"url": 'https://{0}.{1}/{2}'.format(main_hostname, domain, uptime_raw_config.get("endpoint", "")),
|
||||||
"protected": protected,
|
"protected": protected,
|
||||||
"state": uptime_raw_config.get("state", state)
|
"state": uptime_raw_config.get("state", state)
|
||||||
@ -266,8 +266,9 @@ class ActionModule(ActionBase):
|
|||||||
"target": this_dns_target,
|
"target": this_dns_target,
|
||||||
"state": this_state
|
"state": this_state
|
||||||
})
|
})
|
||||||
|
if not this_uptime_raw_config.get('skip', uptime_raw_config.get('skip', False)):
|
||||||
results['uptime_config'].append({
|
results['uptime_config'].append({
|
||||||
"name": host.get("hostname"),
|
"name": host.get("full_domain"),
|
||||||
"url": 'https://{0}/{1}'.format(full_domain, this_uptime_raw_config.get("endpoint", "")),
|
"url": 'https://{0}/{1}'.format(full_domain, this_uptime_raw_config.get("endpoint", "")),
|
||||||
"protected": this_protected,
|
"protected": this_protected,
|
||||||
"state": this_uptime_raw_config.get("state", this_state)
|
"state": this_uptime_raw_config.get("state", this_state)
|
||||||
|
Loading…
Reference in New Issue
Block a user