Merge branch '001-migration-ui-redesign' into master
This commit is contained in:
@@ -32,6 +32,7 @@ Python 3.9+ (Backend), Node.js 18+ (Frontend Build): Follow standard conventions
|
|||||||
- 006-configurable-belief-logs: Added Python 3.9+ + FastAPI (Backend), Pydantic (Config), Svelte (Frontend)
|
- 006-configurable-belief-logs: Added Python 3.9+ + FastAPI (Backend), Pydantic (Config), Svelte (Frontend)
|
||||||
- 005-fix-ui-ws-validation: Added Python 3.9+ (Backend), Node.js 18+ (Frontend Build)
|
- 005-fix-ui-ws-validation: Added Python 3.9+ (Backend), Node.js 18+ (Frontend Build)
|
||||||
- 005-fix-ui-ws-validation: Added Python 3.9+, Node.js 18+ + FastAPI, SvelteKit, Tailwind CSS, Pydantic
|
- 005-fix-ui-ws-validation: Added Python 3.9+, Node.js 18+ + FastAPI, SvelteKit, Tailwind CSS, Pydantic
|
||||||
|
- 005-fix-ui-ws-validation: Added Python 3.9+, Node.js 18+ + FastAPI, SvelteKit, Tailwind CSS, Pydantic
|
||||||
|
|
||||||
|
|
||||||
<!-- MANUAL ADDITIONS START -->
|
<!-- MANUAL ADDITIONS START -->
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ from backend.src.dependencies import get_config_manager
|
|||||||
from backend.src.core.superset_client import SupersetClient
|
from backend.src.core.superset_client import SupersetClient
|
||||||
from superset_tool.models import SupersetConfig
|
from superset_tool.models import SupersetConfig
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from backend.src.core.logger import logger
|
|
||||||
# [/SECTION]
|
# [/SECTION]
|
||||||
|
|
||||||
router = APIRouter(prefix="/api/environments", tags=["environments"])
|
router = APIRouter(prefix="/api/environments", tags=["environments"])
|
||||||
@@ -39,9 +38,7 @@ class DatabaseResponse(BaseModel):
|
|||||||
# @RETURN: List[EnvironmentResponse]
|
# @RETURN: List[EnvironmentResponse]
|
||||||
@router.get("", response_model=List[EnvironmentResponse])
|
@router.get("", response_model=List[EnvironmentResponse])
|
||||||
async def get_environments(config_manager=Depends(get_config_manager)):
|
async def get_environments(config_manager=Depends(get_config_manager)):
|
||||||
logger.info(f"[get_environments][Debug] Config path: {config_manager.config_path}")
|
|
||||||
envs = config_manager.get_environments()
|
envs = config_manager.get_environments()
|
||||||
logger.info(f"[get_environments][Debug] Found {len(envs)} environments")
|
|
||||||
return [EnvironmentResponse(id=e.id, name=e.name, url=e.url) for e in envs]
|
return [EnvironmentResponse(id=e.id, name=e.name, url=e.url) for e in envs]
|
||||||
# [/DEF:get_environments]
|
# [/DEF:get_environments]
|
||||||
|
|
||||||
|
|||||||
@@ -11,19 +11,12 @@
|
|||||||
from typing import List, Dict, Optional, Tuple
|
from typing import List, Dict, Optional, Tuple
|
||||||
from superset_tool.client import SupersetClient as BaseSupersetClient
|
from superset_tool.client import SupersetClient as BaseSupersetClient
|
||||||
from superset_tool.models import SupersetConfig
|
from superset_tool.models import SupersetConfig
|
||||||
from backend.src.core.logger import logger
|
|
||||||
from superset_tool.utils.logger import SupersetLogger
|
|
||||||
# [/SECTION]
|
# [/SECTION]
|
||||||
|
|
||||||
# [DEF:SupersetClient:Class]
|
# [DEF:SupersetClient:Class]
|
||||||
# @PURPOSE: Extended SupersetClient for migration-specific operations.
|
# @PURPOSE: Extended SupersetClient for migration-specific operations.
|
||||||
class SupersetClient(BaseSupersetClient):
|
class SupersetClient(BaseSupersetClient):
|
||||||
def __init__(self, config: SupersetConfig):
|
|
||||||
# Initialize with the application's logger wrapped in SupersetLogger
|
|
||||||
# to ensure BeliefFormatter is used.
|
|
||||||
sl_logger = SupersetLogger(logger=logger)
|
|
||||||
super().__init__(config=config, logger=sl_logger)
|
|
||||||
|
|
||||||
# [DEF:SupersetClient.get_databases_summary:Function]
|
# [DEF:SupersetClient.get_databases_summary:Function]
|
||||||
# @PURPOSE: Fetch a summary of databases including uuid, name, and engine.
|
# @PURPOSE: Fetch a summary of databases including uuid, name, and engine.
|
||||||
# @POST: Returns a list of database dictionaries with 'engine' field.
|
# @POST: Returns a list of database dictionaries with 'engine' field.
|
||||||
|
|||||||
@@ -103,25 +103,16 @@
|
|||||||
<p class="mt-1 text-sm text-gray-500">Regular expression to filter dashboards to migrate.</p>
|
<p class="mt-1 text-sm text-gray-500">Regular expression to filter dashboards to migrate.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-between mb-8">
|
<div class="flex items-center mb-8">
|
||||||
<div class="flex items-center">
|
<input
|
||||||
<input
|
id="replace-db"
|
||||||
id="replace-db"
|
type="checkbox"
|
||||||
type="checkbox"
|
bind:checked={replaceDb}
|
||||||
bind:checked={replaceDb}
|
class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
|
||||||
class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
|
/>
|
||||||
/>
|
<label for="replace-db" class="ml-2 block text-sm text-gray-900">
|
||||||
<label for="replace-db" class="ml-2 block text-sm text-gray-900">
|
Replace Database (Apply Mappings)
|
||||||
Replace Database (Apply Mappings)
|
</label>
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/migration/mappings"
|
|
||||||
class="text-sm font-medium text-indigo-600 hover:text-indigo-500"
|
|
||||||
>
|
|
||||||
Manage Mappings →
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user