Skip to content
Snippets Groups Projects
Commit a9ed1868 authored by wactbprot's avatar wactbprot
Browse files

auxobj --> customer object

parent 033f761f
No related branches found
No related tags found
No related merge requests found
...@@ -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
auxobj_col = 5 custobj_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_auxobj_combo(line = line), line, self.auxobj_col) self.add_widget_to_grid(self.make_custobj_combo(line = line), line, self.custobj_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_auxobj_combo(self, line): def make_custobj_combo(self, line):
aux_obj_ids = self.db.get_auxobj_ids() cust_obj_ids = self.db.get_custobj_ids()
self.log.debug("found following auxobj ids {}".format(aux_obj_ids)) self.log.debug("found following custobj 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.auxobj_selected(c, line)) c.currentIndexChanged.connect(lambda: self.custobj_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 auxobj_selected(self, combo, line): def custobj_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)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"port": 5984, "port": 5984,
"database": "vl_db", "database": "vl_db",
"view": { "view": {
"auxobj": "share/AuxObject", "custobj": "share/CustomerObject",
"calids": "share/Year_Standard-Type_Certificate_Issue" "calids": "share/Year_Standard-Type_Certificate_Issue"
} }
},"redis":{ },"redis":{
......
...@@ -32,14 +32,14 @@ class DB(System): ...@@ -32,14 +32,14 @@ class DB(System):
self.db.save(doc) self.db.save(doc)
def get_auxobj_ids(self): def get_custobj_ids(self):
view_con = self.db_dict.get('view').get('auxobj') view_con = self.db_dict.get('view').get('custobj')
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 'AuxObject' in doc: if 'CustomerObject' in doc:
red_doc = doc.get('AuxObject') red_doc = doc.get('CustomerObject')
if 'CalibrationObject' in doc: if 'CalibrationObject' in doc:
red_doc = doc.get('CalibrationObject') red_doc = doc.get('CalibrationObject')
......
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment