Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
maed-exporter-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Machine Data
maed-exporter
maed-exporter-frontend
Commits
ab168e9a
Commit
ab168e9a
authored
8 months ago
by
Leah Tacke genannt Unterberg
Browse files
Options
Downloads
Patches
Plain Diff
added functionality to clear all existing mappings
parent
ecfe1de7
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#476618
skipped
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/MapView.vue
+6
-0
6 additions, 0 deletions
src/components/MapView.vue
src/services/mappingStore.ts
+10
-2
10 additions, 2 deletions
src/services/mappingStore.ts
with
16 additions
and
2 deletions
src/components/MapView.vue
+
6
−
0
View file @
ab168e9a
...
@@ -239,6 +239,11 @@ function recreate(cmEntry: ConceptMappingEntry) {
...
@@ -239,6 +239,11 @@ function recreate(cmEntry: ConceptMappingEntry) {
concept
.
value
=
cm
.
concept
concept
.
value
=
cm
.
concept
}
}
function
clearMappings
()
{
mappings
.
clearMappings
()
console
.
log
(
'
Cleared all mappings
'
)
}
const
expanded
=
ref
([
0
])
const
expanded
=
ref
([
0
])
</
script
>
</
script
>
...
@@ -252,6 +257,7 @@ const expanded = ref([0])
...
@@ -252,6 +257,7 @@ const expanded = ref([0])
<v-expansion-panel
title=
"Created Mappings"
>
<v-expansion-panel
title=
"Created Mappings"
>
<template
v-slot:text
>
<template
v-slot:text
>
<MappingsTable
show-view
@
showMapping=
"recreate"
></MappingsTable>
<MappingsTable
show-view
@
showMapping=
"recreate"
></MappingsTable>
<v-btn
size=
"small"
@
click=
"clearMappings"
>
Clear All Mappings
</v-btn>
</
template
>
</
template
>
</v-expansion-panel>
</v-expansion-panel>
</v-expansion-panels>
</v-expansion-panels>
...
...
This diff is collapsed.
Click to expand it.
src/services/mappingStore.ts
+
10
−
2
View file @
ab168e9a
...
@@ -50,9 +50,17 @@ export const useMappingStore = defineStore('mappings', () => {
...
@@ -50,9 +50,17 @@ export const useMappingStore = defineStore('mappings', () => {
}
}
}
}
function
$reset
()
{
function
clearMappings
()
{
currentMappings
.
value
=
[]
currentMappings
.
value
=
[]
}
}
return
{
currentMappings
,
saveMapping
,
saveMappings
,
removeMapping
,
downloadMapping
,
$reset
}
return
{
currentMappings
,
saveMapping
,
saveMappings
,
removeMapping
,
downloadMapping
,
clearMappings
,
$reset
:
clearMappings
}
},
{
persist
:
{
pick
:
[
'
currentMappings
'
]}})
},
{
persist
:
{
pick
:
[
'
currentMappings
'
]}})
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