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
61f46c69
Commit
61f46c69
authored
Jan 18, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move integrations settings layout to Vue
parent
c41c5383
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
90 deletions
+90
-90
app/assets/javascripts/integrations/edit/components/integration_form.vue
...scripts/integrations/edit/components/integration_form.vue
+83
-75
app/views/projects/services/_form.html.haml
app/views/projects/services/_form.html.haml
+4
-9
app/views/shared/integrations/_form.html.haml
app/views/shared/integrations/_form.html.haml
+3
-6
No files found.
app/assets/javascripts/integrations/edit/components/integration_form.vue
View file @
61f46c69
...
@@ -95,10 +95,7 @@ export default {
...
@@ -95,10 +95,7 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div
class=
"gl-mb-3"
>
<!-- helpHtml is trusted input -->
<div
v-if=
"helpHtml"
v-safe-html:
[$
options.helpHtmlConfig]=
"helpHtml"
></div>
<override-dropdown
<override-dropdown
v-if=
"defaultState !== null"
v-if=
"defaultState !== null"
:inherit-from-id=
"defaultState.id"
:inherit-from-id=
"defaultState.id"
...
@@ -107,80 +104,91 @@ export default {
...
@@ -107,80 +104,91 @@ export default {
@
change=
"setOverride"
@
change=
"setOverride"
/>
/>
<active-checkbox
v-if=
"propsSource.showActive"
:key=
"`$
{currentKey}-active-checkbox`" />
<div
class=
"row"
>
<jira-trigger-fields
<div
class=
"col-lg-4"
></div>
v-if=
"isJira"
:key=
"`$
{currentKey}-jira-trigger-fields`"
<div
class=
"col-lg-8"
>
v-bind="propsSource.triggerFieldsProps"
<!-- helpHtml is trusted input -->
/>
<div
v-if=
"helpHtml"
v-safe-html:
[$
options.helpHtmlConfig]=
"helpHtml"
></div>
<trigger-fields
v-else-if=
"propsSource.triggerEvents.length"
<active-checkbox
v-if=
"propsSource.showActive"
:key=
"`$
{currentKey}-active-checkbox`" />
:key=
"`$
{currentKey}-trigger-fields`"
<jira-trigger-fields
:events="propsSource.triggerEvents"
v-if=
"isJira"
:type="propsSource.type"
:key=
"`$
{currentKey}-jira-trigger-fields`"
/>
v-bind="propsSource.triggerFieldsProps"
<dynamic-field
/>
v-for=
"field in propsSource.fields"
<trigger-fields
:key=
"`$
{currentKey}-${field.name}`"
v-else-if=
"propsSource.triggerEvents.length"
v-bind="field"
:key=
"`$
{currentKey}-trigger-fields`"
/>
:events="propsSource.triggerEvents"
<jira-issues-fields
:type="propsSource.type"
v-if=
"showJiraIssuesFields"
/>
:key=
"`$
{currentKey}-jira-issues-fields`"
<dynamic-field
v-bind="propsSource.jiraIssuesProps"
v-for=
"field in propsSource.fields"
/>
:key=
"`$
{currentKey}-${field.name}`"
<div
v-if=
"isEditable"
class=
"footer-block row-content-block"
>
v-bind="field"
<template
v-if=
"isInstanceOrGroupLevel"
>
/>
<gl-button
<jira-issues-fields
v-gl-modal
.
confirmSaveIntegration
v-if=
"showJiraIssuesFields"
category=
"primary"
:key=
"`$
{currentKey}-jira-issues-fields`"
variant=
"success"
v-bind="propsSource.jiraIssuesProps"
:loading=
"isSaving"
/>
:disabled=
"isDisabled"
<div
v-if=
"isEditable"
class=
"footer-block row-content-block"
>
data-qa-selector=
"save_changes_button"
<template
v-if=
"isInstanceOrGroupLevel"
>
>
<gl-button
{{
__
(
'
Save changes
'
)
}}
v-gl-modal
.
confirmSaveIntegration
</gl-button>
category=
"primary"
<confirmation-modal
@
submit=
"onSaveClick"
/>
variant=
"success"
</
template
>
:loading=
"isSaving"
<gl-button
:disabled=
"isDisabled"
v-else
data-qa-selector=
"save_changes_button"
category=
"primary"
>
variant=
"success"
{{
__
(
'
Save changes
'
)
}}
type=
"submit"
</gl-button>
:loading=
"isSaving"
<confirmation-modal
@
submit=
"onSaveClick"
/>
:disabled=
"isDisabled"
</
template
>
data-qa-selector=
"save_changes_button"
<gl-button
@
click.prevent=
"onSaveClick"
v-else
>
category=
"primary"
{{ __('Save changes') }}
variant=
"success"
</gl-button>
type=
"submit"
:loading=
"isSaving"
:disabled=
"isDisabled"
data-qa-selector=
"save_changes_button"
@
click.prevent=
"onSaveClick"
>
{{ __('Save changes') }}
</gl-button>
<gl-button
<gl-button
v-if=
"propsSource.canTest"
v-if=
"propsSource.canTest"
:loading=
"isTesting"
:loading=
"isTesting"
:disabled=
"isDisabled"
:disabled=
"isDisabled"
:href=
"propsSource.testPath"
:href=
"propsSource.testPath"
@
click.prevent=
"onTestClick"
@
click.prevent=
"onTestClick"
>
>
{{ __('Test settings') }}
{{ __('Test settings') }}
</gl-button>
</gl-button>
<
template
v-if=
"showReset"
>
<
template
v-if=
"showReset"
>
<gl-button
<gl-button
v-gl-modal
.
confirmResetIntegration
v-gl-modal
.
confirmResetIntegration
category=
"secondary"
category=
"secondary"
variant=
"default"
variant=
"default"
:loading=
"isResetting"
:loading=
"isResetting"
:disabled=
"isDisabled"
:disabled=
"isDisabled"
data-testid=
"reset-button"
data-testid=
"reset-button"
>
>
{{
__
(
'
Reset
'
)
}}
{{
__
(
'
Reset
'
)
}}
</gl-button>
</gl-button>
<reset-confirmation-modal
@
reset=
"onResetClick"
/>
<reset-confirmation-modal
@
reset=
"onResetClick"
/>
</
template
>
</
template
>
<gl-button
class=
"btn-cancel"
:href=
"propsSource.cancelPath"
>
{{ __('Cancel') }}
</gl-button>
<gl-button
class=
"btn-cancel"
:href=
"propsSource.cancelPath"
>
{{
__('Cancel')
}}
</gl-button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
app/views/projects/services/_form.html.haml
View file @
61f46c69
-
if
lookup_context
.
template_exists?
(
'top'
,
"projects/services/
#{
@service
.
to_param
}
"
,
true
)
-
if
lookup_context
.
template_exists?
(
'top'
,
"projects/services/
#{
@service
.
to_param
}
"
,
true
)
=
render
"projects/services/
#{
@service
.
to_param
}
/top"
=
render
"projects/services/
#{
@service
.
to_param
}
/top"
%h3
.page-title
.gl-mt-3
%h3
.page-title
=
@service
.
title
=
@service
.
title
-
if
@service
.
operating?
-
if
@service
.
operating?
=
sprite_icon
(
'check'
,
css_class:
'gl-text-green-500'
)
=
sprite_icon
(
'check'
,
css_class:
'gl-text-green-500'
)
.row.gl-mb-3
=
form_for
(
@service
,
as: :service
,
url:
scoped_integration_path
(
@service
),
method: :put
,
html:
{
class:
'gl-show-field-errors integration-settings-form js-integration-settings-form'
,
data:
{
'test-url'
=>
test_project_service_path
(
@project
,
@service
)
}
})
do
|
form
|
.col-lg-4
=
render
'shared/service_settings'
,
form:
form
,
integration:
@service
-
if
@service
.
respond_to?
(
:detailed_description
)
%input
{
id:
'services_redirect_to'
,
type:
'hidden'
,
name:
'redirect_to'
,
value:
request
.
referrer
}
%p
=
@service
.
detailed_description
.col-lg-8
=
form_for
(
@service
,
as: :service
,
url:
scoped_integration_path
(
@service
),
method: :put
,
html:
{
class:
'gl-show-field-errors integration-settings-form js-integration-settings-form'
,
data:
{
'test-url'
=>
test_project_service_path
(
@project
,
@service
)
}
})
do
|
form
|
=
render
'shared/service_settings'
,
form:
form
,
integration:
@service
%input
{
id:
'services_redirect_to'
,
type:
'hidden'
,
name:
'redirect_to'
,
value:
request
.
referrer
}
-
if
lookup_context
.
template_exists?
(
'show'
,
"projects/services/
#{
@service
.
to_param
}
"
,
true
)
-
if
lookup_context
.
template_exists?
(
'show'
,
"projects/services/
#{
@service
.
to_param
}
"
,
true
)
%hr
%hr
...
...
app/views/shared/integrations/_form.html.haml
View file @
61f46c69
-
integration
=
local_assigns
.
fetch
(
:integration
)
-
integration
=
local_assigns
.
fetch
(
:integration
)
%h3
.page-title
.gl-mt-3
%h3
.page-title
=
integration
.
title
=
integration
.
title
.row
=
form_for
integration
,
as: :service
,
url:
scoped_integration_path
(
integration
),
method: :put
,
html:
{
class:
'gl-show-field-errors integration-settings-form js-integration-settings-form'
,
data:
{
'test-url'
=>
scoped_test_integration_path
(
integration
)
}
}
do
|
form
|
.col-lg-4
=
render
'shared/service_settings'
,
form:
form
,
integration:
integration
.col-lg-8
=
form_for
integration
,
as: :service
,
url:
scoped_integration_path
(
integration
),
method: :put
,
html:
{
class:
'gl-show-field-errors integration-settings-form js-integration-settings-form'
,
data:
{
'test-url'
=>
scoped_test_integration_path
(
integration
)
}
}
do
|
form
|
=
render
'shared/service_settings'
,
form:
form
,
integration:
integration
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