adding systemId in metrics csv
This commit is contained in:
parent
7f6014532d
commit
5ae61d30bc
|
@ -335,6 +335,7 @@ class Device(Thing):
|
|||
|
||||
if act.type == 'Allocate':
|
||||
allo = {'type': 'Allocate',
|
||||
'systemId': self.id,
|
||||
'finalUserCode': act.final_user_code,
|
||||
'numEndUsers': act.end_users,
|
||||
'hid': self.hid,
|
||||
|
@ -353,6 +354,7 @@ class Device(Thing):
|
|||
|
||||
if act.type == 'Deallocate':
|
||||
deallo = {'type': 'Deallocate',
|
||||
'systemId': self.id,
|
||||
'finalUserCode': '',
|
||||
'numEndUsers': '',
|
||||
'hid': self.hid,
|
||||
|
|
|
@ -368,11 +368,12 @@ class ActionRow(OrderedDict):
|
|||
def __init__(self, allocate):
|
||||
super().__init__()
|
||||
# General information about allocates, deallocate and lives
|
||||
self['SystemId'] = allocate['systemId']
|
||||
self['Hid'] = allocate['hid']
|
||||
self['Start'] = allocate['start']
|
||||
self['finalUserCode'] = allocate['finalUserCode']
|
||||
self['numEndUsers'] = allocate['numEndUsers']
|
||||
self['usageTimeAllocate'] = allocate['usageTimeAllocate']
|
||||
self['FinalUserCode'] = allocate['finalUserCode']
|
||||
self['NumEndUsers'] = allocate['numEndUsers']
|
||||
self['UsageTimeAllocate'] = allocate['usageTimeAllocate']
|
||||
self['Type'] = allocate['type']
|
||||
self['LiveCreate'] = allocate['liveCreate']
|
||||
self['usageTimeHdd'] = allocate['usageTimeHdd']
|
||||
self['UsageTimeHdd'] = allocate['usageTimeHdd']
|
||||
|
|
|
@ -173,6 +173,7 @@ def test_live_export_csv2(user: UserClient, client: Client, app: Devicehub):
|
|||
|
||||
assert "4692" in csv_user
|
||||
assert "8692" in csv_user
|
||||
assert "SystemId" in csv_user
|
||||
|
||||
@pytest.mark.mvp
|
||||
@pytest.mark.usefixtures(conftest.app_context.__name__)
|
||||
|
|
Reference in New Issue