Commit 825acb25 authored by Evan Read's avatar Evan Read

Refactor performance bar Admin Area UI and documentation

parent a795f0fa
......@@ -6,9 +6,9 @@
.form-check
= f.check_box :performance_bar_enabled, class: 'form-check-input', data: { qa_selector: 'enable_performance_bar_checkbox'}
= f.label :performance_bar_enabled, class: 'form-check-label' do
= _("Enable access to the Performance Bar")
= _("Allow non-administrators to access to the performance bar")
.form-group
= f.label :performance_bar_allowed_group_path, _('Allowed group'), class: 'label-bold'
= f.label :performance_bar_allowed_group_path, _('Allow access to members of the following group'), class: 'label-bold'
= f.text_field :performance_bar_allowed_group_path, class: 'form-control gl-form-input', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm qa-save-changes-button'
......@@ -35,8 +35,8 @@
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded_by_default? ? _('Collapse') : _('Expand')
%p
= _('Enable access to the Performance Bar for a given group.')
= link_to sprite_icon('question-o'), help_page_path('administration/monitoring/performance/performance_bar')
= _('Enable access to the performance bar for non-administrators in a given group.')
= link_to s_('Learn more.'), help_page_path('administration/monitoring/performance/performance_bar.md', anchor: 'enable-the-performance-bar-for-non-administrators'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
= render 'performance_bar'
......
......@@ -4,17 +4,19 @@ group: Monitor
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Performance Bar **(FREE SELF)**
# Performance bar **(FREE SELF)**
> The **Stats** field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/271551) in GitLab 13.9.
> The **Memory** field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330736) in GitLab 14.0.
> - The **Stats** field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/271551) in GitLab 13.9.
> - The **Memory** field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330736) in GitLab 14.0.
You can display the GitLab Performance Bar to see statistics for the performance
of a page. When activated, it looks as follows:
You can display the performance bar to see statistics for the performance of a GitLab UI page.
For example:
![Performance Bar](img/performance_bar_v14_0.png)
![Performance bar](img/performance_bar_v14_0.png)
From left to right, it displays:
## Available information
From left to right, the performance bar displays:
- **Current Host**: the current host serving the page.
- **Database queries**: the time taken (in milliseconds) and the total number
......@@ -57,8 +59,17 @@ From left to right, it displays:
NOTE:
Not all indicators are available in all environments. For instance, the memory view
requires to run Ruby with [specific patches](https://gitlab.com/gitlab-org/gitlab-build-images/-/blob/master/patches/ruby/2.7.2/thread-memory-allocations-2.7.patch) applied.
When running GitLab locally using the GDK this is typically not the case and the memory view cannot be used.
requires running Ruby with [specific patches](https://gitlab.com/gitlab-org/gitlab-build-images/-/blob/master/patches/ruby/2.7.2/thread-memory-allocations-2.7.patch)
applied. When running GitLab locally using [GDK](../../../development/contributing/index.md#gitlab-development-kit),
this is typically not the case and the memory view cannot be used.
## Keyboard shortcut
Press the [<kbd>p</kbd> + <kbd>b</kbd> keyboard shortcut](../../../user/shortcuts.md) to display
the performance bar, and again to hide it.
For non-administrators to display the performance bar, it must be
[enabled for them](#enable-the-performance-bar-for-non-administrators).
## Request warnings
......@@ -74,23 +85,17 @@ appears next to requests with warnings.
![Request selector showing two requests with warnings](img/performance_bar_request_selector_warning.png)
## Enable the Performance Bar via the Admin Area
## Enable the performance bar for non-administrators
The GitLab Performance Bar is disabled by default for non-administrators. To enable it
The performance bar is disabled by default for non-administrators. To enable it
for a given group:
1. Sign in as a user with Administrator [permissions](../../../user/permissions.md).
1. Sign in as a user with Administrator [role](../../../user/permissions.md).
1. On the top bar, select **Menu >** **{admin}** **Admin**.
1. On the left sidebar, select **Settings > Metrics and profiling**
(`admin/application_settings/metrics_and_profiling`), and expand
**Profiling - Performance bar**.
1. Click **Enable access to the Performance Bar**.
1. In the **Allowed group** field, provide the full path of the group allowed
to access the GitLab Performance Bar.
1. Click **Allow non-administrators to access to the performance bar**.
1. In the **Allow access to members of the following group** field, provide the full path of the
group allowed to access the performance.
1. Click **Save changes**.
## Keyboard shortcut for the Performance Bar
After enabling the GitLab Performance Bar, press the [<kbd>p</kbd> +
<kbd>b</kbd> keyboard shortcut](../../../user/shortcuts.md) to display it, and
again to hide it.
......@@ -84,7 +84,7 @@ To access the default page for Admin Area settings:
| ------ | ----------- |
| [Metrics - Prometheus](../../../administration/monitoring/prometheus/gitlab_metrics.md) | Enable and configure Prometheus metrics. |
| [Metrics - Grafana](../../../administration/monitoring/performance/grafana_configuration.md#integration-with-gitlab-ui) | Enable and configure Grafana. |
| [Profiling - Performance bar](../../../administration/monitoring/performance/performance_bar.md#enable-the-performance-bar-via-the-admin-area) | Enable access to the Performance Bar for a given group. |
| [Profiling - Performance bar](../../../administration/monitoring/performance/performance_bar.md#enable-the-performance-bar-for-non-administrators) | Enable access to the Performance Bar for non-administrator users in a given group. |
| [Self monitoring](../../../administration/monitoring/gitlab_self_monitoring_project/index.md#create-the-self-monitoring-project) | Enable or disable instance self monitoring. |
| [Usage statistics](usage_statistics.md) | Enable or disable version check and Service Ping. |
| [Pseudonymizer data collection](../../../administration/pseudonymizer.md) **(ULTIMATE)** | Enable or disable the Pseudonymizer data collection. |
......
......@@ -3285,6 +3285,9 @@ msgstr ""
msgid "Allow \"%{group_name}\" to sign you in"
msgstr ""
msgid "Allow access to members of the following group"
msgstr ""
msgid "Allow access to the following IP addresses"
msgstr ""
......@@ -3294,6 +3297,9 @@ msgstr ""
msgid "Allow group owners to manage LDAP-related settings"
msgstr ""
msgid "Allow non-administrators to access to the performance bar"
msgstr ""
msgid "Allow only the selected protocols to be used for Git access."
msgstr ""
......@@ -3357,9 +3363,6 @@ msgstr ""
msgid "Allowed email domain restriction only permitted for top-level groups"
msgstr ""
msgid "Allowed group"
msgstr ""
msgid "Allowed to create:"
msgstr ""
......@@ -12118,10 +12121,7 @@ msgstr ""
msgid "Enable a Prometheus metrics endpoint at %{metrics_path} to expose a variety of statistics on the health and performance of GitLab. Additional information on authenticating and connecting to the metrics endpoint is available %{link}."
msgstr ""
msgid "Enable access to the Performance Bar"
msgstr ""
msgid "Enable access to the Performance Bar for a given group."
msgid "Enable access to the performance bar for non-administrators in a given group."
msgstr ""
msgid "Enable and configure Prometheus metrics."
......
......@@ -502,23 +502,23 @@ RSpec.describe 'Admin updates settings' do
group = create(:group)
page.within('.as-performance-bar') do
check 'Enable access to the Performance Bar'
fill_in 'Allowed group', with: group.path
check 'Allow non-administrators to access to the performance bar'
fill_in 'Allow access to members of the following group', with: group.path
click_on 'Save changes'
end
expect(page).to have_content "Application settings saved successfully"
expect(find_field('Enable access to the Performance Bar')).to be_checked
expect(find_field('Allowed group').value).to eq group.path
expect(find_field('Allow non-administrators to access to the performance bar')).to be_checked
expect(find_field('Allow access to members of the following group').value).to eq group.path
page.within('.as-performance-bar') do
uncheck 'Enable access to the Performance Bar'
uncheck 'Allow non-administrators to access to the performance bar'
click_on 'Save changes'
end
expect(page).to have_content 'Application settings saved successfully'
expect(find_field('Enable access to the Performance Bar')).not_to be_checked
expect(find_field('Allowed group').value).to be_nil
expect(find_field('Allow non-administrators to access to the performance bar')).not_to be_checked
expect(find_field('Allow access to members of the following group').value).to be_nil
end
it 'loads usage ping payload on click', :js do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment