Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
netvs-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-core
Commits
fda108d3
Commit
fda108d3
authored
4 years ago
by
Janis Streib
Browse files
Options
Downloads
Patches
Plain Diff
FIX: filter at correct places to improve displayed informtaion
parent
04ac28e5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#273658
passed with warnings
4 years ago
Stage: build
Stage: lint
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/components/DBEditor.vue
+2
-1
2 additions, 1 deletion
frontend/src/components/DBEditor.vue
frontend/src/util/apiutil.js
+4
-2
4 additions, 2 deletions
frontend/src/util/apiutil.js
frontend/src/util/transactionutil.js
+7
-1
7 additions, 1 deletion
frontend/src/util/transactionutil.js
with
13 additions
and
4 deletions
frontend/src/components/DBEditor.vue
+
2
−
1
View file @
fda108d3
...
...
@@ -95,11 +95,12 @@ export default {
}
ta
[
'
parameters
'
]
=
{
'
new
'
:
transactionutil
.
remove_empty_data
(
this
.
object_functions
[
this
.
object_function
].
parameters
,
new_params
),
'
old
'
:
transactionutil
.
filer_old_data
(
this
.
object_functions
[
this
.
object_function
].
parameters
,
this
.
old_data
)
'
old
'
:
this
.
old_data
}
ta
[
'
old_uuid
'
]
=
this
.
old_uuid
ta
[
'
uuid
'
]
=
uuidv4
()
ta
[
'
object_fq_name
'
]
=
this
.
object_fq_name
ta
[
'
object_functions
'
]
=
this
.
object_functions
ta
[
'
object_function
'
]
=
this
.
object_function
ta
[
'
input_reducer
'
]
=
this
.
input_reducer
ta
[
'
non_optionals_order
'
]
=
this
.
non_optionals_order
...
...
This diff is collapsed.
Click to expand it.
frontend/src/util/apiutil.js
+
4
−
2
View file @
fda108d3
import
transactionutil
from
"
@/util/transactionutil
"
;
export
default
{
dict_by_value_of_array
(
arr
,
val
)
{
let
res
=
{}
...
...
@@ -30,10 +32,10 @@ export default {
for
(
let
i
=
0
;
i
<
obj
.
length
;
i
++
)
{
let
app
=
{
name
:
`
${
obj
[
i
].
object_fq_name
}
.
${
obj
[
i
].
object_function
}
`
}
if
(
Object
.
keys
(
obj
[
i
].
parameters
.
old
).
length
>
0
)
{
app
[
'
old
'
]
=
obj
[
i
].
parameters
.
old
app
[
'
old
'
]
=
transactionutil
.
filter_old_data
(
obj
[
i
].
object_functions
[
obj
[
i
].
object_function
].
parameters
,
obj
[
i
].
parameters
.
old
)
}
if
(
Object
.
keys
(
obj
[
i
].
parameters
.
new
).
length
>
0
)
{
app
[
'
new
'
]
=
obj
[
i
].
parameters
.
new
app
[
'
new
'
]
=
transactionutil
.
filter_unchanged_data
(
obj
[
i
].
parameters
.
new
,
obj
[
i
].
parameters
.
old
)
}
res
.
push
(
app
)
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/util/transactionutil.js
+
7
−
1
View file @
fda108d3
...
...
@@ -28,7 +28,13 @@ export default {
return
function_name
}
},
filer_old_data
(
params_list
,
old_data
)
{
filter_unchanged_data
(
d1
,
d2
)
{
return
Object
.
keys
(
d1
).
reduce
(
function
(
filtered
,
key
)
{
if
(
!
(
key
in
d2
)
||
d1
[
key
]
!=
d2
[
key
])
filtered
[
key
]
=
d1
[
key
];
return
filtered
;
},
{})
},
filter_old_data
(
params_list
,
old_data
)
{
return
Object
.
keys
(
old_data
).
reduce
(
function
(
filtered
,
key
)
{
if
(
key
in
params_list
&&
'
old
'
in
params_list
[
key
])
filtered
[
key
]
=
old_data
[
key
];
return
filtered
;
...
...
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