Add tags to the notifications
Reported by @holger.witsch
Is there a way to send tags and/or categories via the tango_* interface ?
For the tango_io, it is ready server-side but we would need to do something in the MetadataManager. Today the API looks like:https://icatplus.esrf.fr/api-docs/#/Logbook/post_logbook__sessionId__investigation_name__investigationName__instrument_name__instrumentName__event If you see the schema below the method it is ready to receive:
"tags": [
"string"
],
On the other hand the MetadataManager sends the event:https://gitlab.esrf.fr/icat/tango-metadata/-/blob/master/src/metadata_manager/MetadataManager.py#L630
{
"type" : eventType,
"datasetName" : datasetName,
"category" : category,
"content" : content,
"creationDate" : str(datetime.now().isoformat()) }
with no tags yet.
I think it would be enough to add:
{
"type" : eventType,
"datasetName" : datasetName,
"category" : category,
"content" : content,
"creationDate" : str(datetime.now().isoformat())
"tags" : ["Calibration", "Test", "Other tag"]
}
But then we need to change the MetadataManager API in order to receive the tags as parameters.
The current API is:
def notifyInfo(self, message):
self.sendNotification("notification", "info", message)
def notifyDebug(self, message):
self.sendNotification("notification", "debug", message)
def notifyCommand(self, message):
self.sendNotification("notification", "commandLine", message)
def notifyError(self, message):
self.sendNotification("notification", "error", message)
def userComment(self, message):
self.sendNotification("annotation", "comment", message)