From 8ada1725bfee9087aca5f633fd0799b44bcb101a Mon Sep 17 00:00:00 2001
From: MeiMei <30769358+mei23@users.noreply.github.com>
Date: Thu, 7 Nov 2019 05:41:44 +0900
Subject: 管理画面のジョブキュー一覧の修正 (#5586)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Fix: inboxのジョブキューが表示されない

* ジョブキューで試行回数等を表示するように

* DBとオブジェクトストレージのジョブキューが表示されるように
---
 src/client/app/admin/views/queue.vue | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'src/client/app/admin/views/queue.vue')

diff --git a/src/client/app/admin/views/queue.vue b/src/client/app/admin/views/queue.vue
index 43a41ffbe8..9aa740c68c 100644
--- a/src/client/app/admin/views/queue.vue
+++ b/src/client/app/admin/views/queue.vue
@@ -48,14 +48,15 @@
 				</ui-select>
 			</ui-horizon-group>
 			<sequential-entrance animation="entranceFromTop" delay="25">
-				<div class="xvvuvgsv" v-for="job in jobs">
+				<div class="xvvuvgsv" v-for="job in jobs" :key="job.id">
 					<b>{{ job.id }}</b>
 					<template v-if="domain === 'deliver'">
 						<span>{{ job.data.to }}</span>
 					</template>
 					<template v-if="domain === 'inbox'">
-						<span>{{ job.activity.id }}</span>
+						<span>{{ job.data.activity.id }}</span>
 					</template>
+					<span>{{ `(${job.attempts}/${job.maxAttempts}, ${Math.floor((jobsFetched - job.timestamp) / 1000 / 60)}min)` }}</span>
 				</div>
 			</sequential-entrance>
 			<ui-info v-if="jobs.length == jobsLimit">{{ $t('result-is-truncated', { n: jobsLimit }) }}</ui-info>
@@ -84,6 +85,7 @@ export default Vue.extend({
 			chartLimit: 200,
 			jobs: [],
 			jobsLimit: 50,
+			jobsFetched: Date.now(),
 			domain: 'deliver',
 			state: 'delayed',
 			faTasks, faPaperPlane, faInbox, faChartBar, faDatabase, faCloud
@@ -140,6 +142,7 @@ export default Vue.extend({
 				state: this.state,
 				limit: this.jobsLimit
 			}).then(jobs => {
+				this.jobsFetched = Date.now(),
 				this.jobs = jobs;
 			});
 		},
@@ -149,7 +152,8 @@ export default Vue.extend({
 
 <style lang="stylus" scoped>
 .xvvuvgsv
-	> b
-		margin-right 16px
+	margin-left -6px
+	> b, span
+		margin 0 6px
 
 </style>
-- 
cgit v1.2.3-freya

