Task #1690
closednfd-status-http-server: serve XML
100%
Description
Change nfd-status-http-server
to serve XML report (from nfd-status -x
).
The XML report should link to a CSS or XSLT stylesheet that displays the XML report in a human-friendly format.
That stylesheet should also be served from nfd-status-http-server
.
Files
Updated by Davide Pesavento over 10 years ago
The HTTP Accept:
header should be used to specify the content type that the client is willing to accept.
Updated by Chengyu Fan over 10 years ago
So far as I know, there is no standard xslt library in Python.
lxml might be an option, but it requires users to install another library ... Any suggestions on it?
Updated by Junxiao Shi over 10 years ago
Requiring lxml
should be acceptable, because this package exists on both supported systems.
In Ubuntu: apt-get install python-lxml
In OSX: port install py25-lxml
Updated by Junxiao Shi over 10 years ago
One other option is to serve XML report only.
There's no HTML report.
Instead, the XML report links an stylesheet (CSS) that makes it look nice by human user.
Updated by Alex Afanasyev over 10 years ago
Ehm. Why do we need to produce HTML? All normal browsers will do XSLT processing and we shouldn't really do anything special. The script should just serve proper xslr and xml files.
Updated by Junxiao Shi over 10 years ago
- Subject changed from nfd-status-http-server: serve XML; generate HTML from XSLT to nfd-status-http-server: serve XML
- Description updated (diff)
Updated by Chengyu Fan over 10 years ago
- File nfd-status-v1.0.xsl nfd-status-v1.0.xsl added
uploaded the initial xslt file, please help me to improve it.
Updated by Alex Afanasyev over 10 years ago
Don't upload it here. Upload it directly to gerrit, so we can test how the result is actually looking.
Junxiao, I remember you had an example of status page. Can you post the link to it here? It was looking very nice and we should take it as a template.
Updated by Chengyu Fan over 10 years ago
I see, I will modify the current one according to the sample status page and upload it to gerrit
Updated by Chengyu Fan over 10 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 80
Updated by Chengyu Fan over 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 80 to 100
Updated by Junxiao Shi over 10 years ago
- Status changed from Code review to Closed