decommission.xsl 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!--
  2. /**
  3. * Licensed to the Apache Software Foundation (ASF) under one
  4. * or more contributor license agreements. See the NOTICE file
  5. * distributed with this work for additional information
  6. * regarding copyright ownership. The ASF licenses this file
  7. * to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance
  9. * with the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. -->
  20. <xsl:stylesheet version="1.0"
  21. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  22. <xsl:include href="dfsclusterhealth_utils.xsl" />
  23. <xsl:output method="html" encoding="UTF-8" />
  24. <xsl:template match="/">
  25. <html>
  26. <head>
  27. <link rel="stylesheet" type="text/css" href="static/hadoop.css" />
  28. <title>
  29. Hadoop cluster
  30. <xsl:value-of select="cluster/@clusterId" />
  31. </title>
  32. </head>
  33. <body>
  34. <h1>
  35. Cluster '
  36. <xsl:value-of select="cluster/@clusterId" />
  37. '
  38. </h1>
  39. <h2>Decommissioning Status</h2>
  40. <xsl:if test="count(cluster/decommissioningReport/item)">
  41. <div id="dfstable">
  42. <table>
  43. <tbody>
  44. <xsl:for-each select="cluster/decommissioningReport/item">
  45. <tr class="rowNormal">
  46. <td id="col1">
  47. <xsl:value-of select="@label" />
  48. </td>
  49. <td id="col2">:</td>
  50. <td id="col3">
  51. <xsl:value-of select="@value" />
  52. </td>
  53. </tr>
  54. </xsl:for-each>
  55. </tbody>
  56. </table>
  57. </div>
  58. <br />
  59. </xsl:if>
  60. <xsl:if test="count(cluster/datanodes/node)">
  61. <div id="dfstable">
  62. <table border="1" cellpadding="10" cellspacing="0">
  63. <thead>
  64. <xsl:for-each select="cluster/datanodes/node[1]/item">
  65. <th>
  66. <xsl:value-of select="@label" />
  67. </th>
  68. </xsl:for-each>
  69. </thead>
  70. <tbody>
  71. <xsl:for-each select="cluster/datanodes/node">
  72. <tr>
  73. <xsl:for-each select="item">
  74. <td>
  75. <xsl:call-template name="displayValue">
  76. <xsl:with-param name="value">
  77. <xsl:value-of select="@value" />
  78. </xsl:with-param>
  79. <xsl:with-param name="unit">
  80. <xsl:value-of select="@unit" />
  81. </xsl:with-param>
  82. <xsl:with-param name="link">
  83. <xsl:value-of select="@link" />
  84. </xsl:with-param>
  85. </xsl:call-template>
  86. </td>
  87. </xsl:for-each>
  88. </tr>
  89. </xsl:for-each>
  90. </tbody>
  91. </table>
  92. </div>
  93. </xsl:if>
  94. <xsl:if test="count(cluster/unreportedNamenodes/node)">
  95. <h2>Unreported Namenodes</h2>
  96. <div id="dfstable">
  97. <table border="1" cellpadding="10" cellspacing="0">
  98. <tbody>
  99. <xsl:for-each select="cluster/unreportedNamenodes/node">
  100. <tr class="rowNormal">
  101. <td id="col1">
  102. <xsl:value-of select="@name" />
  103. </td>
  104. <td id="col2">
  105. <xsl:value-of select="@exception" />
  106. </td>
  107. </tr>
  108. </xsl:for-each>
  109. </tbody>
  110. </table>
  111. </div>
  112. </xsl:if>
  113. <xsl:if test="count(cluster/message/item)">
  114. <h4>Exception</h4>
  115. <xsl:for-each select="cluster/message/item">
  116. <xsl:value-of select="@msg" />
  117. </xsl:for-each>
  118. </xsl:if>
  119. </body>
  120. </html>
  121. </xsl:template>
  122. </xsl:stylesheet>