Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
04408ec2
Commit
04408ec2
authored
Sep 19, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'ee-44998-split-admin-settings-into-multiple-sub-pages' into 'master'"
This reverts commit
8b046005
parent
d01079cd
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
589 additions
and
783 deletions
+589
-783
app/assets/javascripts/pages/admin/application_settings/index.js
...ets/javascripts/pages/admin/application_settings/index.js
+5
-0
app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/index.js
...admin/application_settings/metrics_and_profiling/index.js
+0
-8
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-31
app/controllers/concerns/internal_redirect.rb
app/controllers/concerns/internal_redirect.rb
+0
-6
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-9
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+0
-4
app/views/admin/application_settings/ci_cd.html.haml
app/views/admin/application_settings/ci_cd.html.haml
+0
-27
app/views/admin/application_settings/integrations.html.haml
app/views/admin/application_settings/integrations.html.haml
+0
-31
app/views/admin/application_settings/metrics_and_profiling.html.haml
...dmin/application_settings/metrics_and_profiling.html.haml
+0
-50
app/views/admin/application_settings/network.html.haml
app/views/admin/application_settings/network.html.haml
+0
-36
app/views/admin/application_settings/preferences.html.haml
app/views/admin/application_settings/preferences.html.haml
+0
-69
app/views/admin/application_settings/reporting.html.haml
app/views/admin/application_settings/reporting.html.haml
+0
-36
app/views/admin/application_settings/repository.html.haml
app/views/admin/application_settings/repository.html.haml
+0
-36
app/views/admin/application_settings/show.html.haml
app/views/admin/application_settings/show.html.haml
+298
-19
app/views/layouts/nav/sidebar/_admin.html.haml
app/views/layouts/nav/sidebar/_admin.html.haml
+1
-45
changelogs/unreleased/44998-split-admin-settings-into-multiple-sub-pages.yml
...ed/44998-split-admin-settings-into-multiple-sub-pages.yml
+0
-5
config/routes/admin.rb
config/routes/admin.rb
+0
-1
ee/app/views/admin/application_settings/_snowplow.html.haml
ee/app/views/admin/application_settings/_snowplow.html.haml
+20
-30
ee/app/views/admin/application_settings/geo.html.haml
ee/app/views/admin/application_settings/geo.html.haml
+0
-5
ee/app/views/admin/application_settings/templates.html.haml
ee/app/views/admin/application_settings/templates.html.haml
+0
-7
ee/spec/features/admin/admin_settings_spec.rb
ee/spec/features/admin/admin_settings_spec.rb
+2
-23
ee/spec/features/ci_shared_runner_settings_spec.rb
ee/spec/features/ci_shared_runner_settings_spec.rb
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+1
-10
qa/qa/page/admin/settings/main.rb
qa/qa/page/admin/settings/main.rb
+2
-2
spec/features/admin/admin_settings_spec.rb
spec/features/admin/admin_settings_spec.rb
+256
-291
spec/features/admin/admin_uses_repository_checks_spec.rb
spec/features/admin/admin_uses_repository_checks_spec.rb
+1
-1
No files found.
app/assets/javascripts/pages/admin/application_settings/index.js
View file @
04408ec2
import
initSettingsPanels
from
'
~/settings_panels
'
;
import
projectSelect
from
'
~/project_select
'
;
import
UsagePingPayload
from
'
./usage_ping_payload
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
// Initialize expandable settings panels
initSettingsPanels
();
projectSelect
();
new
UsagePingPayload
(
document
.
querySelector
(
'
.js-usage-ping-payload-trigger
'
),
document
.
querySelector
(
'
.js-usage-ping-payload
'
),
).
init
();
});
app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/index.js
deleted
100644 → 0
View file @
d01079cd
import
UsagePingPayload
from
'
./../usage_ping_payload
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
UsagePingPayload
(
document
.
querySelector
(
'
.js-usage-ping-payload-trigger
'
),
document
.
querySelector
(
'
.js-usage-ping-payload
'
),
).
init
();
});
app/controllers/admin/application_settings_controller.rb
View file @
04408ec2
class
Admin::ApplicationSettingsController
<
Admin
::
ApplicationController
include
InternalRedirect
prepend
EE
::
Admin
::
ApplicationSettingsController
before_action
:set_application_setting
...
...
@@ -7,33 +6,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
def
show
end
def
integrations
end
def
repository
end
def
templates
end
def
ci_cd
end
def
reporting
end
def
metrics_and_profiling
end
def
network
end
def
geo
end
def
preferences
end
def
update
successful
=
ApplicationSettings
::
UpdateService
.
new
(
@application_setting
,
current_user
,
application_setting_params
)
...
...
@@ -43,12 +15,10 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
session
[
:ask_for_usage_stats_consent
]
=
current_user
.
requires_usage_stats_consent?
end
redirect_path
=
referer_path
(
request
)
||
admin_application_settings_path
respond_to
do
|
format
|
if
successful
format
.
json
{
head
:ok
}
format
.
html
{
redirect_to
redirect
_path
,
notice:
'Application settings saved successfully'
}
format
.
html
{
redirect_to
admin_application_settings
_path
,
notice:
'Application settings saved successfully'
}
else
format
.
json
{
head
:bad_request
}
format
.
html
{
render
:show
}
...
...
app/controllers/concerns/internal_redirect.rb
View file @
04408ec2
...
...
@@ -37,10 +37,4 @@ module InternalRedirect
path_with_query
=
[
uri
.
path
,
uri
.
query
].
compact
.
join
(
'?'
)
[
path_with_query
,
uri
.
fragment
].
compact
.
join
(
"#"
)
end
def
referer_path
(
request
)
return
unless
request
.
referer
.
presence
URI
(
request
.
referer
).
path
end
end
app/helpers/application_helper.rb
View file @
04408ec2
...
...
@@ -9,15 +9,7 @@ module ApplicationHelper
# See https://docs.gitlab.com/ee/development/ee_features.html#code-in-app-views
# rubocop: disable CodeReuse/ActiveRecord
def
render_if_exists
(
partial
,
locals
=
{})
render
(
partial
,
locals
)
if
partial_exists?
(
partial
)
end
def
partial_exists?
(
partial
)
lookup_context
.
exists?
(
partial
,
[],
true
)
end
def
template_exists?
(
template
)
lookup_context
.
exists?
(
template
,
[],
false
)
render
(
partial
,
locals
)
if
lookup_context
.
exists?
(
partial
,
[],
true
)
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
app/helpers/application_settings_helper.rb
View file @
04408ec2
...
...
@@ -265,8 +265,4 @@ module ApplicationSettingsHelper
:web_ide_clientside_preview_enabled
]
end
def
expanded_by_default?
Rails
.
env
.
test?
end
end
app/views/admin/application_settings/ci_cd.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"CI/CD"
)
-
page_title
_
(
"CI/CD"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
%section
.settings.as-ci-cd.no-animate
#js-ci-cd-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Continuous Integration and Deployment'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Auto DevOps, runners and job artifacts'
)
.settings-content
=
render
'ci_cd'
-
if
Gitlab
.
config
.
registry
.
enabled
%section
.settings.as-registry.no-animate
#js-registry-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Container Registry'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Various container registry settings.'
)
.settings-content
=
render
'registry'
app/views/admin/application_settings/integrations.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Integrations"
)
-
page_title
_
(
"Integrations"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render_if_exists
'admin/application_settings/elasticsearch_form'
,
expanded:
expanded_by_default?
%section
.settings.as-plantuml.no-animate
#js-plantuml-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'PlantUML'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Allow rendering of PlantUML diagrams in Asciidoc documents.'
)
.settings-content
=
render
'plantuml'
=
render_if_exists
'admin/application_settings/slack'
,
expanded:
expanded_by_default?
%section
.settings.as-third-party-offers.no-animate
#js-third-party-offers-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Third party offers'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Control the display of third party offers.'
)
.settings-content
=
render
'third_party_offers'
,
application_setting:
@application_setting
=
render_if_exists
'admin/application_settings/snowplow'
,
expanded:
expanded_by_default?
app/views/admin/application_settings/metrics_and_profiling.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Metrics and profiling"
)
-
page_title
_
(
"Metrics and profiling"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
%section
.settings.as-influx.no-animate
#js-influx-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Metrics - Influx'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable and configure InfluxDB metrics.'
)
.settings-content
=
render
'influx'
%section
.settings.as-prometheus.no-animate
#js-prometheus-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Metrics - Prometheus'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable and configure Prometheus metrics.'
)
.settings-content
=
render
'prometheus'
%section
.settings.as-performance-bar.no-animate
#js-performance-bar-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Profiling - Performance bar'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable the Performance Bar for a given group.'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'administration/monitoring/performance/performance_bar'
)
.settings-content
=
render
'performance_bar'
%section
.settings.as-usage.no-animate
#js-usage-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
#usage-statistics
%h4
=
_
(
'Usage statistics'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable or disable version check and usage ping.'
)
.settings-content
=
render
'usage'
=
render_if_exists
'admin/application_settings/pseudonymizer_settings'
,
expanded:
expanded_by_default?
app/views/admin/application_settings/network.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Network"
)
-
page_title
_
(
"Network"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
%section
.settings.as-performance.no-animate
#js-performance-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Performance optimization'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Various settings that affect GitLab performance.'
)
.settings-content
=
render
'performance'
%section
.settings.as-ip-limits.no-animate
#js-ip-limits-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'User and IP Rate Limits'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure limits for web and API requests.'
)
.settings-content
=
render
'ip_limits'
%section
.settings.as-outbound.no-animate
#js-outbound-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Outbound requests'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Allow requests to the local network from hooks and services.'
)
.settings-content
=
render
'outbound'
app/views/admin/application_settings/preferences.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Preferences"
)
-
page_title
_
(
"Preferences"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
%section
.settings.as-email.no-animate
#js-email-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Email'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Various email settings.'
)
.settings-content
=
render
'email'
%section
.settings.as-help-page.no-animate
#js-help-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Help page'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Help page text and support page url.'
)
.settings-content
=
render
'help_page'
%section
.settings.as-pages.no-animate
#js-pages-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Pages'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Size and domain settings for static websites'
)
.settings-content
=
render
'pages'
%section
.settings.as-realtime.no-animate
#js-realtime-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Real-time features'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Change this value to influence how frequently the GitLab UI polls for updates.'
)
.settings-content
=
render
'realtime'
%section
.settings.as-background.no-animate
#js-background-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Background jobs'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure Sidekiq job throttling.'
)
.settings-content
=
render
'background_jobs'
%section
.settings.as-gitaly.no-animate
#js-gitaly-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Gitaly'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure Gitaly timeouts.'
)
.settings-content
=
render
'gitaly'
app/views/admin/application_settings/reporting.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Reporting"
)
-
page_title
_
(
"Reporting"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
%section
.settings.as-spam.no-animate
#js-spam-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Spam and Anti-bot Protection'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable reCAPTCHA or Akismet and set IP limits.'
)
.settings-content
=
render
'spam'
%section
.settings.as-abuse.no-animate
#js-abuse-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Abuse reports'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Set notification email for abuse reports.'
)
.settings-content
=
render
'abuse'
%section
.settings.as-logging.no-animate
#js-logging-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Error Reporting and Logging'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable Sentry for error reporting and logging.'
)
.settings-content
=
render
'logging'
app/views/admin/application_settings/repository.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Repository"
)
-
page_title
_
(
"Repository"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
%section
.settings.as-mirror.no-animate
#js-mirror-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Repository mirror'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
'Collapse'
:
'Expand'
%p
=
_
(
'Configure push mirrors.'
)
.settings-content
=
render
partial:
'repository_mirrors_form'
%section
.settings.as-repository-storage.no-animate
#js-repository-storage-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Repository storage'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure storage path and circuit breaker settings.'
)
.settings-content
=
render
'repository_storage'
%section
.settings.as-repository-check.no-animate
#js-repository-check-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
%h4
=
_
(
'Repository maintenance'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure automatic git checks and housekeeping on repositories.'
)
.settings-content
=
render
'repository_check'
app/views/admin/application_settings/show.html.haml
View file @
04408ec2
-
breadcrumb_title
_
(
"Settings"
)
-
page_title
_
(
"Settings"
)
-
breadcrumb_title
"Settings"
-
page_title
"Settings"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
expanded
=
Rails
.
env
.
test?
%section
.settings.as-visibility-access.no-animate
#js-visibility-settings
{
class:
(
'expanded'
if
expanded
_by_default?
)
}
%section
.settings.as-visibility-access.no-animate
#js-visibility-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Visibility and access controls'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Set default and restrict visibility levels. Configure import sources and git access protocol.'
)
.settings-content
=
render
'visibility_and_access'
%section
.settings.as-account-limit.no-animate
#js-account-settings
{
class:
(
'expanded'
if
expanded
_by_default?
)
}
%section
.settings.as-account-limit.no-animate
#js-account-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Account and limit'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Session expiration, projects limit and attachment size.'
)
.settings-content
=
render
'account_and_limit'
%section
.settings.as-signup.no-animate
#js-signup-settings
{
class:
(
'expanded'
if
expanded
_by_default?
)
}
%section
.settings.as-signup.no-animate
#js-signup-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Sign-up restrictions'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure the way a user creates a new account.'
)
.settings-content
=
render
'signup'
%section
.settings.as-signin.no-animate
#js-signin-settings
{
class:
(
'expanded'
if
expanded
_by_default?
)
}
%section
.settings.as-signin.no-animate
#js-signin-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Sign-in restrictions'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Set requirements for a user to sign-in. Enable mandatory two-factor authentication.'
)
.settings-content
=
render
'signin'
%section
.
qa-terms-settings.settings.as-terms.no-animate
#js-terms-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
%section
.
settings.as-terms.no-animate
#js-terms-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Terms of Service and Privacy Policy'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Include a Terms of Service agreement and Privacy Policy that all users must accept.'
)
.settings-content
=
render
'terms'
%section
.settings.as-help-page.no-animate
#js-help-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Help page'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Help page text and support page url.'
)
.settings-content
=
render
'help_page'
%section
.settings.as-pages.no-animate
#js-pages-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Pages'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Size and domain settings for static websites'
)
.settings-content
=
render
'pages'
%section
.settings.as-ci-cd.no-animate
#js-ci-cd-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Continuous Integration and Deployment'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Auto DevOps, runners and job artifacts'
)
.settings-content
=
render
'ci_cd'
%section
.settings.as-influx.no-animate
#js-influx-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Metrics - Influx'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable and configure InfluxDB metrics.'
)
.settings-content
=
render
'influx'
%section
.settings.as-prometheus.no-animate
#js-prometheus-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Metrics - Prometheus'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable and configure Prometheus metrics.'
)
.settings-content
=
render
'prometheus'
%section
.settings.as-performance-bar.no-animate
#js-performance-bar-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Profiling - Performance bar'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable the Performance Bar for a given group.'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'administration/monitoring/performance/performance_bar'
)
.settings-content
=
render
'performance_bar'
%section
.settings.as-snowplow.no-animate
#js-snowplow-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Snowplow
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure the %{link} integration.'
).
html_safe
%
{
link:
link_to
(
'Snowplow'
,
'https://snowplowanalytics.com/'
,
target:
'_blank'
)
}
.settings-content
=
render
'snowplow'
,
application_setting:
@application_setting
%section
.settings.as-background.no-animate
#js-background-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Background jobs'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure Sidekiq job throttling.'
)
.settings-content
=
render
'background_jobs'
%section
.settings.as-spam.no-animate
#js-spam-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Spam and Anti-bot Protection'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable reCAPTCHA or Akismet and set IP limits.'
)
.settings-content
=
render
'spam'
%section
.settings.as-abuse.no-animate
#js-abuse-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Abuse reports'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Set notification email for abuse reports.'
)
.settings-content
=
render
'abuse'
%section
.settings.as-logging.no-animate
#js-logging-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Error Reporting and Logging'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable Sentry for error reporting and logging.'
)
.settings-content
=
render
'logging'
%section
.qa-repository-storage-settings.settings.as-repository-storage.no-animate
#js-repository-storage-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Repository storage'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure storage path and circuit breaker settings.'
)
.settings-content
=
render
'repository_storage'
%section
.settings.as-repository-check.no-animate
#js-repository-check-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Repository maintenance'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure automatic git checks and housekeeping on repositories.'
)
.settings-content
=
render
'repository_check'
-
if
Gitlab
.
config
.
registry
.
enabled
%section
.settings.as-registry.no-animate
#js-registry-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Container Registry'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Various container registry settings.'
)
.settings-content
=
render
'registry'
-
if
koding_enabled?
%section
.settings.as-koding.no-animate
#js-koding-settings
{
class:
(
'expanded'
if
expanded
_by_default?
)
}
%section
.settings.as-koding.no-animate
#js-koding-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Koding'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Online IDE integration settings.'
)
.settings-content
=
render
'koding'
=
render_if_exists
'admin/application_settings/external_authorization_service_form'
,
expanded:
expanded_by_default?
%section
.settings.as-plantuml.no-animate
#js-plantuml-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'PlantUML'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Allow rendering of PlantUML diagrams in Asciidoc documents.'
)
.settings-content
=
render
'plantuml'
%section
.settings.as-usage.no-animate
#js-usage-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
#usage-statistics
%h4
=
_
(
'Usage statistics'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable or disable version check and usage ping.'
)
.settings-content
=
render
'usage'
%section
.settings.as-terminal.no-animate
#js-terminal-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
%section
.settings.as-email.no-animate
#js-email-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Email'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Various email settings.'
)
.settings-content
=
render
'email'
%section
.settings.as-gitaly.no-animate
#js-gitaly-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Gitaly'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure Gitaly timeouts.'
)
.settings-content
=
render
'gitaly'
%section
.settings.as-terminal.no-animate
#js-terminal-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Web terminal'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Set max session time for web terminal.'
)
.settings-content
=
render
'terminal'
%section
.settings.no-animate
#js-web-ide-settings
{
class:
(
'expanded'
if
expanded_by_default?
)
}
%section
.settings.as-realtime.no-animate
#js-realtime-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Real-time features'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Change this value to influence how frequently the GitLab UI polls for updates.'
)
.settings-content
=
render
'realtime'
%section
.settings.as-performance.no-animate
#js-performance-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Performance optimization'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Various settings that affect GitLab performance.'
)
.settings-content
=
render
'performance'
%section
.settings.as-ip-limits.no-animate
#js-ip-limits-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'User and IP Rate Limits'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure limits for web and API requests.'
)
.settings-content
=
render
'ip_limits'
%section
.settings.as-outbound.no-animate
#js-outbound-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Outbound requests'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Allow requests to the local network from hooks and services.'
)
.settings-content
=
render
'outbound'
%section
.settings.as-mirror.no-animate
#js-mirror-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Repository mirror'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Configure push and pull mirrors.'
)
.settings-content
=
render
partial:
'repository_mirrors_form'
=
render_if_exists
'admin/application_settings/geo'
,
expanded:
expanded
=
render_if_exists
'admin/application_settings/external_authorization_service_form'
,
expanded:
expanded
=
render_if_exists
'admin/application_settings/elasticsearch_form'
,
expanded:
expanded
=
render_if_exists
'admin/application_settings/slack'
,
expanded:
expanded
=
render_if_exists
'admin/application_settings/templates'
,
expanded:
expanded
%section
.settings.as-third-party-offers.no-animate
#js-third-party-offers-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Third party offers'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Control the display of third party offers.'
)
.settings-content
=
render
'third_party_offers'
,
application_setting:
@application_setting
=
render_if_exists
'admin/application_settings/custom_templates_form'
,
expanded:
expanded
%section
.settings.no-animate
#js-web-ide-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Web IDE'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
_by_default?
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Manage Web IDE features'
)
.settings-content
...
...
@@ -104,3 +381,5 @@
=
s_
(
'IDE|Allow live previews of JavaScript projects in the Web IDE using CodeSandbox client side evaluation.'
)
=
f
.
submit
_
(
'Save changes'
),
class:
"btn btn-success"
=
render_if_exists
'admin/application_settings/pseudonymizer_settings'
,
expanded:
expanded
app/views/layouts/nav/sidebar/_admin.html.haml
View file @
04408ec2
...
...
@@ -246,54 +246,10 @@
=
sprite_icon
(
'settings'
)
%span
.nav-item-name
=
_
(
'Settings'
)
%ul
.sidebar-sub-level-items
%ul
.sidebar-sub-level-items.is-fly-out-only
=
nav_link
(
controller: :application_settings
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
admin_application_settings_path
do
%strong
.fly-out-top-item-name
=
_
(
'Settings'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#show'
)
do
=
link_to
admin_application_settings_path
,
title:
_
(
'General'
)
do
%span
=
_
(
'General'
)
=
nav_link
(
path:
'application_settings#integrations'
)
do
=
link_to
integrations_admin_application_settings_path
,
title:
_
(
'Integrations'
)
do
%span
=
_
(
'Integrations'
)
=
nav_link
(
path:
'application_settings#repository'
)
do
=
link_to
repository_admin_application_settings_path
,
title:
_
(
'Repository'
)
do
%span
=
_
(
'Repository'
)
-
if
template_exists?
(
'admin/application_settings/templates'
)
=
nav_link
(
path:
'application_settings#templates'
)
do
=
link_to
templates_admin_application_settings_path
,
title:
_
(
'Templates'
)
do
%span
=
_
(
'Templates'
)
=
nav_link
(
path:
'application_settings#ci_cd'
)
do
=
link_to
ci_cd_admin_application_settings_path
,
title:
_
(
'CI/CD'
)
do
%span
=
_
(
'CI/CD'
)
=
nav_link
(
path:
'application_settings#reporting'
)
do
=
link_to
reporting_admin_application_settings_path
,
title:
_
(
'Reporting'
)
do
%span
=
_
(
'Reporting'
)
=
nav_link
(
path:
'application_settings#metrics_and_profiling'
)
do
=
link_to
metrics_and_profiling_admin_application_settings_path
,
title:
_
(
'Metrics and profiling'
)
do
%span
=
_
(
'Metrics and profiling'
)
=
nav_link
(
path:
'application_settings#network'
)
do
=
link_to
network_admin_application_settings_path
,
title:
_
(
'Network'
)
do
%span
=
_
(
'Network'
)
-
if
template_exists?
(
'admin/application_settings/geo'
)
=
nav_link
(
path:
'application_settings#geo'
)
do
=
link_to
geo_admin_application_settings_path
,
title:
_
(
'Geo'
)
do
%span
=
_
(
'Geo'
)
=
nav_link
(
path:
'application_settings#preferences'
)
do
=
link_to
preferences_admin_application_settings_path
,
title:
_
(
'Preferences'
)
do
%span
=
_
(
'Preferences'
)
=
render
'shared/sidebar_toggle_button'
changelogs/unreleased/44998-split-admin-settings-into-multiple-sub-pages.yml
deleted
100644 → 0
View file @
d01079cd
---
title
:
Split admin settings into multiple sub pages
merge_request
:
21467
author
:
type
:
other
config/routes/admin.rb
View file @
04408ec2
...
...
@@ -124,7 +124,6 @@ namespace :admin do
put
:reset_runners_token
put
:reset_health_check_token
put
:clear_repository_check_states
get
:integrations
,
:repository
,
:templates
,
:ci_cd
,
:reporting
,
:metrics_and_profiling
,
:network
,
:geo
,
:preferences
end
## EE-specific
...
...
ee/app/views/admin/application_settings/_snowplow.html.haml
View file @
04408ec2
%section
.settings.as-snowplow.no-animate
#js-snowplow-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Snowplow
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Configure the %{link} integration.'
).
html_safe
%
{
link:
link_to
(
'Snowplow'
,
'https://snowplowanalytics.com/'
,
target:
'_blank'
)
}
.settings-content
=
form_for
@application_setting
,
url:
admin_application_settings_path
,
html:
{
class:
'fieldset-form'
}
do
|
f
|
=
form_errors
(
@application_setting
)
=
form_for
@application_setting
,
url:
admin_application_settings_path
,
html:
{
class:
'fieldset-form'
}
do
|
f
|
=
form_errors
(
@application_setting
)
%fieldset
.form-group
.form-check
=
f
.
check_box
:snowplow_enabled
,
class:
'form-check-input'
=
f
.
label
:snowplow_enabled
,
class:
'form-check-label'
do
Enable Snowplow
.form-group
=
f
.
label
:snowplow_collector_uri
,
'Collector URI'
,
class:
'label-light'
=
f
.
text_field
:snowplow_collector_uri
,
class:
'form-control'
,
placeholder:
'snowplow.example.com'
.form-group
=
f
.
label
:snowplow_site_id
,
class:
'label-light'
do
Site ID
=
f
.
text_field
:snowplow_site_id
,
class:
'form-control'
.form-group
=
f
.
label
:snowplow_cookie_domain
,
class:
'label-light'
do
Cookie domain
=
f
.
text_field
:snowplow_cookie_domain
,
class:
'form-control'
%fieldset
.form-group
.form-check
=
f
.
check_box
:snowplow_enabled
,
class:
'form-check-input'
=
f
.
label
:snowplow_enabled
,
class:
'form-check-label'
do
Enable Snowplow
.form-group
=
f
.
label
:snowplow_collector_uri
,
'Collector URI'
,
class:
'label-light'
=
f
.
text_field
:snowplow_collector_uri
,
class:
'form-control'
,
placeholder:
'snowplow.example.com'
.form-group
=
f
.
label
:snowplow_site_id
,
class:
'label-light'
do
Site ID
=
f
.
text_field
:snowplow_site_id
,
class:
'form-control'
.form-group
=
f
.
label
:snowplow_cookie_domain
,
class:
'label-light'
do
Cookie domain
=
f
.
text_field
:snowplow_cookie_domain
,
class:
'form-control'
=
f
.
submit
'Save changes'
,
class:
'btn btn-success'
=
f
.
submit
'Save changes'
,
class:
'btn btn-success'
ee/app/views/admin/application_settings/geo.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Geo"
)
-
page_title
_
(
"Geo"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render_if_exists
'admin/application_settings/geo'
,
expanded:
expanded_by_default?
ee/app/views/admin/application_settings/templates.html.haml
deleted
100644 → 0
View file @
d01079cd
-
breadcrumb_title
_
(
"Templates"
)
-
page_title
_
(
"Templates"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render_if_exists
'admin/application_settings/templates'
,
expanded:
expanded_by_default?
=
render_if_exists
'admin/application_settings/custom_templates_form'
,
expanded:
expanded_by_default?
ee/spec/features/admin/admin_settings_spec.rb
View file @
04408ec2
...
...
@@ -7,10 +7,10 @@ describe 'Admin updates EE-only settings' do
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
sign_in
(
create
(
:admin
))
allow
(
License
).
to
receive
(
:feature_available?
).
and_return
(
true
)
visit
admin_application_settings_path
end
it
'Modify GitLab Geo settings'
do
visit
geo_admin_application_settings_path
page
.
within
(
'.as-geo'
)
do
fill_in
'Connection timeout'
,
with:
15
click_button
'Save changes'
...
...
@@ -21,7 +21,6 @@ describe 'Admin updates EE-only settings' do
end
it
'Enable external authentication'
do
visit
admin_application_settings_path
page
.
within
(
'.as-external-auth'
)
do
check
'Enable classification control using an external service'
fill_in
'Default classification label'
,
with:
'default'
...
...
@@ -32,7 +31,6 @@ describe 'Admin updates EE-only settings' do
end
it
'Enable elastic search indexing'
do
visit
integrations_admin_application_settings_path
page
.
within
(
'.as-elasticsearch'
)
do
check
'Elasticsearch indexing'
click_button
'Save changes'
...
...
@@ -43,9 +41,8 @@ describe 'Admin updates EE-only settings' do
end
it
'Enable Slack application'
do
visit
integrations_admin_application_settings_path
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
visit
integrations_
admin_application_settings_path
visit
admin_application_settings_path
page
.
within
(
'.as-slack'
)
do
check
'Enable Slack application'
...
...
@@ -54,22 +51,4 @@ describe 'Admin updates EE-only settings' do
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
context
'Templates page'
do
before
do
visit
templates_admin_application_settings_path
end
it
'Render "Templates" section'
do
page
.
within
(
'.as-visibility-access'
)
do
expect
(
page
).
to
have_content
"Templates"
end
end
it
'Render "Custom project templates" section'
do
page
.
within
(
'.as-custom-project-templates'
)
do
expect
(
page
).
to
have_content
"Custom project templates"
end
end
end
end
ee/spec/features/ci_shared_runner_settings_spec.rb
View file @
04408ec2
...
...
@@ -47,7 +47,7 @@ describe 'CI shared runner settings' do
end
def
set_admin_shared_runners_minutes
(
limit
)
visit
ci_cd_
admin_application_settings_path
visit
admin_application_settings_path
page
.
within
(
'.as-ci-cd'
)
do
fill_in
'application_setting_shared_runners_minutes'
,
with:
limit
...
...
locale/gitlab.pot
View file @
04408ec2
...
...
@@ -2115,7 +2115,7 @@ msgstr ""
msgid "Configure limits for web and API requests."
msgstr ""
msgid "Configure push mirrors."
msgid "Configure push
and pull
mirrors."
msgstr ""
msgid "Configure storage path and circuit breaker settings."
...
...
@@ -3347,9 +3347,6 @@ msgstr ""
msgid "Generate a default set of labels"
msgstr ""
msgid "Geo"
msgstr ""
msgid "Geo Nodes"
msgstr ""
...
...
@@ -4681,9 +4678,6 @@ msgstr ""
msgid "Metrics - Prometheus"
msgstr ""
msgid "Metrics and profiling"
msgstr ""
msgid "Metrics|Business"
msgstr ""
...
...
@@ -6313,9 +6307,6 @@ msgstr ""
msgid "Repo by URL"
msgstr ""
msgid "Reporting"
msgstr ""
msgid "Reports|%{failedString} and %{resolvedString}"
msgstr ""
...
...
qa/qa/page/admin/settings/main.rb
View file @
04408ec2
...
...
@@ -6,11 +6,11 @@ module QA
include
QA
::
Page
::
Settings
::
Common
view
'app/views/admin/application_settings/show.html.haml'
do
element
:
terms
_settings
element
:
repository_storage
_settings
end
def
expand_repository_storage
(
&
block
)
expand_section
(
:
terms
_settings
)
do
expand_section
(
:
repository_storage
_settings
)
do
RepositoryStorage
.
perform
(
&
block
)
end
end
...
...
spec/features/admin/admin_settings_spec.rb
View file @
04408ec2
...
...
@@ -9,400 +9,365 @@ describe 'Admin updates settings' do
before
do
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
sign_in
(
admin
)
visit
admin_application_settings_path
end
context
'General page'
do
before
do
visit
admin_application_settings_path
it
'Change visibility settings'
do
page
.
within
(
'.as-visibility-access'
)
do
choose
"application_setting_default_project_visibility_20"
click_button
'Save changes'
end
it
'Change visibility settings'
do
page
.
within
(
'.as-visibility-access'
)
do
choose
"application_setting_default_project_visibility_20"
click_button
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
it
'Uncheck all restricted visibility levels'
do
page
.
within
(
'.as-visibility-access'
)
do
find
(
'#application_setting_visibility_level_0'
).
set
(
false
)
find
(
'#application_setting_visibility_level_10'
).
set
(
false
)
find
(
'#application_setting_visibility_level_20'
).
set
(
false
)
click_button
'Save changes'
end
it
'Uncheck all restricted visibility levels'
do
page
.
within
(
'.as-visibility-access'
)
do
find
(
'#application_setting_visibility_level_0'
).
set
(
false
)
find
(
'#application_setting_visibility_level_10'
).
set
(
false
)
find
(
'#application_setting_visibility_level_20'
).
set
(
false
)
click_button
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
find
(
'#application_setting_visibility_level_0'
)).
not_to
be_checked
expect
(
find
(
'#application_setting_visibility_level_10'
)).
not_to
be_checked
expect
(
find
(
'#application_setting_visibility_level_20'
)).
not_to
be_checked
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
find
(
'#application_setting_visibility_level_0'
)).
not_to
be_checked
expect
(
find
(
'#application_setting_visibility_level_10'
)).
not_to
be_checked
expect
(
find
(
'#application_setting_visibility_level_20'
)).
not_to
be_checked
end
it
'Modify import sources'
do
expect
(
Gitlab
::
CurrentSettings
.
import_sources
).
not_to
be_empty
describe
'LDAP settings'
do
context
'with LDAP enabled'
do
it
'Change allow group owners to manage ldap'
do
allow
(
Gitlab
::
Auth
::
LDAP
::
Config
).
to
receive
(
:enabled?
).
and_return
(
true
)
visit
admin_application_settings_path
page
.
within
(
'.as-visibility-access'
)
do
Gitlab
::
ImportSources
.
options
.
map
do
|
name
,
_
|
uncheck
name
page
.
within
(
'.as-visibility-access'
)
do
find
(
'#application_setting_allow_group_owners_to_manage_ldap'
).
set
(
false
)
click_button
'Save'
end
click_button
'Save changes'
expect
(
page
).
to
have_content
(
'Application settings saved successfully'
)
expect
(
find
(
'#application_setting_allow_group_owners_to_manage_ldap'
)).
not_to
be_checked
end
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
import_sources
).
to
be_empty
context
'with LDAP disabled'
do
it
'Does not show option to allow group owners to manage ldap'
do
visit
admin_application_settings_path
page
.
within
(
'.as-visibility-access'
)
do
check
"Repo by URL"
click_button
'Save changes'
expect
(
page
).
not_to
have_css
(
'#application_setting_allow_group_owners_to_manage_ldap'
)
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
import_sources
).
to
eq
([
'git'
])
end
end
it
'Change Visibility and Access Controls'
do
page
.
within
(
'.as-visibility-access'
)
do
uncheck
'Project export enabled'
click_button
'Save changes'
it
'Modify import sources'
do
expect
(
Gitlab
::
CurrentSettings
.
import_sources
).
not_to
be_empty
page
.
within
(
'.as-visibility-access'
)
do
Gitlab
::
ImportSources
.
options
.
map
do
|
name
,
_
|
uncheck
name
end
expect
(
Gitlab
::
CurrentSettings
.
project_export_enabled
).
to
be_falsey
expect
(
page
).
to
have_content
"Application settings saved successfully"
click_button
'Save changes'
end
it
'Change Keys settings'
do
page
.
within
(
'.as-visibility-access'
)
do
select
'Are forbidden'
,
from:
'RSA SSH keys'
select
'Are allowed'
,
from:
'DSA SSH keys'
select
'Must be at least 384 bits'
,
from:
'ECDSA SSH keys'
select
'Are forbidden'
,
from:
'ED25519 SSH keys'
click_on
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
import_sources
).
to
be_empty
page
.
within
(
'.as-visibility-access'
)
do
check
"Repo by URL"
click_button
'Save changes'
end
forbidden
=
ApplicationSetting
::
FORBIDDEN_KEY_VALUE
.
to_s
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
import_sources
).
to
eq
([
'git'
])
end
expect
(
page
).
to
have_content
'Application settings saved successfully'
expect
(
find_field
(
'RSA SSH keys'
).
value
).
to
eq
(
forbidden
)
expect
(
find_field
(
'DSA SSH keys'
).
value
).
to
eq
(
'0'
)
expect
(
find_field
(
'ECDSA SSH keys'
).
value
).
to
eq
(
'384'
)
expect
(
find_field
(
'ED25519 SSH keys'
).
value
).
to
eq
(
forbidden
)
it
'Change Visibility and Access Controls'
do
page
.
within
(
'.as-visibility-access'
)
do
uncheck
'Project export enabled'
click_button
'Save changes'
end
it
'Change Account and Limit Settings'
do
page
.
within
(
'.as-account-limit'
)
do
uncheck
'Gravatar enabled'
click_button
'Save changes'
end
expect
(
Gitlab
::
CurrentSettings
.
project_export_enabled
).
to
be_falsey
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
Gitlab
::
CurrentSettings
.
gravatar_enabled
).
to
be_falsey
expect
(
page
).
to
have_content
"Application settings saved successfully"
it
'Change Account and Limit Settings'
do
page
.
within
(
'.as-account-limit'
)
do
uncheck
'Gravatar enabled'
click_button
'Save changes'
end
it
'Change New users set to external'
,
:js
do
user_internal_regex
=
find
(
'#application_setting_user_default_internal_regex'
,
visible: :all
)
expect
(
Gitlab
::
CurrentSettings
.
gravatar_enabled
).
to
be_falsey
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
user_internal_regex
).
to
be_readonly
expect
(
user_internal_regex
[
'placeholder'
]).
to
eq
'To define internal users, first enable new users set to external'
it
'Change New users set to external'
,
:js
do
user_internal_regex
=
find
(
'#application_setting_user_default_internal_regex'
,
visible: :all
)
check
'application_setting_user_default_external'
expect
(
user_internal_regex
).
to
be_readonly
expect
(
user_internal_regex
[
'placeholder'
]).
to
eq
'To define internal users, first enable new users set to external'
expect
(
user_internal_regex
).
not_to
be_readonly
expect
(
user_internal_regex
[
'placeholder'
]).
to
eq
'Regex pattern'
end
check
'application_setting_user_default_external'
it
'Change Sign-in restrictions'
do
page
.
within
(
'.as-signin'
)
do
fill_in
'Home page URL'
,
with:
'https://about.gitlab.com/'
click_button
'Save changes'
end
expect
(
user_internal_regex
).
not_to
be_readonly
expect
(
user_internal_regex
[
'placeholder'
]).
to
eq
'Regex pattern'
end
expect
(
Gitlab
::
CurrentSettings
.
home_page_url
).
to
eq
"https://about.gitlab.com/"
expect
(
page
).
to
have_content
"Application settings saved successfully"
it
'Change Sign-in restrictions'
do
page
.
within
(
'.as-signin'
)
do
fill_in
'Home page URL'
,
with:
'https://about.gitlab.com/'
click_button
'Save changes'
end
it
'Terms of Service'
do
# Already have the admin accept terms, so they don't need to accept in this spec.
_existing_terms
=
create
(
:term
)
accept_terms
(
admin
)
expect
(
Gitlab
::
CurrentSettings
.
home_page_url
).
to
eq
"https://about.gitlab.com/"
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
page
.
within
(
'.as-terms'
)
do
check
'Require all users to accept Terms of Service and Privacy Policy when they access GitLab.'
fill_in
'Terms of Service Agreement'
,
with:
'Be nice!'
click_button
'Save changes'
end
it
'Terms of Service'
do
# Already have the admin accept terms, so they don't need to accept in this spec.
_existing_terms
=
create
(
:term
)
accept_terms
(
admin
)
expect
(
Gitlab
::
CurrentSettings
.
enforce_terms
).
to
be
(
true
)
expect
(
Gitlab
::
CurrentSettings
.
terms
).
to
eq
'Be nice!'
expect
(
page
).
to
have_content
'Application settings saved successfully'
page
.
within
(
'.as-terms'
)
do
check
'Require all users to accept Terms of Service and Privacy Policy when they access GitLab.'
fill_in
'Terms of Service Agreement'
,
with:
'Be nice!'
click_button
'Save changes'
end
it
'Modify oauth providers'
do
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
be_empty
expect
(
Gitlab
::
CurrentSettings
.
enforce_terms
).
to
be
(
true
)
expect
(
Gitlab
::
CurrentSettings
.
terms
).
to
eq
'Be nice!'
expect
(
page
).
to
have_content
'Application settings saved successfully'
end
page
.
within
(
'.as-signin'
)
do
uncheck
'Google'
click_button
'Save changes'
end
it
'Modify oauth providers'
do
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
be_empty
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
include
(
'google_oauth2'
)
page
.
within
(
'.as-signin'
)
do
uncheck
'Google'
click_button
'Save changes'
end
page
.
within
(
'.as-signin'
)
do
check
"Google"
click_button
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
include
(
'google_oauth2'
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
not_to
include
(
'google_oauth2'
)
page
.
within
(
'.as-signin'
)
do
check
"Google"
click_button
'Save changes'
end
it
'Oauth providers do not raise validation errors when saving unrelated changes'
do
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
be_empty
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
not_to
include
(
'google_oauth2'
)
end
page
.
within
(
'.as-signin'
)
do
uncheck
'Google'
click_button
'Save changes'
end
it
'Oauth providers do not raise validation errors when saving unrelated changes'
do
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
be_empty
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
include
(
'google_oauth2'
)
page
.
within
(
'.as-signin'
)
do
uncheck
'Google'
click_button
'Save changes'
end
# Remove google_oauth2 from the Omniauth strategies
allow
(
Devise
).
to
receive
(
:omniauth_providers
).
and_return
([]
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
include
(
'google_oauth2'
)
# Save an unrelated setting
page
.
within
(
'.as-terms'
)
do
click_button
'Save changes'
end
# Remove google_oauth2 from the Omniauth strategies
allow
(
Devise
).
to
receive
(
:omniauth_providers
).
and_return
([])
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
include
(
'google_oauth2'
)
# Save an unrelated setting
page
.
within
(
'.as-ci-cd'
)
do
click_button
'Save changes'
end
it
'Configure web terminal'
do
page
.
within
(
'.as-terminal'
)
do
fill_in
'Max session time'
,
with:
15
click_button
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
terminal_max_session_time
).
to
eq
(
15
)
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
disabled_oauth_sign_in_sources
).
to
include
(
'google_oauth2'
)
end
describe
'LDAP settings'
do
context
'with LDAP enabled'
do
it
'Change allow group owners to manage ldap'
do
allow
(
Gitlab
::
Auth
::
LDAP
::
Config
).
to
receive
(
:enabled?
).
and_return
(
true
)
visit
admin_application_settings_path
page
.
within
(
'.as-visibility-access'
)
do
find
(
'#application_setting_allow_group_owners_to_manage_ldap'
).
set
(
false
)
click_button
'Save'
end
expect
(
page
).
to
have_content
(
'Application settings saved successfully'
)
expect
(
find
(
'#application_setting_allow_group_owners_to_manage_ldap'
)).
not_to
be_checked
end
it
'Change Help page'
do
page
.
within
(
'.as-help-page'
)
do
fill_in
'Help page text'
,
with:
'Example text'
check
'Hide marketing-related entries from help'
fill_in
'Support page URL'
,
with:
'http://example.com/help'
click_button
'Save changes'
end
context
'with LDAP disabled'
do
it
'Does not show option to allow group owners to manage ldap'
do
visit
admin_application_settings_path
expect
(
page
).
not_to
have_css
(
'#application_setting_allow_group_owners_to_manage_ldap'
)
end
end
expect
(
Gitlab
::
CurrentSettings
.
help_page_text
).
to
eq
"Example text"
expect
(
Gitlab
::
CurrentSettings
.
help_page_hide_commercial_content
).
to
be_truthy
expect
(
Gitlab
::
CurrentSettings
.
help_page_support_url
).
to
eq
"http://example.com/help"
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
context
'Integrations page'
do
before
do
visit
integrations_admin_application_settings_path
it
'Change Pages settings'
do
page
.
within
(
'.as-pages'
)
do
fill_in
'Maximum size of pages (MB)'
,
with:
15
check
'Require users to prove ownership of custom domains'
click_button
'Save changes'
end
it
'Enable hiding third party offers'
do
page
.
within
(
'.as-third-party-offers'
)
do
check
'Do not display offers from third parties within GitLab'
click_button
'Save changes'
end
expect
(
Gitlab
::
CurrentSettings
.
max_pages_size
).
to
eq
15
expect
(
Gitlab
::
CurrentSettings
.
pages_domain_verification_enabled?
).
to
be_truthy
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
hide_third_party_offers
).
to
be
true
it
'Change CI/CD settings'
do
page
.
within
(
'.as-ci-cd'
)
do
check
'Default to Auto DevOps pipeline for all projects'
fill_in
'Auto devops domain'
,
with:
'domain.com'
click_button
'Save changes'
end
it
'Change Slack Notifications Service template settings'
do
first
(
:link
,
'Service Templates'
).
click
click_link
'Slack notifications'
fill_in
'Webhook'
,
with:
'http://localhost'
fill_in
'Username'
,
with:
'test_user'
fill_in
'service_push_channel'
,
with:
'#test_channel'
page
.
check
(
'Notify only broken pipelines'
)
page
.
check
(
'Notify only default branch'
)
check_all_events
click_on
'Save'
expect
(
Gitlab
::
CurrentSettings
.
auto_devops_enabled?
).
to
be
true
expect
(
Gitlab
::
CurrentSettings
.
auto_devops_domain
).
to
eq
(
'domain.com'
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
page
).
to
have_content
'Application settings saved successfully'
it
'Change Influx settings'
do
page
.
within
(
'.as-influx'
)
do
check
'Enable InfluxDB Metrics'
click_button
'Save changes'
end
click_link
'Slack notifications'
expect
(
Gitlab
::
CurrentSettings
.
metrics_enabled?
).
to
be
true
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
page
.
all
(
'input[type=checkbox]'
).
each
do
|
checkbox
|
expect
(
checkbox
).
to
be_checked
end
expect
(
find_field
(
'Webhook'
).
value
).
to
eq
'http://localhost'
expect
(
find_field
(
'Username'
).
value
).
to
eq
'test_user'
expect
(
find
(
'#service_push_channel'
).
value
).
to
eq
'#test_channel'
it
'Change Prometheus settings'
do
page
.
within
(
'.as-prometheus'
)
do
check
'Enable Prometheus Metrics'
click_button
'Save changes'
end
end
context
'CI/CD page'
do
it
'Change CI/CD settings'
do
visit
ci_cd_admin_application_settings_path
expect
(
Gitlab
::
CurrentSettings
.
prometheus_metrics_enabled?
).
to
be
true
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
page
.
within
(
'.as-ci-cd'
)
do
check
'Default to Auto DevOps pipeline for all projects'
fill_in
'Auto devops domain'
,
with:
'domain.com'
click_button
'Save changes'
end
it
'Change Performance bar settings'
do
group
=
create
(
:group
)
expect
(
Gitlab
::
CurrentSettings
.
auto_devops_enabled?
).
to
be
true
expect
(
Gitlab
::
CurrentSettings
.
auto_devops_domain
).
to
eq
(
'domain.com'
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
page
.
within
(
'.as-performance-bar'
)
do
check
'Enable the Performance Bar'
fill_in
'Allowed group'
,
with:
group
.
path
click_on
'Save changes'
end
end
context
'Reporting page'
do
it
'Change Spam settings'
do
visit
reporting_admin_application_settings_path
page
.
within
(
'.as-spam'
)
do
check
'Enable reCAPTCHA'
fill_in
'reCAPTCHA Site Key'
,
with:
'key'
fill_in
'reCAPTCHA Private Key'
,
with:
'key'
fill_in
'IPs per user'
,
with:
15
click_button
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
find_field
(
'Enable the Performance Bar'
)).
to
be_checked
expect
(
find_field
(
'Allowed group'
).
value
).
to
eq
group
.
path
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
recaptcha_enabled
).
to
be
true
expect
(
Gitlab
::
CurrentSettings
.
unique_ips_limit_per_user
).
to
eq
(
15
)
page
.
within
(
'.as-performance-bar'
)
do
uncheck
'Enable the Performance Bar'
click_on
'Save changes'
end
expect
(
page
).
to
have_content
'Application settings saved successfully'
expect
(
find_field
(
'Enable the Performance Bar'
)).
not_to
be_checked
expect
(
find_field
(
'Allowed group'
).
value
).
to
be_nil
end
context
'Metrics and profiling page'
do
before
do
visit
metrics_and_profiling_admin_application_settings_path
it
'Change Background jobs settings'
do
page
.
within
(
'.as-background'
)
do
fill_in
'Throttling Factor'
,
with:
1
click_button
'Save changes'
end
it
'Change Influx settings'
do
page
.
within
(
'.as-influx'
)
do
check
'Enable InfluxDB Metrics'
click_button
'Save changes'
end
expect
(
Gitlab
::
CurrentSettings
.
sidekiq_throttling_factor
).
to
eq
(
1
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
Gitlab
::
CurrentSettings
.
metrics_enabled?
).
to
be
true
expect
(
page
).
to
have_content
"Application settings saved successfully"
it
'Change Spam settings'
do
page
.
within
(
'.as-spam'
)
do
check
'Enable reCAPTCHA'
fill_in
'reCAPTCHA Site Key'
,
with:
'key'
fill_in
'reCAPTCHA Private Key'
,
with:
'key'
fill_in
'IPs per user'
,
with:
15
click_button
'Save changes'
end
it
'Change Prometheus settings'
do
page
.
within
(
'.as-prometheus'
)
do
check
'Enable Prometheus Metrics'
click_button
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
recaptcha_enabled
).
to
be
true
expect
(
Gitlab
::
CurrentSettings
.
unique_ips_limit_per_user
).
to
eq
(
15
)
end
expect
(
Gitlab
::
CurrentSettings
.
prometheus_metrics_enabled?
).
to
be
true
expect
(
page
).
to
have_content
"Application settings saved successfully"
it
'Configure web terminal'
do
page
.
within
(
'.as-terminal'
)
do
fill_in
'Max session time'
,
with:
15
click_button
'Save changes'
end
it
'Change Performance bar settings'
do
group
=
create
(
:group
)
page
.
within
(
'.as-performance-bar'
)
do
check
'Enable the Performance Bar'
fill_in
'Allowed group'
,
with:
group
.
path
click_on
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
terminal_max_session_time
).
to
eq
(
15
)
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
find_field
(
'Enable the Performance Bar'
)).
to
be_checked
expect
(
find_field
(
'Allowed group'
).
value
).
to
eq
group
.
path
it
'Enable outbound requests'
do
page
.
within
(
'.as-outbound'
)
do
check
'Allow requests to the local network from hooks and services'
click_button
'Save changes'
end
page
.
within
(
'.as-performance-bar'
)
do
uncheck
'Enable the Performance Bar'
click_on
'Save changes'
end
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
allow_local_requests_from_hooks_and_services
).
to
be
true
end
expect
(
page
).
to
have_content
'Application settings saved successfully'
expect
(
find_field
(
'Enable the Performance Bar'
)).
not_to
be_checked
expect
(
find_field
(
'Allowed group'
).
value
).
to
be_nil
it
'Enable hiding third party offers'
do
page
.
within
(
'.as-third-party-offers'
)
do
check
'Do not display offers from third parties within GitLab'
click_button
'Save changes'
end
it
'loads usage ping payload on click'
,
:js
do
expect
(
page
).
to
have_button
'Preview payload'
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
hide_third_party_offers
).
to
be
true
end
find
(
'.js-usage-ping-payload-trigger'
).
click
it
'Change Slack Notifications Service template settings'
do
first
(
:link
,
'Service Templates'
).
click
click_link
'Slack notifications'
fill_in
'Webhook'
,
with:
'http://localhost'
fill_in
'Username'
,
with:
'test_user'
fill_in
'service_push_channel'
,
with:
'#test_channel'
page
.
check
(
'Notify only broken pipelines'
)
page
.
check
(
'Notify only default branch'
)
expect
(
page
).
to
have_selector
'.js-usage-ping-payload'
expect
(
page
).
to
have_button
'Hide payload'
end
end
check_all_events
click_on
'Save'
context
'Network page'
do
it
'Enable outbound requests'
do
visit
network_admin_application_settings_path
expect
(
page
).
to
have_content
'Application settings saved successfully'
page
.
within
(
'.as-outbound'
)
do
check
'Allow requests to the local network from hooks and services'
click_button
'Save changes'
end
click_link
'Slack notifications'
expect
(
page
).
to
have_content
"Application settings saved successfully"
expect
(
Gitlab
::
CurrentSettings
.
allow_local_requests_from_hooks_and_services
).
to
be
true
page
.
all
(
'input[type=checkbox]'
).
each
do
|
checkbox
|
expect
(
checkbox
).
to
be_checked
end
expect
(
find_field
(
'Webhook'
).
value
).
to
eq
'http://localhost'
expect
(
find_field
(
'Username'
).
value
).
to
eq
'test_user'
expect
(
find
(
'#service_push_channel'
).
value
).
to
eq
'#test_channel'
end
context
'Preferences page'
do
before
do
visit
preferences_admin_application_settings_path
it
'Change Keys settings'
do
page
.
within
(
'.as-visibility-access'
)
do
select
'Are forbidden'
,
from:
'RSA SSH keys'
select
'Are allowed'
,
from:
'DSA SSH keys'
select
'Must be at least 384 bits'
,
from:
'ECDSA SSH keys'
select
'Are forbidden'
,
from:
'ED25519 SSH keys'
click_on
'Save changes'
end
it
'Change Help page'
do
page
.
within
(
'.as-help-page'
)
do
fill_in
'Help page text'
,
with:
'Example text'
check
'Hide marketing-related entries from help'
fill_in
'Support page URL'
,
with:
'http://example.com/help'
click_button
'Save changes'
end
forbidden
=
ApplicationSetting
::
FORBIDDEN_KEY_VALUE
.
to_s
expect
(
Gitlab
::
CurrentSettings
.
help_page_text
).
to
eq
"Example text"
expect
(
Gitlab
::
CurrentSettings
.
help_page_hide_commercial_content
).
to
be_truthy
expect
(
Gitlab
::
CurrentSettings
.
help_page_support_url
).
to
eq
"http://example.com/help"
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
it
'Change Pages settings'
do
page
.
within
(
'.as-pages'
)
do
fill_in
'Maximum size of pages (MB)'
,
with:
15
check
'Require users to prove ownership of custom domains'
click_button
'Save changes'
end
expect
(
page
).
to
have_content
'Application settings saved successfully'
expect
(
find_field
(
'RSA SSH keys'
).
value
).
to
eq
(
forbidden
)
expect
(
find_field
(
'DSA SSH keys'
).
value
).
to
eq
(
'0'
)
expect
(
find_field
(
'ECDSA SSH keys'
).
value
).
to
eq
(
'384'
)
expect
(
find_field
(
'ED25519 SSH keys'
).
value
).
to
eq
(
forbidden
)
end
expect
(
Gitlab
::
CurrentSettings
.
max_pages_size
).
to
eq
15
expect
(
Gitlab
::
CurrentSettings
.
pages_domain_verification_enabled?
).
to
be_truthy
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
it
'loads usage ping payload on click'
,
:js
do
expect
(
page
).
to
have_button
'Preview payload'
it
'Change Background jobs settings'
do
page
.
within
(
'.as-background'
)
do
fill_in
'Throttling Factor'
,
with:
1
click_button
'Save changes'
end
find
(
'.js-usage-ping-payload-trigger'
).
click
expect
(
Gitlab
::
CurrentSettings
.
sidekiq_throttling_factor
).
to
eq
(
1
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
expect
(
page
).
to
have_selector
'.js-usage-ping-payload'
expect
(
page
).
to
have_button
'Hide payload'
end
def
check_all_events
...
...
spec/features/admin/admin_uses_repository_checks_spec.rb
View file @
04408ec2
...
...
@@ -33,7 +33,7 @@ describe 'Admin uses repository checks' do
end
it
'to clear all repository checks'
,
:js
do
visit
repository_
admin_application_settings_path
visit
admin_application_settings_path
expect
(
RepositoryCheck
::
ClearWorker
).
to
receive
(
:perform_async
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment