removed travis cache, fixed login form

pull/490/head v0.90.24
Hunter Long 2020-04-09 21:35:40 -07:00
parent e7e5167ec8
commit edb3691717
2 changed files with 15 additions and 8 deletions

View File

@ -10,12 +10,6 @@ before_script:
branches: branches:
only: only:
- master - master
cache:
directories:
- ~/.npm
- ~/.cache
- $GOPATH/pkg/mod
- $GOPATH/src/github.com/statping/statping/frontend/node_modules
env: env:
global: global:
- "PATH=$HOME/.local/bin:$PATH" - "PATH=$HOME/.local/bin:$PATH"

View File

@ -9,7 +9,7 @@
<p class="mb-1">{{failure.issue}}</p> <p class="mb-1">{{failure.issue}}</p>
</div> </div>
<nav v-if="total > 4" aria-label="page navigation example"> <nav v-if="total > 4" class="mt-3">
<ul class="pagination justify-content-center"> <ul class="pagination justify-content-center">
<li class="page-item" :class="{'disabled': page===1}"> <li class="page-item" :class="{'disabled': page===1}">
<a @click.prevent="gotoPage(page-1)" :disabled="page===1" class="page-link" href="#" aria-label="Previous"> <a @click.prevent="gotoPage(page-1)" :disabled="page===1" class="page-link" href="#" aria-label="Previous">
@ -17,7 +17,7 @@
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
</a> </a>
</li> </li>
<li v-for="n in Math.floor(total / limit)" class="page-item" :class="{'active': page === n}"> <li v-for="n in maxPages" class="page-item" :class="{'active': page === n}">
<a @click.prevent="gotoPage(n)" class="page-link" href="#">{{n}}</a> <a @click.prevent="gotoPage(n)" class="page-link" href="#">{{n}}</a>
</li> </li>
<li class="page-item" :class="{'disabled': page===Math.floor(total / limit)}"> <li class="page-item" :class="{'disabled': page===Math.floor(total / limit)}">
@ -53,6 +53,19 @@ export default {
page: 1 page: 1
} }
}, },
computed: {
pages() {
return Math.floor(this.total / this.limit)
},
maxPages() {
const p = Math.floor(this.total / this.limit)
if (p > 16) {
return 16
} else {
return p
}
}
},
async mounted () { async mounted () {
await this.gotoPage(1) await this.gotoPage(1)
}, },