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
03092f3d
Commit
03092f3d
authored
Feb 25, 2020
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address minor review comments
parent
bc8266dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
ee/app/assets/javascripts/analytics/cycle_analytics/components/custom_stage_form.vue
...nalytics/cycle_analytics/components/custom_stage_form.vue
+11
-6
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/custom_stage_form.vue
View file @
03092f3d
...
@@ -38,7 +38,7 @@ export const initializeFormData = ({ emptyFieldState, initialFields, errors }) =
...
@@ -38,7 +38,7 @@ export const initializeFormData = ({ emptyFieldState, initialFields, errors }) =
:
{
:
{
...
emptyFieldState
,
...
emptyFieldState
,
endEventIdentifier
:
endEventIdentifier
:
initialFields
&&
!
initialFields
?
.
startEventIdentifier
initialFields
&&
!
initialFields
.
startEventIdentifier
?
[
s__
(
'
CustomCycleAnalytics|Please select a start event first
'
)]
?
[
s__
(
'
CustomCycleAnalytics|Please select a start event first
'
)]
:
null
,
:
null
,
};
};
...
@@ -97,10 +97,15 @@ export default {
...
@@ -97,10 +97,15 @@ export default {
},
},
data
()
{
data
()
{
const
{
initialFields
=
{},
errors
=
null
}
=
this
;
const
{
initialFields
=
{},
errors
=
null
}
=
this
;
const
formData
=
initializeFormData
({
emptyFieldState
:
defaultFields
,
initialFields
,
errors
});
const
{
fields
,
fieldErrors
}
=
initializeFormData
({
emptyFieldState
:
defaultFields
,
initialFields
,
errors
,
});
return
{
return
{
labelEvents
:
getLabelEventsIdentifiers
(
this
.
events
),
labelEvents
:
getLabelEventsIdentifiers
(
this
.
events
),
...
formData
,
fields
,
fieldErrors
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -130,7 +135,7 @@ export default {
...
@@ -130,7 +135,7 @@ export default {
hasErrors
()
{
hasErrors
()
{
return
(
return
(
this
.
eventMismatchError
||
this
.
eventMismatchError
||
Object
.
values
(
this
.
fieldErrors
).
some
(
errArray
=>
errArray
&&
errArray
.
length
)
Object
.
values
(
this
.
fieldErrors
).
some
(
errArray
=>
errArray
?
.
length
)
);
);
},
},
isComplete
()
{
isComplete
()
{
...
@@ -281,7 +286,6 @@ export default {
...
@@ -281,7 +286,6 @@ export default {
:label=
"s__('CustomCycleAnalytics|Name')"
:label=
"s__('CustomCycleAnalytics|Name')"
:state=
"!hasFieldErrors('name')"
:state=
"!hasFieldErrors('name')"
:invalid-feedback=
"fieldErrorMessage('name')"
:invalid-feedback=
"fieldErrorMessage('name')"
@
change.native=
"onUpdateNameField"
>
>
<gl-form-input
<gl-form-input
v-model=
"fields.name"
v-model=
"fields.name"
...
@@ -290,6 +294,7 @@ export default {
...
@@ -290,6 +294,7 @@ export default {
name=
"custom-stage-name"
name=
"custom-stage-name"
:placeholder=
"s__('CustomCycleAnalytics|Enter a name for the stage')"
:placeholder=
"s__('CustomCycleAnalytics|Enter a name for the stage')"
required
required
@
change.native=
"onUpdateNameField"
/>
/>
</gl-form-group>
</gl-form-group>
<div
class=
"d-flex"
:class=
"{ 'justify-content-between': startEventRequiresLabel }"
>
<div
class=
"d-flex"
:class=
"{ 'justify-content-between': startEventRequiresLabel }"
>
...
@@ -333,7 +338,6 @@ export default {
...
@@ -333,7 +338,6 @@ export default {
:label=
"s__('CustomCycleAnalytics|Stop event')"
:label=
"s__('CustomCycleAnalytics|Stop event')"
:state=
"!hasFieldErrors('endEventIdentifier')"
:state=
"!hasFieldErrors('endEventIdentifier')"
:invalid-feedback=
"fieldErrorMessage('endEventIdentifier')"
:invalid-feedback=
"fieldErrorMessage('endEventIdentifier')"
@
change.native=
"onUpdateEndEventField"
>
>
<gl-form-select
<gl-form-select
v-model=
"fields.endEventIdentifier"
v-model=
"fields.endEventIdentifier"
...
@@ -341,6 +345,7 @@ export default {
...
@@ -341,6 +345,7 @@ export default {
:options=
"endEventOptions"
:options=
"endEventOptions"
:required=
"true"
:required=
"true"
:disabled=
"!hasStartEvent"
:disabled=
"!hasStartEvent"
@
change.native=
"onUpdateEndEventField"
/>
/>
</gl-form-group>
</gl-form-group>
</div>
</div>
...
...
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