mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-06 19:47:44 +00:00
feat: add a web UI server (#1345)
* update rdagent cmd * fix log error message * use multiProcessing.Process instead of subprocess.Popen * add traces to gitignore * add user interactor in RDLoop (finance scenarios) * add interactor (feedback, hypothesis) for quant scens * fix the test_end in qlib conf * add features init config, general instruction to qlib scenarios * set base features for based exp * fix bug when combine factors * move traces folder to git_ignore_folder * fix bug in features init * fix quant interact bug * fix logger warning error * bug fixes * modify rdagent logger, now it can set file output * adjust cli functions and fix logger bug * fix server port transport problem * update server_ui in cli * add web code * fix CI problem * black fix * update web ui README * update README * update readme
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import axios from 'axios'
|
||||
|
||||
axios.defaults.headers.post['Content-Type'] = 'application/json'
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: ''
|
||||
})
|
||||
service.defaults.timeout = 5 * 60 * 1000;
|
||||
|
||||
// request拦截器
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
if (config.data) {}
|
||||
if (config.params) {
|
||||
// console.log('request: ', config.params)
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
console.log('error-request: ', error)
|
||||
return error
|
||||
}
|
||||
)
|
||||
|
||||
// respone拦截器
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
return response.data
|
||||
},
|
||||
error => {
|
||||
console.log('error-response: ', error)
|
||||
console.log('error-response: ', error.response)
|
||||
return error.response
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
||||
Reference in New Issue
Block a user