From 2faa58928fb4fc772002aa40df0fbddee3d3457b Mon Sep 17 00:00:00 2001
From: MeiMei <30769358+mei23@users.noreply.github.com>
Date: Sun, 16 Dec 2018 07:06:43 +0900
Subject: Format uptimes (#3629)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Format uptime

* 逆だわ

* ザ

* 1個多い

* Fix comment
---
 src/client/app/common/views/widgets/server.uptimes.vue | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/client/app/common/views/widgets/server.uptimes.vue')

diff --git a/src/client/app/common/views/widgets/server.uptimes.vue b/src/client/app/common/views/widgets/server.uptimes.vue
index 06713d83ce..56d0398e3a 100644
--- a/src/client/app/common/views/widgets/server.uptimes.vue
+++ b/src/client/app/common/views/widgets/server.uptimes.vue
@@ -1,13 +1,14 @@
 <template>
 <div class="uptimes">
 	<p>Uptimes</p>
-	<p>Process: {{ process ? process.toFixed(0) : '---' }}s</p>
-	<p>OS: {{ os ? os.toFixed(0) : '---' }}s</p>
+	<p>Process: {{ process }}</p>
+	<p>OS: {{ os }}</p>
 </div>
 </template>
 
 <script lang="ts">
 import Vue from 'vue';
+import formatUptime from '../../scripts/format-uptime';
 
 export default Vue.extend({
 	props: ['connection'],
@@ -25,8 +26,8 @@ export default Vue.extend({
 	},
 	methods: {
 		onStats(stats) {
-			this.process = stats.process_uptime;
-			this.os = stats.os_uptime;
+			this.process = formatUptime(stats.process_uptime);
+			this.os = formatUptime(stats.os_uptime);
 		}
 	}
 });
-- 
cgit v1.2.3-freya

