downey
(Michael Downey)
2014 年 4 月 1 日午後 5:40
1
Continuing the discussion from How can you hide the MiniProfiler? :
Note there seems to now be a setting in config/discourse.conf for this:
# enable MiniProfiler for administrators
enable_mini_profiler = true
It would be nice to see this move into the Admin settings in the future.
Is this (in the admin settings) something possible to do? Since the mini-profiler is always on the left side of the screen, it’s often in the way for a language that has left-to-right reading and left-justified text. It’d be great if we could toggle it on only when needed for troubleshooting.
「いいね!」 3
You can press alt +P to hide or show it at any time.
「いいね!」 18
Where could I have learned that alt-p trick?
「いいね!」 4
mlapida
(Michael Lapidakis)
2014 年 4 月 2 日午前 3:16
4
It’s in the source code, at the bottom of the page:
data-toggle-shortcut="Alt+P" data-start-hidden="false"></script>
「いいね!」 5
@codinghorror I use
chrome-extension://jlpkojjdgbllmedoapgfodplfhcbnbpn/update.html#help
Which uses Alt-P…
Any chance that the keyboard shortcut could be configurable, or can be eventually turned off/on via the admin settings?
downey
(Michael Downey)
2015 年 7 月 5 日午後 10:26
6
Did you try disabling your extension for a moment, then disabling the profiler, then re-enabling your extension? Seems like that would do it.
「いいね!」 1
pnoeric
(Eric)
2020 年 4 月 4 日午後 4:18
7
Hi @downey , is this first message still accurate? You reference enable_mini_profiler but here in Github the flag appears to be named load_mini_profiler
Also, after changing this setting, do I need to do an app reload, an app rebuild, or nothing (changes take effect immediately)?
Thanks-- E
「いいね!」 2
downey
(Michael Downey)
2020 年 4 月 4 日午後 4:21
8
Well much has changed in 5 years. I don’t know about a global disable, someone else might. AFAIK the Alt+P still works.
「いいね!」 4
rsmithlal
(Robert Smith)
2021 年 5 月 18 日午後 1:52
9
Thanks for your reply. I noticed it appear one day and had no idea why, so your answer helped a lot.
「いいね!」 2
rsmithlal
(Robert Smith)
2021 年 6 月 30 日午後 3:32
10
Apparently the mini profiler interface only appears for users that are designated as developers, not just any admin. Is that right?
Falco
(Falco)
2021 年 6 月 30 日午後 3:53
11
Yes, only users in the developers role will see it.
「いいね!」 1
Jagster
(Jakke Lehtonen)
2021 年 10 月 7 日午後 7:17
12
What if there isn’t ALT-key… like in my iPhone or logitech-made-mac-keybord of iPad?
This isn’t any bigger issue and like to see snapshot of loading time, but when I take screenshots for users it looks a bit odd.
sam
(Sam Saffron)
2021 年 10 月 8 日午前 2:31
13
Note it is only visible to developers (you need to explicitly insert a row into a table)
You can always use the UI directly to tweak visibility.
「いいね!」 2
Falco:
はい、開発者ロールのユーザーのみが表示されます。
ユーザーは「開発者ロール」にどのように追加または削除されますか?グループが見当たりません。
「いいね!」 1
Stephen
(Stephen)
2023 年 6 月 1 日午後 7:10
15
標準では、app.yml で指定されたメールアドレスと一致します。
他のユーザーに追加したい場合は、データベースを直接編集する必要があります。
「いいね!」 3
pfaffman
(Jay Pfaffman)
2023 年 6 月 2 日午後 4:56
16
app.yml の DISCOURSE_DEVELOPER_EMAILS には、カンマで区切って複数の開発者を追加できます。その変数からメールを削除すると、データベースに追加するような(私が可能だと知らなかった)工夫をしていない限り、そのロールからも削除されます。
「いいね!」 6
UIにおけるミニプロファイラーに関する情報不足により、私も被害に遭いました。ミニプロファイラーとは何か、その名称、なぜ表示されるのか、そして非表示にする方法についての情報が不足しています。私はサイトをセットアップしますが、開発者ではないため、それを見る必要はありませんが、慣れてしまいました。
最低限、現在の動作を説明するためにドキュメントを更新することをお勧めします。
さらに、可能であれば、混乱していてそれを消したいと思っている人のために、「ミニプロファイラー - ALT+Pを押して表示を切り替える」のようなヘルプテキストを表示したいです。
以下は、サイトのユーザーにそれを追加するための良いステップバイステップガイドのようです。
「いいね!」 3
pfaffman
(Jay Pfaffman)
2024 年 1 月 5 日午後 11:13
19
デフォルトでオフにするのが良いのではないでしょうか。そうすれば、それを望む人がオンにでき、他の人は気づくこともありません。
「いいね!」 4
はい、そのアイデアに惹かれます。DISCOURSE_DEVELOPER_EMAILS にいても、デフォルトではオフになります。
app.yml から DISCOURSE_DEVELOPER_EMAILS を削除して再構築したところ、ミニプロファイラーが完全に表示されなくなったことに気づきました。ALT+P を使用しても表示されると予想していましたが、おそらく私が知らない技術的な詳細があるのでしょう。
「いいね!」 2
pfaffman
(Jay Pfaffman)
2024 年 1 月 5 日午後 11:51
21
それがミニプロファイラーを確認できる理由です。
しかし、デフォルトでオフに変更し、それを望む人がALT-Pでオンにすることもできます。これにより、ほとんどすべての人が問題を解決できると思います。デフォルトでオフになった場合、多くの人がオンにする方法を尋ねることはないでしょう(ショートカットはショートカットメニューにあると推測します)。
「いいね!」 2