fix(backend): standardize superset client init and auth
- Update plugins (debug, mapper, search) to explicitly map environment config to SupersetConfig - Add authenticate method to SupersetClient for explicit session management - Add get_environment method to ConfigManager - Fix navbar dropdown hover stability in frontend with invisible bridge
This commit is contained in:
@@ -137,13 +137,25 @@ class MapperPlugin(PluginBase):
|
||||
|
||||
# Get config and initialize client
|
||||
from ..dependencies import get_config_manager
|
||||
from superset_tool.models import SupersetConfig
|
||||
config_manager = get_config_manager()
|
||||
env_config = config_manager.get_environment(env_name)
|
||||
if not env_config:
|
||||
logger.error(f"[MapperPlugin.execute][State] Environment '{env_name}' not found.")
|
||||
raise ValueError(f"Environment '{env_name}' not found in configuration.")
|
||||
|
||||
client = SupersetClient(env_config)
|
||||
# Map Environment model to SupersetConfig
|
||||
superset_config = SupersetConfig(
|
||||
env=env_config.name,
|
||||
base_url=env_config.url,
|
||||
auth={
|
||||
"provider": "db", # Defaulting to db provider
|
||||
"username": env_config.username,
|
||||
"password": env_config.password,
|
||||
"refresh": "false"
|
||||
}
|
||||
)
|
||||
client = SupersetClient(superset_config)
|
||||
client.authenticate()
|
||||
|
||||
postgres_config = None
|
||||
|
||||
Reference in New Issue
Block a user