From 20ee57931f4ddbb29fcff93e4a7dc3b27a43eb9e Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Wed, 6 Feb 2019 15:24:59 +0900
Subject: Resolve #4165

---
 src/client/app/admin/views/queue.vue | 43 ++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 src/client/app/admin/views/queue.vue

(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
new file mode 100644
index 0000000000..e26b86e3ef
--- /dev/null
+++ b/src/client/app/admin/views/queue.vue
@@ -0,0 +1,43 @@
+<template>
+<div>
+	<ui-card>
+		<div slot="title">{{ $t('operation') }}</div>
+		<section>
+			<ui-button @click="removeAllJobs">{{ $t('remove-all-jobs') }}</ui-button>
+		</section>
+	</ui-card>
+</div>
+</template>
+
+<script lang="ts">
+import Vue from 'vue';
+import i18n from '../../i18n';
+
+export default Vue.extend({
+	i18n: i18n('admin/views/queue.vue'),
+
+	data() {
+		return {
+		};
+	},
+
+	methods: {
+		async removeAllJobs() {
+			const process = async () => {
+				await this.$root.api('admin/queue/clear');
+				this.$root.dialog({
+					type: 'success',
+					splash: true
+				});
+			};
+
+			await process().catch(e => {
+				this.$root.dialog({
+					type: 'error',
+					text: e.toString()
+				});
+			});
+		},
+	}
+});
+</script>
-- 
cgit v1.2.3-freya

