daisy / pipeline-ui

A user interface for the DAISY Pipeline 2
MIT License
5 stars 2 forks source link

Display descriptions of outputs #108

Closed bertfrees closed 11 months ago

bertfrees commented 1 year ago

It would be nice if the description of outputs, if present, would be displayed in the UI somehow. Currently in the finished job view we have a nested list under the "Result" section, which looks like this (without the bullets):

(This is for the DTBook to ODT script.) The "ODT" option also has a discription: "The output braille file.". Quite simple in this case but it could contain more text. It would be nice if this was incorporated in the UI. Perhaps it could be done by making the outputs appear more like the options in the job form view, i.e. with a little triangle before the items to make them fold.

marisademeglio commented 1 year ago

The descriptions of the outputs aren't available via the webservice (or point me to where I'd find them?)

E.g.

This is a successful job with results

<job href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094" id="1a4ed219-4d21-47a4-be35-d0d0bbb66094" status="SUCCESS">
<nicename>EPUB 3 Validator</nicename>
<script href="http://127.0.0.1:49152/ws/scripts/epub3-validator" id="epub3-validator" input-filesets="epub3">
<nicename>EPUB 3 Validator</nicename>
<description>Validates a EPUB.</description>
<version>2.0.3</version>
</script>
<messages progress="1.0">
<message content="Running EPUBCheck" level="INFO" portion="0.8" progress="1.0" sequence="18" timeStamp="1678209648735"/>
</messages>
<log href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/log"/>
<results href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/result" mime-type="application/zip">
<result from="port" href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/result/port/html-report" mime-type="application/zip" name="html-report" nicename="Validation report">
<result file="file:/Users/marisa/Library/Application%20Support/pipeline-ui/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/output/html-report/html-report.html" href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/result/port/html-report/idx/html-report/html-report.html" mime-type="application/vnd.pipeline.report+xml" size="1828"/>
</result>
<result from="port" href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/result/port/ace-report" mime-type="application/zip" name="ace-report" nicename="Accessibility report">
<result file="file:/Users/marisa/Library/Application%20Support/pipeline-ui/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/output/ace-report/ace-report.html" href="http://127.0.0.1:49152/ws/jobs/1a4ed219-4d21-47a4-be35-d0d0bbb66094/result/port/ace-report/idx/ace-report/ace-report.html" mime-type="application/vnd.pipeline.report+xml" size="157"/>
</result>
</results>
</job>

and this is the script that it used

<script href="http://127.0.0.1:49152/ws/scripts/epub3-validator" id="epub3-validator" input-filesets="epub3">
<nicename>EPUB 3 Validator</nicename>
<description>Validates a EPUB.</description>
<version>2.0.3</version>
<homepage>
http://daisy.github.io/pipeline/Get-Help/User-Guide/Scripts/epub3-validator/
</homepage>
<option desc="Either a *.epub file or a *.opf file." mediaType="application/epub+zip application/oebps-package+xml" name="epub" nicename="EPUB" ordered="true" required="true" sequence="false" type="anyFileURI"/>
<option default="false" desc="Check the compliance to the EPUB accessibility specification using the [DAISY Ace](https://daisy.github.io/ace) tool. To use this option, check [how to install Ace](https://daisy.github.io/ace/getting-started/installation/) on your system. Note that this option is only available for zipped EPUBs." name="accessibility-check" nicename="Enable accessibility check" ordered="true" required="false" sequence="false" type="boolean"/>
</script>
bertfrees commented 1 year ago

D'oh. Forgot about that. That's obviously an issue that needs to be addressed first. It seems like something we can perfectly do in a backward-compatible way.

bertfrees commented 1 year ago

Blocked on https://github.com/daisy/pipeline-framework/issues/187.

bertfrees commented 1 year ago

This is now possible to implement with engine version 1.14.13.

marisademeglio commented 1 year ago

This seems ok to me now, I think the UI was already looking for nicename on the results elements and is now using it automatically.

bertfrees commented 1 year ago

Nice!

bertfrees commented 1 year ago

Fixed by https://github.com/daisy/pipeline-ui/pull/144

bertfrees commented 1 year ago

Doesn't seem to be fixed after all. In the case of the DTBook to ODT script, the finished job view still contains:

Results

but the description "The output braille file." is missing.

marisademeglio commented 1 year ago

Oh ok yes I see, we need to parse the XML to get the desc attribute. Sorry I thought it was coming from nicename. Schedule this for the next milestone?

bertfrees commented 1 year ago

Yes sounds good