From 357d7939f6bec4e5232ed885c25bad057c823a20 Mon Sep 17 00:00:00 2001 From: yudejp Date: Wed, 21 Apr 2021 17:17:07 +0900 Subject: [PATCH] Add server status page --- next.config.js | 5 +++- pages/index.js | 1 + pages/status.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 pages/status.js diff --git a/next.config.js b/next.config.js index a672f1c..3e9d6c3 100644 --- a/next.config.js +++ b/next.config.js @@ -11,5 +11,8 @@ module.exports = nextTranslate({ // This is the default locale you want to be used when visiting // a non-locale prefixed path e.g. `/hello` defaultLocale: 'ja', - } + }, + images: { + domains: ['mackerel.io'], + }, }) \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index a524ab7..f532b3d 100644 --- a/pages/index.js +++ b/pages/index.js @@ -38,6 +38,7 @@ export default function Index(props) { +

diff --git a/pages/status.js b/pages/status.js new file mode 100644 index 0000000..99c039b --- /dev/null +++ b/pages/status.js @@ -0,0 +1,61 @@ +import Layout from "./components/Layout" +import Navbar from "./components/Navbar" +import useTranslation from 'next-translate/useTranslation' +import { faDiscord, faTwitter, faGithub, faKeybase, faInstagram } from '@fortawesome/free-brands-svg-icons' +import { faEnvelope, faBirthdayCake, faMapPin, faSchool } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import Link from 'next/link' +import Image from 'next/image' + +import { useRouter } from 'next/router' + +export default function About(props) { + const router = useRouter() + const { locale, locales, defaultLocale, pathname } = router + const { t, lang } = useTranslation("status") + const status = t('status') + const location = t('location') + const tottori = t('tottori') + const hiroshima = t('hiroshima') + const model = t('model') + + return ( + + + +
+ { + // Heading + } +
+

{status}

Powered / Generated by Mackerel.

+
+ { + // cherry Datadog + } +

cherry

+
+

CPU

i7-2600
+

RAM

DDR3 24GB
+

OS

Arch Linux
+

{location}

{hiroshima}
+
+ + + { + // raspberry Datadog + } +

raspberry

+
+

{model}

Raspberry Pi 4 Model B Rev 1.2
+

RAM

4GB
+

OS

Raspbian GNU/Linux 10 (buster)
+

{location}

{tottori}
+
+ + +
+ +
+ ) +} \ No newline at end of file