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.
|
||||
|
||||
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
|
||||
---
|
||||
|
|
|
@ -5,7 +5,7 @@ if [ $version ]
|
|||
then
|
||||
versions=("$version")
|
||||
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
|
||||
|
||||
for version in ${versions[*]}
|
||||
|
|
|
@ -30,7 +30,7 @@ class TestMaintenance(UptimeKumaTestCase):
|
|||
|
||||
if parse_version(self.api.version) >= parse_version("1.21.2"):
|
||||
expected_maintenance.update({
|
||||
"timezone": "Europe/Berlin"
|
||||
"timezoneOption": "Europe/Berlin"
|
||||
})
|
||||
|
||||
# add maintenance
|
||||
|
@ -242,7 +242,7 @@ class TestMaintenance(UptimeKumaTestCase):
|
|||
"daysOfMonth": [],
|
||||
"cron": "50 5 * * *",
|
||||
"durationMinutes": 120,
|
||||
"timezone": "Europe/Berlin"
|
||||
"timezoneOption": "Europe/Berlin"
|
||||
}
|
||||
self.do_test_maintenance_strategy(expected_maintenance)
|
||||
|
||||
|
|
|
@ -848,7 +848,7 @@ class UptimeKumaApi(object):
|
|||
timeRange: list = None,
|
||||
cron: str = "30 3 * * *",
|
||||
durationMinutes: int = 60,
|
||||
timezone: str = None
|
||||
timezoneOption: str = None
|
||||
) -> dict:
|
||||
if not dateRange:
|
||||
dateRange = [
|
||||
|
@ -883,7 +883,7 @@ class UptimeKumaApi(object):
|
|||
data.update({
|
||||
"cron": cron,
|
||||
"durationMinutes": durationMinutes,
|
||||
"timezone": timezone,
|
||||
"timezoneOption": timezoneOption,
|
||||
})
|
||||
return data
|
||||
|
||||
|
@ -2915,7 +2915,7 @@ class UptimeKumaApi(object):
|
|||
],
|
||||
"cron": "",
|
||||
"durationMinutes": null,
|
||||
"timezone": "Europe/Berlin",
|
||||
"timezoneOption": "Europe/Berlin",
|
||||
"timezoneOffset": "+02:00",
|
||||
"status": "ended"
|
||||
}
|
||||
|
@ -2967,7 +2967,7 @@ class UptimeKumaApi(object):
|
|||
"cron": null,
|
||||
"duration": null,
|
||||
"durationMinutes": 0,
|
||||
"timezone": "Europe/Berlin",
|
||||
"timezoneOption": "Europe/Berlin",
|
||||
"timezoneOffset": "+02:00",
|
||||
"status": "ended"
|
||||
}
|
||||
|
@ -3016,7 +3016,7 @@ class UptimeKumaApi(object):
|
|||
... ],
|
||||
... weekdays=[],
|
||||
... daysOfMonth=[],
|
||||
... timezone="Europe/Berlin"
|
||||
... timezoneOption="Europe/Berlin"
|
||||
... )
|
||||
{
|
||||
"msg": "Added Successfully.",
|
||||
|
@ -3049,7 +3049,7 @@ class UptimeKumaApi(object):
|
|||
... ],
|
||||
... weekdays=[],
|
||||
... daysOfMonth=[],
|
||||
... timezone="Europe/Berlin"
|
||||
... timezoneOption="Europe/Berlin"
|
||||
... )
|
||||
{
|
||||
"msg": "Added Successfully.",
|
||||
|
@ -3087,7 +3087,7 @@ class UptimeKumaApi(object):
|
|||
... 0
|
||||
... ],
|
||||
... daysOfMonth=[],
|
||||
... timezone="Europe/Berlin"
|
||||
... timezoneOption="Europe/Berlin"
|
||||
... )
|
||||
{
|
||||
"msg": "Added Successfully.",
|
||||
|
@ -3126,7 +3126,7 @@ class UptimeKumaApi(object):
|
|||
... 30,
|
||||
... "lastDay1"
|
||||
... ],
|
||||
... timezone="Europe/Berlin"
|
||||
... timezoneOption="Europe/Berlin"
|
||||
... )
|
||||
{
|
||||
"msg": "Added Successfully.",
|
||||
|
@ -3149,7 +3149,7 @@ class UptimeKumaApi(object):
|
|||
... daysOfMonth=[],
|
||||
... cron="50 5 * * *",
|
||||
... durationMinutes=120,
|
||||
... timezone="Europe/Berlin"
|
||||
... timezoneOption="Europe/Berlin"
|
||||
... )
|
||||
{
|
||||
"msg": "Added Successfully.",
|
||||
|
|
Loading…
Reference in a new issue