Changeset c3af134a


Ignore:
Timestamp:
Aug 3, 2009 8:02:28 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b5876e7f
Parents:
7986f56
Message:
  • Remove UTC time from summary bar
  • Increase skew warning threshold to 3s (was 100ms)
Location:
apps/routerconsole
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java

    r7986f56 rc3af134a  
    6565    }
    6666   
    67     private static final DateFormat _fmt = new java.text.SimpleDateFormat("HH:mm:ss", Locale.UK);
    68     public String getTime() {
     67    private String timeSkew() {
    6968        if (_context == null) return "";
    70        
    71         String now = null;
    72         synchronized (_fmt) {
    73             now = _fmt.format(new Date(_context.clock().now()));
    74         }
    75        
    76         if (!_context.clock().getUpdatedSuccessfully())
    77             return now + " (Unknown skew)";
    78        
     69        //if (!_context.clock().getUpdatedSuccessfully())
     70        //    return " (Unknown skew)";
    7971        long ms = _context.clock().getOffset();
    80        
    8172        long diff = Math.abs(ms);
    82         if (diff < 100)
    83             return now;
    84         return now + " (" + DataHelper.formatDuration(diff) + " skew)";
     73        if (diff < 3000)
     74            return "";
     75        return " (" + DataHelper.formatDuration(diff) + " skew)";
    8576    }
    8677   
     
    9586   
    9687    public String getReachability() {
     88        return reachability() + timeSkew();
     89    }
     90
     91    private String reachability() {
    9792        if (_context.router().getUptime() > 60*1000 && (!_context.router().gracefulShutdownInProgress()) &&
    9893            !_context.clientManager().isAlive())
  • apps/routerconsole/jsp/summarynoframe.jsp

    r7986f56 rc3af134a  
    4949<b>Version:</b> <jsp:getProperty name="helper" property="version" /><br />
    5050<b>Uptime:</b> <jsp:getProperty name="helper" property="uptime" /><br />
    51 <b>Now:</b> <jsp:getProperty name="helper" property="time" /><br />
    5251<b>Reachability:</b> <a href="config.jsp#help" target="_top"><jsp:getProperty name="helper" property="reachability" /></a>
    5352<%
Note: See TracChangeset for help on using the changeset viewer.