-
Notifications
You must be signed in to change notification settings - Fork 27
tmf: Introduce "MIME" data provider type #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
tmf: Introduce "MIME" data provider type #242
Conversation
| * | ||
| * @since 10.3 | ||
| */ | ||
| REPORT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alone won't be sufficient. FE clients won't be able to display the if they receive such a data provider descriptor. The type here describes what data it is. Then the TSP will need to be augmented with endpoints and data structures that provides the details for visualization. For example, TIME_GRAPH data providers, tells clients that there is an endpoint to query the tree and states. Also, the query parameters and returned data structures are defined in the TSP.
For reports such endpoints, query parameters and output data structures are not specified in the TSP yet and needs to be added.
The configurable reports purpose is to create new data provider instances of known, in TSP specified data providers.
If you compare the implementation to the InAndOut analysis, the configuration endpoint allows to create derived data providers with a known type, for example it spawns, for example, XY_TREE charts, DATA_TREE data providers.
So, for your image report, you need to have a type that indicates a image report. Then there needs to be an endpoint in the TSP to query such data provider.
2ddafd1 to
820af76
Compare
|
would it be interesting to have a mime type later so image can be one type of report. e.g. Audio or multipart. I see the dataprovider endpoint as being dual paths:
/download:
get:
summary: Download a file
description: Allows the user to download a specific file with a specified MIME type.
operationId: downloadFile
responses:
'200':
description: The file is successfully downloaded.
content:
application/octet-stream:
schema:
type: string
format: binary
example: 'Your file content here.'
'404':
description: File not found.
'500':
description: Internal server error.
parameters:
- in: query
name: mimeType
required: false
schema:
type: string
description: The MIME type of the file (optional, default to application/octet-stream)
example: 'application/pdf'thoughts? |
@MatthewKhouzam I see several option for
Secondly, looking on the TSP side, we need to understand if there should be (or need to be) multiple endpoints. At the first glance, it seems better to have one endpoint, e.g. The other thing we could always download such reports a octet stream and from the descriptor we would know the mime-type and how to handle the report resource. |
b717e42 to
1a1e4f8
Compare
...ass.tmf.core/src/org/eclipse/tracecompass/tmf/core/dataprovider/IDataProviderDescriptor.java
Outdated
Show resolved
Hide resolved
1a1e4f8 to
92fb9be
Compare
|
I find this MUCH cleaner. Thanks Kaveh! |
0e08c85 to
1342912
Compare
...ass.tmf.core/src/org/eclipse/tracecompass/tmf/core/dataprovider/IDataProviderDescriptor.java
Outdated
Show resolved
Hide resolved
1342912 to
c562532
Compare
Followed by introducing the configurable reports data providers, this commit proposes a new data provider type called "MIME", which is related to different types of configurable MIME reports, such as images, HTML, text, pdf, excel, etc. [Added] A new data provider type called "MIME" Signed-off-by: Kaveh Shahedi <kaveh.shahedi@ericsson.com>
c562532 to
5d5a8c3
Compare
What it does
Followed by introducing the configurable reports data providers, this commit proposes a new data provider type called
MIME, which is related to different types of configurable MIME reports, such as images, HTML, text, pdf, excel, etc.How to test
Once a new configurable MIME report is created, the fetched output's type should be
MIME.P.S.: For now, all the reports have the type of
NONE; They should be updated subsequently (check the Follow-ups section below).Follow-ups
ImageReportDataProvidershould change their provider type toMIME.Review checklist