Browse Source

fix pagination

master
zeus 2 years ago
parent
commit
a9e45d7067
  1. 2
      dist/index.html
  2. 2
      dist/js/app.3d16a347.js
  3. 1
      dist/js/app.3d16a347.js.map
  4. 2
      dist/js/app.5466e359.js
  5. 1
      dist/js/app.5466e359.js.map
  6. 104
      src/components/mynetwork/availablemicroservices.vue
  7. 7
      src/components/mynetwork/images.vue

2
dist/index.html

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.291cc1d1.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.3d16a347.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.291cc1d1.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.3d16a347.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.291cc1d1.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.5466e359.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.291cc1d1.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.5466e359.js"></script></body></html>

2
dist/js/app.3d16a347.js

File diff suppressed because one or more lines are too long

1
dist/js/app.3d16a347.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.5466e359.js

File diff suppressed because one or more lines are too long

1
dist/js/app.5466e359.js.map

File diff suppressed because one or more lines are too long

104
src/components/mynetwork/availablemicroservices.vue

@ -120,22 +120,28 @@
:css="css.table"
>
<!--
EDO
props.rowData._id gia to pagination problem
pass props.rowData._id as index
allagi tou vuetablerefresh
-->
<div slot="actionsenabled" slot-scope="props">
<div class="d-flex justify-content-center">
<button
v-if="testactionrowindex[props.rowData.swarmlabname] == props.rowIndex"
v-if="testactionrowindex[props.rowData.swarmlabname] == props.rowData._id"
class="ti-thumb-up btn btn-info btn-sm"
title="Stop Lab_Instance"
round
@click="onAction('down-item', props.rowData, props.rowIndex)"
@click="onAction('down-item', props.rowData, props.rowData._id)"
>
</button>
<button
v-if="testactionrowindex[props.rowData.swarmlabname] != props.rowIndex && testactionrowindex[props.rowIndex] == props.rowIndex"
v-if="testactionrowindex[props.rowData.swarmlabname] != props.rowData._id && testactionrowindex[props.rowData._id] == props.rowData._id"
class="ti-thumb-down btn btn-secondary btn-sm"
title="Start Lab_Instance"
round
@click="onAction('run-item', props.rowData, props.rowIndex)"
@click="onAction('run-item', props.rowData, props.rowData._id)"
>
</button>
</div>
@ -143,10 +149,10 @@
<div slot="actionslocal" slot-scope="props">
<div class="d-flex justify-content-center">
<button
v-if="testactionrowindex[props.rowIndex] == props.rowIndex && testactionrowindex[props.rowData.swarmlabname] != props.rowIndex"
v-if="testactionrowindex[props.rowData._id] == props.rowData._id && testactionrowindex[props.rowData.swarmlabname] != props.rowData._id"
class="ti-trash btn btn-info btn-sm"
title="Remove Lab_Instance"
@click="onAction('rm-install', props.rowData, props.rowIndex)"
@click="onAction('rm-install', props.rowData, props.rowData._id)"
round
>
</button>
@ -155,17 +161,17 @@
<div slot="actions" slot-scope="props">
<div class="d-flex justify-content-center">
<button
v-if="checkactionrowindex(props.rowData,props.rowIndex)"
v-if="checkactionrowindex(props.rowData,props.rowData._id)"
class="ti-cloud-down btn btn-outline-secondary btn-sm"
title="Download Lab_Instance"
round
@click="onAction('run-install', props.rowData, props.rowIndex)">
@click="onAction('run-install', props.rowData, props.rowData._id)">
</button>
<button
class="ti-info btn btn-outline-secondary btn-sm"
title="Lab_Instance Info"
round
@click="onAction('view-item', props.rowData, props.rowIndex)">
@click="onAction('view-item', props.rowData, props.rowData._id)">
</button>
</div>
</div>
@ -305,6 +311,10 @@ export default {
}],
multiSort: true,
paginationComponent: 'vuetable-pagination',
currentpage:'1',
currentpagepaginationData: {},
dataselect:'',
indexselect:'',
itemActions: [
{ name: 'view-item', label: '', icon: 'glyphicon glyphicon-zoom-in', class: 'btn btn-info', extra: {'title': 'View', 'data-toggle':"tooltip", 'data-placement': "left"} },
{ name: 'edit-item', label: '', icon: 'glyphicon glyphicon-pencil', class: 'btn btn-warning', extra: {title: 'Edit', 'data-toggle':"tooltip", 'data-placement': "top"} },
@ -319,12 +329,14 @@ export default {
},
mounted() {
this.$root.$on('hybrid_refresh_availableservices', () => {
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
Vue.nextTick( () => this.refreshVuetable())
})
//refresh from socket mytable
this.$root.$on('hybrid_refresh_table', (v) => {
this.$nextTick(function () {
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
this.viewhybridoptions = false
})
})
@ -368,36 +380,38 @@ export default {
})
},
async checkactionrowindex(data,index){
this.dataselect=data
this.indexselect=index
if(this.testactionrowindex[index] == index){
var obj = {}
obj.token = this.token
obj.instance = data.swarmlabname
var res1 = await store.dispatch('pipelineLLO/getservicesstatus', obj)
//console.log('res8 all '+JSON.stringify(res1))
//console.log('res8--- all '+JSON.stringify(data))
if(res1.data.data == 'yes'){
//EDO
Vue.set(this.testactionrowindex, data.swarmlabname, index)
//console.log('res8 YES '+JSON.stringify(res1.data))
//Vue.set(this.testactionrowindex, data.swarmlabname, data.swarmlabname)
}else{
//console.log('res8 NO '+JSON.stringify(res1.data))
Vue.delete(this.testactionrowindex, data.swarmlabname)
}
//console.log('is set '+index)
}else{
//console.log('not set '+index)
var obj = {}
obj.token = this.token
obj.instance = data.swarmlabname
var res = await store.dispatch('pipelineLLO/getservicesinfo', obj)
if(res.data.data == 'yes'){
//console.log('resi YES '+JSON.stringify(res))
if(res.data.data == 'yes'){
//EDO
Vue.set(this.testactionrowindex, index, index)
var res1 = await store.dispatch('pipelineLLO/getservicesstatus', obj)
//console.log('res8 all '+JSON.stringify(res1))
if(res1.data.data == 'yes'){
//EDO
Vue.set(this.testactionrowindex, data.swarmlabname, index)
//Vue.set(this.testactionrowindex, data.swarmlabname, data.swarmlabname)
//console.log('res8 YES '+JSON.stringify(res1.data))
}else{
//console.log('res8 NO '+JSON.stringify(res1.data))
@ -409,24 +423,31 @@ export default {
console.log('resi NO2 '+JSON.stringify(res))
}
}
//console.log('string YES '+JSON.stringify(this.testactionrowindex))
},
setFilter () {
this.moreParams = {
'filter': this.searchFor,
'type': this.selected
}
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
Vue.nextTick( () => this.refreshVuetable())
//this.refreshVuetable()
},
resetFilter () {
this.moreParams = {}
this.searchFor = ''
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
Vue.nextTick( () => this.refreshVuetable())
//this.refreshVuetable()
},
onPaginationData (paginationData) {
this.$refs.pagination.setPaginationData(paginationData)
this.$refs.paginationInfo.setPaginationData(paginationData)
this.currentpagepaginationData = paginationData
},
onChangePage (page) {
this.currentpage = page
this.$refs.vuetable.changePage(page)
},
editRow(rowData) {
@ -473,7 +494,8 @@ export default {
confirmButtonText: 'Yes, Delete it!'
})
//Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
Vue.nextTick( () => this.refreshVuetable())
//this.refreshVuetable()
}else if(action == 'rm-install' ){
this.hybridoptions.swarmlabname = data.swarmlabname
this.$wait.start('myRunInstancetutor');
@ -507,7 +529,7 @@ export default {
focusCancel: true,
confirmButtonText: 'Ok!'
})
console.log('inf res11111111111 '+ JSON.stringify(res.data.path))
//console.log('inf res11111111111 '+ JSON.stringify(res.data.path))
}
}
@ -548,7 +570,7 @@ export default {
value.port = this.hybridoptions.port
this.$root.$emit('hybrid_start_instance', value)
Vue.set(this.testactionrowindex, value.swarmlabname, value.index)
console.log('inf git 2 '+ JSON.stringify(data.swarmlabname))
//console.log('inf git 2 '+ JSON.stringify(data.swarmlabname))
}else{
@ -556,7 +578,7 @@ export default {
this.viewhybridoptions = true
this.hybridoptions.swarmlabname = data.swarmlabname
this.hybridoptions.index = index
console.log('inf git 1 '+ JSON.stringify(this.hybridoptions))
//console.log(this.$refs.pagination)
/*
console.log('RUN 1 '+ JSON.stringify(data.swarmlabname))
// run on mytable.vue
@ -565,7 +587,9 @@ export default {
Vue.nextTick( () => this.$refs.vuetable.refresh())
*/
}
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.reload())
//EDO
this.refreshVuetable()
}else if(action == 'down-item' ){
this.hybridoptions.swarmlabname = data.swarmlabname
this.hybridoptions.index = index
@ -587,7 +611,8 @@ export default {
})
//console.log('RUN 1 '+ JSON.stringify(data.swarmlabname))
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
}
},
async rmAndClose(result){
@ -599,7 +624,7 @@ export default {
var value = this.hybridoptions.swarmlabname
this.$root.$emit('hybrid_stop_instance', value)
Vue.delete(this.testactionrowindex, this.hybridoptions.index)
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
}else {
console.log('no')
}
@ -617,13 +642,30 @@ export default {
value.port = this.hybridoptions.port
this.$root.$emit('hybrid_start_instance', value)
Vue.set(this.testactionrowindex, value.swarmlabname, value.index)
Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
//Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
},
refreshVuetable() {
this.$nextTick(()=>{
this.vuetablekeyg += 1
})
//this.vuetablekeyg += 1
// EDO
// echo ta data pou exei epilexei o user
// kai etsi alazo se afta tin katastassi
// afero ta $nextTick
// kai allazo apo refresh edo se afto to action
// refresh only status
//this.dataselect=data
//this.indexselect=index
this.checkactionrowindex(this.dataselect, this.indexselect)
this.$refs.pagination.loadPage(this.currentpage)
//this.$nextTick(()=>{
//this.vuetablekeyg += 1
//this.onPaginationData(this.currentpagepaginationData)
//this.onChangePage(this.currentpage)
//this.$refs.pagination.loadPage()
// console.log("----------------------------------------------", this.currentpage)
//})
},
playbookinfoShow(value) {
return this.visibility[value]=true

7
src/components/mynetwork/images.vue

@ -2,11 +2,11 @@
<card class="card-user" style="max-height:100%">
<v-wait for="myRunInstancetutor">
<v-wait for="myRunInstancedockerimages">
<template slot="waiting">
<div>
<img src="@/assets/loading.gif" />
Enter Lab_room...
Clear ...
</div>
</template>
</v-wait>
@ -374,12 +374,15 @@ export default {
})
},
async onActionHybrid_containerrmall(action) {
// myRunInstancedockerimages
var rmimages = this.rmactionclear
if(action.isConfirmed){
this.$wait.start('myRunInstancedockerimages');
var log = await store.dispatch("pipelineLLO/hybrid_rmall",{
token:this.token,
action:rmimages
})
this.$wait.end('myRunInstancedockerimages');
console.log(JSON.stringify(log))
if(log.data.error == 'no'){
if(rmimages != 'images'){

Loading…
Cancel
Save