Skip to content

Add Classic Central Alert Inventory Workflow - #156

Open
KarthikSKumar98 wants to merge 1 commit into
v2from
transition-alert-inventory
Open

Add Classic Central Alert Inventory Workflow#156
KarthikSKumar98 wants to merge 1 commit into
v2from
transition-alert-inventory

Conversation

@KarthikSKumar98

Copy link
Copy Markdown
Collaborator

This PR adds a read-only workflow that retrieves enabled alert configurations from Classic Central. It provides scope-aware browser review and exports results as JSON or CSV for transition assessment, validation, and recordkeeping. This will help users as they transition from Classic Central to Central

- Created index.html with theme detection and loading of assets
- Added token.json for API configuration with placeholders
- Added token.json.example as a template for users to configure their access token

@app.get("/{path:path}", include_in_schema=False)
def application_route(path: str) -> FileResponse:
static_path = (asset_root / path).resolve()
static_path = (asset_root / path).resolve()
if (
static_path.is_relative_to(resolved_asset_root)
and static_path.is_file()
static_path.is_relative_to(resolved_asset_root)
and static_path.is_file()
):
return FileResponse(static_path)

os.replace(temp_path, destination)
temp_path = None
temp_stat = None
if overwrite:
os.replace(temp_path, destination)
temp_path = None
temp_stat = None
Comment on lines +244 to +253
def _request_json(
credentials: Credentials,
path: str,
query: Sequence[tuple[str, str]],
*,
opener: Callable[..., Any] | None,
sleep: Callable[[float], None],
timeout: float,
should_cancel: Callable[[], bool] | None,
) -> Any:
status_code, retry_after = _http_error_facts(error)
try:
error.close()
except Exception:
webbrowser.open(url)
try:
server.run(sockets=[bound_socket])
except KeyboardInterrupt:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants