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
96682442
Commit
96682442
authored
10 months ago
by
ml bonhomme
Committed by
Erwan Rouchet
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Change menu items order + throw unsupported action error
parent
83cf5f80
No related branches found
No related tags found
1 merge request
!1683
Add separator + confirm modals in the process status actions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Process/Status/Status.vue
+36
-36
36 additions, 36 deletions
src/components/Process/Status/Status.vue
with
36 additions
and
36 deletions
src/components/Process/Status/Status.vue
+
36
−
36
View file @
96682442
...
...
@@ -32,40 +32,6 @@
</div>
<div
class=
"dropdown-menu"
>
<div
class=
"dropdown-content"
>
<template
v-if=
"finishedProcess"
>
<a
class=
"dropdown-item"
:class=
"!hasAdminAccess ? 'is-disabled' : ''"
v-if=
"isVerified"
v-on:click=
"retryAction"
:title=
"hasAdminAccess ? 'Retry this entire process' : 'An admin access is required to retry this process'"
>
<i
class=
"icon-undo"
></i>
Retry process
</a>
<hr
class=
"navbar-divider"
/>
<router-link
v-if=
"process.element"
class=
"dropdown-item"
:to=
"
{ name: 'element-details', params: { id: process.element.id } }"
>
<i
class=
"icon-arrow-right"
></i>
View element
</router-link>
</
template
>
<
template
v-else-if=
"activeProcess"
>
<a
class=
"dropdown-item has-text-danger"
:class=
"!isVerified ? 'is-disabled' : ''"
v-if=
"isVerified"
v-on:click=
"stopAction"
:title=
"hasAdminAccess ? 'Stop this process' : 'An admin access is required to stop this process'"
>
<i
class=
"icon-minus"
></i>
Stop process
</a>
<hr
class=
"navbar-divider"
/>
</
template
>
<router-link
:to=
"hasActivities ?
{ name: 'process-workers-activity', params: { processId: process.id } } : ''"
class="dropdown-item"
...
...
@@ -100,6 +66,40 @@
</a>
</
template
>
</TemplateCreation>
<
template
v-if=
"finishedProcess"
>
<router-link
v-if=
"process.element"
class=
"dropdown-item"
:to=
"
{ name: 'element-details', params: { id: process.element.id } }"
>
<i
class=
"icon-arrow-right"
></i>
View element
</router-link>
<hr
class=
"navbar-divider"
/>
<a
class=
"dropdown-item"
:class=
"!hasAdminAccess ? 'is-disabled' : ''"
v-if=
"isVerified"
v-on:click=
"retryAction"
:title=
"hasAdminAccess ? 'Retry this entire process' : 'An admin access is required to retry this process'"
>
<i
class=
"icon-undo"
></i>
Retry process
</a>
</
template
>
<
template
v-else-if=
"activeProcess"
>
<hr
class=
"navbar-divider"
/>
<a
class=
"dropdown-item has-text-danger"
:class=
"!isVerified ? 'is-disabled' : ''"
v-if=
"isVerified"
v-on:click=
"stopAction"
:title=
"hasAdminAccess ? 'Stop this process' : 'An admin access is required to stop this process'"
>
<i
class=
"icon-minus"
></i>
Stop process
</a>
</
template
>
</div>
</div>
</div>
...
...
@@ -160,7 +160,7 @@
<
template
v-slot:footer=
"{ close }"
>
<button
class=
"button"
v-on:click=
"close"
>
Cancel
</button>
<button
class=
"button"
class=
"button
ml-auto
"
:class=
"
{ 'is-loading': loading, 'is-danger': confirmAction === 'stop', 'is-primary': confirmAction === 'retry' }"
v-on:click="confirmedAction"
>
...
...
@@ -247,7 +247,7 @@ export default {
await
this
.
retry
()
this
.
confirmModal
=
false
this
.
confirmAction
=
''
}
else
th
is
.
notify
({
type
:
'
error
'
,
text
:
`Unknown
action
${
this
.
confirmAction
}
`
}
)
}
else
th
row
new
Error
(
`Unsupported
action
${
this
.
confirmAction
}
`
)
},
async
retry
()
{
if
(
!
this
.
hasAdminAccess
||
!
this
.
process
.
id
||
this
.
loading
)
return
...
...
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