o.maxLen = 1000 o.queryType = 'measurement' o.queryId = ObjectId('4fdbac481d41c834fb000001') o.fields = ['capturetime','string'] o.groupTime = 'minute' o.valueMap = {} o.since = None o.before = None o.customFilter = {} o.statsInfo = [{'sum': 1}, {'min': 'string'}, {'max': 'string'}] o.save() c = Chart() c.name = 'Colors Evaluated' c.olap = o.name c.style = 'column' c.minval = 0 c.maxval = 10 c.xtype = 'linear' c.colormap = {'0': 'red', '1': 'green', '2': 'yellow','3': u'orange','4': 'purple'} c.labelmap = {'0': 'red','1': 'green','2': 'yellow','3': 'orange','4': 'purple'} c.accumulate = True c.renderorder = 2 c.halfsize = True c.realtime = True c.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() c = Chart() c.name = 'Movement' c.olap = o.name c.style = 'spline' c.minval = 0 c.maxval = None c.xtype = 'datetime' c.colormap = {} c.labelmap = {} c.accumulate = False c.renderorder = 1 c.halfsize = False c.realtime = True c.dataMap = ['capturetime','numeric'] c.metaMap = ['measurement_id', 'inspection_id', 'frame_id'] c.save()
meas = Measurement( name="movement", label="Movement", method = "movement", parameters = dict(), units = "", featurecriteria = dict( index = 0 ), inspection = insp.id ) meas.save() o1 = OLAP() o1.name = 'Motion' o1.maxLen = 1000 o1.queryType = 'measurement_id' o1.queryId = meas.id o1.fields = ['capturetime','numeric', 'measurement_id', 'inspection_id', 'frame_id'] o1.since = None o1.before = None o1.customFilter = {} o1.statsInfo = [] o1.save() c1 = Chart() c1.name = 'Motion' c1.olap = o1.name c1.style = 'spline' c1.minval = 0 c1.maxval = 100 c1.xtype = 'datetime' c1.colormap = {} c1.labelmap = {} c1.accumulate = False c1.renderorder = 1 c1.halfsize = False c1.realtime = True c1.dataMap = ['capturetime','numeric'] c1.metaMap = ['measurement_id', 'inspection_id', 'frame_id'] c1.save()