Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HUB Terra
SMS
Frontend
Commits
b12652a8
Commit
b12652a8
authored
3 years ago
by
Marc Hanisch
Browse files
Options
Downloads
Plain Diff
Merge branch '192-fix-configuration-results-after-delete' into 'master'
Remove configuration from search result after deletion Closes
#192
See merge request
!180
parents
1a81aada
ea4d6cc4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!180
Remove configuration from search result after deletion
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pages/configurations/index.vue
+8
-4
8 additions, 4 deletions
pages/configurations/index.vue
with
8 additions
and
4 deletions
pages/configurations/index.vue
+
8
−
4
View file @
b12652a8
...
...
@@ -135,20 +135,24 @@ export default class SearchConfigurationsPage extends Vue {
this
.
configurationToDelete
=
null
}
deleteAndCloseDialog
()
{
// TODO reload current search after deletion
deleteAndCloseDialog
()
{
this
.
showDeleteDialog
=
false
if
(
this
.
configurationToDelete
===
null
)
{
return
}
this
.
$api
.
configurations
.
deleteById
(
this
.
configurationToDelete
.
id
).
then
(()
=>
{
// remove configuration from search results
const
indexToDelete
=
this
.
searchResults
.
findIndex
(
configuration
=>
configuration
.
id
===
this
.
configurationToDelete
?.
id
)
if
(
indexToDelete
>
-
1
)
{
this
.
searchResults
.
splice
(
indexToDelete
,
1
)
}
this
.
$store
.
commit
(
'
snackbar/setSuccess
'
,
'
Configuration deleted
'
)
}).
catch
((
_error
)
=>
{
this
.
$store
.
commit
(
'
snackbar/setError
'
,
'
Configuration could not be deleted
'
)
}).
finally
(()
=>
{
this
.
configurationToDelete
=
null
})
.
finally
(()
=>
{
this
.
configurationToDelete
=
null
})
}
}
...
...
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