rename ss-tools to superset-tools across the entire project
- Replace all occurrences of 'ss-tools' with 'superset-tools' in 104 files - Rename git bundle file ss-tools.bundle → superset-tools.bundle - Update .gitignore pattern accordingly - Preserve variable names (hasSsTools etc.) and code identifiers
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Example: External tool triggers maintenance via ss-tools API.
|
||||
Example: External tool triggers maintenance via superset-tools API.
|
||||
|
||||
This script demonstrates how an ETL pipeline (Airflow DAG, cron job, CI/CD)
|
||||
can start and end maintenance banners on Superset dashboards using the
|
||||
ss-tools API Key authentication.
|
||||
superset-tools API Key authentication.
|
||||
|
||||
Requirements: Python 3.10+, requests (pip install requests)
|
||||
|
||||
@@ -12,7 +12,7 @@ Usage:
|
||||
# Start maintenance
|
||||
python maintenance-api-python.py start \
|
||||
--api-key ssk_M7xqaP2zL9vR4nF8kC1bH5jT6dW0yA3 \
|
||||
--base-url https://ss-tools.example.com \
|
||||
--base-url https://superset-tools.example.com \
|
||||
--tables public.messages,public.users \
|
||||
--duration-hours 4 \
|
||||
--message "Scheduled ETL refresh"
|
||||
@@ -20,13 +20,13 @@ Usage:
|
||||
# End maintenance by event ID
|
||||
python maintenance-api-python.py end \
|
||||
--api-key ssk_M7xqaP2zL9vR4nF8kC1bH5jT6dW0yA3 \
|
||||
--base-url https://ss-tools.example.com \
|
||||
--base-url https://superset-tools.example.com \
|
||||
--event-id m-abc123
|
||||
|
||||
# End ALL maintenance (use with caution!)
|
||||
python maintenance-api-python.py end-all \
|
||||
--api-key ssk_M7xqaP2zL9vR4nF8kC1bH5jT6dW0yA3 \
|
||||
--base-url https://ss-tools.example.com \
|
||||
--base-url https://superset-tools.example.com \
|
||||
--environment ss-dev
|
||||
"""
|
||||
|
||||
@@ -52,7 +52,7 @@ def start_maintenance(base_url: str, api_key: str, tables: list[str],
|
||||
Start a maintenance event.
|
||||
|
||||
Args:
|
||||
base_url: ss-tools base URL (e.g. https://ss-tools.example.com)
|
||||
base_url: superset-tools base URL (e.g. https://superset-tools.example.com)
|
||||
api_key: API key with 'maintenance:start' permission
|
||||
tables: List of table names to flag (e.g. ["public.messages"])
|
||||
environment_id: Superset environment (e.g. "ss-dev", "ss-prod")
|
||||
@@ -116,7 +116,7 @@ def end_maintenance(base_url: str, api_key: str, event_id: str,
|
||||
End a specific maintenance event and remove its banners.
|
||||
|
||||
Args:
|
||||
base_url: ss-tools base URL
|
||||
base_url: superset-tools base URL
|
||||
api_key: API key with 'maintenance:end' permission
|
||||
event_id: The event ID returned by start_maintenance
|
||||
timeout: Request timeout in seconds
|
||||
@@ -165,7 +165,7 @@ def end_all_maintenance(base_url: str, api_key: str,
|
||||
USE WITH CAUTION — this removes banners from all dashboards.
|
||||
|
||||
Args:
|
||||
base_url: ss-tools base URL
|
||||
base_url: superset-tools base URL
|
||||
api_key: API key with 'maintenance:end_all' permission
|
||||
environment_id: If set, only end events in this environment.
|
||||
If None, uses the API key's default scope.
|
||||
@@ -226,7 +226,7 @@ def _format_error(response: requests.Response) -> str:
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="ss-tools Maintenance Banner CLI",
|
||||
description="superset-tools Maintenance Banner CLI",
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
epilog="""
|
||||
Examples:
|
||||
@@ -244,7 +244,7 @@ Examples:
|
||||
parser.add_argument(
|
||||
"--base-url",
|
||||
default="http://localhost:8000",
|
||||
help="ss-tools base URL (default: %(default)s)",
|
||||
help="superset-tools base URL (default: %(default)s)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--api-key",
|
||||
|
||||
Reference in New Issue
Block a user