tools: display nfd software verion in nfd-status-http-server and nfd-status

refs #1916

Change-Id: I0ba272d4ba9314d483776526d05eaf0f2393dbac
diff --git a/daemon/mgmt/status-server.cpp b/daemon/mgmt/status-server.cpp
index 8861b9a..c8ce5b4 100644
--- a/daemon/mgmt/status-server.cpp
+++ b/daemon/mgmt/status-server.cpp
@@ -63,7 +63,7 @@
 {
   shared_ptr<ndn::nfd::ForwarderStatus> status = make_shared<ndn::nfd::ForwarderStatus>();
 
-  status->setNfdVersion(NFD_VERSION);
+  status->setNfdVersion(NFD_VERSION_BUILD_STRING);
   status->setStartTimestamp(m_startTimestamp);
   status->setCurrentTimestamp(time::system_clock::now());
 
diff --git a/tests/daemon/mgmt/status-server.cpp b/tests/daemon/mgmt/status-server.cpp
index 5757f46..bda69a4 100644
--- a/tests/daemon/mgmt/status-server.cpp
+++ b/tests/daemon/mgmt/status-server.cpp
@@ -84,7 +84,7 @@
   ndn::nfd::ForwarderStatus status;
   BOOST_REQUIRE_NO_THROW(status.wireDecode(g_response->getContent()));
 
-  BOOST_CHECK_EQUAL(status.getNfdVersion(), NFD_VERSION);
+  BOOST_CHECK_EQUAL(status.getNfdVersion(), NFD_VERSION_BUILD_STRING);
   BOOST_CHECK_GE(time::toUnixTimestamp(status.getStartTimestamp()), time::toUnixTimestamp(t1));
   BOOST_CHECK_LE(time::toUnixTimestamp(status.getStartTimestamp()), time::toUnixTimestamp(t2));
   BOOST_CHECK_GE(time::toUnixTimestamp(status.getCurrentTimestamp()), time::toUnixTimestamp(t3));
diff --git a/tools/nfd-status-http-server-files/nfd-status.xsl b/tools/nfd-status-http-server-files/nfd-status.xsl
index 5836fbb..76c7004 100644
--- a/tools/nfd-status-http-server-files/nfd-status.xsl
+++ b/tools/nfd-status-http-server-files/nfd-status.xsl
@@ -29,13 +29,6 @@
   </html>
 </xsl:template>
 
-<xsl:template match="nfd:version">
-  <xsl:variable name="major"><xsl:value-of select="floor(. div 1000000) mod 1000"/></xsl:variable>
-  <xsl:variable name="minor"><xsl:value-of select="floor(. div 1000) mod 1000"/></xsl:variable>
-  <xsl:variable name="patch"><xsl:value-of select=". mod 1000"/></xsl:variable>
-
-  <xsl:value-of select="$major"/>.<xsl:value-of select="$minor"/>.<xsl:value-of select="$patch"/>
-</xsl:template>
 
 <xsl:template name="formatDate">
   <xsl:param name="date" />
@@ -100,7 +93,7 @@
     <tbody>
       <tr class="center">
         <td><xsl:apply-templates select="nfd:nfdId"/></td>
-        <td><xsl:apply-templates select="nfd:version"/></td>
+        <td><xsl:value-of select="nfd:version"/></td>
         <td><xsl:call-template name="formatDate"><xsl:with-param name="date" select="nfd:startTime" /></xsl:call-template></td>
         <td><xsl:call-template name="formatDate"><xsl:with-param name="date" select="nfd:currentTime" /></xsl:call-template></td>
         <td><xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:uptime" /></xsl:call-template></td>