Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
d8826043
Commit
d8826043
authored
Apr 07, 2021
by
Lubber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Change Schema
parent
dd6c873f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
2 deletions
+60
-2
add_vialog_schema.py
...ice/app/_add_use_case_scripts/vialog/add_vialog_schema.py
+2
-2
add_change.py
...ice/app/_add_use_case_scripts/vialog/tables/add_change.py
+58
-0
No files found.
src/participation-hub/business-logic-microservice/app/_add_use_case_scripts/vialog/add_vialog_schema.py
View file @
d8826043
...
...
@@ -9,7 +9,7 @@ for modules_path in modules_paths:
if
os
.
path
.
exists
(
modules_path
):
sys
.
path
.
insert
(
1
,
modules_path
)
from
_add_use_case_scripts.vialog.tables
import
add_user
,
add_video
from
_add_use_case_scripts.vialog.tables
import
add_user
,
add_video
,
add_change
import
network_constants
as
nc
from
security.token_manager
import
TokenManager
...
...
@@ -38,4 +38,4 @@ if __name__ == "__main__":
add_use_case
(
use_case
)
add_user
.
main
(
use_case
)
add_video
.
main
(
use_case
)
\ No newline at end of file
add_change
.
main
(
use_case
)
\ No newline at end of file
src/participation-hub/business-logic-microservice/app/_add_use_case_scripts/vialog/tables/add_change.py
0 → 100644
View file @
d8826043
from
_add_use_case_scripts.requestPost
import
postLayersToSwagger
,
postTableToSwagger
def
add_table
(
use_case
:
str
,
table_name
:
str
):
'''
take the columns and add the mappings at the server
replace all "/"'s in the internal representation with a "_"
'''
columns
=
[
"changeType"
,
"changedValue"
,
"previousValue"
,
"newValue"
,
]
columns
=
{
c
:
c
for
c
in
columns
}
columns
[
"UniqueID"
]
=
"videoId"
table
=
{
"name"
:
table_name
,
"mappings"
:
columns
}
postTableToSwagger
(
use_case
,
table
)
def
add_layers
(
use_case
:
str
,
table_name
:
str
):
layers
=
[
{
"use_case"
:
use_case
,
"table"
:
table_name
,
"name"
:
"Changetype_Layer"
,
"properties"
:
[
"changeType"
,
],
"cluster_properties"
:
[
"changeType"
,
]
},
{
"use_case"
:
use_case
,
"table"
:
table_name
,
"name"
:
"Changedvalue_Layer"
,
"properties"
:
[
"changedValue"
,
],
"cluster_properties"
:
[
"changedValue"
]
}
]
postLayersToSwagger
(
use_case
,
layers
)
def
main
(
use_case
:
str
):
print
(
"user"
)
table_name
=
"change"
add_table
(
use_case
,
table_name
)
add_layers
(
use_case
,
table_name
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment