Skip to content

Commit 72f248d

Browse files
committed
Add script revision to show session table
1 parent 6816e99 commit 72f248d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

client/src/views/show/config/ConfigSessions.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ export default {
4747
async mounted() {
4848
await this.GET_SHOW_SESSION_DATA();
4949
await this.GET_SESSION_TAGS();
50+
await this.GET_SCRIPT_REVISIONS();
5051
this.loaded = true;
5152
},
5253
methods: {
53-
...mapActions(['GET_SHOW_SESSION_DATA', 'GET_SESSION_TAGS']),
54+
...mapActions(['GET_SHOW_SESSION_DATA', 'GET_SESSION_TAGS', 'GET_SCRIPT_REVISIONS']),
5455
},
5556
};
5657
</script>

client/src/vue_components/show/config/sessions/SessionList.vue

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
</p>
4040
</template>
4141

42+
<template #cell(script_revision_id)="data">
43+
<p>
44+
{{
45+
scriptRevisionLabel(data.item.script_revision_id)
46+
}}
47+
</p>
48+
</template>
49+
4250
<template #cell(tags)="data">
4351
<div class="tags-cell">
4452
<div class="tags-pills-container">
@@ -86,14 +94,15 @@ export default {
8694
{ key: 'start_date_time', label: 'Start Time' },
8795
{ key: 'end_date_time', label: 'End Time' },
8896
{ key: 'run_time', label: 'Run Time' },
97+
{ key: 'script_revision_id', label: 'Script Revision' },
8998
{ key: 'tags', label: 'Tags' },
9099
],
91100
startingSession: false,
92101
stoppingSession: false,
93102
};
94103
},
95104
computed: {
96-
...mapGetters(['SHOW_SESSIONS_LIST', 'CURRENT_SHOW_SESSION', 'INTERNAL_UUID', 'IS_SHOW_EXECUTOR', 'IS_SHOW_EDITOR']),
105+
...mapGetters(['SHOW_SESSIONS_LIST', 'CURRENT_SHOW_SESSION', 'INTERNAL_UUID', 'IS_SHOW_EXECUTOR', 'IS_SHOW_EDITOR', 'SCRIPT_REVISIONS']),
97106
},
98107
methods: {
99108
contrastColor,
@@ -136,6 +145,13 @@ export default {
136145
const diff = endDate - startDate;
137146
return msToTimerString(diff);
138147
},
148+
scriptRevisionLabel(revisionId) {
149+
const revision = this.SCRIPT_REVISIONS.find((rev) => rev.id === revisionId);
150+
if (revision) {
151+
return `${revision.revision}: ${revision.description}`;
152+
}
153+
return 'N/A';
154+
}
139155
},
140156
};
141157
</script>

0 commit comments

Comments
 (0)