diff --git a/apiserver/apiserver/api/views.py b/apiserver/apiserver/api/views.py index cdb5fe2..d6c2ddc 100644 --- a/apiserver/apiserver/api/views.py +++ b/apiserver/apiserver/api/views.py @@ -1473,6 +1473,18 @@ class ProtocoinViewSet(Base): ) utils.log_transaction(tx) + track = cache.get('track', {}) + + devicename = 'LASTLARGEPRINT' + first_name = username.split('.')[0].title() + + track[devicename] = dict( + time=time.time(), + username=username, + first_name=first_name, + ) + cache.set('track', track) + return Response(200) except OperationalError: self.printer_report(request, pk) diff --git a/webclient/src/Home.js b/webclient/src/Home.js index 3b68d39..ccaee22 100644 --- a/webclient/src/Home.js +++ b/webclient/src/Home.js @@ -359,6 +359,26 @@ export function Home(props) { } trigger={[more]} />

+

+ Media computer: {getTrackStat('PROTOGRAPH1')} +

+ Last use:
+ {getTrackLast('PROTOGRAPH1')}
+ {getTrackAgo('PROTOGRAPH1')}
+ by {getTrackName('PROTOGRAPH1')} +

+ +

+ Last print:
+ {getTrackLast('LASTLARGEPRINT')}
+ {getTrackAgo('LASTLARGEPRINT')}
+ by {getTrackName('LASTLARGEPRINT')} +

+ + } trigger={[more]} /> +

+

ORD2 printer: {printer3dStat('ord2')}

ORD3 printer: {printer3dStat('ord3')}