Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions packages/business/src/locale/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,10 @@ export default {
'When the task encounters an error',
packages_business_setting_alarmnotification_dangrenwustop:
'When the Agent service stops',
packages_business_setting_alarmnotification_dangyinqinglixian: 'When the engine stops',
packages_business_setting_alarmnotification_dangyinqinghuifu: 'When the engine starts',
packages_business_setting_alarmnotification_dangyinqinglixian:
'When the engine stops',
packages_business_setting_alarmnotification_dangyinqinghuifu:
'When the engine starts',
packages_business_setting_alarmnotification_api_server_worker_delay_p50_warn:
'When APIServer worker P50 per minute exceeding threshold',
packages_business_setting_alarmnotification_api_server_worker_delay_p95_warn:
Expand Down Expand Up @@ -1453,6 +1455,30 @@ export default {
packages_business_components_conditionbox_mubiaobiaoshuju: 'Target Filter',
packages_business_components_conditionbox_enableCustomCommand_tip:
'Ensure that the query conditions have indexes; without indexes, it may result in a full table scan, causing increased database pressure.',
packages_business_components_conditionbox_advanced_verification_doc: `##### Advanced Verification Instructions
**The first step** The function input parameter is the source table data, you can call the **built-in function** according to the source table data to query the target data<br>
**Step 2** Custom verification logic<br>
**Step 3** The function returns the result<br>

- **result**: whether the verification is passed (passed: verification passed, failed: verification failed), if no or other characters are filled in, the verification fails, required <br>
- **message**: verification exception information, it is recommended to return if verification fails, optional<br>
- **data**: current verification target data, it is recommended to return if verification fails, optional<br>


Full Example: This is an example MongoDB query
\`\`\`\`javascript
function validate(sourceRow){'{'}
// step 1
var targetRow = target.executeQuery({'{'}database: "target",collection: "USER",filter: {'{'}USER_ID: sourceRow.USER_ID{'}}'});
// step 2
if(sourceRow.USER_ID === targetRow[0].USER_ID){'{'}
// step 3
return {'{'}result: 'passed',message: "",data: ""{'}'}
{'}'}else{'{'}
return {'{'}result: 'failed', message: "Inconsistent records", data: targetRow{'}'}
{'}'}
{'}'}
\`\`\`\``,
packages_business_data_server_list_apIwendang: 'API Document Export',
packages_business_verification_form_gaojipeizhi: 'Advanced Configuration',
packages_business_verification_form_validate_table_is_empty:
Expand Down Expand Up @@ -1769,6 +1795,8 @@ export default {
'Under active development. Some features may still be incomplete.',
packages_business_column_setting: 'Display Settings',
packages_business_column_reset: 'Reset',
packages_business_api_server_connection_pool_deficiency_warn: 'When any API Server connection pool resource is tight and triggers the alarm threshold',
packages_business_api_server_connection_pool_idle_warn: 'When the number of connections in the connection pool of any API Server falls below the alarm threshold',
packages_business_api_server_connection_pool_deficiency_warn:
'When any API Server connection pool resource is tight and triggers the alarm threshold',
packages_business_api_server_connection_pool_idle_warn:
'When the number of connections in the connection pool of any API Server falls below the alarm threshold',
}
31 changes: 29 additions & 2 deletions packages/business/src/locale/lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,31 @@ export default {
packages_business_components_conditionbox_mubiaobiaoshuju: '目标表数据过滤',
packages_business_components_conditionbox_enableCustomCommand_tip:
'需要保证查询条件有索引,如果没索引会产生全表扫描导致数据库压力变大',
packages_business_components_conditionbox_advanced_verification_doc: `##### 高级校验说明
**第一步** 函数入参为源表数据,可以根据源表数据调用**内置函数**查询出目标数据<br>
**第二步** 自定义校验逻辑<br>
**第三步** 函数返回结果<br>

- **result**:是否通过校验(passed:校验通过,failed:校验失败),如果不填或填其它字符则校验失败,必填项<br>
- **message**:校验异常信息,建议校验失败返回,选填项<br>
- **data**:当前校验目标数据,建议校验失败返回,选填项<br>


完整示例:此为MongoDB查询示例
\`\`\`javascript
function validate(sourceRow){'{'}
// 第1步
var targetRow = target.executeQuery({'{'}database: "target",collection: "USER",filter: {'{'}USER_ID: sourceRow.USER_ID{'}}'});
// 第2步
if(sourceRow.USER_ID === targetRow[0].USER_ID){'{'}
// 第3步
return {'{'}result: 'passed',message: "",data: ""{'}'}
{'}'}else{'{'}
return {'{'}result: 'failed',message: "记录不一致",data: targetRow{'}'}
{'}'}
{'}'}
\`\`\`
`,
packages_business_data_server_list_apIwendang: 'API文档导出',
packages_business_verification_form_gaojipeizhi: '高级配置',
packages_business_verification_form_validate_table_is_empty:
Expand Down Expand Up @@ -1576,6 +1601,8 @@ export default {
public_connector_alpha_tip: '正在持续开发中,部分功能可能还在完善',
packages_business_column_setting: '显示设置',
packages_business_column_reset: '重置',
packages_business_api_server_connection_pool_deficiency_warn: '当任一API Server 连接池资源紧张触发告警阈值时',
packages_business_api_server_connection_pool_idle_warn: '当任一API Server 连接池连接数低于告警阈值时',
packages_business_api_server_connection_pool_deficiency_warn:
'当任一API Server 连接池资源紧张触发告警阈值时',
packages_business_api_server_connection_pool_idle_warn:
'当任一API Server 连接池连接数低于告警阈值时',
}
42 changes: 36 additions & 6 deletions packages/business/src/locale/lang/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,14 @@ export default {
'當任一API Server的工作行程記憶體使用量超過告警閾值時',
packages_business_setting_alarmnotification_api_server_worker_memory_usage_alter:
'當任一API Server的工作行程記憶體使用量超過通知閾值時',
packages_business_api_server_p95_warn: '當任一API Server請求耗時P95超過告警閾值時',
packages_business_api_server_p99_warn: '當任一API Server請求耗時P99超過告警閾值時',
packages_business_api_server_error_rate_warn: '當任一API Server請求錯誤率超過告警閾值時',
packages_business_task_source_no_incremental_event: '當源端已開啟心跳表,連續 60 秒未接收到增量事件時',
packages_business_api_server_p95_warn:
'當任一API Server請求耗時P95超過告警閾值時',
packages_business_api_server_p99_warn:
'當任一API Server請求耗時P99超過告警閾值時',
packages_business_api_server_error_rate_warn:
'當任一API Server請求錯誤率超過告警閾值時',
packages_business_task_source_no_incremental_event:
'當源端已開啟心跳表,連續 60 秒未接收到增量事件時',
packages_business_setting_alarmnotification_dangrenwuuP: 'Agent服务啓動時',
packages_business_setting_alarmnotification_dangyinqinglixian: '當引擎停止時',
packages_business_setting_alarmnotification_dangyinqinghuifu: '當引擎啓動時',
Expand Down Expand Up @@ -1303,6 +1307,30 @@ export default {
packages_business_components_conditionbox_mubiaobiaoshuju: '目標表數據過濾',
packages_business_components_conditionbox_enableCustomCommand_tip:
'需要保證查詢條件有索引,如果沒索引會產生全表掃描導致數據庫壓力變大',
packages_business_components_conditionbox_advanced_verification_doc: `##### 高級校驗說明
**第一步** 函數入參為源表數據,可以根據源表數據調用**內置函數**查詢出目標數據<br>
**第二步** 自定義校驗邏輯<br>
**第三步** 函數返回結果<br>

- **result**:是否通過校驗(passed:校驗通過,failed:校驗失敗),如果不填或填其它字符則校驗失敗,必填項<br>
- **message**:校驗異常信息,建議校驗失敗返回,選填項<br>
- **data**:當前校驗目標數據,建議校驗失敗返回,選填項<br>


完整示例:此為MongoDB查詢示例
\`\`\`javascript
function validate(sourceRow){'{'}
// 第1步
var targetRow = target.executeQuery({'{'}database: "target",collection: "USER",filter: {'{'}USER_ID: sourceRow.USER_ID{'}}'});
// 第2步
if(sourceRow.USER_ID === targetRow[0].USER_ID){'{'}
// 第3步
return {'{'}result: 'passed',message: "",data: ""{'}'}
{'}'}else{'{'}
return {'{'}result: 'failed',message: "記錄不一致",data: targetRow{'}'}
{'}'}
{'}'}
\`\`\``,
packages_business_data_server_list_apIwendang: 'API文檔導出',
packages_business_verification_form_gaojipeizhi: '高級配置',
packages_business_verification_form_validate_table_is_empty:
Expand Down Expand Up @@ -1561,6 +1589,8 @@ export default {
public_connector_alpha_tip: '正在持續開發中,部分功能可能還在完善',
packages_business_column_setting: '顯示設定',
packages_business_column_reset: '重置',
packages_business_api_server_connection_pool_deficiency_warn: '當任一API Server 連接池資源緊張触发告警閾值時',
packages_business_api_server_connection_pool_idle_warn: '當任一API Server 連接池連接數低於告警閾值時',
packages_business_api_server_connection_pool_deficiency_warn:
'當任一API Server 連接池資源緊張触发告警閾值時',
packages_business_api_server_connection_pool_idle_warn:
'當任一API Server 連接池連接數低於告警閾值時',
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ const dialogAddScriptVisible = ref(false)
const formIndex = ref('')
const webScript = ref('')
const jsEngineName = ref('graal.js')
const doc = ref('')
const doc = computed(() =>
i18n.t('packages_business_components_conditionbox_advanced_verification_doc'),
)
const currentPage = ref(1)
const pageSize = ref(5)
const autoSuggestJoinFields = ref(true)
Expand Down Expand Up @@ -259,15 +261,12 @@ const getConnectionsListMethod = async (

const response: ApiResponse<ConnectionResponse> = {
items: result.items.map((item: ConnectionItem) => {
const findDynamicSchema = item.capabilities.find(
(t: any) => t.id === 'dynamic_schema',
)
if (findDynamicSchema) {
dynamicSchemaMap[item.id] = true
}
const connectionId = item.id
const connectionName = item.name
const databaseType = item.database_type
if (hasCapability(databaseType, 'dynamic_schema')) {
dynamicSchemaMap[connectionId] = true
}
return {
attrs: {
nodeId: '',
Expand Down Expand Up @@ -427,10 +426,7 @@ const getConnectionsInTask = async (
const connectionId = t.connectionId
const connectionName = t.attrs?.connectionName
const databaseType = t.databaseType
const findDynamicSchema = t.attrs?.capabilities.find(
(t: any) => t.id === 'dynamic_schema',
)
if (findDynamicSchema) {
if (hasCapability(databaseType, 'dynamic_schema')) {
dynamicSchemaMap[t.connectionId] = true
}
return {
Expand Down Expand Up @@ -1223,86 +1219,6 @@ const validateCapabilities = (tasks: any[], capability: string) => {
return message
}

const loadDoc = () => {
if (i18n.locale === 'en') {
doc.value = `##### Advanced Verification Instructions
**The first step** The function input parameter is the source table data, you can call the **built-in function** according to the source table data to query the target data<br>
**Step 2** Custom verification logic<br>
**Step 3** The function returns the result<br>

- **result**: whether the verification is passed (passed: verification passed, failed: verification failed), if no or other characters are filled in, the verification fails, required <br>
- **message**: verification exception information, it is recommended to return if verification fails, optional<br>
- **data**: current verification target data, it is recommended to return if verification fails, optional<br>


Full Example: This is an example MongoDB query
\`\`\`\`javascript
function validate(sourceRow){
// step 1
var targetRow = target.executeQuery({database: "target",collection: "USER",filter: {USER_ID: sourceRow.USER_ID}});
// step 2
if(sourceRow.USER_ID === targetRow[0].USER_ID){
// step 3
return {result: 'passed',message: "",data: ""}
}else{
return {result: 'failed', message: "Inconsistent records", data: targetRow}
}
}
\`\`\`\``
} else if (i18n.locale === 'zh-TW') {
doc.value = `##### 高級校驗說明
**第一步** 函數入參為源表數據,可以根據源表數據調用**內置函數**查詢出目標數據<br>
**第二步** 自定義校驗邏輯<br>
**第三步** 函數返回結果<br>

- **result**:是否通過校驗(passed:校驗通過,failed:校驗失敗),如果不填或填其它字符則校驗失敗,必填項<br>
- **message**:校驗異常信息,建議校驗失敗返回,選填項<br>
- **data**:當前校驗目標數據,建議校驗失敗返回,選填項<br>


完整示例:此為MongoDB查詢示例
\`\`\`javascript
function validate(sourceRow){
// 第1步
var targetRow = target.executeQuery({database: "target",collection: "USER",filter: {USER_ID: sourceRow.USER_ID}});
// 第2步
if(sourceRow.USER_ID === targetRow[0].USER_ID){
// 第3步
return {result: 'passed',message: "",data: ""}
}else{
return {result: 'failed',message: "記錄不一致",data: targetRow}
}
}
\`\`\``
} else {
doc.value = `##### 高级校验说明
**第一步** 函数入参为源表数据,可以根据源表数据调用**内置函数**查询出目标数据<br>
**第二步** 自定义校验逻辑<br>
**第三步** 函数返回结果<br>

- **result**:是否通过校验(passed:校验通过,failed:校验失败),如果不填或填其它字符则校验失败,必填项<br>
- **message**:校验异常信息,建议校验失败返回,选填项<br>
- **data**:当前校验目标数据,建议校验失败返回,选填项<br>


完整示例:此为MongoDB查询示例
\`\`\`javascript
function validate(sourceRow){
// 第1步
var targetRow = target.executeQuery({database: "target",collection: "USER",filter: {USER_ID: sourceRow.USER_ID}});
// 第2步
if(sourceRow.USER_ID === targetRow[0].USER_ID){
// 第3步
return {result: 'passed',message: "",data: ""}
}else{
return {result: 'failed',message: "记录不一致",data: targetRow}
}
}
\`\`\`
`
}
}

const getModeTypeDisabled = (item: any) => {
return (
!item.source.connectionId ||
Expand Down Expand Up @@ -1455,7 +1371,6 @@ const isNullsLast = (item: any) => {

// Lifecycle Hooks
onMounted(() => {
loadDoc()
handleSearch('')
})

Expand Down
Loading