From ccaf6bbe7b9dd38b478123586d2f8089ece29b04 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 24 May 2018 14:06:13 +0900 Subject: [PATCH 1/5] Add missing translation Signed-off-by: Kenji Okimoto --- config/locales/translation_en.yml | 1 + config/locales/translation_ja.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/config/locales/translation_en.yml b/config/locales/translation_en.yml index eaaef1a5a..099adae58 100644 --- a/config/locales/translation_en.yml +++ b/config/locales/translation_en.yml @@ -98,6 +98,7 @@ en: start: Start stop: Stop restart: Restart + reload: Reload log: Log stopped: Stopped running: Running diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index 9a41a0b37..af8f2a341 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -98,6 +98,7 @@ ja: start: 開始 stop: 停止 restart: 再起動 + reload: リロード log: ログ stopped: 停止中 running: 稼働中 From 8458817fd381a7bafbc1543e347e03cd4efd17ef Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 24 May 2018 14:06:23 +0900 Subject: [PATCH 2/5] Adjust button position Signed-off-by: Kenji Okimoto --- app/views/misc/information.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/misc/information.html.haml b/app/views/misc/information.html.haml index 1da249e7a..aba14fa0f 100644 --- a/app/views/misc/information.html.haml +++ b/app/views/misc/information.html.haml @@ -1,5 +1,5 @@ - page_title t('.page_title') do - - link_to misc_download_info_path, class: "btn btn-primary float-right" do + - link_to misc_download_info_path, class: "btn btn-primary float-right mt-3" do = icon('fa-download') = t('.download_system_information') From c7fd8f58f1b197fc69a7ca087732f5ac32dc9d2e Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 24 May 2018 14:06:33 +0900 Subject: [PATCH 3/5] Set reload button color properly Signed-off-by: Kenji Okimoto --- app/views/fluentd/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/fluentd/show.html.haml b/app/views/fluentd/show.html.haml index be0a2b801..49c95c73c 100644 --- a/app/views/fluentd/show.html.haml +++ b/app/views/fluentd/show.html.haml @@ -17,7 +17,7 @@ = link_to icon("fa-play") << t("fluentd.common.start"), start_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "disabled btn-outline-dark" : "btn-primary"}" = link_to icon("fa-pause") << t("fluentd.common.stop"), stop_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-danger" : "disabled btn-outline-dark"}" = link_to icon("fa-refresh") << t("fluentd.common.restart"), restart_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-warning" : "disabled btn-outline-dark"}" - = link_to icon("fa-refresh") << t("fluentd.common.reload"), reload_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-info" : "disabled btn-default"}" + = link_to icon("fa-refresh") << t("fluentd.common.reload"), reload_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-info" : "disabled btn-outline-dark"}" .col-xl-6.col-sm-6 .card.card-default .card-header From 47e21958b47453461a7dd68b0202c4be00a0bc67 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 24 May 2018 14:23:29 +0900 Subject: [PATCH 4/5] Enable rails-ujs to support PUT/POST/DELETE properly Signed-off-by: Kenji Okimoto --- app/javascript/packs/application.js | 5 +++++ package.json | 1 + yarn.lock | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 7202a880c..25c74dbfb 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -14,6 +14,11 @@ import jQuery from 'jquery/dist/jquery' window.$ = jQuery window.jQuery = jQuery +import Rails from 'rails-ujs/lib/assets/compiled/rails-ujs.js' + +window.Rails = Rails +Rails.start() + import 'popper.js/dist/popper' import 'bootstrap/dist/js/bootstrap' import 'datatables.net/js/jquery.dataTables' diff --git a/package.json b/package.json index 2214c6df7..2ab342f36 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "jquery": "^3.3.1", "lodash": "^4.17.10", "popper.js": "^1.14.3", + "rails-ujs": "^5.2.0", "startbootstrap-sb-admin": "^4.0.0", "vue": "^2.5.16", "vue-loader": "14.2.2", diff --git a/yarn.lock b/yarn.lock index 85ef3f054..74ae85699 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4741,6 +4741,10 @@ querystringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.0.0.tgz#fa3ed6e68eb15159457c89b37bc6472833195755" +rails-ujs@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/rails-ujs/-/rails-ujs-5.2.0.tgz#d93f7a969a226c0ae67044172955be8c1cdf49fc" + randomatic@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" From eeb4099568d97f74d39c70f8249a182ef5e077c3 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 24 May 2018 14:26:33 +0900 Subject: [PATCH 5/5] Fix a typo in StyleSheet class name Signed-off-by: Kenji Okimoto --- app/views/fluentd/errors.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/fluentd/errors.html.haml b/app/views/fluentd/errors.html.haml index 40055b20b..3c0be19ff 100644 --- a/app/views/fluentd/errors.html.haml +++ b/app/views/fluentd/errors.html.haml @@ -7,7 +7,7 @@ .col-xl-12.col-sm-12 - @errors.each do |error| .card.card-primary - .card-heading + .card-header %h4= error[:subject] - if error[:notes].present? .card-body