explorer.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <html xmlns="http://www.w3.org/1999/xhtml">
  18. <head>
  19. <meta http-equiv="X-UA-Compatible" content="IE=9" />
  20. <link rel="stylesheet" type="text/css" href="/static/bootstrap-3.0.2/css/bootstrap.min.css" />
  21. <link rel="stylesheet" type="text/css" href="/static/bootstrap-3.0.2/css/bootstrap-editable.css"/>
  22. <link rel="stylesheet" type="text/css" href="/static/hadoop.css" />
  23. <title>Browsing HDFS</title>
  24. </head>
  25. <body>
  26. <header class="navbar navbar-inverse bs-docs-nav" role="banner">
  27. <div class="container">
  28. <div class="navbar-header">
  29. <div class="navbar-brand">Hadoop</div>
  30. </div>
  31. <ul class="nav navbar-nav" id="ui-tabs">
  32. <li><a href="dfshealth.html#tab-overview">Overview</a></li>
  33. <li><a href="dfshealth.html#tab-datanode">Datanodes</a></li>
  34. <li><a href="dfshealth.html#tab-datanode-volume-failures">Datanode Volume Failures</a></li>
  35. <li><a href="dfshealth.html#tab-snapshot">Snapshot</a></li>
  36. <li><a href="dfshealth.html#tab-startup-progress">Startup Progress</a></li>
  37. <li class="dropdown">
  38. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Utilities <b class="caret"></b></a>
  39. <ul class="dropdown-menu">
  40. <li><a href="#">Browse the file system</a></li>
  41. <li><a href="logs">Logs</a></li>
  42. </ul>
  43. </li>
  44. </ul>
  45. </div>
  46. </header>
  47. <div class="modal" id="file-info" tabindex="-1" role="dialog" aria-hidden="true">
  48. <div class="modal-dialog">
  49. <div class="modal-content">
  50. <div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  51. <h4 class="modal-title" id="file-info-title">File information</h4>
  52. </div>
  53. <div class="modal-body" id="file-info-body">
  54. <a id="file-info-download">Download</a>
  55. <!--<a id="file-info-preview" style="cursor:pointer">Tail the file (last 32K)</a>-->
  56. <hr />
  57. <div class="panel panel-success" id="file-info-blockinfo-panel">
  58. <div class="panel-heading">
  59. Block information --
  60. <select class="btn btn-default" id="file-info-blockinfo-list">
  61. </select>
  62. </div>
  63. <div class="panel-body" id="file-info-blockinfo-body"></div>
  64. </div>
  65. <div class="panel panel-info" id="file-info-tail" style="display:none">
  66. <div class="panel-heading">File contents</div>
  67. <div class="panel-body">
  68. <div class="input-group-sm">
  69. <textarea class="form-control" style="height: 150px" id="file-info-preview-body"></textarea>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="modal-footer"><button type="button" class="btn btn-success"
  75. data-dismiss="modal">Close</button></div>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="container">
  80. <div class="page-header">
  81. <h1>Browse Directory</h1>
  82. </div>
  83. <div class="alert alert-danger" id="alert-panel" style="display:none">
  84. <button type="button" class="close" onclick="$('#alert-panel').hide();">&times;</button>
  85. <div class="alert-body" id="alert-panel-body"></div>
  86. </div>
  87. <div class="modal" id="btn-create-directory" tabindex="-1" role="dialog"
  88. aria-hidden="true">
  89. <div class="modal-dialog">
  90. <div class="modal-content">
  91. <div class="modal-header">
  92. <button type="button" class="close"
  93. data-dismiss="modal" aria-hidden="true">&times;</button>
  94. <h4 class="modal-title">Create Directory</h4>
  95. </div>
  96. <div class="modal-body">
  97. <div class="form-group">
  98. <div class="input-group">
  99. <span class="input-group-addon" id="new_directory_pwd"></span>
  100. <input type="text" class="form-control" id="new_directory"
  101. placeholder="New Directory Name" />
  102. </div>
  103. </div>
  104. </div>
  105. <div class="modal-footer">
  106. <button type="button" class="btn" data-dismiss="modal">Cancel</button>
  107. <button type="button" class="btn btn-success"
  108. id="btn-create-directory-send" data-complete-text="Creating...">
  109. Create
  110. </button>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <div class="modal" id="delete-modal" tabindex="-1" role="dialog" aria-hidden="true">
  116. <div class="modal-dialog">
  117. <div class="modal-content">
  118. <div class="modal-header">
  119. <button type="button" class="close" data-dismiss="modal"
  120. aria-hidden="true">&times;</button>
  121. <h4 class="modal-title" id="delete-modal-title">Delete</h4>
  122. </div>
  123. <div class="modal-body">
  124. <div class="panel-body">
  125. <div id="delete-prompt"></div>
  126. </div>
  127. </div>
  128. <div class="modal-footer">
  129. <button type="button" class="btn" data-dismiss="modal">Cancel</button>
  130. <button type="button" class="btn btn-success" id="delete-button"
  131. data-complete-text="Deleting...">Delete</button>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="row">
  137. <div class="col-xs-11">
  138. <form onsubmit="return false;">
  139. <div class="input-group">
  140. <input type="text" class="form-control" id="directory"/>
  141. <span class="input-group-btn">
  142. <button class="btn btn-default" type="button" id="btn-nav-directory">Go!</button>
  143. </span>
  144. </div>
  145. </form>
  146. </div>
  147. <div class="col-xs-1">
  148. <button type="button" class="btn btn-default" data-toggle="modal"
  149. aria-label="New Directory" data-target="#btn-create-directory"
  150. title="Create Directory">
  151. <span class="glyphicon glyphicon-folder-open"></span>
  152. </button>
  153. </div>
  154. </div>
  155. <br />
  156. <div id="panel"></div>
  157. <div class="row">
  158. <hr />
  159. <div class="col-xs-2"><p>Hadoop, {release-year-token}.</p></div>
  160. </div>
  161. </div>
  162. <script type="text/x-template" id="explorer-popover-perm-info">
  163. <div class="explorer-popover-perm-body">
  164. <table class="table table-striped">
  165. <thead>
  166. <tr>
  167. <th class="text-center">User</th>
  168. <th class="text-center">Group</th>
  169. <th class="text-center">Other</th>
  170. </tr>
  171. </thead>
  172. <tbody>
  173. <tr>
  174. <td><label><input type="checkbox" data-bit="8" /> Read</label></td>
  175. <td><label><input type="checkbox" data-bit="5" /> Read</label></td>
  176. <td><label><input type="checkbox" data-bit="2" /> Read</label></td>
  177. </tr>
  178. <tr>
  179. <td><label><input type="checkbox" data-bit="7" /> Write</label></td>
  180. <td><label><input type="checkbox" data-bit="4" /> Write</label></td>
  181. <td><label><input type="checkbox" data-bit="1" /> Write</label></td>
  182. </tr>
  183. <tr>
  184. <td><label><input type="checkbox" data-bit="6" /> Execute</label></td>
  185. <td><label><input type="checkbox" data-bit="3" /> Execute</label></td>
  186. <td><label><input type="checkbox" data-bit="0" /> Execute</label></td>
  187. </tr>
  188. </tbody>
  189. </table>
  190. <div style="text-align: right; margin-right: 10px">
  191. <label><input type="checkbox" id="explorer-perm-sticky" data-bit="9" /> Sticky bit</label>
  192. </div>
  193. <hr/>
  194. <div style="text-align: right">
  195. <button type="button" class="btn" id="explorer-perm-cancel">Cancel</button>
  196. <button type="button" class="btn btn-success" id="explorer-set-perm-button"
  197. data-complete-text="Updating...">Set</button>
  198. </div>
  199. </div>
  200. </script>
  201. <script type="text/x-dust-template" id="tmpl-explorer">
  202. <table class="table">
  203. <thead>
  204. <tr>
  205. <th>Permission</th>
  206. <th>Owner</th>
  207. <th>Group</th>
  208. <th>Size</th>
  209. <th>Last Modified</th>
  210. <th>Replication</th>
  211. <th>Block Size</th>
  212. <th>Name</th>
  213. <th></th>
  214. </tr>
  215. </thead>
  216. <tbody>
  217. {#FileStatus}
  218. <tr inode-path="{pathSuffix}" data-permission="{permission}"
  219. class="explorer-entry">
  220. <td><span class="explorer-perm-links editable-click">
  221. {type|helper_to_directory}{permission|helper_to_permission}
  222. {aclBit|helper_to_acl_bit}
  223. </span></td>
  224. <td><span class="explorer-owner-links">{owner}</span></td>
  225. <td><span class="explorer-group-links">{group}</span></td>
  226. <td>{length|fmt_bytes}</td>
  227. <td>{#helper_date_tostring value="{modificationTime}"/}</td>
  228. <td><span class="explorer-replication-links">{replication}</span></td>
  229. <td>{blockSize|fmt_bytes}</td>
  230. <td><a inode-type="{type}" class="explorer-browse-links">{pathSuffix}</a></td>
  231. <td><span class="glyphicon glyphicon-trash"></span></td>
  232. </tr>
  233. {/FileStatus}
  234. </tbody>
  235. </table>
  236. </script>
  237. <script type="text/x-dust-template" id="tmpl-block-info">
  238. {#block}
  239. <p>Block ID: {blockId}</p>
  240. <p>Block Pool ID: {blockPoolId}</p>
  241. <p>Generation Stamp: {generationStamp}</p>
  242. <p>Size: {numBytes}</p>
  243. {/block}
  244. <p>Availability:
  245. <ul>
  246. {#locations}
  247. <li>{hostName}</li>
  248. {/locations}
  249. </ul>
  250. </p>
  251. </script>
  252. <script type="text/javascript" src="/static/jquery-1.10.2.min.js">
  253. </script><script type="text/javascript" src="/static/bootstrap-3.0.2/js/bootstrap.min.js">
  254. </script><script type="text/javascript" src="/static/bootstrap-3.0.2/js/bootstrap-editable.min.js">
  255. </script><script type="text/javascript" src="/static/dust-full-2.0.0.min.js">
  256. </script><script type="text/javascript" src="/static/dust-helpers-1.1.1.min.js">
  257. </script><script type="text/javascript" src="/static/dfs-dust.js">
  258. </script><script type="text/javascript" src="/static/json-bignum.js">
  259. </script><script type="text/javascript" src="/static/rest-csrf.js">
  260. </script><script type="text/javascript" src="explorer.js">
  261. </script><script type="text/javascript" src="/static/moment.min.js">
  262. </script>
  263. </body>
  264. </html>