Merge branch 'v2.0' into v2.1
This commit is contained in:
commit
89919dbe36
52 changed files with 677 additions and 336 deletions
|
@ -3,15 +3,12 @@ import { APP } from '../_helpers/APP'
|
|||
const apiBase = '/http'
|
||||
|
||||
function getAllRouters (params) {
|
||||
return APP.api.get(`${apiBase}/routers?search=${params.query}&status=${params.status}`)
|
||||
return APP.api.get(`${apiBase}/routers?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
const total = body.data ? body.data.length : 0
|
||||
return APP.api.get(`${apiBase}/routers?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
console.log('Success -> HttpService -> getAllRouters', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
console.log('Success -> HttpService -> getAllRouters', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -24,15 +21,12 @@ function getRouterByName (name) {
|
|||
}
|
||||
|
||||
function getAllServices (params) {
|
||||
return APP.api.get(`${apiBase}/services?search=${params.query}&status=${params.status}`)
|
||||
return APP.api.get(`${apiBase}/services?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
const total = body.data ? body.data.length : 0
|
||||
return APP.api.get(`${apiBase}/services?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
console.log('Success -> HttpService -> getAllServices', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
console.log('Success -> HttpService -> getAllServices', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -45,15 +39,12 @@ function getServiceByName (name) {
|
|||
}
|
||||
|
||||
function getAllMiddlewares (params) {
|
||||
return APP.api.get(`${apiBase}/middlewares?search=${params.query}&status=${params.status}`)
|
||||
return APP.api.get(`${apiBase}/middlewares?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
const total = body.data ? body.data.length : 0
|
||||
return APP.api.get(`${apiBase}/middlewares?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
console.log('Success -> HttpService -> getAllMiddlewares', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
console.log('Success -> HttpService -> getAllMiddlewares', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -3,15 +3,12 @@ import { APP } from '../_helpers/APP'
|
|||
const apiBase = '/tcp'
|
||||
|
||||
function getAllRouters (params) {
|
||||
return APP.api.get(`${apiBase}/routers?search=${params.query}&status=${params.status}`)
|
||||
return APP.api.get(`${apiBase}/routers?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
const total = body.data ? body.data.length : 0
|
||||
return APP.api.get(`${apiBase}/routers?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
console.log('Success -> HttpService -> getAllRouters', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
console.log('Success -> HttpService -> getAllRouters', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -24,15 +21,12 @@ function getRouterByName (name) {
|
|||
}
|
||||
|
||||
function getAllServices (params) {
|
||||
return APP.api.get(`${apiBase}/services?search=${params.query}&status=${params.status}`)
|
||||
return APP.api.get(`${apiBase}/services?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
const total = body.data ? body.data.length : 0
|
||||
return APP.api.get(`${apiBase}/services?search=${params.query}&status=${params.status}&per_page=${params.limit}&page=${params.page}`)
|
||||
.then(body => {
|
||||
console.log('Success -> HttpService -> getAllServices', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
console.log('Success -> HttpService -> getAllServices', body.data)
|
||||
// TODO - suggestion: add the total-pages in api response to optimize the query
|
||||
return { data: body.data || [], total }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<div class="text-subtitle2">RULE</div>
|
||||
<q-chip
|
||||
dense
|
||||
class="app-chip app-chip-rule">
|
||||
class="app-chip app-chip-wrap app-chip-rule">
|
||||
{{ data.rule }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="text-subtitle2">NAME</div>
|
||||
<q-chip
|
||||
dense
|
||||
class="app-chip app-chip-name">
|
||||
class="app-chip app-chip-wrap app-chip-name">
|
||||
{{ data.name }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
@ -66,7 +66,7 @@
|
|||
dense
|
||||
clickable
|
||||
@click.native="$router.push({ path: `/${protocol}/services/${getServiceId()}`})"
|
||||
class="app-chip app-chip-service">
|
||||
class="app-chip app-chip-wrap app-chip-service">
|
||||
{{ data.service }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section v-if="data.loadBalancer">
|
||||
<q-card-section v-if="data.loadBalancer && $route.meta.protocol !== 'tcp'">
|
||||
<div class="row items-start no-wrap">
|
||||
<div class="col">
|
||||
<div class="text-subtitle2">Pass Host Header</div>
|
||||
|
@ -54,6 +54,19 @@
|
|||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section v-if="data.loadBalancer.terminationDelay">
|
||||
<div class="row items-start no-wrap">
|
||||
<div class="col">
|
||||
<div class="text-subtitle2">Termination Delay</div>
|
||||
<q-chip
|
||||
dense
|
||||
class="app-chip app-chip-name">
|
||||
{{ data.loadBalancer.terminationDelay }} ms
|
||||
</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator v-if="sticky" />
|
||||
<StickyServiceDetails v-if="sticky" :sticky="sticky" :dense="dense"/>
|
||||
</q-scroll-area>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue