summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2018-07-18 02:41:40 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2018-07-26 19:00:10 +0200
commit866429f7892842c2a29a902eace64efac781019b (patch)
tree86341514b5c87d2ec8fdc4e15fe3986ac3afd452 /app/views
parentf8f2d0f9e18a76324d85ae319a3bb8585ed107d5 (diff)
downloadgitlab-ce-866429f7892842c2a29a902eace64efac781019b.tar.gz
Add instance_statistics_visibility_private application setting and top nav icon
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/application_settings/_usage.html.haml3
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml6
2 files changed, 8 insertions, 1 deletions
diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml
index 40b5c51ac88..860e7765168 100644
--- a/app/views/admin/application_settings/_usage.html.haml
+++ b/app/views/admin/application_settings/_usage.html.haml
@@ -30,6 +30,9 @@
form. For more information, see the documentation on
= succeed '.' do
= link_to 'deactivating the usage ping', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'deactivate-the-usage-ping')
+ .form-group
+ = f.label :instance_statistics_visibility_private, 'Instance Statistics visibility'
+ = f.select :instance_statistics_visibility_private, options_for_select({'All users' => false, 'Only admins' => true}, Gitlab::CurrentSettings.instance_statistics_visibility_private?), {}, class: 'form-control'
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index a71a4b13a7e..356e52918d9 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -70,8 +70,12 @@
= nav_link(controller: 'admin/dashboard') do
= link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin area'), aria: { label: _("Admin area") }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= sprite_icon('admin', size: 18)
+ - unless hide_instance_statistics?
+ = nav_link(controller: :instance_statistics) do
+ = link_to instance_statistics_root_path, title: 'Instance statistics', aria: { label: 'Instance statistics' }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
+ = sprite_icon('chart', size: 18)
- if Gitlab::Sherlock.enabled?
%li
= link_to sherlock_transactions_path, class: 'admin-icon', title: _('Sherlock Transactions'),
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
- = icon('tachometer fw')
+ = icon('tachometer fw') \ No newline at end of file