Skip to content

Commit bdcf78f

Browse files
fix empty tags
1 parent 9e958e2 commit bdcf78f

File tree

4 files changed

+35
-3
lines changed

4 files changed

+35
-3
lines changed

ical-proxy/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# ical-proxy
22

3+
Exposes an iCal feed as JSON for querying with the JSON API plugin.
4+
5+
Examples:
6+
- input: ./fixtures/calendar.ics
7+
- output: ./fixtures/calendar.json
8+
9+
Url to query: <hostname:port>/annotations - does not do any filtering or querying (exposes all events). The JSON result can be queried as a metric to display in tables, or as annotations.
10+
11+
You can get extra information from the JSON using the JSONata features of the JSON API plugin. Examples:
12+
13+
- `duration`: `$.(timeEnd-time)`
14+
- `timeSinceEvent`: `$.(timeEnd-$millis())`
15+
16+
You can use values in transforms to filter data out of tables.
17+
318
## Configuration
419

520
### HTTP Headers

ical-proxy/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ def query():
3939
@app.route("/annotations", methods=methods)
4040
def annotations():
4141
if request.method in ["GET", "POST"]:
42+
tags = ""
43+
4244
ical_url = request.headers.get(
4345
"X-ICAL-URL",
44-
f"file://{os.path.dirname(os.path.realpath(__file__))}/fixtures/calendar.ics",
46+
f"file://{os.path.dirname(os.path.realpath(__file__))}/fixtures/something.ics",
4547
)
4648

4749
if "X-TAGS" in request.headers:

ical-proxy/fixtures/calendar.ics

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,25 @@ X-WR-CALNAME:Scheduled Maintenance
77
X-WR-TIMEZONE:Europe/London
88
X-WR-CALDESC:A calendar for IT/Platform/Other maintenance events
99
BEGIN:VEVENT
10+
DTSTART:20221003T110000Z
11+
DTEND:20221003T113000Z
12+
DTSTAMP:20221003T083457Z
13+
14+
CREATED:20220929T145219Z
15+
DESCRIPTION:Bob and Jim will be working together to enable GitHub Actions o
16+
n the GitHub Enterprise Server. This requires a restart of services on the
17+
server.
18+
LAST-MODIFIED:20220929T152907Z
19+
LOCATION:
20+
SEQUENCE:0
21+
STATUS:CONFIRMED
22+
SUMMARY:GitHub Enterprise: Enable Actions
23+
TRANSP:OPAQUE
24+
END:VEVENT
25+
BEGIN:VEVENT
1026
DTSTART:20220916T113000Z
1127
DTEND:20220916T123000Z
12-
DTSTAMP:20220921T132404Z
28+
DTSTAMP:20221003T083457Z
1329
1430
CREATED:20220916T093411Z
1531
DESCRIPTION:Something is happening at this time

ical-proxy/fixtures/calendar_annotations.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)