feat(queries): 完成 M04 查询定义与版本激活
交付不可变查询版本、保存即生效与激活(D26),并带控制台列表筛选排序与试跑预览;补 RLS 下 current_version_no 回填迁移。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8c0335040f
commit
21cc721fcc
97 files changed
+13354
-153
No files matched your search
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"appName": "Watchman",
|
||||
"appName": "Alert Platform",
|
||||
"login": {
|
||||
"title": "Sign in to Watchman",
|
||||
"title": "Sign in to Alert Platform",
|
||||
"subtitle": "Use your company account to open the alert platform",
|
||||
"eyebrow": "WATCHMAN · EARLY WARNING",
|
||||
"eyebrow": "ALERT PLATFORM · EARLY WARNING",
|
||||
"heroEm": "visible",
|
||||
"heroBefore": "Make exceptions ",
|
||||
"submitting": "Signing in",
|
||||
@@ -20,7 +20,7 @@
|
||||
"unavailable": "Sign-in is temporarily unavailable. Try again shortly.",
|
||||
"logout": "Sign out",
|
||||
"forbiddenTitle": "No access",
|
||||
"forbiddenBody": "This account is signed in, but it does not have a Watchman view, operate, or admin role.",
|
||||
"forbiddenBody": "This account is signed in, but it does not have an Alert Platform view, operate, or admin role.",
|
||||
"fixture": "Local identity mode. This is not a production sign-in."
|
||||
},
|
||||
"shell": {
|
||||
@@ -36,8 +36,10 @@
|
||||
"nav": {
|
||||
"home": "Overview",
|
||||
"datasources": "Data sources",
|
||||
"queries": "Queries",
|
||||
"create": "New",
|
||||
"detail": "Details"
|
||||
"detail": "Details",
|
||||
"version": "Version v{no}"
|
||||
},
|
||||
"datasource": {
|
||||
"list": {
|
||||
@@ -45,7 +47,15 @@
|
||||
"loading": "Loading data sources",
|
||||
"loadFailed": "Failed to load data sources",
|
||||
"empty": "No data sources yet",
|
||||
"emptyHint": "An administrator can create the first data source."
|
||||
"emptyHint": "An administrator can create the first data source.",
|
||||
"filterName": "Name (contains)",
|
||||
"filterEngine": "Engine",
|
||||
"filterStatus": "Status",
|
||||
"filterSearch": "Search",
|
||||
"filterReset": "Reset",
|
||||
"filterClear": "Clear filters",
|
||||
"filterEmpty": "No data sources match",
|
||||
"filterEmptyHint": "Try another name, engine or status, or reset the filters."
|
||||
},
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
@@ -166,5 +176,281 @@
|
||||
},
|
||||
"saved": "Saved",
|
||||
"disabled": "Disabled"
|
||||
},
|
||||
"query": {
|
||||
"list": {
|
||||
"create": "New",
|
||||
"loadFailed": "Failed to load queries",
|
||||
"empty": "No queries yet",
|
||||
"emptyHint": "An administrator can create the first query: pick a data source, write a parameterized SQL template, and declare its parameters and output contract.",
|
||||
"filterName": "Name (contains)",
|
||||
"filterDatasource": "Data source",
|
||||
"filterStatus": "Status",
|
||||
"filterSearch": "Search",
|
||||
"filterReset": "Reset",
|
||||
"filterClear": "Clear filters",
|
||||
"filterEmpty": "No queries match",
|
||||
"filterEmptyHint": "Try another name, data source or status, or reset the filters."
|
||||
},
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
"datasource": "Data source",
|
||||
"status": "Status",
|
||||
"latestVersion": "Latest version",
|
||||
"currentVersion": "Current version",
|
||||
"updatedAt": "Updated",
|
||||
"actions": "Actions"
|
||||
},
|
||||
"status": {
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled"
|
||||
},
|
||||
"actions": {
|
||||
"open": "Open",
|
||||
"preview": "Preview",
|
||||
"previewDisabledWhy": "Disabled, cannot be previewed",
|
||||
"backToList": "Back to list",
|
||||
"backToDraft": "Back to query",
|
||||
"backToQuery": "Back to query",
|
||||
"save": "Save",
|
||||
"publish": "Publish",
|
||||
"activate": "Activate this version",
|
||||
"switchVersion": "Switch version",
|
||||
"needSave": "Save the draft first",
|
||||
"disable": "Disable",
|
||||
"enable": "Enable",
|
||||
"runPreview": "Run preview",
|
||||
"previewNeedSave": "Save first; preview uses the saved current version",
|
||||
"add": "Add",
|
||||
"remove": "Remove"
|
||||
},
|
||||
"denied": {
|
||||
"title": "Queries are not available",
|
||||
"body": "Only administrators can open the query pages."
|
||||
},
|
||||
"form": {
|
||||
"basic": "Basics",
|
||||
"subNew": "New",
|
||||
"subSaved": "Current {version}",
|
||||
"name": "Name",
|
||||
"namePlaceholder": "Unique within the tenant",
|
||||
"nameTooLong": "At most 128 characters",
|
||||
"datasource": "Data source",
|
||||
"datasourcePlaceholder": "Select a data source",
|
||||
"datasourceOff": "(disabled)",
|
||||
"datasourcesFailed": "Failed to load data sources",
|
||||
"description": "Purpose",
|
||||
"status": "Status",
|
||||
"statusNew": "Enabled by default after creation",
|
||||
"statusHint": "Switch it with {action} in the footer",
|
||||
"sql": "SQL template",
|
||||
"sqlPlaceholder": "SELECT lot_no FROM process_readings WHERE line_code = :line_code",
|
||||
"sqlHint": "Use named parameters such as :line_code. Values are always bound, never spliced into the SQL. Read-only access is guaranteed by the data source account and the executor.",
|
||||
"paramsTitle": "Parameter schema",
|
||||
"paramsHint": "Every :name in the SQL must be declared here. Undeclared parameters are refused when running or publishing.",
|
||||
"outputsTitle": "Output schema",
|
||||
"outputsHint": "The output contract used to check result types: names and types only.",
|
||||
"identifiersTitle": "Allowed identifiers",
|
||||
"identifiersHint": "Table or column names cannot be parameter values. Only names declared here may appear in the template at {example}. Empty means none are allowed.",
|
||||
"limits": "Execution limits",
|
||||
"limitsHint": "Server caps: timeout_ms up to {timeout}, max_rows up to {rows}.",
|
||||
"required": "Required",
|
||||
"invalidRange": "Enter a whole number from {min} to {max}"
|
||||
},
|
||||
"sqlParams": {
|
||||
"none": "No :parameters used in the SQL yet.",
|
||||
"used": "Parameters in the SQL:",
|
||||
"undeclared": ":{name} not declared",
|
||||
"undeclaredTitle": "Not declared in the parameter schema; preview and save will reject it",
|
||||
"unused": "{name} unused",
|
||||
"unusedTitle": "Declared but not used in the SQL"
|
||||
},
|
||||
"params": {
|
||||
"name": "Name",
|
||||
"type": "Type",
|
||||
"required": "Required",
|
||||
"default": "Default",
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"add": "Add parameter",
|
||||
"empty": "No parameters declared yet.",
|
||||
"namePlaceholder": "For example line_code",
|
||||
"defaultPlaceholder": "Optional",
|
||||
"invalidName": "Invalid parameter name: {name}",
|
||||
"duplicate": "Duplicate parameter name: {name}",
|
||||
"invalidDefault": "Default does not fit the type: {name}"
|
||||
},
|
||||
"outputs": {
|
||||
"name": "Column",
|
||||
"type": "Type",
|
||||
"add": "Add output column",
|
||||
"empty": "No output columns declared yet.",
|
||||
"namePlaceholder": "For example lot_no",
|
||||
"invalidName": "Invalid output column name: {name}",
|
||||
"duplicate": "Duplicate output column name: {name}",
|
||||
"invalidDefault": "Invalid output column: {name}"
|
||||
},
|
||||
"identifiers": {
|
||||
"none": "None (dynamic identifiers are not allowed)",
|
||||
"placeholder": "Type an identifier and press Enter, for example process_readings",
|
||||
"invalid": "An identifier may only contain letters, digits and underscores, and cannot start with a digit: {name}"
|
||||
},
|
||||
"preview": {
|
||||
"title": "Trial run",
|
||||
"target": "Preview target: ",
|
||||
"targetVersion": "Version v{no} (frozen)",
|
||||
"dirtyNote": "You have unsaved changes. Save before running a preview (it uses the saved current version).",
|
||||
"needSaveNote": "Save before running a preview.",
|
||||
"noParams": "This query declares no parameters, so you can run it directly.",
|
||||
"invalidValue": "The value does not fit the parameter type",
|
||||
"unset": "(not set)",
|
||||
"none": "Not run yet. Fill in the parameters and use Run preview in the footer.",
|
||||
"running": "Running",
|
||||
"success": {
|
||||
"title": "Run succeeded",
|
||||
"body": "Returned {count} sample rows and the columns fit the output contract. Columns tagged Masked are covered."
|
||||
},
|
||||
"empty": {
|
||||
"title": "Empty result",
|
||||
"body": "The query ran successfully but no row matched. This is neither a failure nor a type error."
|
||||
},
|
||||
"illegal": {
|
||||
"title": "Output type mismatch",
|
||||
"body": "The query ran, but the returned values do not fit the output contract, so the whole batch is not valid output.",
|
||||
"row": "Row",
|
||||
"field": "Column",
|
||||
"expected": "Contract type",
|
||||
"actual": "Actual type"
|
||||
},
|
||||
"failure": {
|
||||
"timeout": {
|
||||
"title": "Timed out",
|
||||
"body": "No answer within timeout_ms, so the query was stopped. Narrow the time window or adjust the limits and retry."
|
||||
},
|
||||
"unreachable": {
|
||||
"title": "Connection failed",
|
||||
"body": "Could not connect to the data source. Check the data source and the network."
|
||||
},
|
||||
"auth_failed": {
|
||||
"title": "Data source authentication failed",
|
||||
"body": "The data source did not accept the saved account or password. Update it on the data source page."
|
||||
},
|
||||
"rejected": {
|
||||
"title": "Data source refused the connection",
|
||||
"body": "The data source replied but refused the connection, for example because the database does not exist."
|
||||
},
|
||||
"sql_error": {
|
||||
"title": "SQL failed",
|
||||
"body": "The source database rejected the SQL. Check the SQL template."
|
||||
},
|
||||
"limit_exceeded": {
|
||||
"title": "Over max_rows",
|
||||
"body": "More rows than max_rows={max_rows} were returned, so nothing was returned. Narrow the condition or raise max_rows."
|
||||
},
|
||||
"validation": {
|
||||
"title": "Template or parameters invalid",
|
||||
"body": "The template or parameters failed validation, so nothing was sent to the source database."
|
||||
},
|
||||
"engine_readonly_unsupported": {
|
||||
"title": "Preview not available for this engine",
|
||||
"body": "SQL Server has no server-enforced read-only session in this release, so query preview is refused. Use a PostgreSQL or MySQL data source; connection tests still work."
|
||||
},
|
||||
"unknown": {
|
||||
"title": "Run failed",
|
||||
"body": "The query did not complete."
|
||||
},
|
||||
"noteCircuit": "Connection-class failures count toward this data source's circuit breaker.",
|
||||
"noteNoCircuit": "This kind of failure does not count toward the circuit breaker."
|
||||
},
|
||||
"disabled": {
|
||||
"title": "Disabled, not run",
|
||||
"queryBody": "This query is disabled and cannot be run. Use Enable in the footer first.",
|
||||
"sourceBody": "The bound data source is disabled and cannot be run."
|
||||
},
|
||||
"circuit": {
|
||||
"title": "Data source circuit open, not run",
|
||||
"body": "The data source circuit is open, so no query is sent to the source database. Expected to recover after {until}."
|
||||
},
|
||||
"masked": "Masked",
|
||||
"datasource": "Data source {name}",
|
||||
"onlyPreview": "Preview only: no alarm is created, no notification is sent, nothing enters official runs.",
|
||||
"failedUnknown": "The run did not finish. Try again shortly.",
|
||||
"targetCurrent": "Current version (saved content)"
|
||||
},
|
||||
"versions": {
|
||||
"title": "Versions",
|
||||
"hint": "Saving creates a new version and makes it current. Any history version can be activated.",
|
||||
"empty": "No versions yet.",
|
||||
"emptyCreate": "After you save, v1 will appear here.",
|
||||
"version": "Version",
|
||||
"latest": "Latest",
|
||||
"current": "Current",
|
||||
"publishedAt": "Created at",
|
||||
"publishedBy": "By",
|
||||
"unpublished": "No version",
|
||||
"none": "None",
|
||||
"loadFailed": "Failed to load versions",
|
||||
"frozenNote": "Version {version} is frozen and cannot be edited. Fix it on the query page and save a new version; you can still preview or activate here.",
|
||||
"info": "Version info",
|
||||
"readonly": "Read-only",
|
||||
"query": "Query",
|
||||
"activated": "Switched to {version}",
|
||||
"switchTitle": "Switch version · {name}"
|
||||
},
|
||||
"refs": {
|
||||
"title": "References",
|
||||
"empty": "No references yet",
|
||||
"loadFailed": "Failed to load references"
|
||||
},
|
||||
"publishConfirm": {
|
||||
"title": "Publish {version}?",
|
||||
"body": "The saved draft will be frozen as immutable version {version}. It cannot be changed or deleted afterwards; a correction needs a new version.",
|
||||
"ok": "Publish",
|
||||
"cancel": "Cancel"
|
||||
},
|
||||
"disableConfirm": {
|
||||
"title": "Disable query",
|
||||
"body": "A disabled query cannot be previewed. The record and published versions are kept. Disable \"{name}\"?",
|
||||
"ok": "Disable",
|
||||
"cancel": "Cancel"
|
||||
},
|
||||
"disabledNote": "This query is disabled. You can still view and edit the draft, but not run a preview. Use Enable in the footer to restore it.",
|
||||
"notFound": "Query not found",
|
||||
"versionNotFound": "Version not found",
|
||||
"loadFailed": "Failed to load the query",
|
||||
"saveFailed": "The action did not complete. Try again shortly.",
|
||||
"saved": "Draft saved",
|
||||
"savedVersion": "Saved as {version} and set as current",
|
||||
"publishNeedSave": "Save unsaved changes first",
|
||||
"published": "Saved {version}",
|
||||
"enabledDone": "Enabled",
|
||||
"disabledDone": "Disabled",
|
||||
"errors": {
|
||||
"duplicate_name": "This name already exists. Choose another.",
|
||||
"datasource_not_found": "The selected data source does not exist",
|
||||
"datasource_not_database": "Only a database data source can be used",
|
||||
"template_empty": "The SQL template cannot be empty",
|
||||
"param_schema_invalid": "The parameter schema is invalid",
|
||||
"param_default_invalid": "A parameter default does not fit its type",
|
||||
"output_schema_invalid": "The output schema is invalid",
|
||||
"allowed_identifiers_invalid": "The allowed identifiers are invalid",
|
||||
"limit_invalid": "A limit must be a whole number of at least 1",
|
||||
"disabled": "The query is disabled and cannot be run",
|
||||
"version_conflict": "Version number conflict. Refresh and try again.",
|
||||
"not_found": "Record not found",
|
||||
"version_immutable": "A published version cannot be changed",
|
||||
"identifier_invalid": "An identifier in the template is malformed",
|
||||
"identifier_not_allowed": "The template uses an identifier that is not allowed",
|
||||
"identifier_unterminated": "An identifier in the template is not closed",
|
||||
"missing_param": "A required parameter is missing",
|
||||
"multiple_statements": "The template may contain only one statement",
|
||||
"param_type_mismatch": "A parameter value does not fit its type",
|
||||
"params_invalid": "The parameters are malformed",
|
||||
"template_unterminated": "The template has an unclosed quote or comment",
|
||||
"undeclared_param": "The template uses a parameter that is not declared",
|
||||
"unknown_param": "A parameter that is not declared was sent",
|
||||
"unsupported_engine": "This data source engine is not supported yet",
|
||||
"unsupported_datasource": "This data source type is not supported yet"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user