Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Frontend
Commits
a0e31ad2
Commit
a0e31ad2
authored
2 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove nested form tag in WorkerConfiguration modal
parent
3c936721
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1468
Remove nested form tag in WorkerConfiguration modal
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Process/Workers/Configurations/Form.vue
+52
-54
52 additions, 54 deletions
src/components/Process/Workers/Configurations/Form.vue
with
52 additions
and
54 deletions
src/components/Process/Workers/Configurations/Form.vue
+
52
−
54
View file @
a0e31ad2
<
template
>
<form>
<div
class=
"field"
>
<label
class=
"label"
>
Name
</label>
<input
class=
"input"
type=
"text"
v-model=
"newConfiguration.name"
v-on:update=
"$emit('update:modelValue', newConfiguration)"
<div
class=
"field"
>
<label
class=
"label"
>
Name
</label>
<input
class=
"input"
type=
"text"
v-model=
"newConfiguration.name"
v-on:update=
"$emit('update:modelValue', newConfiguration)"
:disabled=
"loading || null"
/>
</div>
<span
v-if=
"schema"
>
<input
id=
"JSONStringSwitch"
type=
"checkbox"
class=
"switch is-rtl is-rounded is-info"
:checked=
"JSONStringToggled"
v-on:change=
"toggleJSONStringMode"
/>
<label
class=
"is-pulled-right"
for=
"JSONStringSwitch"
>
JSON
</label>
</span>
<div
class=
"field"
v-if=
"JSONStringMode"
>
<label
class=
"label"
>
JSON payload
</label>
<div
class=
"control"
>
<textarea
class=
"textarea is-family-monospace"
:class=
"
{ 'is-danger': Boolean(JSONConfigError) }"
v-model="stringConfiguration"
:disabled="loading || null"
/>
placeholder="{}"
>
</textarea>
<p
class=
"help is-danger"
v-if=
"JSONConfigError"
>
{{
JSONConfigError
}}
</p>
<p
class=
"help"
v-else
>
You can define here any JSON object that will be made available to the worker when it runs.
</p>
</div>
<span
v-if=
"schema"
>
<input
id=
"JSONStringSwitch"
type=
"checkbox"
class=
"switch is-rtl is-rounded is-info"
:checked=
"JSONStringToggled"
v-on:change=
"toggleJSONStringMode"
/>
<label
class=
"is-pulled-right"
for=
"JSONStringSwitch"
>
JSON
</label>
</span>
<div
class=
"field"
v-if=
"JSONStringMode"
>
<label
class=
"label"
>
JSON payload
</label>
<div
class=
"control"
>
<textarea
class=
"textarea is-family-monospace"
:class=
"
{ 'is-danger': Boolean(JSONConfigError) }"
v-model="stringConfiguration"
:disabled="loading || null"
placeholder="{}"
>
</textarea>
<p
class=
"help is-danger"
v-if=
"JSONConfigError"
>
{{
JSONConfigError
}}
</p>
<p
class=
"help"
v-else
>
You can define here any JSON object that will be made available to the worker when it runs.
</p>
</div>
<div
class=
"mb-3"
v-else-if=
"Object.keys(newConfiguration.configuration).length"
>
<label
class=
"label"
>
Configuration
</label>
<div
class=
"field"
v-for=
"(field, key) in schema"
:key=
"key"
:field=
"field"
>
<label
class=
"field-label is-normal"
>
{{
field
.
title
}}
</label>
<div
class=
"field-body"
>
<component
v-if=
"FIELDS[field.type]"
:is=
"FIELDS[field.type].component"
:field=
"field"
:field-id=
"key"
:class=
"
{ 'is-danger': Boolean(configurationErrors[key]) }"
v-model="newConfiguration.configuration[key]"
/>
</div>
<p
class=
"help is-danger"
v-if=
"configurationErrors[key]"
>
{{
configurationErrors
[
key
]
}}
</p>
</div>
<form
class=
"mb-3"
v-else-if=
"Object.keys(newConfiguration.configuration).length"
>
<label
class=
"label"
>
Configuration
</label>
<div
class=
"field"
v-for=
"(field, key) in schema"
:key=
"key"
:field=
"field"
>
<label
class=
"field-label is-normal"
>
{{
field
.
title
}}
</label>
<div
class=
"field-body"
>
<component
v-if=
"FIELDS[field.type]"
:is=
"FIELDS[field.type].component"
:field=
"field"
:field-id=
"key"
:class=
"
{ 'is-danger': Boolean(configurationErrors[key]) }"
v-model="newConfiguration.configuration[key]"
/>
</div>
<p
class=
"help is-danger"
v-if=
"configurationErrors[key]"
>
{{
configurationErrors
[
key
]
}}
</p>
</div>
</form>
</form>
</div>
</
template
>
<
script
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment