Skip to content

Commit 892f3bc

Browse files
d-linkoDavid Linko
andauthored
215 transcoder log table navigation misbehavior (#260)
* fixed pagnation issue/ refreshed transcoder table format * fixed updateNonce error and made addARI btn always an option * if there no object to add do nothing * correctly copy mgr.rc file * fixed handlePageChange not found issue * file clean up --------- Co-authored-by: David Linko <david.linko@jhuapl.edu>
1 parent 459ecbb commit 892f3bc

File tree

4 files changed

+28
-31
lines changed

4 files changed

+28
-31
lines changed

anms-ui/public/app/components/management/builder/ActionParameter.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
:options="listComponents"
99
@input="addToList"
1010
:clearSearchOnSelect="false">
11-
<template v-slot:no-options="{ search, searching }">
12-
<template v-if="searching">
13-
<b-button @click="addARI(search)">Add ARI</b-button>
14-
</template>
11+
<template v-slot:list-header="{ search, _ }">
12+
<b-button size="sm" @click="addARI(search)">Add ARI</b-button>
1513
</template>
1614
</v-select>
1715
</b-form-group>
@@ -62,6 +60,7 @@ export default {
6260
},
6361
methods: {
6462
addARI(newARI ) {
63+
newARI = newARI.trim();
6564
this.ariKey = { "display": newARI, "actual": true }
6665
this.addToList();
6766
},

anms-ui/public/app/components/management/builder/buildAri.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<b-container>
3535
<h5>ARI Builder</h5>
3636
<label>
37-
<input type="checkbox" v-model="isExecutionCheck" onchange="updateNonce"/>
37+
<input type="checkbox" v-model="isExecutionCheck"/>
3838
Execution Set?
3939
</label>
4040
<div v-if="isExecutionCheck">
@@ -138,9 +138,6 @@ export default {
138138
reloadARIs: "reloadARIs",
139139
setSearchString: "setSearchString"
140140
}),
141-
updateNonce(){
142-
this.correlator_nonce = undefined;
143-
},
144141
onSearch(search, loading) {
145142
if (search.length) {
146143
loading(true);
@@ -186,8 +183,10 @@ export default {
186183
});
187184
},
188185
updateResults: function (result) {
189-
let head = result[0].value.includes("ari") ? "" : "ari://";
190-
this.finResultStr = head + result[0].value;
186+
if(result[0].value){
187+
let head = result[0].value.includes("ari") ? "" : "ari://";
188+
this.finResultStr = head + result[0].value;
189+
}
191190
},
192191
submitAriString() {
193192
this.handleCbor(this.finResultStr);

anms-ui/public/app/components/management/builder/transcoder.vue

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,32 @@
2727
<button class="btn btn-outline-secondary" @click="reloadTranscoderLog()" data-toggle="tooltip" data-placement="top" title="Refresh Transcoder Log Table!"> &#x21bb;</button>
2828
</div>
2929
</div>
30+
<p>Select CBOR(s) to send to Agents tab</p>
3031
<div class="b-table">
31-
<p>Select CBOR(s) to send to Agents tab</p>
3232
<b-table scr
3333
id="transcoder-table"
34+
striped
35+
bordered
36+
no-border-collapse
3437
:items="currentTranscoderLogs"
3538
:fields="fields"
3639
:per-page="pageSize"
37-
hover
38-
bordered
3940
:sort-by.sync="sortField"
4041
:sort-desc.sync="sortDesc">
4142
<template #cell(selected)="{ item }">
4243
<div style="text-align: center;">
4344
<b-form-checkbox :checked="item.selected" @change="selectTranscoderLog($event, item)"></b-form-checkbox>
4445
</div>
4546
</template>
46-
<template #cell(cbor)="{ item }">
47-
<h5 v-b-tooltip.hover
47+
<template #cell(cbor)="{ item }">
48+
<p v-b-tooltip.hover
4849
title="send to agents page"
4950
@click="sendTranscoderCode(item.cbor)">
5051
{{ item.cbor }}
51-
</h5>
52-
</template>
53-
</b-table>
54-
52+
</p>
53+
</template>
54+
</b-table>
55+
</div>
5556
<div class="d-flex float-right">
5657
<div>
5758
<button class="btn btn-outline-secondary"
@@ -71,15 +72,13 @@
7172
</option>
7273
</select>
7374
</div>
74-
7575
<b-pagination v-model="page"
7676
class="m-0"
7777
:total-rows="count"
7878
:per-page="pageSize"
7979
aria-controls="transcoder-table"
8080
@change="handlePageChange"></b-pagination>
8181
</div>
82-
</div>
8382
</b-col>
8483
<br/>
8584
</b-row>
@@ -90,13 +89,12 @@
9089
<script>
9190
import { mapGetters, mapActions } from "vuex";
9291
93-
9492
export default {
9593
name: "Transcoder",
9694
data() {
9795
return {
9896
fields: [
99-
{ key: "selected", label: "", sortable: false }, {key: "transcoder_log_id", sortable: true }, { key: "input_string", sortable: true }, { key: "parsed_as", sortable: true }, { key: "cbor", sortable: false }, { key: "ari", sortable: false }, { key: "uri", sortable: false },
97+
{ key: "selected", label: "", sortable: false}, {key: "transcoder_log_id", sortable: true}, { key: "input_string", sortable: true }, { key: "parsed_as", sortable: true }, { key: "cbor", sortable: false }, { key: "ari", sortable: false }, { key: "uri", sortable: false },
10098
],
10199
nodeMan: null,
102100
node: null,
@@ -160,7 +158,6 @@ export default {
160158
}else{ // else it needs to be removed from list
161159
this.selected_cbors = this.selected_cbors.filter(obj => ![entryUpdated.transcoder_log_id].includes(obj.transcoder_log_id));
162160
}
163-
164161
}
165162
},
166163
sendTranscoderCodeSelected(){
@@ -171,13 +168,17 @@ export default {
171168
},
172169
handlePageChange(value) {
173170
const vm = this;
174-
vm.reloadTranscoderLog();
175171
vm.setPage(value);
172+
// slight buffer to allow transcoder to catch up of needed
173+
let sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
174+
sleep(200).then(() => {
175+
vm.reloadTranscoderLog();
176+
});
176177
},
177178
handlePageSizeChange(event) {
178179
const vm = this;
179180
vm.setPageSize(event.target.value);
180-
handlePageChange(1);
181+
vm.handlePageChange(1);
181182
},
182183
handleSearchStringChange(event) {
183184
const vm = this;
@@ -189,12 +190,12 @@ export default {
189190

190191
<style>
191192
.b-table {
192-
max-height: calc(100vh - 300px);
193+
max-height: calc(90vh - 300px);
193194
overflow-y: auto;
194195
}
195196
196197
.page-item.active .page-link {
197198
border-color: var(--success);
198199
color: var(--success)
199200
}
200-
</style>
201+
</style>

testenv.Containerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ RUN systemctl enable ion bpecho@4 ion-app-proxy && \
148148
mkdir -p /var/run/ion
149149

150150
# Runtime config for this container
151-
COPY deps/dtnma-tools/integration-test-ion/node-*.rc /etc/ion/
152-
COPY deps/test-ion-configs/mgr.rc etc/ion/
151+
COPY deps/test-ion-configs/mgr.rc etc/ion/node-1.rc
153152

154153
# CMD is systemd init
155154
EXPOSE 1113/udp
@@ -176,7 +175,6 @@ RUN systemctl enable ion bpecho@4 refda-ion && \
176175
mkdir -p /var/run/ion
177176

178177
# Runtime config for this container
179-
# COPY deps/dtnma-tools/integration-test-ion/node-*.rc /etc/ion/
180178
COPY deps/test-ion-configs/agent-2.rc /etc/ion/node-2.rc
181179
COPY deps/test-ion-configs/agent-3.rc /etc/ion/node-3.rc
182180

0 commit comments

Comments
 (0)