Project

General

Profile

Actions

Task #1690

closed

nfd-status-http-server: serve XML

Added by Junxiao Shi almost 10 years ago. Updated over 9 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
Actions #1

Updated by Davide Pesavento almost 10 years ago

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

Actions #2

Updated by Chengyu Fan almost 10 years ago

  • Assignee set to Chengyu Fan
Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Updated by Chengyu Fan almost 10 years ago

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

Actions #9

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

Actions #10

Updated by Chengyu Fan almost 10 years ago

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

Actions #11

Updated by Chengyu Fan almost 10 years ago

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

Updated by Chengyu Fan almost 10 years ago

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

Updated by Junxiao Shi over 9 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF