Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
anselm
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
vaclab
anselm
Commits
a9ed1868
Commit
a9ed1868
authored
6 years ago
by
wactbprot
Browse files
Options
Downloads
Patches
Plain Diff
auxobj --> customer object
parent
033f761f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
anselm.py
+8
-8
8 additions, 8 deletions
anselm.py
anselm/config.json
+1
-1
1 addition, 1 deletion
anselm/config.json
anselm/db.py
+6
-6
6 additions, 6 deletions
anselm/db.py
srv.py
+5
-1
5 additions, 1 deletion
srv.py
with
20 additions
and
16 deletions
anselm.py
+
8
−
8
View file @
a9ed1868
...
@@ -53,7 +53,7 @@ class Anselm(System):
...
@@ -53,7 +53,7 @@ class Anselm(System):
cal_id_col
=
2
cal_id_col
=
2
fullscale_col
=
3
fullscale_col
=
3
dut_branch_col
=
4
dut_branch_col
=
4
aux
obj_col
=
5
cust
obj_col
=
5
task_col
=
6
task_col
=
6
run_kind_col
=
7
run_kind_col
=
7
run_btn_col
=
8
run_btn_col
=
8
...
@@ -154,7 +154,7 @@ class Anselm(System):
...
@@ -154,7 +154,7 @@ class Anselm(System):
line
=
self
.
current_grid_line
line
=
self
.
current_grid_line
self
.
add_widget_to_grid
(
self
.
make_cal_id_combo
(
line
=
line
),
line
,
self
.
cal_id_col
)
self
.
add_widget_to_grid
(
self
.
make_cal_id_combo
(
line
=
line
),
line
,
self
.
cal_id_col
)
self
.
add_widget_to_grid
(
self
.
make_
aux
obj_combo
(
line
=
line
),
line
,
self
.
aux
obj_col
)
self
.
add_widget_to_grid
(
self
.
make_
cust
obj_combo
(
line
=
line
),
line
,
self
.
cust
obj_col
)
self
.
add_widget_to_grid
(
self
.
make_fullscale_combo
(
line
=
line
),
line
,
self
.
fullscale_col
)
self
.
add_widget_to_grid
(
self
.
make_fullscale_combo
(
line
=
line
),
line
,
self
.
fullscale_col
)
self
.
add_widget_to_grid
(
self
.
make_dut_branch_combo
(
line
=
line
),
line
,
self
.
dut_branch_col
)
self
.
add_widget_to_grid
(
self
.
make_dut_branch_combo
(
line
=
line
),
line
,
self
.
dut_branch_col
)
self
.
add_widget_to_grid
(
self
.
make_result_label
(
line
=
line
),
line
,
self
.
result_col
)
self
.
add_widget_to_grid
(
self
.
make_result_label
(
line
=
line
),
line
,
self
.
result_col
)
...
@@ -215,14 +215,14 @@ class Anselm(System):
...
@@ -215,14 +215,14 @@ class Anselm(System):
return
c
return
c
def
make_
aux
obj_combo
(
self
,
line
):
def
make_
cust
obj_combo
(
self
,
line
):
aux
_obj_ids
=
self
.
db
.
get_
aux
obj_ids
()
cust
_obj_ids
=
self
.
db
.
get_
cust
obj_ids
()
self
.
log
.
debug
(
"
found following
aux
obj ids {}
"
.
format
(
aux
_obj_ids
))
self
.
log
.
debug
(
"
found following
cust
obj ids {}
"
.
format
(
cust
_obj_ids
))
c
=
self
.
make_combo
(
aux
_obj_ids
,
first_item
=
"
select read out device
"
,
last_item
=
False
)
c
=
self
.
make_combo
(
cust
_obj_ids
,
first_item
=
"
select read out device
"
,
last_item
=
False
)
c
.
currentIndexChanged
.
connect
(
lambda
:
self
.
aux
obj_selected
(
c
,
line
))
c
.
currentIndexChanged
.
connect
(
lambda
:
self
.
cust
obj_selected
(
c
,
line
))
return
c
return
c
...
@@ -266,7 +266,7 @@ class Anselm(System):
...
@@ -266,7 +266,7 @@ class Anselm(System):
self
.
log
.
debug
(
"
task: {}
"
.
format
(
task
))
self
.
log
.
debug
(
"
task: {}
"
.
format
(
task
))
self
.
log
.
info
(
"
task with name {} selected at line {}
"
.
format
(
task_name
,
line
))
self
.
log
.
info
(
"
task with name {} selected at line {}
"
.
format
(
task_name
,
line
))
def
aux
obj_selected
(
self
,
combo
,
line
):
def
cust
obj_selected
(
self
,
combo
,
line
):
doc_id
=
combo
.
currentText
()
doc_id
=
combo
.
currentText
()
self
.
aset
(
'
doc_id
'
,
line
,
doc_id
)
self
.
aset
(
'
doc_id
'
,
line
,
doc_id
)
...
...
This diff is collapsed.
Click to expand it.
anselm/config.json
+
1
−
1
View file @
a9ed1868
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"port"
:
5984
,
"port"
:
5984
,
"database"
:
"vl_db"
,
"database"
:
"vl_db"
,
"view"
:
{
"view"
:
{
"
aux
obj"
:
"share/
Aux
Object"
,
"
cust
obj"
:
"share/
Customer
Object"
,
"calids"
:
"share/Year_Standard-Type_Certificate_Issue"
"calids"
:
"share/Year_Standard-Type_Certificate_Issue"
}
}
},
"redis"
:{
},
"redis"
:{
...
...
This diff is collapsed.
Click to expand it.
anselm/db.py
+
6
−
6
View file @
a9ed1868
...
@@ -32,14 +32,14 @@ class DB(System):
...
@@ -32,14 +32,14 @@ class DB(System):
self
.
db
.
save
(
doc
)
self
.
db
.
save
(
doc
)
def
get_
aux
obj_ids
(
self
):
def
get_
cust
obj_ids
(
self
):
view_con
=
self
.
db_dict
.
get
(
'
view
'
).
get
(
'
aux
obj
'
)
view_con
=
self
.
db_dict
.
get
(
'
view
'
).
get
(
'
cust
obj
'
)
try
:
try
:
view
=
self
.
db
.
view
(
view_con
)
view
=
self
.
db
.
view
(
view_con
)
res
=
[
doc
.
get
(
'
id
'
)
for
doc
in
view
]
res
=
[
doc
.
get
(
'
id
'
)
for
doc
in
view
]
except
Exception
as
inst
:
except
Exception
as
inst
:
self
.
log
.
error
(
"
aux
view does not work: {}
"
.
format
(
inst
))
self
.
log
.
error
(
"
cust
view does not work: {}
"
.
format
(
inst
))
res
=
[
"
dummy
aux
"
]
res
=
[
"
dummy
cust
"
]
self
.
log
.
warn
(
"
return dummy value
"
)
self
.
log
.
warn
(
"
return dummy value
"
)
return
res
return
res
...
@@ -64,8 +64,8 @@ class DB(System):
...
@@ -64,8 +64,8 @@ class DB(System):
doc
=
self
.
db
[
doc_id
]
doc
=
self
.
db
[
doc_id
]
red_doc
=
None
red_doc
=
None
if
doc
:
if
doc
:
if
'
Aux
Object
'
in
doc
:
if
'
Customer
Object
'
in
doc
:
red_doc
=
doc
.
get
(
'
Aux
Object
'
)
red_doc
=
doc
.
get
(
'
Customer
Object
'
)
if
'
CalibrationObject
'
in
doc
:
if
'
CalibrationObject
'
in
doc
:
red_doc
=
doc
.
get
(
'
CalibrationObject
'
)
red_doc
=
doc
.
get
(
'
CalibrationObject
'
)
...
...
This diff is collapsed.
Click to expand it.
srv.py
+
5
−
1
View file @
a9ed1868
...
@@ -132,4 +132,8 @@ def target_pressure():
...
@@ -132,4 +132,8 @@ def target_pressure():
if
not
'
error
'
in
res
:
if
not
'
error
'
in
res
:
return
jsonify
({
'
ToExchange
'
:
res
})
return
jsonify
({
'
ToExchange
'
:
res
})
else
:
else
:
return
jsonify
(
res
)
return
jsonify
(
res
)
\ No newline at end of file
@app.route
(
'
/offset_all
'
,
methods
=
[
'
POST
'
])
def
offset_all
():
s
.
log
.
info
(
"
request to target pressures
"
)
\ No newline at end of file
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