summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-05-27 17:44:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-05-27 17:44:51 +0900
commit5dbe1d448b9406fbe5a79e62b6826c31df7f9cb0 (patch)
tree4595a843850d1d00bc67a619ee475a71fc40bd6a /src/client/app
parentRefactoring (diff)
downloadsharkey-5dbe1d448b9406fbe5a79e62b6826c31df7f9cb0.tar.gz
sharkey-5dbe1d448b9406fbe5a79e62b6826c31df7f9cb0.tar.bz2
sharkey-5dbe1d448b9406fbe5a79e62b6826c31df7f9cb0.zip
Improve job queue view
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/admin/views/queue.chart.vue2
-rw-r--r--src/client/app/admin/views/queue.vue30
-rw-r--r--src/client/app/common/views/components/ui/input.vue26
3 files changed, 42 insertions, 16 deletions
diff --git a/src/client/app/admin/views/queue.chart.vue b/src/client/app/admin/views/queue.chart.vue
index c3d68d75af..ff29aa8392 100644
--- a/src/client/app/admin/views/queue.chart.vue
+++ b/src/client/app/admin/views/queue.chart.vue
@@ -176,6 +176,6 @@ export default Vue.extend({
<style lang="stylus" scoped>
.wptihjuy
min-height 200px !important
- margin 0 -8px -8px -8px
+ margin -8px
</style>
diff --git a/src/client/app/admin/views/queue.vue b/src/client/app/admin/views/queue.vue
index 358ed6cf74..43a41ffbe8 100644
--- a/src/client/app/admin/views/queue.vue
+++ b/src/client/app/admin/views/queue.vue
@@ -2,15 +2,29 @@
<div>
<ui-card>
<template #title><fa :icon="faChartBar"/> {{ $t('title') }}</template>
- <section class="wptihjuy">
- <header><fa :icon="faPaperPlane"/> Deliver</header>
+ <section>
+ <header><fa :icon="faPaperPlane"/> {{ $t('domains.deliver') }}</header>
<x-chart v-if="connection" :connection="connection" :limit="chartLimit" type="deliver"/>
</section>
- <section class="wptihjuy">
- <header><fa :icon="faInbox"/> Inbox</header>
+ <section>
+ <header><fa :icon="faInbox"/> {{ $t('domains.inbox') }}</header>
<x-chart v-if="connection" :connection="connection" :limit="chartLimit" type="inbox"/>
</section>
<section>
+ <details>
+ <summary>{{ $t('other-queues') }}</summary>
+ <section>
+ <header><fa :icon="faDatabase"/> {{ $t('domains.db') }}</header>
+ <x-chart v-if="connection" :connection="connection" :limit="chartLimit" type="db"/>
+ </section>
+ <ui-hr/>
+ <section>
+ <header><fa :icon="faCloud"/> {{ $t('domains.objectStorage') }}</header>
+ <x-chart v-if="connection" :connection="connection" :limit="chartLimit" type="objectStorage"/>
+ </section>
+ </details>
+ </section>
+ <section>
<ui-button @click="removeAllJobs">{{ $t('remove-all-jobs') }}</ui-button>
</section>
</ui-card>
@@ -23,9 +37,13 @@
<template #label>{{ $t('queue') }}</template>
<option value="deliver">{{ $t('domains.deliver') }}</option>
<option value="inbox">{{ $t('domains.inbox') }}</option>
+ <option value="db">{{ $t('domains.db') }}</option>
+ <option value="objectStorage">{{ $t('domains.objectStorage') }}</option>
</ui-select>
<ui-select v-model="state">
<template #label>{{ $t('state') }}</template>
+ <option value="active">{{ $t('states.active') }}</option>
+ <option value="waiting">{{ $t('states.waiting') }}</option>
<option value="delayed">{{ $t('states.delayed') }}</option>
</ui-select>
</ui-horizon-group>
@@ -48,7 +66,7 @@
<script lang="ts">
import Vue from 'vue';
-import { faTasks, faInbox } from '@fortawesome/free-solid-svg-icons';
+import { faTasks, faInbox, faDatabase, faCloud } from '@fortawesome/free-solid-svg-icons';
import { faPaperPlane, faChartBar } from '@fortawesome/free-regular-svg-icons';
import i18n from '../../i18n';
import XChart from './queue.chart.vue';
@@ -68,7 +86,7 @@ export default Vue.extend({
jobsLimit: 50,
domain: 'deliver',
state: 'delayed',
- faTasks, faPaperPlane, faInbox, faChartBar
+ faTasks, faPaperPlane, faInbox, faChartBar, faDatabase, faCloud
};
},
diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue
index dd0912f833..e266e141e8 100644
--- a/src/client/app/common/views/components/ui/input.vue
+++ b/src/client/app/common/views/components/ui/input.vue
@@ -210,17 +210,25 @@ export default Vue.extend({
}
this.$nextTick(() => {
- if (this.$refs.prefix) {
- this.$refs.label.style.left = (this.$refs.prefix.offsetLeft + this.$refs.prefix.offsetWidth) + 'px';
- if (this.$refs.prefix.offsetWidth) {
- this.$refs.input.style.paddingLeft = this.$refs.prefix.offsetWidth + 'px';
+ // このコンポーネントが作成された時、非表示状態である場合がある
+ // 非表示状態だと要素の幅などは0になってしまうので、定期的に計算する
+ const clock = setInterval(() => {
+ if (this.$refs.prefix) {
+ this.$refs.label.style.left = (this.$refs.prefix.offsetLeft + this.$refs.prefix.offsetWidth) + 'px';
+ if (this.$refs.prefix.offsetWidth) {
+ this.$refs.input.style.paddingLeft = this.$refs.prefix.offsetWidth + 'px';
+ }
}
- }
- if (this.$refs.suffix) {
- if (this.$refs.suffix.offsetWidth) {
- this.$refs.input.style.paddingRight = this.$refs.suffix.offsetWidth + 'px';
+ if (this.$refs.suffix) {
+ if (this.$refs.suffix.offsetWidth) {
+ this.$refs.input.style.paddingRight = this.$refs.suffix.offsetWidth + 'px';
+ }
}
- }
+ }, 100);
+
+ this.$once('hook:beforeDestroy', () => {
+ clearInterval(clock);
+ });
});
this.$on('keydown', (e: KeyboardEvent) => {