Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<div>
<Transcoder ref="transcoder"></Transcoder>
</div>

</div>
</template>

Expand Down Expand Up @@ -181,7 +180,11 @@ export default {
})
.finally(() => (this.loading = false));
this.finResultStr = inputString;
this.$refs.transcoder.reloadTranscoderLog();
let sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
// allow time for the ARI to be added to the DB
sleep(200).then(() => {
this.$refs.transcoder.reloadTranscoderLog();
});
},
updateResults: function (result) {
let head = result[0].value.includes("ari") ? "" : "ari://";
Expand Down
20 changes: 7 additions & 13 deletions anms-ui/public/app/components/management/builder/transcoder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
type="grow"></b-spinner>
</div>
</template>
<template v-if="!serviceLoading">
<template v-if="!serviceLoading">
<b-row>
<b-col offset="2"
cols="8">
Expand All @@ -24,6 +24,7 @@
@click="handlePageChange(1)">
Search
</button>
<button class="btn btn-outline-secondary" @click="reloadTranscoderLog()"><font-awesome-icon icon="sync-alt" /> &#x21bb;</button>
</div>
</div>
<div class="b-table">
Expand Down Expand Up @@ -57,6 +58,7 @@
</option>
</select>
</div>

<b-pagination v-model="page"
class="m-0"
:total-rows="count"
Expand All @@ -66,14 +68,15 @@
</div>
</div>
</b-col>
<br/>
</b-row>
</template>
</template>
</div>
</template>

<script>
import { mapGetters, mapActions } from "vuex";
import { status_refresh_rate } from '@app/shared/constants';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';

export default {
name: "Transcoder",
Expand All @@ -93,22 +96,13 @@ export default {
errored: false,
pageSizes: [5, 10, 20, 50, 100],
selected: null,
transcoderWorkerId: "",
sortField: "",
sortDesc: false,
};
},
mounted() {
const vm = this;
vm.reloadTranscoderLog();
vm.transcoderWorkerId = setInterval(() => {
console.log("Calling schedule transcoder Log refresh in App");
vm.reloadTranscoderLog();
}, status_refresh_rate);
},
beforeDestroy() {
console.log("Clearing interval with id:", this.transcoderWorkerId);
clearInterval(this.transcoderWorkerId);
},
computed: {
...mapGetters("transcoder", {
Expand All @@ -135,8 +129,8 @@ export default {
},
handlePageChange(value) {
const vm = this;
vm.setPage(value);
vm.reloadTranscoderLog();
vm.setPage(value);
},
handlePageSizeChange(event) {
const vm = this;
Expand Down