from SimpleSeer.models.Inspection import Inspection from SimpleSeer.models.Inspection import Measurement from SimpleSeer.models.OLAP import OLAP from SimpleSeer.models.Chart import Chart system('echo "db.dropDatabase()" | mongo default') insp = Inspection( name= "Motion", method="motion") insp.save() meas = Measurement( name="movement", label="Movement", method = "movement", parameters = dict(), units = "", featurecriteria = dict( index = 0 ), inspection = insp.id ) meas.save() ## Delivery time o = OLAP() o.name = 'Movement' o.maxLen = 1000 o.queryType = 'measurement_id' o.queryId = meas.id o.fields = ['capturetime','numeric', 'measurement_id', 'inspection_id', 'frame_id'] o.since = None o.before = None o.customFilter = {} o.statsInfo = [] o.save()