Skip to content

Commit 2151ea7

Browse files
authored
Use heartbeat attributes for heartbeat alert details (#201)
* Use heartbeat attributes for heartbeat alert details * Fix tests and whitespace
1 parent 171fd4a commit 2151ea7

56 files changed

Lines changed: 126 additions & 92 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks.git
33
rev: v1.4.0
44
hooks:
5-
- id: autopep8-wrapper
65
- id: check-added-large-files
76
- id: check-ast
87
- id: check-byte-order-marker
@@ -23,16 +22,20 @@ repos:
2322
args: ['--django']
2423
- id: requirements-txt-fixer
2524
- id: trailing-whitespace
25+
- repo: https://github.com/pre-commit/mirrors-autopep8
26+
rev: v1.5
27+
hooks:
28+
- id: autopep8
2629
- repo: https://github.com/asottile/pyupgrade
27-
rev: v1.6.1
30+
rev: v1.26.2
2831
hooks:
2932
- id: pyupgrade
3033
args: ['--py3-plus']
3134
- repo: https://github.com/asottile/seed-isort-config
32-
rev: v1.2.0
35+
rev: v1.9.4
3336
hooks:
3437
- id: seed-isort-config
3538
- repo: https://github.com/pre-commit/mirrors-isort
36-
rev: v4.3.4
39+
rev: v4.3.21
3740
hooks:
3841
- id: isort

alertaclient/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import json
32
import logging
43
import os
@@ -200,10 +199,11 @@ def delete_customer(self, id):
200199
return self.http.delete('/customer/%s' % id)
201200

202201
# Heartbeats
203-
def heartbeat(self, origin, tags=None, timeout=None, customer=None):
202+
def heartbeat(self, origin, tags=None, attributes=None, timeout=None, customer=None):
204203
data = {
205204
'origin': origin,
206205
'tags': tags or list(),
206+
'attributes': attributes or dict(),
207207
'timeout': timeout,
208208
'createTime': datetime.utcnow(),
209209
'customer': customer

alertaclient/auth/azure.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import webbrowser
32
from uuid import uuid4
43

alertaclient/auth/github.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import webbrowser
32
from uuid import uuid4
43

alertaclient/auth/gitlab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import webbrowser
32
from uuid import uuid4
43

alertaclient/auth/google.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import webbrowser
32
from uuid import uuid4
43

alertaclient/auth/oidc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import webbrowser
32
from uuid import uuid4
43

alertaclient/auth/token.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import base64
32
import json
43
from http.server import BaseHTTPRequestHandler, HTTPServer

alertaclient/auth/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import os
32
from netrc import netrc
43
from urllib.parse import urlparse

alertaclient/commands/cmd_blackouts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import json
32

43
import click

0 commit comments

Comments
 (0)