feat: add support for uptime kuma 1.21.3
BREAKING CHANGE: maintenance parameter `timezone` renamed to `timezoneOption`
This commit is contained in:
parent
d2cfc6652d
commit
8e841cd324
4 changed files with 18 additions and 13 deletions
|
@ -8,7 +8,12 @@ This package was developed to configure Uptime Kuma with Ansible. The Ansible co
|
||||||
|
|
||||||
Python version 3.7+ is required.
|
Python version 3.7+ is required.
|
||||||
|
|
||||||
Supported Uptime Kuma versions: 1.17.0 - 1.21.2
|
Supported Uptime Kuma versions:
|
||||||
|
|
||||||
|
| uptime-kuma-api | Uptime Kuma |
|
||||||
|
|-----------------|-----------------|
|
||||||
|
| 1.0.0 | 1.21.3 |
|
||||||
|
| 0.1.0 - 0.13.0 | 1.17.0 - 1.21.2 |
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
---
|
---
|
||||||
|
|
|
@ -5,7 +5,7 @@ if [ $version ]
|
||||||
then
|
then
|
||||||
versions=("$version")
|
versions=("$version")
|
||||||
else
|
else
|
||||||
versions=(1.21.2 1.21.1 1.20.2 1.19.6 1.18.5 1.17.1)
|
versions=(1.21.3)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for version in ${versions[*]}
|
for version in ${versions[*]}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class TestMaintenance(UptimeKumaTestCase):
|
||||||
|
|
||||||
if parse_version(self.api.version) >= parse_version("1.21.2"):
|
if parse_version(self.api.version) >= parse_version("1.21.2"):
|
||||||
expected_maintenance.update({
|
expected_maintenance.update({
|
||||||
"timezone": "Europe/Berlin"
|
"timezoneOption": "Europe/Berlin"
|
||||||
})
|
})
|
||||||
|
|
||||||
# add maintenance
|
# add maintenance
|
||||||
|
@ -242,7 +242,7 @@ class TestMaintenance(UptimeKumaTestCase):
|
||||||
"daysOfMonth": [],
|
"daysOfMonth": [],
|
||||||
"cron": "50 5 * * *",
|
"cron": "50 5 * * *",
|
||||||
"durationMinutes": 120,
|
"durationMinutes": 120,
|
||||||
"timezone": "Europe/Berlin"
|
"timezoneOption": "Europe/Berlin"
|
||||||
}
|
}
|
||||||
self.do_test_maintenance_strategy(expected_maintenance)
|
self.do_test_maintenance_strategy(expected_maintenance)
|
||||||
|
|
||||||
|
|
|
@ -848,7 +848,7 @@ class UptimeKumaApi(object):
|
||||||
timeRange: list = None,
|
timeRange: list = None,
|
||||||
cron: str = "30 3 * * *",
|
cron: str = "30 3 * * *",
|
||||||
durationMinutes: int = 60,
|
durationMinutes: int = 60,
|
||||||
timezone: str = None
|
timezoneOption: str = None
|
||||||
) -> dict:
|
) -> dict:
|
||||||
if not dateRange:
|
if not dateRange:
|
||||||
dateRange = [
|
dateRange = [
|
||||||
|
@ -883,7 +883,7 @@ class UptimeKumaApi(object):
|
||||||
data.update({
|
data.update({
|
||||||
"cron": cron,
|
"cron": cron,
|
||||||
"durationMinutes": durationMinutes,
|
"durationMinutes": durationMinutes,
|
||||||
"timezone": timezone,
|
"timezoneOption": timezoneOption,
|
||||||
})
|
})
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
@ -2915,7 +2915,7 @@ class UptimeKumaApi(object):
|
||||||
],
|
],
|
||||||
"cron": "",
|
"cron": "",
|
||||||
"durationMinutes": null,
|
"durationMinutes": null,
|
||||||
"timezone": "Europe/Berlin",
|
"timezoneOption": "Europe/Berlin",
|
||||||
"timezoneOffset": "+02:00",
|
"timezoneOffset": "+02:00",
|
||||||
"status": "ended"
|
"status": "ended"
|
||||||
}
|
}
|
||||||
|
@ -2967,7 +2967,7 @@ class UptimeKumaApi(object):
|
||||||
"cron": null,
|
"cron": null,
|
||||||
"duration": null,
|
"duration": null,
|
||||||
"durationMinutes": 0,
|
"durationMinutes": 0,
|
||||||
"timezone": "Europe/Berlin",
|
"timezoneOption": "Europe/Berlin",
|
||||||
"timezoneOffset": "+02:00",
|
"timezoneOffset": "+02:00",
|
||||||
"status": "ended"
|
"status": "ended"
|
||||||
}
|
}
|
||||||
|
@ -3016,7 +3016,7 @@ class UptimeKumaApi(object):
|
||||||
... ],
|
... ],
|
||||||
... weekdays=[],
|
... weekdays=[],
|
||||||
... daysOfMonth=[],
|
... daysOfMonth=[],
|
||||||
... timezone="Europe/Berlin"
|
... timezoneOption="Europe/Berlin"
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
"msg": "Added Successfully.",
|
"msg": "Added Successfully.",
|
||||||
|
@ -3049,7 +3049,7 @@ class UptimeKumaApi(object):
|
||||||
... ],
|
... ],
|
||||||
... weekdays=[],
|
... weekdays=[],
|
||||||
... daysOfMonth=[],
|
... daysOfMonth=[],
|
||||||
... timezone="Europe/Berlin"
|
... timezoneOption="Europe/Berlin"
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
"msg": "Added Successfully.",
|
"msg": "Added Successfully.",
|
||||||
|
@ -3087,7 +3087,7 @@ class UptimeKumaApi(object):
|
||||||
... 0
|
... 0
|
||||||
... ],
|
... ],
|
||||||
... daysOfMonth=[],
|
... daysOfMonth=[],
|
||||||
... timezone="Europe/Berlin"
|
... timezoneOption="Europe/Berlin"
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
"msg": "Added Successfully.",
|
"msg": "Added Successfully.",
|
||||||
|
@ -3126,7 +3126,7 @@ class UptimeKumaApi(object):
|
||||||
... 30,
|
... 30,
|
||||||
... "lastDay1"
|
... "lastDay1"
|
||||||
... ],
|
... ],
|
||||||
... timezone="Europe/Berlin"
|
... timezoneOption="Europe/Berlin"
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
"msg": "Added Successfully.",
|
"msg": "Added Successfully.",
|
||||||
|
@ -3149,7 +3149,7 @@ class UptimeKumaApi(object):
|
||||||
... daysOfMonth=[],
|
... daysOfMonth=[],
|
||||||
... cron="50 5 * * *",
|
... cron="50 5 * * *",
|
||||||
... durationMinutes=120,
|
... durationMinutes=120,
|
||||||
... timezone="Europe/Berlin"
|
... timezoneOption="Europe/Berlin"
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
"msg": "Added Successfully.",
|
"msg": "Added Successfully.",
|
||||||
|
|
Loading…
Reference in a new issue