2e268c86eee6a1753d16afe23388c9f26dd0f7ca,modules/s3db/setup.py,S3SetupMonitorModel,setup_monitor_task_onaccept,#Any#,2289
Before Change
check_id = form_vars.check_id
cotable = db.setup_monitor_check_option
query = (cotable.check_id == check_id) & \
(cotable.deleted == False)
options = db(query).select(cotable.tag,
cotable.value,
)
if not options:
After Change
// Read default check options
ctable = db.setup_monitor_check
check = db(ctable.id == form_vars.check_id).select(ctable.options,
limitby = (0, 1)
).first()
// Read deployment_id
ttable = db.setup_monitor_task
server_id = form_vars.server_id
if server_id:
task = None
else:
// Read record
task = db(ttable.id == record_id).select(ttable.id,
ttable.server_id,
limitby = (0, 1)
).first()
server_id = task.server_id
stable = db.setup_server
server = db(stable.id == server_id).select(stable.deployment_id,
limitby = (0, 1)
).first()
deployment_id = server.deployment_id
// Update record
if task:
task.update_record(deployment_id = deployment_id,
options = check.options,
)
else:
db(ttable.id == record_id).update(deployment_id = deployment_id,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: sahana/eden
Commit Name: 2e268c86eee6a1753d16afe23388c9f26dd0f7ca
Time: 2020-01-27
Author: fran@aidiq.com
File Name: modules/s3db/setup.py
Class Name: S3SetupMonitorModel
Method Name: setup_monitor_task_onaccept
Project Name: sahana/eden
Commit Name: 86b0720a78db81ce102f0ada03327757a294a8f8
Time: 2019-09-02
Author: fran@aidiq.com
File Name: modules/s3db/dc.py
Class Name: DataCollectionTemplateModel
Method Name: dc_question_onaccept
Project Name: sahana/eden
Commit Name: 2e268c86eee6a1753d16afe23388c9f26dd0f7ca
Time: 2020-01-27
Author: fran@aidiq.com
File Name: modules/templates/default/monitor.py
Class Name: S3Monitor
Method Name: email_round_trip