Skip to content

Commit a6771f1

Browse files
authored
Merge pull request #405 from tapdata/feat/TAP-5855-incremental-verification
Feat/tap 5855 incremental verification
2 parents ea2df36 + 2f871fb commit a6771f1

File tree

30 files changed

+2114
-245
lines changed

30 files changed

+2114
-245
lines changed

apps/daas/src/vuex/modules/feature.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { licensesApi } from '@tap/api'
2-
import { SettingList } from '@/router/menu'
32

43
const MENU_FEATURE_MAP = {
54
dataService: 'dataService',

packages/api/src/TaskInspect.ts

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import Http from './Http'
2+
3+
interface TaskInspectConfig {
4+
custom: {
5+
cdc: {
6+
enable: boolean
7+
sample: {
8+
interval: number
9+
limit: number
10+
}
11+
type: 'CLOSE' | 'SAMPLE'
12+
}
13+
full?: {
14+
enable: boolean
15+
cron: string
16+
diffEnable: boolean
17+
diffLimit: number
18+
diffRetryTimes: number
19+
sampleLimit: number
20+
samplePercent: number
21+
trigger: string
22+
type: string
23+
}
24+
recover?: {
25+
enable: boolean
26+
}
27+
}
28+
intelligent?: {
29+
cdcSampleInterval: number
30+
cdcSampleLimit: number
31+
enableRecover: boolean
32+
fullDiffLimit: number
33+
fullSampleLimit: number
34+
}
35+
mode: 'CLOSE' | 'INTELLIGENT' | 'CUSTOM'
36+
}
37+
38+
interface TaskInspectHistory {
39+
id: string
40+
taskId: string
41+
createdAt: string
42+
status: string
43+
type: string
44+
[key: string]: any
45+
}
46+
47+
export default class TaskInspect extends Http {
48+
constructor() {
49+
super('/api/task-inspect')
50+
}
51+
52+
async getConfig(taskId: string, params?: any): Promise<TaskInspectConfig> {
53+
const response = (await this.axios.get(`${this.url}/${taskId}`, {
54+
params,
55+
})) as unknown as TaskInspectConfig
56+
57+
return (
58+
response || {
59+
mode: 'CLOSE',
60+
custom: {
61+
cdc: {
62+
enable: true,
63+
sample: { interval: 10, limit: 1 },
64+
type: 'SAMPLE',
65+
},
66+
},
67+
}
68+
)
69+
}
70+
71+
putConfig(taskId: string, params: TaskInspectConfig) {
72+
return this.axios.put<TaskInspectConfig>(`${this.url}/${taskId}`, params)
73+
}
74+
75+
getHistories(taskId: string, params: any) {
76+
return this.axios.get<TaskInspectHistory[]>(
77+
`${this.url}/${taskId}/histories`,
78+
{ params },
79+
)
80+
}
81+
}

packages/api/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ const agentGroupApi = new AgentGroup()
250250
import Webhook from './Webhook'
251251
const webhookApi = new Webhook()
252252

253+
import TaskInspect from './TaskInspect'
254+
const taskInspectApi = new TaskInspect()
255+
253256
export {
254257
connectionsApi,
255258
databaseTypesApi,
@@ -313,7 +316,8 @@ export {
313316
connectorRecordApi,
314317
alarmMailApi,
315318
agentGroupApi,
316-
webhookApi
319+
webhookApi,
320+
taskInspectApi
317321
}
318322
export * from './ApiClient'
319323

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

packages/assets/icons/svg/Eye.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

packages/assets/styles/element.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,17 +408,17 @@
408408
margin-left: 0;
409409
}
410410

411-
&.is-text.el-button--small:has(> i:only-child) {
411+
&.is-text.el-button--small:has(> i:only-child), &.is-text.el-button--small:has(> i + span:empty) {
412412
--el-border-radius-base: var(--el-border-radius-small);
413413
font-size: 16px;
414414
}
415415

416416
// 这里的default 介于按钮的 sm/default 之间
417-
&.is-text.el-button--default:has(> i:only-child) {
417+
&.is-text.el-button--default:has(> i:only-child), &.is-text.el-button--default:has(> i + span:empty) {
418418
font-size: 18px;
419419
}
420420

421-
&.is-text.el-button--large:has(> i:only-child) {
421+
&.is-text.el-button--large:has(> i:only-child), &.is-text.el-button--large:has(> i + span:empty) {
422422
font-size: 24px;
423423
}
424424
}

0 commit comments

Comments
 (0)