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
17515f04
Commit
17515f04
authored
Feb 25, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a shared partial for integrations
Allows reuse across project / group / admin
parent
f28eb919
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
app/assets/stylesheets/utilities.scss
app/assets/stylesheets/utilities.scss
+1
-0
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+7
-0
app/views/admin/application_settings/integrations.html.haml
app/views/admin/application_settings/integrations.html.haml
+7
-1
app/views/projects/services/_integrations.html.haml
app/views/projects/services/_integrations.html.haml
+26
-0
No files found.
app/assets/stylesheets/utilities.scss
View file @
17515f04
...
...
@@ -81,3 +81,4 @@
.gl-text-green-700
{
@include
gl-text-green-700
;
}
.gl-align-items-center
{
@include
gl-align-items-center
;
}
.d-sm-revert
{
display
:
revert
!
important
;
}
app/controllers/admin/application_settings_controller.rb
View file @
17515f04
...
...
@@ -27,6 +27,13 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
define_method
(
action
)
{
perform_update
if
submitted?
}
end
def
integrations
perform_update
if
submitted?
# TODO: Update this with actual integrations
@integrations
=
Project
.
first
.
find_or_initialize_services
.
sort_by
(
&
:title
)
end
def
update
perform_update
end
...
...
app/views/admin/application_settings/integrations.html.haml
View file @
17515f04
...
...
@@ -4,7 +4,7 @@
-
if
Feature
.
enabled?
(
:instance_level_integrations
)
-
if
show_admin_integrations_moved?
.gl-alert.gl-alert-tip.js-admin-integrations-moved.
prepend-top-default
{
role:
'alert'
,
data:
{
feature_id:
UserCalloutsHelper
::
ADMIN_INTEGRATIONS_MOVED
,
dismiss_endpoint:
user_callouts_path
}
}
.gl-alert.gl-alert-tip.js-admin-integrations-moved.
mt-3
{
role:
'alert'
,
data:
{
feature_id:
UserCalloutsHelper
::
ADMIN_INTEGRATIONS_MOVED
,
dismiss_endpoint:
user_callouts_path
}
}
=
sprite_icon
(
'bulb'
,
size:
16
,
css_class:
'gl-icon gl-alert-icon gl-alert-icon-no-title'
)
%button
.js-close.gl-alert-dismiss
{
type:
'button'
,
'aria-label'
=>
_
(
'Dismiss'
)
}
=
sprite_icon
(
'close'
,
size:
16
,
css_class:
'gl-icon'
)
...
...
@@ -14,6 +14,12 @@
.gl-alert-actions
=
link_to
_
(
'Go to Settings'
),
admin_application_settings_path
,
class:
'btn gl-alert-action new-gl-button'
%h4
=
s_
(
'Integrations|Apply integration settings to all Projects'
)
%p
=
s_
(
'Integrations|Integrations configured here will automatically apply to all projects on this instance.'
)
=
link_to
_
(
'Learn more'
),
'#'
=
render
'projects/services/integrations'
-
else
=
render_if_exists
'admin/application_settings/elasticsearch_form'
=
render
'admin/application_settings/plantuml'
...
...
app/views/projects/services/_integrations.html.haml
0 → 100644
View file @
17515f04
%table
.table.b-table.gl-table.mt-3
{
role:
'table'
,
'aria-busy'
:
false
,
'aria-colcount'
:
4
}
%colgroup
%col
%col
%col
.d-none.d-sm-revert
%col
{
width:
120
}
%thead
{
role:
'rowgroup'
}
%tr
{
role:
'row'
}
%th
{
role:
'columnheader'
,
scope:
'col'
,
'aria-colindex'
:
1
}
%th
{
role:
'columnheader'
,
scope:
'col'
,
'aria-colindex'
:
2
}=
_
(
'Integration'
)
%th
.d-none.d-sm-block
{
role:
'columnheader'
,
scope:
'col'
,
'aria-colindex'
:
3
}=
_
(
'Description'
)
%th
{
role:
'columnheader'
,
scope:
'col'
,
'aria-colindex'
:
4
}=
_
(
'Last updated'
)
%tbody
{
role:
'rowgroup'
}
-
@integrations
.
each
do
|
integration
|
%tr
{
role:
'row'
}
%td
{
role:
'cell'
,
'aria-colindex'
:
1
}
=
boolean_to_icon
integration
.
activated?
%td
{
role:
'cell'
,
'aria-colindex'
:
2
}
=
link_to
'#'
do
%strong
=
integration
.
title
%td
.d-none.d-sm-block
{
role:
'cell'
,
'aria-colindex'
:
3
}
=
integration
.
description
%td
{
role:
'cell'
,
'aria-colindex'
:
4
}
-
if
integration
.
updated_at
.
present?
=
time_ago_with_tooltip
integration
.
updated_at
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