Project

General

Profile

Task #1690

nfd-status-http-server: serve XML

Added by Junxiao Shi over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Tools
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

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

nfd-status-v1.0.xsl (3.89 KB) nfd-status-v1.0.xsl Chengyu Fan, 07/07/2014 03:30 PM
#1

Updated by Davide Pesavento over 7 years ago

The HTTP Accept: header should be used to specify the content type that the client is willing to accept.

#2

Updated by Chengyu Fan over 7 years ago

  • Assignee set to Chengyu Fan
#3

Updated by Chengyu Fan over 7 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?

#4

Updated by Junxiao Shi over 7 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

#5

Updated by Junxiao Shi over 7 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.

#6

Updated by Alex Afanasyev over 7 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.

#7

Updated by Junxiao Shi over 7 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)
#8

Updated by Chengyu Fan over 7 years ago

uploaded the initial xslt file, please help me to improve it.

#9

Updated by Alex Afanasyev over 7 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.

#10

Updated by Chengyu Fan over 7 years ago

I see, I will modify the current one according to the sample status page and upload it to gerrit

#11

Updated by Chengyu Fan over 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 80
#12

Updated by Chengyu Fan over 7 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 80 to 100
#13

Updated by Junxiao Shi over 7 years ago

  • Status changed from Code review to Closed

Also available in: Atom PDF