Add TCP Middlewares support
This commit is contained in:
parent
679def0151
commit
fc9f41b955
134 changed files with 5865 additions and 1852 deletions
|
@ -39,9 +39,29 @@ function getServiceByName (name) {
|
|||
})
|
||||
}
|
||||
|
||||
function getAllMiddlewares (params) {
|
||||
return APP.api.get(`${apiBase}/middlewares?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(response => {
|
||||
const { data = [], headers } = response
|
||||
const total = getTotal(headers, params)
|
||||
console.log('Success -> TcpService -> getAllMiddlewares', response.data)
|
||||
return { data, total }
|
||||
})
|
||||
}
|
||||
|
||||
function getMiddlewareByName (name) {
|
||||
return APP.api.get(`${apiBase}/middlewares/${name}`)
|
||||
.then(body => {
|
||||
console.log('Success -> TcpService -> getMiddlewareByName', body.data)
|
||||
return body.data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
getAllRouters,
|
||||
getRouterByName,
|
||||
getAllServices,
|
||||
getServiceByName
|
||||
getServiceByName,
|
||||
getAllMiddlewares,
|
||||
getMiddlewareByName
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue