-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: server update & bugfix (#230)
feat: mime && connectdb feat: 文件上传、删除、预览功能实现 (#206) feat: middleware (#208) * feat: middleware * feat: dynamicly add query params func * feat: common params * update: go mod tidy * feat: batchExec complete file and import task (#213) modify upload and download mody: go mod refine the code update: make check modify return values Refactor (#219) * update: server-v2 * updata: format feat: context auth (#220) update: export module (#222) feat: export RegisterHandlers (#223) update: gitignore (#224) fix: fix service init crash (#225) update: WithErrorMessage (#226) fix import task (#227) fix the type conveersion problem fix: fix import & file model (#229) Co-authored-by: Bruce <[email protected]>
- Loading branch information
1 parent
0deae69
commit eb8e692
Showing
90 changed files
with
5,549 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,57 @@ | ||
import { _delete, get, post, put } from '../utils/http'; | ||
|
||
let service = { | ||
execNGQL: (params, config?) => { | ||
return post('/api-nebula/db/exec')(params, config) | ||
const service = { | ||
execNGQL: (params, config?) => { | ||
return post('/api-nebula/db/exec')(params, config); | ||
}, | ||
batchExecNGQL: (params, config?) => { | ||
return post('/api-nebula/db/batchExec')(params, config) | ||
return post('/api-nebula/db/batchExec')(params, config); | ||
}, | ||
connectDB: (params, config?) => { | ||
return post('/api-nebula/db/connect')(params, config) | ||
return post('/api-nebula/db/connect')(params, config); | ||
}, | ||
disconnectDB: (params, config?) => { | ||
return post('/api-nebula/db/disconnect')(params, config) | ||
return post('/api-nebula/db/disconnect')(params, config); | ||
}, | ||
// import | ||
importData: (params, config?) => { | ||
return post('/api/import-tasks/import')(params, config) | ||
return post('/api/import-tasks')(params, config); | ||
}, | ||
handleImportAction: (params, config?) => { | ||
return post('/api/import-tasks/action')(params, config) | ||
stopImportTask: (id: number) => { | ||
return post(`/api/import-tasks/${id}/stop`)(); | ||
}, | ||
getLog: (params, config?) => { | ||
return get('/api/import-tasks/logs')(params, config) | ||
deleteImportTask: (id: number) => { | ||
return post(`/api/import-tasks/${id}/stop`)(); | ||
}, | ||
getErrLog: (params, config?) => { | ||
return get('/api/import-tasks/err-logs')(params, config) | ||
getTaskList: (params?, config?) => { | ||
return get('/api/import-tasks')(params, config); | ||
}, | ||
finishImport: (params, config?) => { | ||
return post('/api/import/finish')(params, config) | ||
}, | ||
getUploadDir: () => { | ||
return get('/api/import-tasks/working-dir')() | ||
getTaskLogs: (params?, config?) => { | ||
const { id, ...others } = params; | ||
return get(`/api/import-tasks/${id}/task-log-names`)(others, config); | ||
}, | ||
getTaskDir: () => { | ||
return get('/api/import-tasks/task-dir')() | ||
getLogDetail: (params, config?) => { | ||
const { id, ...others } = params; | ||
return get(`/api/import-tasks/${id}/logs`)(others, config); | ||
}, | ||
deteleFile:params => { | ||
getTaskConfig: (id: string | number) => `/api/import-tasks/${id}/download-config`, | ||
getTaskLog: (id: string | number) => `/api/import-tasks/${id}/download-logs`, | ||
// files | ||
deteleFile: params => { | ||
const { filename } = params; | ||
return _delete(`/api/files/${filename}`)(); | ||
}, | ||
getFiles: () => { | ||
return get('/api/files')() | ||
return get('/api/files')(); | ||
}, | ||
uploadFiles: (params?, config?) => { | ||
put('/api/files')(params, { ...config, headers: { 'Content-Type': 'multipart/form-data' } }); | ||
}, | ||
getTaskLogs: (params?, config?) => { | ||
const { id, ...others } = params; | ||
return get(`/api/import-tasks/${id}/task-log-names`)(others, config); | ||
}, | ||
getTaskConfigUrl: (id: string | number) => `/api/import-tasks/config/${id}`, | ||
getTaskLogUrl: (id: string | number) => `/api/import-tasks/${id}/log`, | ||
getTaskErrLogUrl: (id: string | number) => `/api/import-tasks/${id}/err-logs`, | ||
} | ||
}; | ||
|
||
export const updateService = (partService: any) => { | ||
Object.assign(service, partService) | ||
} | ||
Object.assign(service, partService); | ||
}; | ||
|
||
export default service; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.