Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions pages/redis-search-indexes/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
<div class="d-flex">
<h2>Redis Search Indexes</h2>
<v-spacer />
<v-btn color="primary" :loading="loadingAll" :disabled="loadingAll" @click="confirmAll()">
<v-btn color="primary" :loading="loadingAll" :disabled="loadingAll" @click="confirmAll(false)">
Reindex All
</v-btn>
<v-btn color="primary" :loading="loadingAll" :disabled="loadingAll" @click="confirmAll(true)">
Reindex All (concurrently)
</v-btn>
</div>
<v-divider class="my-4" />
<div>
Expand Down Expand Up @@ -164,14 +167,18 @@ export default class RedisSearchIndexesParent extends Vue {
}
}

async reindexAll () {
async reindexAll (concurrently:boolean) {
this.loadingAll = true

try {
await this.$axios.$get(
if (concurrently) {
await this.$axios.$get(
'/dev/redis-search/force-reindex-all/?concurrently=true'
)
}else{
await this.$axios.$get(
'/dev/redis-search/force-reindex-all/'
)

}
this.$notification.show({
type: 'success',
message: 'Success'
Expand Down Expand Up @@ -200,15 +207,15 @@ export default class RedisSearchIndexesParent extends Vue {
})
}

confirmAll () {
confirmAll (concurrently:boolean) {
this.confirmationModal
.show({
title: 'Wait!!!',
message: 'Are you sure you want to proceed? It cannot be undone.'
})
.then((result) => {
if (result) {
this.reindexAll()
this.reindexAll(concurrently)
}
})
}
Expand Down