Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha 5 release ready #48

Merged
merged 55 commits into from
Aug 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4c0568d
chore: update version number
devraj Jun 29, 2024
3299361
docs: update tagline
devraj Jun 29, 2024
1c2c74e
chore: enables social plugin for mkdocs
devraj Jun 29, 2024
4ae7873
chore: update packages
devraj Jun 29, 2024
e39470d
refactor: adds docstrings plugin to include source docs
devraj Jun 30, 2024
da99186
docs: expands on developer guide
devraj Jun 30, 2024
5d813be
feat: adds proxy support in httpx configuration
devraj Jun 30, 2024
e67d428
docs: reorganise toc
devraj Jun 30, 2024
d314d5e
docs: completes documentation on sdk configuration
devraj Jun 30, 2024
9a0f382
docs: updates usage on list and detail/retrieve
devraj Jul 1, 2024
2ff7bfb
refactor: update pydantic
devraj Jul 1, 2024
b44a332
chore: format syntax
devraj Jul 4, 2024
ea33047
docs: update hardware setup notes
devraj Jul 4, 2024
2087616
fix: pyndatic bugs following from latest release
devraj Jul 4, 2024
f5146bb
chore: update assets for future use in docs
devraj Jul 4, 2024
594a43a
docs: update exception handling reference
devraj Jul 5, 2024
ef1fc61
refactor: initial implementation of generic search
devraj Jul 5, 2024
a4d99c5
fix: unhandled exception
devraj Jul 5, 2024
9ef7376
feat(cli): wire up the cardholder search
devraj Jul 5, 2024
d1c136d
feat: adds stubs to all possible cli items
devraj Jul 6, 2024
29549e7
fix: configuration of updates for alarm summary
devraj Jul 9, 2024
0d86233
refactor(cli): calls ack and process alarm methods
devraj Jul 9, 2024
9c21258
feat(cli): wires up viewed cli to api
devraj Jul 9, 2024
95a5c97
refactor(cli): colours alarm priority
devraj Jul 9, 2024
5726e36
refactor: relaxes rule where href is optional in cardholder invitation
devraj Jul 9, 2024
9adb404
fix: incorrect call to the sdk from the cli
devraj Jul 10, 2024
65969bc
docs: adds assets for #54
devraj Jul 10, 2024
d7e0411
docs: updates notes from my failures of setting up 7000
devraj Jul 10, 2024
f89f84a
chore: update packages
devraj Jul 11, 2024
8501915
feat: implements first cut of multiple args on alarms
devraj Jul 11, 2024
1c3b3e3
refactor: adds confirmation for bulk operations
devraj Jul 11, 2024
dcf62bb
refactor: adds --yes flag to override prompt
devraj Jul 11, 2024
a8f6b69
docs: updates resources from configuration attempt
devraj Jul 13, 2024
a268b1c
refactor(tui): demo table working in grig
devraj Jul 13, 2024
c7e875e
fix: refines cli output
devraj Jul 13, 2024
a3be7d2
fix: cli annotation to make parameter optional
devraj Jul 13, 2024
da7d0a9
feat(debug): adds delete endpoint for debugging
devraj Jul 13, 2024
f654556
fix: taskfile missing the get command
devraj Jul 15, 2024
ac02a1f
refactor: moves cc related docs to hardware
devraj Jul 20, 2024
2e51433
docs: updates notes on releasing software
devraj Jul 20, 2024
b93fe0a
chore: update packages
devraj Jul 20, 2024
5589a82
refactor: update packages
devraj Jul 29, 2024
1b98a80
fix: validation rules to relax email in inviates
devraj Jul 29, 2024
da52f9a
refactor: syntax and code formatting
devraj Jul 29, 2024
e9607c1
fix: enum definition
devraj Jul 29, 2024
a3cacf2
feat: adds basic container for running cli
devraj Jul 30, 2024
9e10ce8
fix: cli working in container post build
devraj Jul 30, 2024
2941f71
refactor: clean Dockerfile for cli
devraj Jul 30, 2024
6166804
chore: update depdenencies
devraj Aug 1, 2024
6cc52dd
feat: adds access group cli endpoint
devraj Aug 5, 2024
ec45312
chore: update packages
devraj Aug 5, 2024
6891403
chore: update packages
devraj Aug 9, 2024
de3a884
docs: updates credeits and headings
devraj Aug 9, 2024
fcbfc36
chore: update packages
devraj Aug 14, 2024
326f8fc
chore: update packages
devraj Aug 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: adds confirmation for bulk operations
uses  to add confirmation messages for bulk operations
preventing users making accidental errors
  • Loading branch information
devraj committed Jul 11, 2024
commit 1c3b3e39512805edb40b3c99d04afe8686eb610a
23 changes: 19 additions & 4 deletions gallagher/cli/alarms.py
Original file line number Diff line number Diff line change
@@ -131,10 +131,18 @@ async def acknowledge(
):
"""acknowledge an alarm, optionally with a comment"""
console = Console()

# ask for confirmation if multiple alarms are to be acknowledged
if len(ids) > 1 and \
not typer.confirm(
"Are you sure you want to acknowledge multiple alarms?"
):
raise typer.Abort()

with console.status(
"[magenta] Commenting on alarm ...",
"[magenta] Acknowledging alarms ...",
) as status:

for id in ids:
try:

@@ -176,7 +184,7 @@ async def acknowledge(
"""mark alarm as viewed, optionally with a comment"""
console = Console()
with console.status(
"[magenta] Marking alarm as viewed ...",
"[magenta] Attempting to view alarm ...",
) as status:
try:

@@ -215,8 +223,15 @@ async def acknowledge(
):
"""mark alarm as processed, optionally with a comment"""
console = Console()
# ask for confirmation if multiple alarms are to be acknowledged
if len(ids) > 1 and \
not typer.confirm(
"Are you sure you want to process multiple alarms?"
):
raise typer.Abort()

with console.status(
"[magenta] Commenting on alarm ...",
"[magenta] Processing alarms ...",
) as status:

for id in ids: