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
0f52db38
Commit
0f52db38
authored
6 years ago
by
Jacob Schatz
Committed by
Micaël Bergeron
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated based on feedback.
parent
1595907a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
22 deletions
+50
-22
app/views/admin/application_settings/_elt_database_cron_job.html.haml
...min/application_settings/_elt_database_cron_job.html.haml
+10
-6
app/views/admin/application_settings/show.html.haml
app/views/admin/application_settings/show.html.haml
+11
-10
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
ee/app/helpers/ee/application_settings_helper.rb
ee/app/helpers/ee/application_settings_helper.rb
+16
-0
ee/app/models/ee/application_setting.rb
ee/app/models/ee/application_setting.rb
+6
-2
ee/app/models/license.rb
ee/app/models/license.rb
+2
-1
ee/lib/assets/pseudonymity_dump.yml
ee/lib/assets/pseudonymity_dump.yml
+0
-2
lib/tasks/gitlab/db.rake
lib/tasks/gitlab/db.rake
+4
-0
No files found.
app/views/admin/application_settings/_elt_database_cron_job.html.haml
View file @
0f52db38
...
...
@@ -4,16 +4,20 @@
%fieldset
.form-group.row
.offset-sm-2.col-sm-10
-
can_be_configured
=
@application_setting
.
elt_database_dump_can_be_configured?
-
is_enabled
=
@application_setting
.
elt_database_dump_enabled?
-
is_available
=
@application_setting
.
elt_database_dump_available?
.form-check
=
f
.
label
:elt_database_dump_enabled
do
=
f
.
check_box
:elt_database_dump_enabled
,
disabled:
!
can_be_configured
Enable
ELT
Database Cron Job
=
f
.
check_box
:elt_database_dump_enabled
,
disabled:
!
is_available
Enable
Meltano
Database Cron Job
.form-text.text-muted
-
if
can_be_configur
ed
GitLab will run a cron job which will send pseudoanonymized data to be processed and analyzed.
-
if
is_enabl
ed
=
meltano_elt_description_text
-
else
The ELT database cron job is disabled. When enabled the cron job will send pseudoanonymized data to be processed and analyzed.
-
if
is_available
=
meltano_elt_disabled_description_text
-
else
=
meltano_elt_unavailable_description_text
=
f
.
submit
'Save changes'
,
class:
"btn btn-success"
This diff is collapsed.
Click to expand it.
app/views/admin/application_settings/show.html.haml
View file @
0f52db38
...
...
@@ -237,16 +237,17 @@
.settings-content
=
render
'usage'
%section
.settings.as-usage.no-animate
#js-elt-database-dump-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'ELT Database Cron Job'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable or disable ELT Database Cron Job.'
)
.settings-content
=
render
'elt_database_cron_job'
-
if
meltano_elt_database_dump_enabled?
%section
.settings.as-usage.no-animate
#js-elt-database-dump-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Meltano ELT Database Cron Job'
)
%button
.btn.btn-default.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
=
_
(
'Enable or disable Meltano ELT Database Cron Job.'
)
.settings-content
=
render
'elt_database_cron_job'
%section
.settings.as-email.no-animate
#js-email-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
...
...
This diff is collapsed.
Click to expand it.
config/initializers/1_settings.rb
View file @
0f52db38
...
...
@@ -162,7 +162,7 @@ Settings.gitlab['import_sources'] ||= Gitlab::ImportSources.values
Settings
.
gitlab
[
'trusted_proxies'
]
||=
[]
Settings
.
gitlab
[
'no_todos_messages'
]
||=
YAML
.
load_file
(
Rails
.
root
.
join
(
'config'
,
'no_todos_messages.yml'
))
Settings
.
gitlab
[
'usage_ping_enabled'
]
=
true
if
Settings
.
gitlab
[
'usage_ping_enabled'
].
nil?
Settings
.
gitlab
[
'elt_database_dump_enabled'
]
=
tru
e
if
Settings
.
gitlab
[
'elt_database_dump_enabled'
].
nil?
Settings
.
gitlab
[
'elt_database_dump_enabled'
]
=
fals
e
if
Settings
.
gitlab
[
'elt_database_dump_enabled'
].
nil?
#
# Elasticseacrh
...
...
This diff is collapsed.
Click to expand it.
ee/app/helpers/ee/application_settings_helper.rb
View file @
0f52db38
...
...
@@ -35,6 +35,22 @@ module EE
"and the value is encrypted at rest."
)
end
def
meltano_elt_database_dump_enabled?
return
License
.
feature_available?
:meltano_elt_database_dump
end
def
meltano_elt_description_text
_
(
"GitLab will run the Meltano ELT cron job which will send pseudoanonymized data to be processed and analyzed."
)
end
def
meltano_elt_disabled_description_text
_
(
"The Meltano ELT database cron job is disabled. When enabled the cron job will send pseudoanonymized data to be processed and analyzed."
)
end
def
meltano_elt_unavailable_description_text
_
(
"The Meltano ELT database cron job is disabled. Once enabled, the cron job will send pseudoanonymized data to be processed and analyzed."
)
end
override
:visible_attributes
def
visible_attributes
super
+
[
...
...
This diff is collapsed.
Click to expand it.
ee/app/models/ee/application_setting.rb
View file @
0f52db38
...
...
@@ -106,11 +106,15 @@ module EE
end
end
def
elt_database_dump_available?
License
.
feature_available?
:meltano_elt_database_dump
end
def
elt_database_dump_can_be_configured?
Settings
.
gitlab
.
elt_database_dump_enabled
Settings
.
gitlab
.
elt_database_dump_enabled
&&
License
.
feature_available?
(
:meltano_elt_database_dump
)
end
def
elt_database_dump_enabled
def
elt_database_dump_enabled
?
elt_database_dump_can_be_configured?
&&
super
end
...
...
This diff is collapsed.
Click to expand it.
ee/app/models/license.rb
View file @
0f52db38
...
...
@@ -30,7 +30,8 @@ class License < ActiveRecord::Base
related_issues
repository_mirrors
repository_size_limit
scoped_issue_board
scoped_issue_board,
meltano_elt_database_dump
]
.
freeze
EEP_FEATURES
=
EES_FEATURES
+
%i[
...
...
This diff is collapsed.
Click to expand it.
ee/lib/assets/pseudonymity_dump.yml
View file @
0f52db38
output
:
csv
:
'
/tmp/'
tables
:
approvals
:
whitelist
:
...
...
This diff is collapsed.
Click to expand it.
lib/tasks/gitlab/db.rake
View file @
0f52db38
...
...
@@ -46,6 +46,10 @@ namespace :gitlab do
desc
'Configures the database by running migrate, or by loading the schema and seeding if needed'
task
configure: :environment
do
unless
License
.
feature_available?
:meltano_elt_database_dump
raise
"The Meltano ELT extract is not available with this license."
end
if
ActiveRecord
::
Base
.
connection
.
tables
.
any?
Rake
::
Task
[
'db:migrate'
].
invoke
else
...
...
This diff is collapsed.
Click to expand it.
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