nezhahq.github.io/assets/en_US_guide_settings.md.876b0741.js

49 lines
14 KiB
JavaScript

import{_ as a,c as n,o as s,a as t}from"./app.31af427a.js";const g='{"title":"Site Title","description":"","frontmatter":{},"headers":[{"level":2,"title":"Site Title","slug":"site-title"},{"level":2,"title":"Admin List","slug":"admin-list"},{"level":2,"title":"Theme","slug":"theme"},{"level":2,"title":"Language","slug":"language"},{"level":2,"title":"Custom code (style, script)","slug":"custom-code-style-script"},{"level":2,"title":"Access Password","slug":"access-password"},{"level":2,"title":"CDN Bypassed Domain/IP","slug":"cdn-bypassed-domain-ip"},{"level":2,"title":"IP Change Alert","slug":"ip-change-alert"}],"relativePath":"en_US/guide/settings.md","lastUpdated":1666600441000}',e={},o=t(`<h2 id="site-title" tabindex="-1">Site Title <a class="header-anchor" href="#site-title" aria-hidden="true">#</a></h2><p>You can customize your site title here<br><br></p><h2 id="admin-list" tabindex="-1">Admin List <a class="header-anchor" href="#admin-list" aria-hidden="true">#</a></h2><ul><li><p>If you have changed your Github, Gitlab, Jihulab, Gitee username, you can change it in this item, otherwise you can&#39;t log in, please separate multiple users with commas: <code>user1,user2</code></p></li><li><p>To change your administrator account, please go to <code>/opt/nezha/dashboard/data/config.yaml</code> to set the new administrator <code>Client ID</code> and <code>Client Secret</code>.<br><br></p></li></ul><h2 id="theme" tabindex="-1">Theme <a class="header-anchor" href="#theme" aria-hidden="true">#</a></h2><p>Select the home page theme here, and update the panel if there is not an existing theme in the options<br><br></p><h2 id="language" tabindex="-1">Language <a class="header-anchor" href="#language" aria-hidden="true">#</a></h2><p>Nezha Monitoring currently supports the following languages:</p><ul><li>\u7B80\u4F53\u4E2D\u6587</li><li>English</li><li>Espa\xF1ol</li></ul><p><a href="https://crowdin.com/project/nezha" target="_blank" rel="noopener noreferrer"><img src="https://badges.crowdin.net/nezha/localized.svg" alt=""></a><br> We welcome corrections to translations and contributions of additional languages<br><br></p><h2 id="custom-code-style-script" tabindex="-1">Custom code (style, script) <a class="header-anchor" href="#custom-code-style-script" aria-hidden="true">#</a></h2><p>Change logo, change color tone, add statistics code, etc.</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>The custom code only takes effect in the visitor&#39;s home page, not in the admin panel.<br> Since the code of different themes is different, if you really need to modify the content of the admin panel, please enter Docker to changes it by yourself.</p></div><br><h4 id="example-of-changing-the-default-theme-progress-bar-color" tabindex="-1">Example of changing the default theme progress bar color <a class="header-anchor" href="#example-of-changing-the-default-theme-progress-bar-color" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.ui.fine.progress&gt; .bar</span> <span class="token punctuation">{</span>
<span class="token property">background-color</span><span class="token punctuation">:</span> pink <span class="token important">!important</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="example-of-modifying-daynight-theme-progress-bar-color-and-footer-by-hyt-allen-xu-tech-fever" tabindex="-1">Example of modifying DayNight theme progress bar color and footer (by <a href="https://github.com/hyt-allen-xu" target="_blank" rel="noopener noreferrer">@hyt-allen-xu</a> <a href="https://github.com/tech-fever" target="_blank" rel="noopener noreferrer">@tech-fever</a>) <a class="header-anchor" href="#example-of-modifying-daynight-theme-progress-bar-color-and-footer-by-hyt-allen-xu-tech-fever" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.ui.fine.progress&gt; .progress-bar</span> <span class="token punctuation">{</span>
<span class="token property">background-color</span><span class="token punctuation">:</span> #00a7d0 <span class="token important">!important</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">&gt;</span></span><span class="token script"><span class="token language-javascript">
window<span class="token punctuation">.</span><span class="token function-variable function">onload</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
<span class="token keyword">var</span> avatar<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;img&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">var</span> footer<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;div.footer-container&quot;</span><span class="token punctuation">)</span>
footer<span class="token punctuation">.</span>innerHTML<span class="token operator">=</span><span class="token string">&quot;\xA92021 YourName &amp; Powered by YourName&quot;</span>
footer<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
avatar<span class="token punctuation">.</span>src<span class="token operator">=</span><span class="token string">&quot;Logo URL&quot;</span>
avatar<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="example-of-modifying-the-logo-of-the-default-theme-modifying-the-footer-by-ilay1678" tabindex="-1">Example of modifying the logo of the default theme, modifying the footer (by <a href="https://github.com/iLay1678" target="_blank" rel="noopener noreferrer">@iLay1678</a>) <a class="header-anchor" href="#example-of-modifying-the-logo-of-the-default-theme-modifying-the-footer-by-ilay1678" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.right.menu&gt;a</span><span class="token punctuation">{</span>
<span class="token property">visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector">.footer .is-size-7</span><span class="token punctuation">{</span>
<span class="token property">visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector">.item img</span><span class="token punctuation">{</span>
<span class="token property">visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">&gt;</span></span><span class="token script"><span class="token language-javascript">
window<span class="token punctuation">.</span><span class="token function-variable function">onload</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
<span class="token keyword">var</span> avatar<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;.item img&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">var</span> footer<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;div.is-size-7&quot;</span><span class="token punctuation">)</span>
footer<span class="token punctuation">.</span>innerHTML<span class="token operator">=</span><span class="token string">&quot;Powered by YOUR NAME&quot;</span>
footer<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
avatar<span class="token punctuation">.</span>src<span class="token operator">=</span><span class="token string">&quot;Your square logo link&quot;</span>
avatar<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="example-of-modifying-the-background-image-of-hotaru-theme" tabindex="-1">Example of modifying the background image of hotaru theme <a class="header-anchor" href="#example-of-modifying-the-background-image-of-hotaru-theme" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.hotaru-cover</span> <span class="token punctuation">{</span>
<span class="token property">background</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span>https://s3.ax1x.com/2020/12/08/DzHv6A.jpg<span class="token punctuation">)</span></span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h2 id="access-password" tabindex="-1">Access Password <a class="header-anchor" href="#access-password" aria-hidden="true">#</a></h2><p>If you don&#39;t want to show your homepage directly, you can set a access password here<br> After setting the password, you need to enter the password to access the homepage<br><br></p><h2 id="cdn-bypassed-domain-ip" tabindex="-1">CDN Bypassed Domain/IP <a class="header-anchor" href="#cdn-bypassed-domain-ip" aria-hidden="true">#</a></h2><p>This setting is a prerequisite for using the one-click script to install the Agent, see <a href="/en_US/guide/agent.html#preparation">here</a> for details <br></p><h2 id="ip-change-alert" tabindex="-1">IP Change Alert <a class="header-anchor" href="#ip-change-alert" aria-hidden="true">#</a></h2><p>If you want to be notified when a server&#39;s ip changes, you can set it up here</p><h4 id="coverage" tabindex="-1">Coverage <a class="header-anchor" href="#coverage" aria-hidden="true">#</a></h4><p>Select a rule here to determine which servers need to be monitored, and you can choose according to your needs</p><h4 id="specific-servers" tabindex="-1">Specific Servers <a class="header-anchor" href="#specific-servers" aria-hidden="true">#</a></h4><p>In conjunction with the coverage settings, set the exclusions for the selected rule here</p><h4 id="send-notification-to-specific-notification-group" tabindex="-1">Send Notification To Specific Notification Group <a class="header-anchor" href="#send-notification-to-specific-notification-group" aria-hidden="true">#</a></h4><p>Select the notification method, please set the notification method in the &quot;Notifications&quot; page<br><br></p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p><strong>When the settings are completed, the notification takes effect when <code>enabled</code> is activated</strong></p></div><br><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>IP Change Alert does not show ip by default, if you don&#39;t want to hide it, you can activate &quot;Do NOT desensitize Server IP In Notification Messages&quot;</p></div>`,37),p=[o];function c(i,l,r,u,d,h){return s(),n("div",null,p)}var f=a(e,[["render",c]]);export{g as __pageData,f as default};