|
60 | 60 | <v-data-table |
61 | 61 | v-model:items-per-page="itemsPerPage" |
62 | 62 | v-model:sort-by="sortBy" |
63 | | - :headers="headers" |
| 63 | + :headers="_headers" |
64 | 64 | :items="store.executions" |
65 | 65 | :filter-keys="['pipeline']" |
66 | 66 | :custom-filter="filterOnPipelineId" |
|
77 | 77 | <td> |
78 | 78 | {{ item.pipeline && store.pipelineById(item.pipeline).version }} |
79 | 79 | </td> |
| 80 | + <td v-if="this.authStore.isAdmin">{{ item.started_by }}</td> |
80 | 81 | <td>{{ formatDate(item.start_time) }}</td> |
81 | 82 | <td>{{ formatDate(item.completion_time) }}</td> |
82 | 83 | <td class="first-letter">{{ item.status || 'Unknown' }}</td> |
|
89 | 90 | :max="progressMax(item)" |
90 | 91 | :indeterminate="item.status.toLowerCase() == 'starting'" |
91 | 92 | > |
92 | | - <strong>{{ progress(item) }} / {{ progressMax(item) }}</strong> |
| 93 | + Reports: <strong>{{ progress(item) }}</strong> |
93 | 94 | </v-progress-linear> |
94 | 95 | </td> |
95 | 96 | <td class="text-right nowrap"> |
|
116 | 117 | v-if="settings.isGrafanaEnabled()" |
117 | 118 | color="secondary" |
118 | 119 | variant="text" |
119 | | - :disabled="item.job_reports_count == 0" |
120 | 120 | v-tooltip:bottom-end="'View execution dashboard (new page)'" |
121 | 121 | @click="viewPipelineExecutionDashboard(item)" |
122 | 122 | > |
@@ -215,6 +215,13 @@ export default { |
215 | 215 | key: 'version', |
216 | 216 | sortable: true, |
217 | 217 | }, |
| 218 | + { |
| 219 | + // Only shown to admins using computed property, below |
| 220 | + title: 'User', |
| 221 | + key: 'started_by', |
| 222 | + sortable: true, |
| 223 | + admins_only: true, |
| 224 | + }, |
218 | 225 | { |
219 | 226 | title: 'Started', |
220 | 227 | key: 'start_time', |
@@ -266,6 +273,13 @@ export default { |
266 | 273 | const seconds = Math.floor((Date.now() - this.lastPollTime) / 1000); |
267 | 274 | return `${seconds}s ago`; |
268 | 275 | }, |
| 276 | +
|
| 277 | + _headers() { |
| 278 | + // Filter out columns restricted to admins if necessary |
| 279 | + return this.headers.filter( |
| 280 | + (x) => !x.admins_only || this.authStore.isAdmin, |
| 281 | + ); |
| 282 | + }, |
269 | 283 | }, |
270 | 284 |
|
271 | 285 | mounted() { |
|
0 commit comments