Web UI: Take off logic from generic table component
This commit is contained in:
parent
2d3fc613ec
commit
3f1484480e
13 changed files with 287 additions and 190 deletions
|
@ -43,7 +43,14 @@
|
|||
</div>
|
||||
<div class="row items-center q-col-gutter-lg">
|
||||
<div class="col-12">
|
||||
<main-table :data="allRouters" :request="()=>{}" :loading="routersLoading" :pagination.sync="routersPagination" :filter="routersFilter" :type="`${protocol}-routers`"/>
|
||||
<main-table
|
||||
:data="allRouters"
|
||||
v-bind="getTableProps({ type: `${protocol}-routers` })"
|
||||
:request="()=>{}"
|
||||
:loading="routersLoading"
|
||||
:pagination.sync="routersPagination"
|
||||
:filter="routersFilter"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,6 +61,7 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import SkeletonBox from '../../components/_commons/SkeletonBox'
|
||||
import PanelMiddlewares from '../../components/_commons/PanelMiddlewares'
|
||||
|
@ -62,6 +70,7 @@ import MainTable from '../../components/_commons/MainTable'
|
|||
export default {
|
||||
name: 'PageMiddlewareDetail',
|
||||
props: ['name', 'type'],
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PageDefault,
|
||||
SkeletonBox,
|
||||
|
|
|
@ -111,7 +111,14 @@
|
|||
</div>
|
||||
<div class="row items-center q-col-gutter-lg">
|
||||
<div class="col-12">
|
||||
<main-table :data="allRouters" :request="()=>{}" :loading="routersLoading" :pagination.sync="routersPagination" :filter="routersFilter" :type="`${protocol}-routers`"/>
|
||||
<main-table
|
||||
:data="allRouters"
|
||||
v-bind="getTableProps({ type: `${protocol}-routers` })"
|
||||
:request="()=>{}"
|
||||
:loading="routersLoading"
|
||||
:pagination.sync="routersPagination"
|
||||
:filter="routersFilter"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -122,6 +129,7 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import SkeletonBox from '../../components/_commons/SkeletonBox'
|
||||
import PanelServiceDetails from '../../components/_commons/PanelServiceDetails'
|
||||
|
@ -134,6 +142,7 @@ import PanelMirroringServices from '../../components/_commons/PanelMirroringServ
|
|||
export default {
|
||||
name: 'PageServiceDetail',
|
||||
props: ['name', 'type'],
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PanelMirroringServices,
|
||||
PanelWeightedServices,
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="col-12">
|
||||
<main-table
|
||||
ref="mainTable"
|
||||
v-bind="getTableProps({ type: 'http-middlewares' })"
|
||||
:data="allMiddlewares.items"
|
||||
:onLoadMore="handleLoadMore"
|
||||
:endReached="allMiddlewares.endReached"
|
||||
:loading="allMiddlewares.loading"
|
||||
type="http-middlewares"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,12 +26,14 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import ToolBarTable from '../../components/_commons/ToolBarTable'
|
||||
import MainTable from '../../components/_commons/MainTable'
|
||||
|
||||
export default {
|
||||
name: 'PageHTTPMiddlewares',
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PageDefault,
|
||||
ToolBarTable,
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="col-12">
|
||||
<main-table
|
||||
ref="mainTable"
|
||||
v-bind="getTableProps({ type: 'http-routers' })"
|
||||
:data="allRouters.items"
|
||||
:onLoadMore="handleLoadMore"
|
||||
:endReached="allRouters.endReached"
|
||||
:loading="allRouters.loading"
|
||||
type="http-routers"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,12 +26,14 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import ToolBarTable from '../../components/_commons/ToolBarTable'
|
||||
import MainTable from '../../components/_commons/MainTable'
|
||||
|
||||
export default {
|
||||
name: 'PageHTTPRouters',
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PageDefault,
|
||||
ToolBarTable,
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="col-12">
|
||||
<main-table
|
||||
ref="mainTable"
|
||||
v-bind="getTableProps({ type: 'http-services' })"
|
||||
:data="allServices.items"
|
||||
:onLoadMore="handleLoadMore"
|
||||
:endReached="allServices.endReached"
|
||||
:loading="allServices.loading"
|
||||
type="http-services"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,12 +26,14 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import ToolBarTable from '../../components/_commons/ToolBarTable'
|
||||
import MainTable from '../../components/_commons/MainTable'
|
||||
|
||||
export default {
|
||||
name: 'PageHTTPServices',
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PageDefault,
|
||||
ToolBarTable,
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="col-12">
|
||||
<main-table
|
||||
ref="mainTable"
|
||||
v-bind="getTableProps({ type: 'tcp-routers' })"
|
||||
:data="allRouters.items"
|
||||
:onLoadMore="handleLoadMore"
|
||||
:endReached="allRouters.endReached"
|
||||
:loading="allRouters.loading"
|
||||
type="tcp-routers"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,12 +26,14 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import ToolBarTable from '../../components/_commons/ToolBarTable'
|
||||
import MainTable from '../../components/_commons/MainTable'
|
||||
|
||||
export default {
|
||||
name: 'PageTCPRouters',
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PageDefault,
|
||||
ToolBarTable,
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="col-12">
|
||||
<main-table
|
||||
ref="mainTable"
|
||||
v-bind="getTableProps({ type: 'tcp-services' })"
|
||||
:data="allServices.items"
|
||||
:onLoadMore="handleLoadMore"
|
||||
:endReached="allServices.endReached"
|
||||
:loading="allServices.loading"
|
||||
type="tcp-services"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,12 +26,14 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import GetTablePropsMixin from '../../_mixins/GetTableProps'
|
||||
import PageDefault from '../../components/_commons/PageDefault'
|
||||
import ToolBarTable from '../../components/_commons/ToolBarTable'
|
||||
import MainTable from '../../components/_commons/MainTable'
|
||||
|
||||
export default {
|
||||
name: 'PageTCPServices',
|
||||
mixins: [GetTablePropsMixin],
|
||||
components: {
|
||||
PageDefault,
|
||||
ToolBarTable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue