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
3 changes: 2 additions & 1 deletion frontend/src/api/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const datasourceApi = {
request.post(`/datasource/execSql/${id}`, { sql: sql }),
chooseTables: (id: number, data: any) => request.post(`/datasource/chooseTables/${id}`, data),
tableList: (id: number) => request.post(`/datasource/tableList/${id}`),
fieldList: (id: number) => request.post(`/datasource/fieldList/${id}`),
fieldList: (id: number, data = { fieldName: '' }) =>
request.post(`/datasource/fieldList/${id}`, data),
edit: (data: any) => request.post('/datasource/editLocalComment', data),
previewData: (id: number, data: any) => request.post(`/datasource/previewData/${id}`, data),
saveTable: (data: any) => request.post('/datasource/editTable', data),
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"Data Q&A": "Data Q&A",
"Data Connections": "Data Sources",
"Dashboard": "Dashboard",
"AI Model Configuration": "AI Model Configuration",
"AI Model Configuration": "AI Model Config",
"Details": "Details"
},
"parameter": {
"parameter_configuration": "Parameter Configuration",
"parameter_configuration": "Parameter Config",
"question_count_settings": "Question Count Settings",
"model_thinking_process": "Expand Model Thinking Process",
"rows_of_data": "Limit 1000 Rows of Data",
Expand Down Expand Up @@ -72,7 +72,7 @@
"code_for_debugging": "Copy the following code for debugging",
"full_screen_mode": "Full screen mode",
"editing_terminology": "Editing Terminology",
"professional_terminology": "Terminology Configuration",
"professional_terminology": "Terminology Config",
"term_name": "Term Name",
"term_description": "Term Description",
"search_term": "Search Term",
Expand Down Expand Up @@ -388,7 +388,7 @@
"set_successfully": "Set successfully",
"operate_with_caution": "After the system default model is replaced, the result of intelligent question will be affected, please operate with caution.",
"system_default_model": "Do you want to set {msg} as the system default model?",
"ai_model_configuration": "AI model configuration",
"ai_model_configuration": "AI model config",
"system_default_model_de": "System default model",
"relevant_results_found": "No relevant results found",
"add_model": "Add model",
Expand Down Expand Up @@ -508,7 +508,7 @@
"find_user": "Find user",
"add_successfully": "Add successfully",
"member_management": "Member management",
"permission_configuration": "Permission configuration",
"permission_configuration": "Permission Config",
"set": "Settings",
"operate_with_caution": "After deletion, the users under the workspace will be removed and all resources will be deleted. Please operate with caution."
},
Expand Down
23 changes: 22 additions & 1 deletion frontend/src/views/ds/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,17 @@ const renderHeader = ({ column }: any) => {
return column.label
}

const fieldNameSearch = () => {
btnSelectClick(btnSelect.value)
}
const fieldName = ref('')
const btnSelectClick = (val: any) => {
btnSelect.value = val
loading.value = true

if (val === 'd') {
datasourceApi
.fieldList(currentTable.value.id)
.fieldList(currentTable.value.id, { fieldName: fieldName.value })
.then((res) => {
fieldList.value = res
pageInfo.total = res.length
Expand Down Expand Up @@ -403,6 +407,15 @@ const btnSelectClick = (val: any) => {
{{ t('ds.preview') }}
</el-button>
</div>
<div v-if="btnSelect === 'd'" class="field-name">
<el-input
:placeholder="t('dashboard.search')"
v-model="fieldName"
@blur="fieldNameSearch"
autocomplete="off"
clearable
/>
</div>

<div
v-if="!loading"
Expand Down Expand Up @@ -785,6 +798,14 @@ const btnSelectClick = (val: any) => {
.table-content {
padding: 16px 24px;
height: calc(100% - 80px);
position: relative;

.field-name {
position: absolute;
right: 16px;
top: 16px;
width: 240px;
}

.btn-select {
height: 32px;
Expand Down