File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
backend/apps/datasource/crud Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1717 DatasourceConf
1818
1919
20- def get_datasource_list (session : SessionDep ) -> CoreDatasource :
20+ def get_datasource_list (session : SessionDep ):
2121 statement = select (CoreDatasource ).order_by (CoreDatasource .create_time .desc ())
2222 datasource_list = session .exec (statement ).fetchall ()
2323 return datasource_list
Original file line number Diff line number Diff line change @@ -281,6 +281,12 @@ const check = () => {
281281 type: ' success' ,
282282 showClose: true
283283 })
284+ } else {
285+ ElMessage ({
286+ message: ' Connect failed' ,
287+ type: ' error' ,
288+ showClose: true
289+ })
284290 }
285291 })
286292}
@@ -304,6 +310,12 @@ const next = async(formEl: FormInstance | undefined) => {
304310 datasourceApi .getTablesByConf (form .value ).then ((res ) => {
305311 tableList .value = res
306312 })
313+ } else {
314+ ElMessage ({
315+ message: ' Connect failed' ,
316+ type: ' error' ,
317+ showClose: true
318+ })
307319 }
308320 })
309321 }
Original file line number Diff line number Diff line change 11<template >
2- <div >
2+ <div v-loading = " loading " >
33 <div class =" header" >
44 <div class =" mt-4" >
55 <el-input
@@ -72,6 +72,7 @@ const dsForm = ref()
7272const dsList = ref <any >([])// show ds list
7373const allDsList = ref <any >([])// all ds list
7474const router = useRouter ()
75+ const loading = ref (false )
7576
7677const getStatus = (status : string ) => {
7778 if (status === ' Success' ) {
@@ -98,9 +99,11 @@ const refresh = () => {
9899}
99100
100101const list = () => {
102+ loading .value = true
101103 datasourceApi .list ().then ((res ) => {
102104 allDsList .value = res
103105 dsList .value = JSON .parse (JSON .stringify (allDsList .value ))
106+ loading .value = false
104107 })
105108}
106109
You can’t perform that action at this time.
0 commit comments