HDFS-8292. Move conditional in fmt_time from dfs-dust.js to status.html. Contributed by Charles Lamb.

(cherry picked from commit 87e9978235)
This commit is contained in:
Andrew Wang 2015-04-30 18:23:13 -07:00
parent 4195b10860
commit 34d686e6e9
3 changed files with 4 additions and 4 deletions

View File

@ -164,6 +164,9 @@ Release 2.8.0 - UNRELEASED
HDFS-8200. Refactor FSDirStatAndListingOp. (wheat9) HDFS-8200. Refactor FSDirStatAndListingOp. (wheat9)
HDFS-8292. Move conditional in fmt_time from dfs-dust.js to status.html.
(Charles Lamb via wang)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

View File

@ -65,7 +65,7 @@
<tr><th>Compiled</th><td>{CompileInfo}</td></tr> <tr><th>Compiled</th><td>{CompileInfo}</td></tr>
<tr><th>NameNode Address</th><td>{HostAndPort}</td></tr> <tr><th>NameNode Address</th><td>{HostAndPort}</td></tr>
<tr><th>Started</th><td>{StartTime|date_tostring}</td></tr> <tr><th>Started</th><td>{StartTime|date_tostring}</td></tr>
<tr><th>Last Checkpoint</th><td>{@if cond="{LastCheckpointTime} === 0"}Never{:else}{LastCheckpointTime|date_tostring} ({LastCheckpointDeltaMs|fmt_time} ago){/if}</td></tr> <tr><th>Last Checkpoint</th><td>{@if cond="{LastCheckpointTime} === 0"}Never{:else}{LastCheckpointTime|date_tostring}{/if} {@if cond="{LastCheckpointDeltaMs} >= 0"} ({LastCheckpointDeltaMs|fmt_time} ago){/if}</td></tr>
<tr><th>Checkpoint Period</th><td>{CheckpointPeriod} seconds</td></tr> <tr><th>Checkpoint Period</th><td>{CheckpointPeriod} seconds</td></tr>
<tr><th>Checkpoint Transactions</th><td>{TxnCount}</td></tr> <tr><th>Checkpoint Transactions</th><td>{TxnCount}</td></tr>
</table> </table>

View File

@ -40,9 +40,6 @@
}, },
'fmt_time': function (v) { 'fmt_time': function (v) {
if (v < 0) {
return "unknown";
}
var s = Math.floor(v / 1000), h = Math.floor(s / 3600); var s = Math.floor(v / 1000), h = Math.floor(s / 3600);
s -= h * 3600; s -= h * 3600;
var m = Math.floor(s / 60); var m = Math.floor(s / 60);