From 5d9b5820afcd8525278f7e661a2519c76eedca5f Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 11 Aug 2017 23:57:16 +0900 Subject: status実装 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit とりあえずCPU使用率だけ --- src/config.ts | 2 + src/web/app/common/scripts/config.js | 4 +- src/web/app/desktop/tags/home-widgets/nav.tag | 2 +- src/web/app/status/script.js | 23 +++++ src/web/app/status/style.styl | 12 +++ src/web/app/status/tags/index.js | 1 + src/web/app/status/tags/index.tag | 139 ++++++++++++++++++++++++++ 7 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 src/web/app/status/script.js create mode 100644 src/web/app/status/style.styl create mode 100644 src/web/app/status/tags/index.js create mode 100644 src/web/app/status/tags/index.tag (limited to 'src') diff --git a/src/config.ts b/src/config.ts index ca940420e8..53b7108fdc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -81,6 +81,7 @@ type Mixin = { api_url: string; auth_url: string; about_url: string; + status_url: string; dev_url: string; drive_url: string; }; @@ -115,6 +116,7 @@ export default function load() { mixin.auth_url = `${mixin.scheme}://auth.${mixin.host}`; mixin.dev_url = `${mixin.scheme}://dev.${mixin.host}`; mixin.about_url = `${mixin.scheme}://about.${mixin.host}`; + mixin.status_url = `${mixin.scheme}://status.${mixin.host}`; mixin.drive_url = `${mixin.secondary_scheme}://file.${mixin.secondary_host}`; return Object.assign(config, mixin); diff --git a/src/web/app/common/scripts/config.js b/src/web/app/common/scripts/config.js index 16f75d6e16..d108b834bb 100644 --- a/src/web/app/common/scripts/config.js +++ b/src/web/app/common/scripts/config.js @@ -8,6 +8,7 @@ const url = `${scheme}//${host}`; const apiUrl = `${scheme}//api.${host}`; const devUrl = `${scheme}//dev.${host}`; const aboutUrl = `${scheme}//about.${host}`; +const statusUrl = `${scheme}//status.${host}`; export default { host, @@ -15,5 +16,6 @@ export default { url, apiUrl, devUrl, - aboutUrl + aboutUrl, + statusUrl }; diff --git a/src/web/app/desktop/tags/home-widgets/nav.tag b/src/web/app/desktop/tags/home-widgets/nav.tag index 304be8f954..16a93545a4 100644 --- a/src/web/app/desktop/tags/home-widgets/nav.tag +++ b/src/web/app/desktop/tags/home-widgets/nav.tag @@ -1,4 +1,4 @@ -MisskeyについてステータスWikiリポジトリ開発者Follow us on +MisskeyについてステータスWikiリポジトリ開発者Follow us on + + + + +

CPU { percentage }%

+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-freya From 692d5141fce81496abd09d1cd3c0bddaf79e4f3b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 12 Aug 2017 02:29:46 +0900 Subject: [Client:Status] :v: --- locales/en.yml | 4 ++ locales/ja.yml | 4 ++ src/web/app/status/style.styl | 5 +-- src/web/app/status/tags/index.tag | 92 ++++++++++++++++++++++++++++++++------- 4 files changed, 86 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/locales/en.yml b/locales/en.yml index a01392809e..a91fc5709b 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -426,3 +426,7 @@ mobile: all: "All" known: "You know" load-more: "More" + +status: + all-systems-maybe-operational: "All systems maybe operational" + what-is-this-site: "" diff --git a/locales/ja.yml b/locales/ja.yml index d55e690e91..efbc60475c 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -427,3 +427,7 @@ mobile: all: "すべて" known: "知り合い" load-more: "もっと" + +status: + all-systems-maybe-operational: "すべてのシステムがたぶん正常に作動しています" + what-is-this-site: "" diff --git a/src/web/app/status/style.styl b/src/web/app/status/style.styl index e560febf98..b48d7aeb9e 100644 --- a/src/web/app/status/style.styl +++ b/src/web/app/status/style.styl @@ -6,7 +6,4 @@ html body margin 0 - padding 32px 0 - - @media (max-width 600px) - padding 0 + padding 0 diff --git a/src/web/app/status/tags/index.tag b/src/web/app/status/tags/index.tag index b75b9710c1..121f673d4d 100644 --- a/src/web/app/status/tags/index.tag +++ b/src/web/app/status/tags/index.tag @@ -1,26 +1,54 @@ -

Misskey Status

+

MisskeyStatus

+

%i18n:status.all-systems-maybe-operational%

+
+ + +

MEM { percentage }%

+ + + +
+ - + - - - - - + + + + + + +
+ + +

%i18n:stats.posts-count% { stats.posts_count }

+ + + +
+ + +

%i18n:stats.users-count% { stats.users_count }

+ + + +
+ + + + Black ... Total
Blue ... Posts
Red ... Replies
Green ... Reposts
+ + + + +
+ + +
+ + + + + + + + diff --git a/src/web/app/status/tags/index.tag b/src/web/app/status/tags/index.tag index 121f673d4d..07b9921abb 100644 --- a/src/web/app/status/tags/index.tag +++ b/src/web/app/status/tags/index.tag @@ -56,7 +56,6 @@ this.mixin('api'); this.initializing = true; - this.view = 0; this.connection = new Connection(); this.on('mount', () => { diff --git a/webpack/webpack.config.ts b/webpack/webpack.config.ts index 7035d4bb9a..5199285d55 100644 --- a/webpack/webpack.config.ts +++ b/webpack/webpack.config.ts @@ -16,6 +16,7 @@ module.exports = langs.map(([lang, locale]) => { const entry = { desktop: './src/web/app/desktop/script.js', mobile: './src/web/app/mobile/script.js', + stats: './src/web/app/stats/script.js', status: './src/web/app/status/script.js', dev: './src/web/app/dev/script.js', auth: './src/web/app/auth/script.js' -- cgit v1.2.3-freya From 6391caa60c4e946c6d93a322a957fa4b54c9d212 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 12 Aug 2017 15:26:56 +0900 Subject: :art: --- src/web/app/stats/tags/index.tag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/web/app/stats/tags/index.tag b/src/web/app/stats/tags/index.tag index 015bf439de..0adf58b0bd 100644 --- a/src/web/app/stats/tags/index.tag +++ b/src/web/app/stats/tags/index.tag @@ -144,7 +144,7 @@ -- cgit v1.2.3-freya From 8564a29b5aa1dd34d373cac94480612b9e573345 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 12 Aug 2017 18:03:23 +0900 Subject: [API] Remove needless data --- src/api/endpoints/aggregation/posts.ts | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/api/endpoints/aggregation/posts.ts b/src/api/endpoints/aggregation/posts.ts index 573816e4fd..48ee225129 100644 --- a/src/api/endpoints/aggregation/posts.ts +++ b/src/api/endpoints/aggregation/posts.ts @@ -79,11 +79,6 @@ module.exports = params => new Promise(async (res, rej) => { graph.push(data); } else { graph.push({ - date: { - year: day.getFullYear(), - month: day.getMonth() + 1, // In JavaScript, month is zero-based. - day: day.getDate() - }, posts: 0, reposts: 0, replies: 0 -- cgit v1.2.3-freya