fix(health): suppress 404 when health monitor disabled + fix audit test assertion
- Sidebar.svelte: defer healthStore.refresh() until feature flags confirm health_monitor is enabled; skip entirely when disabled - health.js: remove throw error from catch block — log and return null instead, preventing 'Uncaught (in promise)' on expected 404 - test_report_audit_immutability.py: fix mock assertions — audit_service uses logger.reason/reflect/explore, not logger.info - HealthStore and Sidebar now produce zero network noise when FEATURES__HEALTH_MONITOR=false
This commit is contained in:
@@ -293,14 +293,14 @@ async def generate_commit_message(
|
||||
history_objs = _gs.get_commit_history(dashboard_id, limit=5)
|
||||
history = [h.message for h in history_objs if hasattr(h, "message")]
|
||||
|
||||
from ...plugins.llm_analysis.models import LLMProviderType
|
||||
from ...plugins.llm_analysis.service import LLMClient
|
||||
from ...services.llm_prompt_templates import (
|
||||
from src.plugins.llm_analysis.models import LLMProviderType
|
||||
from src.plugins.llm_analysis.service import LLMClient
|
||||
from src.services.llm_prompt_templates import (
|
||||
DEFAULT_LLM_PROMPTS,
|
||||
normalize_llm_settings,
|
||||
resolve_bound_provider_id,
|
||||
)
|
||||
from ...services.llm_provider import LLMProviderService
|
||||
from src.services.llm_provider import LLMProviderService
|
||||
|
||||
llm_service = LLMProviderService(db)
|
||||
providers = llm_service.get_all_providers()
|
||||
@@ -325,7 +325,7 @@ async def generate_commit_message(
|
||||
default_model=provider.default_model,
|
||||
)
|
||||
|
||||
from ...plugins.git.llm_extension import GitLLMExtension
|
||||
from src.plugins.git.llm_extension import GitLLMExtension
|
||||
|
||||
extension = GitLLMExtension(client)
|
||||
git_prompt = llm_settings["prompts"].get(
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
# #region TranslateRoutes [C:4] [TYPE Module] [SEMANTICS translate, api, package, schedule, dashboard, llm]
|
||||
# @BRIEF API routes for LLM-based SQL/dashboard translation management including terminology dictionary CRUD and import.
|
||||
# @LAYER: UI (API)
|
||||
# @RELATION DEPENDS_ON -> [TranslateJobResponse]
|
||||
# @RELATION DEPENDS_ON -> [DictionaryManager:Class]
|
||||
# @RELATION DEPENDS_ON -> [get_current_user]
|
||||
# @RELATION DEPENDS_ON -> [get_db]
|
||||
# @RELATION DEPENDS_ON -> [has_permission]
|
||||
# @RELATION DEPENDS_ON -> [ConfigManager]
|
||||
# @LAYER API
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RATIONALE: Snapshot isolation — in-progress runs use config snapshot; config edits affect future runs only.
|
||||
# @REJECTED: Invalidating in-progress runs on config edit would break scheduled run continuity.
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RELATION DEPENDS_ON -> [SupersetClient]
|
||||
# @RATIONALE Snapshot isolation — in-progress runs use config snapshot; config edits affect future runs only.
|
||||
# @REJECTED Invalidating in-progress runs on config edit would break scheduled run continuity.
|
||||
# @POST Translation job, run, dictionary, correction, preview, and schedule CRUD operations are executed.
|
||||
# @PRE API server is running, user is authenticated, database is accessible.
|
||||
# @SIDE_EFFECT Creates/modifies DB rows; triggers background translation runs; queries Superset API.
|
||||
|
||||
"""
|
||||
Translate routes package.
|
||||
|
||||
@@ -20,10 +20,12 @@ from ._router import router
|
||||
# Corrections
|
||||
# ============================================================
|
||||
|
||||
# #region submit_correction [TYPE Function]
|
||||
# #region submit_correction [C:4] [TYPE Function]
|
||||
# @BRIEF Submit a term correction from a run result review.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: Correction applied with conflict detection.
|
||||
# @PRE User has translate.dictionary.edit permission.
|
||||
# @POST Correction applied with conflict detection.
|
||||
# @SIDE_EFFECT Creates/updates DictionaryEntry row; commits.
|
||||
# @RELATION DEPENDS_ON -> [DictionaryManager]
|
||||
@router.post("/corrections")
|
||||
async def submit_correction(
|
||||
payload: TermCorrectionSubmit,
|
||||
@@ -55,10 +57,14 @@ async def submit_correction(
|
||||
# #endregion submit_correction
|
||||
|
||||
|
||||
# #region submit_bulk_corrections [TYPE Function]
|
||||
# #region submit_bulk_corrections [C:4] [TYPE Function]
|
||||
# @BRIEF Submit multiple term corrections atomically.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: All corrections applied or none with conflict list.
|
||||
# @PRE User has translate.dictionary.edit permission.
|
||||
# @POST All corrections applied or none with conflict list.
|
||||
# @SIDE_EFFECT Creates/updates DictionaryEntry rows; commits once.
|
||||
# @RELATION DEPENDS_ON -> [DictionaryManager]
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.post("/corrections/bulk")
|
||||
async def submit_bulk_corrections(
|
||||
payload: TermCorrectionBulkSubmit,
|
||||
|
||||
@@ -22,7 +22,7 @@ from ._router import router
|
||||
# Terminology Dictionaries
|
||||
# ============================================================
|
||||
|
||||
# #region list_dictionaries [TYPE Function]
|
||||
# #region list_dictionaries [C:4] [TYPE Function]
|
||||
# @BRIEF List all terminology dictionaries.
|
||||
# @PRE: User has translate.dictionary.view permission.
|
||||
# @POST: Returns list of dictionaries with total count.
|
||||
@@ -46,7 +46,7 @@ async def list_dictionaries(
|
||||
# #endregion list_dictionaries
|
||||
|
||||
|
||||
# #region get_dictionary [TYPE Function]
|
||||
# #region get_dictionary [C:4] [TYPE Function]
|
||||
# @BRIEF Get a single terminology dictionary by ID.
|
||||
# @PRE: User has translate.dictionary.view permission.
|
||||
# @POST: Returns the dictionary with entry_count.
|
||||
@@ -71,7 +71,7 @@ async def get_dictionary(
|
||||
# #endregion get_dictionary
|
||||
|
||||
|
||||
# #region create_dictionary [TYPE Function]
|
||||
# #region create_dictionary [C:4] [TYPE Function]
|
||||
# @BRIEF Create a new terminology dictionary.
|
||||
# @PRE: User has translate.dictionary.create permission.
|
||||
# @POST: Returns the created dictionary.
|
||||
@@ -99,7 +99,7 @@ async def create_dictionary(
|
||||
# #endregion create_dictionary
|
||||
|
||||
|
||||
# #region update_dictionary [TYPE Function]
|
||||
# #region update_dictionary [C:4] [TYPE Function]
|
||||
# @BRIEF Update an existing terminology dictionary.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: Returns the updated dictionary.
|
||||
@@ -133,7 +133,7 @@ async def update_dictionary(
|
||||
# #endregion update_dictionary
|
||||
|
||||
|
||||
# #region delete_dictionary [TYPE Function]
|
||||
# #region delete_dictionary [C:4] [TYPE Function]
|
||||
# @BRIEF Delete a terminology dictionary, blocked if attached to active/scheduled jobs.
|
||||
# @PRE: User has translate.dictionary.delete permission.
|
||||
# @POST: Dictionary is deleted.
|
||||
@@ -162,7 +162,7 @@ async def delete_dictionary(
|
||||
# Dictionary Entries CRUD
|
||||
# ============================================================
|
||||
|
||||
# #region list_dictionary_entries [TYPE Function]
|
||||
# #region list_dictionary_entries [C:4] [TYPE Function]
|
||||
# @BRIEF List entries for a dictionary, optionally filtered by language pair.
|
||||
# @PRE: User has translate.dictionary.view permission.
|
||||
# @POST: Returns paginated list of entries with language pair fields.
|
||||
@@ -220,7 +220,7 @@ async def list_dictionary_entries(
|
||||
# #endregion list_dictionary_entries
|
||||
|
||||
|
||||
# #region add_dictionary_entry [TYPE Function]
|
||||
# #region add_dictionary_entry [C:4] [TYPE Function]
|
||||
# @BRIEF Add a new entry to a dictionary.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: Entry is created.
|
||||
@@ -269,7 +269,7 @@ async def add_dictionary_entry(
|
||||
# #endregion add_dictionary_entry
|
||||
|
||||
|
||||
# #region edit_dictionary_entry [TYPE Function]
|
||||
# #region edit_dictionary_entry [C:4] [TYPE Function]
|
||||
# @BRIEF Update an existing dictionary entry.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: Entry is updated.
|
||||
@@ -319,7 +319,7 @@ async def edit_dictionary_entry(
|
||||
# #endregion edit_dictionary_entry
|
||||
|
||||
|
||||
# #region delete_dictionary_entry [TYPE Function]
|
||||
# #region delete_dictionary_entry [C:4] [TYPE Function]
|
||||
# @BRIEF Delete a dictionary entry.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: Entry is deleted.
|
||||
@@ -343,10 +343,12 @@ async def delete_dictionary_entry(
|
||||
# #endregion delete_dictionary_entry
|
||||
|
||||
|
||||
# #region import_dictionary_entries [TYPE Function]
|
||||
# #region import_dictionary_entries [C:4] [TYPE Function]
|
||||
# @BRIEF Import entries into a terminology dictionary from CSV/TSV content.
|
||||
# @PRE: User has translate.dictionary.edit permission.
|
||||
# @POST: Entries are imported per conflict mode.
|
||||
# @PRE User has translate.dictionary.edit permission.
|
||||
# @POST Entries are imported per conflict mode.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.post("/dictionaries/{dictionary_id}/import")
|
||||
async def import_dictionary_entries(
|
||||
dictionary_id: str,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# #region TranslateHelpersModule [C:2] [TYPE Module] [SEMANTICS sqlalchemy, translate, helper, query, mapping]
|
||||
# @BRIEF Shared helper functions for translate route handlers.
|
||||
# @LAYER: API
|
||||
# @LAYER API
|
||||
# @RELATION DEPENDS_ON -> [models.translate]
|
||||
|
||||
from typing import Any
|
||||
|
||||
@@ -31,7 +31,7 @@ from ._router import router
|
||||
# Translation Job CRUD
|
||||
# ============================================================
|
||||
|
||||
# #region list_jobs [TYPE Function]
|
||||
# #region list_jobs [C:4] [TYPE Function]
|
||||
# @BRIEF List all translation jobs.
|
||||
# @PRE: User has translate.job.view permission.
|
||||
# @POST: Returns list of translation jobs.
|
||||
@@ -64,7 +64,7 @@ async def list_jobs(
|
||||
# #endregion list_jobs
|
||||
|
||||
|
||||
# #region get_job [TYPE Function]
|
||||
# #region get_job [C:4] [TYPE Function]
|
||||
# @BRIEF Get a single translation job by ID.
|
||||
# @PRE: User has translate.job.view permission.
|
||||
# @POST: Returns the translation job.
|
||||
@@ -88,7 +88,7 @@ async def get_job(
|
||||
# #endregion get_job
|
||||
|
||||
|
||||
# #region create_job [TYPE Function]
|
||||
# #region create_job [C:4] [TYPE Function]
|
||||
# @BRIEF Create a new translation job.
|
||||
# @PRE: User has translate.job.create permission.
|
||||
# @POST: Returns the created translation job.
|
||||
@@ -113,7 +113,7 @@ async def create_job(
|
||||
# #endregion create_job
|
||||
|
||||
|
||||
# #region update_job [TYPE Function]
|
||||
# #region update_job [C:4] [TYPE Function]
|
||||
# @BRIEF Update an existing translation job.
|
||||
# @PRE: User has translate.job.edit permission.
|
||||
# @POST: Returns the updated translation job.
|
||||
@@ -139,7 +139,7 @@ async def update_job(
|
||||
# #endregion update_job
|
||||
|
||||
|
||||
# #region delete_job [TYPE Function]
|
||||
# #region delete_job [C:4] [TYPE Function]
|
||||
# @BRIEF Delete a translation job.
|
||||
# @PRE: User has translate.job.delete permission.
|
||||
# @POST: Job is deleted.
|
||||
@@ -161,7 +161,7 @@ async def delete_job(
|
||||
# #endregion delete_job
|
||||
|
||||
|
||||
# #region duplicate_job [TYPE Function]
|
||||
# #region duplicate_job [C:4] [TYPE Function]
|
||||
# @BRIEF Duplicate a translation job.
|
||||
# @PRE: User has translate.job.create permission.
|
||||
# @POST: Returns the duplicated job with status DRAFT.
|
||||
@@ -188,13 +188,14 @@ async def duplicate_job(
|
||||
# #endregion duplicate_job
|
||||
|
||||
|
||||
# #region get_datasource_columns [TYPE Function]
|
||||
# #region get_datasource_columns [C:4] [TYPE Function]
|
||||
# @BRIEF Get column metadata and database dialect for a Superset datasource.
|
||||
# @PRE: User has translate.job.view permission.
|
||||
# @POST: Returns column list with metadata and database_dialect.
|
||||
# @SIDE_EFFECT: Queries Superset API for dataset detail and database info.
|
||||
# @RATIONALE: Dialect detection from Superset connection cached on TranslationJob at save time.
|
||||
# @REJECTED: Hardcoding dialect list per database — would drift from actual Superset config.
|
||||
# @PRE User has translate.job.view permission.
|
||||
# @POST Returns column list with metadata and database_dialect.
|
||||
# @SIDE_EFFECT Queries Superset API for dataset detail and database info.
|
||||
# @RATIONALE Dialect detection from Superset connection cached on TranslationJob at save time.
|
||||
# @REJECTED Hardcoding dialect list per database — would drift from actual Superset config.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.get("/datasources")
|
||||
async def list_datasources(
|
||||
|
||||
@@ -17,7 +17,7 @@ from ._router import router
|
||||
# Metrics
|
||||
# ============================================================
|
||||
|
||||
# #region get_metrics [TYPE Function]
|
||||
# #region get_metrics [C:4] [TYPE Function]
|
||||
# @BRIEF Get translation metrics, optionally filtered by job.
|
||||
# @PRE: User has translate.metrics.view permission.
|
||||
# @POST: Returns metrics data.
|
||||
@@ -40,10 +40,12 @@ async def get_metrics(
|
||||
# #endregion get_metrics
|
||||
|
||||
|
||||
# #region get_job_metrics [TYPE Function]
|
||||
# #region get_job_metrics [C:4] [TYPE Function]
|
||||
# @BRIEF Get aggregated metrics for a specific job.
|
||||
# @PRE: User has translate.metrics.view permission.
|
||||
# @POST: Returns metrics dict.
|
||||
# @PRE User has translate.metrics.view permission.
|
||||
# @POST Returns metrics dict.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.get("/jobs/{job_id}/metrics")
|
||||
async def get_job_metrics(
|
||||
job_id: str,
|
||||
|
||||
@@ -23,7 +23,7 @@ from ._router import router
|
||||
# Preview
|
||||
# ============================================================
|
||||
|
||||
# #region preview_translation [TYPE Function]
|
||||
# #region preview_translation [C:4] [TYPE Function]
|
||||
# @BRIEF Preview a translation before applying it.
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Returns a preview session with records and cost estimation.
|
||||
@@ -59,7 +59,7 @@ async def preview_translation(
|
||||
# #endregion preview_translation
|
||||
|
||||
|
||||
# #region update_preview_row [TYPE Function]
|
||||
# #region update_preview_row [C:4] [TYPE Function]
|
||||
# @BRIEF Approve, edit, or reject a preview row (optionally per language).
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Preview row status is updated.
|
||||
@@ -91,7 +91,7 @@ async def update_preview_row(
|
||||
# #endregion update_preview_row
|
||||
|
||||
|
||||
# #region accept_preview_session [TYPE Function]
|
||||
# #region accept_preview_session [C:4] [TYPE Function]
|
||||
# @BRIEF Accept a preview session, marking it as the quality gate for full execution.
|
||||
# @PRE: User has translate.job.execute permission. Job has an ACTIVE preview session.
|
||||
# @POST: Preview session is marked as APPLIED; full execution can proceed.
|
||||
@@ -114,7 +114,7 @@ async def accept_preview_session(
|
||||
# #endregion accept_preview_session
|
||||
|
||||
|
||||
# #region apply_preview [TYPE Function]
|
||||
# #region apply_preview [C:4] [TYPE Function]
|
||||
# @BRIEF Apply a preview session (alias for accept when accepting at session level).
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Preview is applied.
|
||||
@@ -146,10 +146,12 @@ async def apply_preview(
|
||||
# Preview Records
|
||||
# ============================================================
|
||||
|
||||
# #region get_preview_records [TYPE Function]
|
||||
# #region get_preview_records [C:4] [TYPE Function]
|
||||
# @BRIEF Get records for a preview session.
|
||||
# @PRE: User has translate.job.view permission.
|
||||
# @POST: Returns list of preview records.
|
||||
# @PRE User has translate.job.view permission.
|
||||
# @POST Returns list of preview records.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.get("/preview/{session_id}/records", response_model=list[PreviewRow])
|
||||
async def get_preview_records(
|
||||
session_id: str,
|
||||
|
||||
@@ -6,6 +6,7 @@ from fastapi import APIRouter
|
||||
|
||||
# #region translate_router [TYPE Global]
|
||||
# @BRIEF APIRouter instance for all translate sub-routes.
|
||||
|
||||
router = APIRouter(prefix="/api/translate", tags=["translate"])
|
||||
# #endregion translate_router
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ from ._router import router
|
||||
# List Runs (cross-job)
|
||||
# ============================================================
|
||||
|
||||
# #region list_runs [TYPE Function]
|
||||
# #region list_runs [C:4] [TYPE Function]
|
||||
# @BRIEF List all runs with cross-job filtering and pagination.
|
||||
# @PRE: User has translate.history.view permission.
|
||||
# @POST: Returns paginated list of runs.
|
||||
@@ -126,7 +126,7 @@ async def list_runs(
|
||||
# Run Detail
|
||||
# ============================================================
|
||||
|
||||
# #region get_run_detail [TYPE Function]
|
||||
# #region get_run_detail [C:4] [TYPE Function]
|
||||
# @BRIEF Get detailed run info with config_snapshot, records, events.
|
||||
# @PRE: User has translate.history.view permission.
|
||||
# @POST: Returns run detail with records and events.
|
||||
@@ -169,10 +169,12 @@ async def get_run_detail(
|
||||
# Download Skipped CSV
|
||||
# ============================================================
|
||||
|
||||
# #region download_skipped_csv [TYPE Function]
|
||||
# #region download_skipped_csv [C:4] [TYPE Function]
|
||||
# @BRIEF Download a CSV of skipped translation records from a run.
|
||||
# @PRE: User has translate.job.view permission.
|
||||
# @POST: Returns CSV file of skipped records.
|
||||
# @PRE User has translate.job.view permission.
|
||||
# @POST Returns CSV file of skipped records.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.get("/runs/{run_id}/skipped.csv")
|
||||
async def download_skipped_csv(
|
||||
run_id: str,
|
||||
|
||||
@@ -25,7 +25,7 @@ from ._router import router
|
||||
# Translation Run / Execute
|
||||
# ============================================================
|
||||
|
||||
# #region run_translation [TYPE Function]
|
||||
# #region run_translation [C:4] [TYPE Function]
|
||||
# @BRIEF Execute a translation job (trigger a run).
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Returns the created translation run.
|
||||
@@ -164,7 +164,7 @@ def run_translation(
|
||||
# #endregion run_translation
|
||||
|
||||
|
||||
# #region retry_run [TYPE Function]
|
||||
# #region retry_run [C:4] [TYPE Function]
|
||||
# @BRIEF Retry failed batches in a translation run.
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Returns the updated translation run.
|
||||
@@ -190,7 +190,7 @@ def retry_run(
|
||||
# #endregion retry_run
|
||||
|
||||
|
||||
# #region retry_insert [TYPE Function]
|
||||
# #region retry_insert [C:4] [TYPE Function]
|
||||
# @BRIEF Retry the SQL insert phase for a completed run.
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Returns the updated run.
|
||||
@@ -216,7 +216,7 @@ def retry_insert(
|
||||
# #endregion retry_insert
|
||||
|
||||
|
||||
# #region cancel_run [TYPE Function]
|
||||
# #region cancel_run [C:4] [TYPE Function]
|
||||
# @BRIEF Cancel a running translation.
|
||||
# @PRE: User has translate.job.execute permission.
|
||||
# @POST: Run is cancelled.
|
||||
@@ -239,7 +239,7 @@ def cancel_run(
|
||||
# #endregion cancel_run
|
||||
|
||||
|
||||
# #region get_run_history [TYPE Function]
|
||||
# #region get_run_history [C:4] [TYPE Function]
|
||||
# @BRIEF Get run history for a translation job.
|
||||
# @PRE: User has translate.history.view permission.
|
||||
# @POST: Returns list of runs.
|
||||
@@ -264,7 +264,7 @@ def get_run_history(
|
||||
# #endregion get_run_history
|
||||
|
||||
|
||||
# #region get_run_status [TYPE Function]
|
||||
# #region get_run_status [C:4] [TYPE Function]
|
||||
# @BRIEF Get status and statistics for a translation run.
|
||||
# @PRE: User has translate.history.view permission.
|
||||
# @POST: Returns run details with statistics.
|
||||
@@ -286,7 +286,7 @@ def get_run_status(
|
||||
# #endregion get_run_status
|
||||
|
||||
|
||||
# #region get_run_records [TYPE Function]
|
||||
# #region get_run_records [C:4] [TYPE Function]
|
||||
# @BRIEF Get paginated records for a translation run.
|
||||
# @PRE: User has translate.history.view permission.
|
||||
# @POST: Returns paginated records.
|
||||
@@ -315,7 +315,7 @@ def get_run_records(
|
||||
# Batches
|
||||
# ============================================================
|
||||
|
||||
# #region get_batches [TYPE Function]
|
||||
# #region get_batches [C:4] [TYPE Function]
|
||||
# @BRIEF Get batches for a translation run.
|
||||
# @PRE: User has translate.job.view permission.
|
||||
# @POST: Returns list of batches.
|
||||
@@ -360,7 +360,7 @@ def get_batches(
|
||||
# Manual Language Override
|
||||
# ============================================================
|
||||
|
||||
# #region override_detected_language [TYPE Function]
|
||||
# #region override_detected_language [C:4] [TYPE Function]
|
||||
# @BRIEF Manually override the detected source language for a specific translation language entry.
|
||||
# @PRE: User has translate.job.execute permission. Run, record, and language entry exist.
|
||||
# @POST: TranslationLanguage.source_language_detected is updated; language_overridden is set to True.
|
||||
@@ -439,7 +439,7 @@ def override_detected_language(
|
||||
# Inline Correction
|
||||
# ============================================================
|
||||
|
||||
# #region inline_edit_translation [C:3] [TYPE Function] [SEMANTICS api,translate,correction]
|
||||
# #region inline_edit_translation [C:4] [TYPE Function] [SEMANTICS api,translate,correction]
|
||||
# @BRIEF Apply an inline correction to a translated value on a completed run result.
|
||||
# @PRE: User has translate.job.execute permission. Run, record, and language entry exist.
|
||||
# @POST: TranslationLanguage.final_value and user_edit are updated. Optional dictionary submission.
|
||||
@@ -488,10 +488,12 @@ def inline_edit_translation(
|
||||
# Bulk Find-and-Replace
|
||||
# ============================================================
|
||||
|
||||
# #region bulk_find_replace [C:3] [TYPE Function] [SEMANTICS api,translate,bulk,replace]
|
||||
# #region bulk_find_replace [C:4] [TYPE Function] [SEMANTICS api,translate,bulk,replace]
|
||||
# @BRIEF Perform bulk find-and-replace on translated values within a run.
|
||||
# @PRE: User has translate.job.execute permission. Run exists.
|
||||
# @POST: If preview=false, matching translations are updated. Optional dictionary submission.
|
||||
# @PRE User has translate.job.execute permission. Run exists.
|
||||
# @POST If preview=false, matching translations are updated. Optional dictionary submission.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.post("/runs/{run_id}/bulk-replace")
|
||||
def bulk_find_replace(
|
||||
run_id: str,
|
||||
|
||||
@@ -18,7 +18,7 @@ from ._router import router
|
||||
# Schedule
|
||||
# ============================================================
|
||||
|
||||
# #region get_schedule [TYPE Function]
|
||||
# #region get_schedule [C:4] [TYPE Function]
|
||||
# @BRIEF Get the schedule for a translation job.
|
||||
# @PRE: User has translate.schedule.view permission.
|
||||
# @POST: Returns the schedule configuration.
|
||||
@@ -53,7 +53,7 @@ async def get_schedule(
|
||||
# #endregion get_schedule
|
||||
|
||||
|
||||
# #region set_schedule [TYPE Function]
|
||||
# #region set_schedule [C:4] [TYPE Function]
|
||||
# @BRIEF Set or update the schedule for a translation job.
|
||||
# @PRE: User has translate.schedule.manage permission.
|
||||
# @POST: Schedule is created or updated.
|
||||
@@ -119,7 +119,7 @@ async def set_schedule(
|
||||
# #endregion set_schedule
|
||||
|
||||
|
||||
# #region enable_schedule [TYPE Function]
|
||||
# #region enable_schedule [C:4] [TYPE Function]
|
||||
# @BRIEF Enable a schedule for a translation job.
|
||||
# @PRE: User has translate.schedule.manage permission.
|
||||
# @POST: Schedule is enabled.
|
||||
@@ -151,7 +151,7 @@ async def enable_schedule(
|
||||
# #endregion enable_schedule
|
||||
|
||||
|
||||
# #region disable_schedule [TYPE Function]
|
||||
# #region disable_schedule [C:4] [TYPE Function]
|
||||
# @BRIEF Disable a schedule for a translation job.
|
||||
# @PRE: User has translate.schedule.manage permission.
|
||||
# @POST: Schedule is disabled.
|
||||
@@ -177,7 +177,7 @@ async def disable_schedule(
|
||||
# #endregion disable_schedule
|
||||
|
||||
|
||||
# #region delete_schedule [TYPE Function]
|
||||
# #region delete_schedule [C:4] [TYPE Function]
|
||||
# @BRIEF Delete the schedule for a translation job.
|
||||
# @PRE: User has translate.schedule.manage permission.
|
||||
# @POST: Schedule is removed.
|
||||
@@ -203,10 +203,12 @@ async def delete_schedule(
|
||||
# #endregion delete_schedule
|
||||
|
||||
|
||||
# #region get_next_executions [TYPE Function]
|
||||
# #region get_next_executions [C:4] [TYPE Function]
|
||||
# @BRIEF Preview next N executions for a job's schedule.
|
||||
# @PRE: User has translate.schedule.view permission.
|
||||
# @POST: Returns next execution times.
|
||||
# @PRE User has translate.schedule.view permission.
|
||||
# @POST Returns next execution times.
|
||||
# @COMPLEXITY 4
|
||||
|
||||
@router.get("/jobs/{job_id}/schedule/next-executions")
|
||||
async def get_next_executions(
|
||||
job_id: str,
|
||||
|
||||
Reference in New Issue
Block a user