Compare commits
No commits in common. "71f36283b95a41a4976f20fada43ab900cd18d03" and "d66aa31058d29a133ac6bcba8bf66b0569419e01" have entirely different histories.
71f36283b9
...
d66aa31058
4 changed files with 0 additions and 34 deletions
|
@ -157,12 +157,6 @@ class RecordsFieldInstance(GridFieldInstance):
|
|||
def getRenderer(self, name):
|
||||
return grid_macros.macros.get(name)
|
||||
|
||||
def fromKeyTable(self, value):
|
||||
fis = self.columnFieldInstances
|
||||
return [dict([(fis[0].name, k)] +
|
||||
[(fi.name, v[i]) for i, v in enumerate(fis[1:])])
|
||||
for k, v in value.items()]
|
||||
|
||||
def marshall(self, value):
|
||||
result = []
|
||||
value = value or []
|
||||
|
@ -264,13 +258,6 @@ class KeyTableFieldInstance(RecordsFieldInstance):
|
|||
pass
|
||||
|
||||
|
||||
class ContextBasedRecordsFieldInstance(RecordsFieldInstance):
|
||||
|
||||
@Lazy
|
||||
def columnTypes(self):
|
||||
obj = self.clientInstance.context
|
||||
return [Field(name) for name in obj.columnNames]
|
||||
|
||||
class ContextBasedKeyTableFieldInstance(KeyTableFieldInstance):
|
||||
|
||||
@Lazy
|
||||
|
|
|
@ -51,16 +51,6 @@ class Records(Grid):
|
|||
instanceName='records',))
|
||||
|
||||
|
||||
class RecordsTable(Grid):
|
||||
|
||||
__typeInfo__ = ('recordstable',
|
||||
FieldType('recordstable', 'recordstable',
|
||||
u'A series of records or rows.',
|
||||
displayRenderer='display_records',
|
||||
inputRenderer='input_records',
|
||||
instanceName='recordstable',))
|
||||
|
||||
|
||||
class KeyTable(Grid):
|
||||
|
||||
__typeInfo__ = ('keytable',
|
||||
|
|
|
@ -80,11 +80,6 @@ class Track(Persistent):
|
|||
data.update(newData)
|
||||
self.data = data # record change
|
||||
|
||||
def updateIndex(self, **kw):
|
||||
for k, v in kw.items():
|
||||
setattr(self, k, v)
|
||||
getParent(self).indexTrack(0, self, k)
|
||||
|
||||
def __repr__(self):
|
||||
md = self.metadata
|
||||
md['timeStamp'] = timeStamp2ISO(md['timeStamp'])
|
||||
|
@ -107,7 +102,6 @@ class TrackingStorage(BTreeContainer):
|
|||
runs = None # currently active runs
|
||||
finishedRuns = None # finished runs
|
||||
currentRuns = None # the currently active run for each task
|
||||
storage = None # compatibility with new cco.storage
|
||||
|
||||
def __init__(self, *args, **kw):
|
||||
trackFactory = kw.pop('trackFactory', None)
|
||||
|
@ -206,9 +200,6 @@ class TrackingStorage(BTreeContainer):
|
|||
self.indexTrack(trackNum, track)
|
||||
return trackId
|
||||
|
||||
def setTrackData(self, track, data):
|
||||
track.data = data # persistent track: data will be stored automatically
|
||||
|
||||
def updateTrack(self, track, data, overwrite=False):
|
||||
trackId = str(track.__name__)
|
||||
trackNum = int(trackId)
|
||||
|
|
|
@ -32,8 +32,6 @@ def getTimeStamp():
|
|||
return int(time.time())
|
||||
|
||||
def date2TimeStamp(d):
|
||||
if isinstance(d, (int, float)):
|
||||
return int(d)
|
||||
return int(time.mktime(d.timetuple()))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue