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
4416de25
Commit
4416de25
authored
Dec 13, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address reviewer feedback
- simplify button disabled state - rename loading state variables
parent
ad6db20c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
21 deletions
+15
-21
app/assets/javascripts/integrations/edit/components/integration_form.vue
...scripts/integrations/edit/components/integration_form.vue
+15
-21
No files found.
app/assets/javascripts/integrations/edit/components/integration_form.vue
View file @
4416de25
...
...
@@ -53,8 +53,8 @@ export default {
data
()
{
return
{
integrationActive
:
false
,
testingLoad
ing
:
false
,
saveLoad
ing
:
false
,
isTest
ing
:
false
,
isSav
ing
:
false
,
};
},
computed
:
{
...
...
@@ -78,14 +78,8 @@ export default {
showTestButton
()
{
return
this
.
propsSource
.
canTest
;
},
disableSaveButton
()
{
return
Boolean
(
this
.
isResetting
||
this
.
testingLoading
);
},
disableResetButton
()
{
return
Boolean
(
this
.
isSaving
||
this
.
testingLoading
);
},
disableTestButton
()
{
return
Boolean
(
this
.
isResetting
||
this
.
saveLoading
);
disableButtons
()
{
return
Boolean
(
this
.
isSaving
||
this
.
isResetting
||
this
.
isTesting
);
},
},
mounted
()
{
...
...
@@ -95,10 +89,10 @@ export default {
methods
:
{
...
mapActions
([
'
setOverride
'
,
'
fetchResetIntegration
'
,
'
requestJiraIssueTypes
'
]),
onSaveClick
()
{
this
.
saveLoad
ing
=
true
;
this
.
isSav
ing
=
true
;
if
(
this
.
integrationActive
&&
!
this
.
form
.
checkValidity
())
{
this
.
saveLoad
ing
=
false
;
this
.
isSav
ing
=
false
;
eventHub
.
$emit
(
VALIDATE_INTEGRATION_FORM_EVENT
);
return
;
}
...
...
@@ -106,7 +100,7 @@ export default {
this
.
form
.
submit
();
},
onTestClick
()
{
this
.
testingLoad
ing
=
true
;
this
.
isTest
ing
=
true
;
if
(
!
this
.
form
.
checkValidity
())
{
eventHub
.
$emit
(
VALIDATE_INTEGRATION_FORM_EVENT
);
...
...
@@ -128,7 +122,7 @@ export default {
Sentry
.
captureException
(
error
);
})
.
finally
(()
=>
{
this
.
testingLoad
ing
=
false
;
this
.
isTest
ing
=
false
;
});
},
onResetClick
()
{
...
...
@@ -212,8 +206,8 @@ export default {
v-gl-modal
.
confirmSaveIntegration
category=
"primary"
variant=
"confirm"
:loading=
"
saveLoad
ing"
:disabled=
"disable
SaveButton
"
:loading=
"
isSav
ing"
:disabled=
"disable
Buttons
"
data-qa-selector=
"save_changes_button"
>
{{
__
(
'
Save changes
'
)
}}
...
...
@@ -225,8 +219,8 @@ export default {
category=
"primary"
variant=
"confirm"
type=
"submit"
:loading=
"
saveLoad
ing"
:disabled=
"disable
SaveButton
"
:loading=
"
isSav
ing"
:disabled=
"disable
Buttons
"
data-testid=
"save-button"
data-qa-selector=
"save_changes_button"
@
click.prevent=
"onSaveClick"
...
...
@@ -238,8 +232,8 @@ export default {
v-if=
"showTestButton"
category=
"secondary"
variant=
"confirm"
:loading=
"
testingLoad
ing"
:disabled=
"disable
TestButton
"
:loading=
"
isTest
ing"
:disabled=
"disable
Buttons
"
data-testid=
"test-button"
@
click.prevent=
"onTestClick"
>
...
...
@@ -252,7 +246,7 @@ export default {
category=
"secondary"
variant=
"confirm"
:loading=
"isResetting"
:disabled=
"disable
ResetButton
"
:disabled=
"disable
Buttons
"
data-testid=
"reset-button"
>
{{
__
(
'
Reset
'
)
}}
...
...
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