aboutsummaryrefslogtreecommitdiff
path: root/src/static/templates/admin/diagnostics.hbs
blob: a61d899232ae2b99b4b6de5fa223b1125e4b5313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<main class="container-xl">
    <div id="diagnostics-block" class="my-3 p-3 bg-white rounded shadow">
        <h6 class="border-bottom pb-2 mb-2">Diagnostics</h6>

        <h3>Versions</h3>
        <div class="row">
            <div class="col-md">
                <dl class="row">
                    <dt class="col-sm-5">Server Installed
                        <span class="badge bg-success d-none" id="server-success" title="Latest version is installed.">Ok</span>
                        <span class="badge bg-warning d-none" id="server-warning" title="There seems to be an update available.">Update</span>
                        <span class="badge bg-info d-none" id="server-branch" title="This is a branched version.">Branched</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="server-installed">{{page_data.current_release}}</span>
                    </dd>
                    <dt class="col-sm-5">Server Latest
                        <span class="badge bg-secondary d-none" id="server-failed" title="Unable to determine latest version.">Unknown</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="server-latest">{{page_data.latest_release}}<span id="server-latest-commit" class="d-none">-{{page_data.latest_commit}}</span></span>
                    </dd>
                    {{#if page_data.web_vault_enabled}}
                    <dt class="col-sm-5">Web Installed
                        <span class="badge bg-success d-none" id="web-success" title="Latest version is installed.">Ok</span>
                        <span class="badge bg-warning d-none" id="web-warning" title="There seems to be an update available.">Update</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="web-installed">{{page_data.web_vault_version}}</span>
                    </dd>
                    {{#unless page_data.running_within_docker}}
                    <dt class="col-sm-5">Web Latest
                        <span class="badge bg-secondary d-none" id="web-failed" title="Unable to determine latest version.">Unknown</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="web-latest">{{page_data.latest_web_build}}</span>
                    </dd>
                    {{/unless}}
                    {{/if}}
                    {{#unless page_data.web_vault_enabled}}
                    <dt class="col-sm-5">Web Installed</dt>
                    <dd class="col-sm-7">
                        <span id="web-installed">Web Vault is disabled</span>
                    </dd>
                    {{/unless}}
                    <dt class="col-sm-5">Database</dt>
                    <dd class="col-sm-7">
                        <span><b>{{page_data.db_type}}:</b> {{page_data.db_version}}</span>
                    </dd>
                </dl>
            </div>
        </div>

        <h3>Checks</h3>
        <div class="row">
            <div class="col-md">
                <dl class="row">
                    <dt class="col-sm-5">OS/Arch</dt>
                    <dd class="col-sm-7">
                        <span class="d-block"><b>{{ page_data.host_os }} / {{ page_data.host_arch }}</b></span>
                    </dd>
                    <dt class="col-sm-5">Running within Docker</dt>
                    <dd class="col-sm-7">
                    {{#if page_data.running_within_docker}}
                        <span class="d-block"><b>Yes (Base: {{ page_data.docker_base_image }})</b></span>
                    {{/if}}
                    {{#unless page_data.running_within_docker}}
                        <span class="d-block"><b>No</b></span>
                    {{/unless}}
                    </dd>
                    <dt class="col-sm-5">Environment settings overridden</dt>
                    <dd class="col-sm-7">
                    {{#if page_data.overrides}}
                        <span class="d-block" title="The following settings are overridden: {{page_data.overrides}}"><b>Yes</b></span>
                    {{/if}}
                    {{#unless page_data.overrides}}
                        <span class="d-block"><b>No</b></span>
                    {{/unless}}
                    </dd>
                    <dt class="col-sm-5">Uses a reverse proxy</dt>
                    <dd class="col-sm-7">
                    {{#if page_data.ip_header_exists}}
                        <span class="d-block" title="IP Header found."><b>Yes</b></span>
                    {{/if}}
                    {{#unless page_data.ip_header_exists}}
                        <span class="d-block" title="No IP Header found."><b>No</b></span>
                    {{/unless}}
                    </dd>
                    {{!-- Only show this if the IP Header Exists --}}
                    {{#if page_data.ip_header_exists}}
                    <dt class="col-sm-5">IP header
                    {{#if page_data.ip_header_match}}
                        <span class="badge bg-success" title="IP_HEADER config seems to be valid.">Match</span>
                    {{/if}}
                    {{#unless page_data.ip_header_match}}
                        <span class="badge bg-danger" title="IP_HEADER config seems to be invalid. IP's in the log could be invalid. Please fix.">No Match</span>
                    {{/unless}}
                    </dt>
                    <dd class="col-sm-7">
                    {{#if page_data.ip_header_match}}
                        <span class="d-block"><b>Config/Server:</b> {{ page_data.ip_header_name }}</span>
                    {{/if}}
                    {{#unless page_data.ip_header_match}}
                        <span class="d-block"><b>Config:</b> {{ page_data.ip_header_config }}</span>
                        <span class="d-block"><b>Server:</b> {{ page_data.ip_header_name }}</span>
                    {{/unless}}
                    </dd>
                    {{/if}}
                    {{!-- End if IP Header Exists --}}
                    <dt class="col-sm-5">Internet access
                    {{#if page_data.has_http_access}}
                        <span class="badge bg-success" title="We have internet access!">Ok</span>
                    {{/if}}
                    {{#unless page_data.has_http_access}}
                        <span class="badge bg-danger" title="There seems to be no internet access. Please fix.">Error</span>
                    {{/unless}}
                    </dt>
                    <dd class="col-sm-7">
                    {{#if page_data.has_http_access}}
                        <span class="d-block"><b>Yes</b></span>
                    {{/if}}
                    {{#unless page_data.has_http_access}}
                        <span class="d-block"><b>No</b></span>
                    {{/unless}}
                    </dd>
                    <dt class="col-sm-5">Internet access via a proxy</dt>
                    <dd class="col-sm-7">
                    {{#if page_data.uses_proxy}}
                        <span class="d-block" title="Internet access goes via a proxy (HTTPS_PROXY or HTTP_PROXY is configured)."><b>Yes</b></span>
                    {{/if}}
                    {{#unless page_data.uses_proxy}}
                        <span class="d-block" title="We have direct internet access, no outgoing proxy configured."><b>No</b></span>
                    {{/unless}}
                    </dd>
                    <dt class="col-sm-5">DNS (github.com)
                        <span class="badge bg-success d-none" id="dns-success" title="DNS Resolving works!">Ok</span>
                        <span class="badge bg-danger d-none" id="dns-warning" title="DNS Resolving failed. Please fix.">Error</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="dns-resolved">{{page_data.dns_resolved}}</span>
                    </dd>
                    <dt class="col-sm-5">Date & Time (Local)</dt>
                    <dd class="col-sm-7">
                        <span><b>Server:</b> {{page_data.server_time_local}}</span>
                    </dd>
                    <dt class="col-sm-5">Date & Time (UTC)
                        <span class="badge bg-success d-none" id="time-success" title="Server and browser times are within 15 seconds of each other.">Server/Browser Ok</span>
                        <span class="badge bg-danger d-none" id="time-warning" title="Server and browser times are more than 15 seconds apart.">Server/Browser Error</span>
                        <span class="badge bg-success d-none" id="ntp-server-success" title="Server and NTP times are within 15 seconds of each other.">Server NTP Ok</span>
                        <span class="badge bg-danger d-none" id="ntp-server-warning" title="Server and NTP times are more than 15 seconds apart.">Server NTP Error</span>
                        <span class="badge bg-success d-none" id="ntp-browser-success" title="Browser and NTP times are within 15 seconds of each other.">Browser NTP Ok</span>
                        <span class="badge bg-danger d-none" id="ntp-browser-warning" title="Browser and NTP times are more than 15 seconds apart.">Browser NTP Error</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="ntp-time" class="d-block"><b>NTP:</b> <span id="ntp-server-string">{{page_data.ntp_time}}</span></span>
                        <span id="time-server" class="d-block"><b>Server:</b> <span id="time-server-string">{{page_data.server_time}}</span></span>
                        <span id="time-browser" class="d-block"><b>Browser:</b> <span id="time-browser-string"></span></span>
                    </dd>

                    <dt class="col-sm-5">Domain configuration
                        <span class="badge bg-success d-none" id="domain-success" title="The domain variable matches the browser location and seems to be configured correctly.">Match</span>
                        <span class="badge bg-danger d-none" id="domain-warning" title="The domain variable does not match the browser location.&#013;&#010;The domain variable does not seem to be configured correctly.&#013;&#010;Some features may not work as expected!">No Match</span>
                        <span class="badge bg-success d-none" id="https-success" title="Configured to use HTTPS">HTTPS</span>
                        <span class="badge bg-danger d-none" id="https-warning" title="Not configured to use HTTPS.&#013;&#010;Some features may not work as expected!">No HTTPS</span>
                    </dt>
                    <dd class="col-sm-7">
                        <span id="domain-server" class="d-block"><b>Server:</b> <span id="domain-server-string">{{page_data.admin_url}}</span></span>
                        <span id="domain-browser" class="d-block"><b>Browser:</b> <span id="domain-browser-string"></span></span>
                    </dd>
                </dl>
            </div>
        </div>

        <h3>Support</h3>
        <div class="row">
            <div class="col-md">
                <dl class="row">
                    <dd class="col-sm-12">
                        If you need support please check the following links first before you create a new issue:
                         <a href="https://vaultwarden.discourse.group/" target="_blank" rel="noreferrer noopener">Vaultwarden Forum</a>
                         | <a href="https://github.com/dani-garcia/vaultwarden/discussions" target="_blank" rel="noreferrer noopener">Github Discussions</a>
                    </dd>
                </dl>
                <dl class="row">
                    <dd class="col-sm-12">
                        You can use the button below to pre-generate a string which you can copy/paste on either the Forum or when Creating a new issue at Github.<br>
                        We try to hide the most sensitive values from the generated support string by default, but please verify if there is nothing in there which you want to hide!<br>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="col-sm-3">
                        <button type="button" id="gen-support" class="btn btn-primary">Generate Support String</button>
                        <br><br>
                        <button type="button" id="copy-support" class="btn btn-info mb-3 d-none">Copy To Clipboard</button>
                        <div class="toast-container position-absolute float-start vw-copy-toast">
                            <div id="toastClipboardCopy" class="toast fade hide" role="status" aria-live="polite" aria-atomic="true" data-bs-autohide="true" data-bs-delay="1500">
                                <div class="toast-body">
                                    Copied to clipboard!
                                </div>
                            </div>
                        </div>
                    </dt>
                    <dd class="col-sm-9">
                        <pre id="support-string" class="pre-scrollable d-none w-100 border p-2"></pre>
                    </dd>
                </dl>
            </div>
        </div>
    </div>
</main>
<script src="{{urlpath}}/vw_static/admin_diagnostics.js"></script>
<script type="application/json" id="diagnostics_json">{{to_json page_data}}</script>