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
39f0069d
Commit
39f0069d
authored
Mar 23, 2021
by
Justin Ho
Committed by
Tom Quirk
Apr 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move integrations list to Vue
Using GlTable
parent
f379f644
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
0 deletions
+110
-0
app/assets/javascripts/integrations/index/components/integrations_list.vue
...ripts/integrations/index/components/integrations_list.vue
+29
-0
app/assets/javascripts/integrations/index/components/integrations_table.vue
...ipts/integrations/index/components/integrations_table.vue
+38
-0
app/assets/javascripts/integrations/index/index.js
app/assets/javascripts/integrations/index/index.js
+23
-0
app/assets/javascripts/pages/projects/settings/integrations/show/index.js
...cripts/pages/projects/settings/integrations/show/index.js
+3
-0
app/helpers/services_helper.rb
app/helpers/services_helper.rb
+15
-0
app/views/shared/integrations/_index.html.haml
app/views/shared/integrations/_index.html.haml
+2
-0
No files found.
app/assets/javascripts/integrations/index/components/integrations_list.vue
0 → 100644
View file @
39f0069d
<
script
>
import
IntegrationsTable
from
'
./integrations_table.vue
'
;
export
default
{
name
:
'
IntegrationsList
'
,
components
:
{
IntegrationsTable
,
},
props
:
{
integrations
:
{
type
:
Array
,
required
:
true
,
},
},
computed
:
{
activeIntegrations
()
{
// TODO filter
return
this
.
integrations
;
},
},
};
</
script
>
<
template
>
<div>
<integrations-table
:integrations=
"activeIntegrations"
/>
<div>
{{
integrations
}}
</div>
</div>
</
template
>
app/assets/javascripts/integrations/index/components/integrations_table.vue
0 → 100644
View file @
39f0069d
<
script
>
import
{
GlTable
}
from
'
@gitlab/ui
'
;
export
default
{
components
:
{
GlTable
,
},
props
:
{
integrations
:
{
type
:
Array
,
required
:
true
,
},
},
fields
:
[
{
key
:
'
active
'
,
label
:
''
,
},
{
key
:
'
name
'
,
label
:
'
Integration
'
,
},
{
key
:
'
description
'
,
label
:
'
Description
'
,
},
{
key
:
'
updated_at
'
,
label
:
'
Last edit
'
,
},
],
};
</
script
>
<
template
>
<gl-table
:items=
"integrations"
:fields=
"$options.fields"
/>
<!--
</gl-table>
-->
</
template
>
app/assets/javascripts/integrations/index/index.js
0 → 100644
View file @
39f0069d
import
Vue
from
'
vue
'
;
import
IntegrationList
from
'
./components/integrations_list.vue
'
;
export
default
()
=>
{
const
el
=
document
.
querySelector
(
'
.js-integrations-list
'
);
if
(
!
el
)
{
return
null
;
}
const
{
integrations
}
=
el
.
dataset
;
return
new
Vue
({
el
,
render
(
createElement
)
{
return
createElement
(
IntegrationList
,
{
props
:
{
integrations
:
JSON
.
parse
(
integrations
),
},
});
},
});
};
app/assets/javascripts/pages/projects/settings/integrations/show/index.js
View file @
39f0069d
import
initIntegrationsList
from
'
~/integrations/index
'
;
import
PersistentUserCallout
from
'
~/persistent_user_callout
'
;
const
callout
=
document
.
querySelector
(
'
.js-webhooks-moved-alert
'
);
PersistentUserCallout
.
factory
(
callout
);
initIntegrationsList
();
app/helpers/services_helper.rb
View file @
39f0069d
...
...
@@ -115,6 +115,12 @@ module ServicesHelper
form_data
end
def
integration_list_data
(
integrations
)
{
integrations:
integrations
.
map
{
|
i
|
serialize_integration
(
i
)
}.
to_json
}
end
def
trigger_events_for_service
(
integration
)
ServiceEventSerializer
.
new
(
service:
integration
).
represent
(
integration
.
configurable_events
).
to_json
end
...
...
@@ -155,6 +161,15 @@ module ServicesHelper
'project'
end
end
def
serialize_integration
(
integration
)
{
active:
integration
.
activated?
,
name:
integration
.
title
,
description:
integration
.
description
,
updated_at:
integration
.
updated_at
}
end
end
ServicesHelper
.
prepend_if_ee
(
'EE::ServicesHelper'
)
...
...
app/views/shared/integrations/_index.html.haml
View file @
39f0069d
.js-integrations-list
{
data:
integration_list_data
(
integrations
)
}
%table
.table.b-table.gl-table
{
role:
'table'
,
'aria-busy'
:
false
,
'aria-colcount'
:
4
}
%colgroup
%col
...
...
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