Commit 715c4505 authored by Axel Brand's avatar Axel Brand Committed by daeva

Gojara

- changed rr.summary.title to Gojara in plugin.xml so that Settings will always be named Gojara-Settings even if name of actual jar is different
- made time differences in spectrum2 stats + login time iff prettier

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13725 b35dd754-fafc-0310-a699-88a17e54d16e
parent 00068bfc
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
<sidebar id="sidebar-server-settings"> <sidebar id="sidebar-server-settings">
<item id="remoteRoster" name="${rr.summary.title}" url="rr-main.jsp" <item id="remoteRoster" name="Gojara Settings" url="rr-main.jsp"
description="${rr.summary.title}" /> description="Manage GoJara Settings" />
</sidebar> </sidebar>
</tab> </tab>
<tab id="tab-server"> <tab id="tab-server">
......
...@@ -222,7 +222,13 @@ public class GojaraAdminManager { ...@@ -222,7 +222,13 @@ public class GojaraAdminManager {
long diffMinutes = time / 60 % 60; long diffMinutes = time / 60 % 60;
long diffHours = time / (60 * 60) % 24; long diffHours = time / (60 * 60) % 24;
long diffDays = time / (24 * 60 * 60); long diffDays = time / (24 * 60 * 60);
return "" + diffSeconds + " Sec " + diffMinutes + " Min " + diffHours + " Hours " + diffDays + " Days";
String seconds = diffSeconds == 0 ? "" : (diffSeconds + " Sec");
String minutes = diffMinutes == 0 ? "" : (diffMinutes + " Min ");
String hours = diffHours == 0 ? "" : (diffHours + " Hours ");
String days = diffDays == 0 ? "" : (diffDays + " Days ");
return days + hours + minutes + seconds;
} }
} else if (stat.equals("messages_from_xmpp")) { } else if (stat.equals("messages_from_xmpp")) {
if (gatewayStatisticsMap.get(gateway).get("messages_from_xmpp") != null) if (gatewayStatisticsMap.get(gateway).get("messages_from_xmpp") != null)
......
...@@ -74,7 +74,13 @@ public class JspHelper { ...@@ -74,7 +74,13 @@ public class JspHelper {
long diffMinutes = diff / (60 * 1000) % 60; long diffMinutes = diff / (60 * 1000) % 60;
long diffHours = diff / (60 * 60 * 1000) % 24; long diffHours = diff / (60 * 60 * 1000) % 24;
long diffDays = diff / (24 * 60 * 60 * 1000); long diffDays = diff / (24 * 60 * 60 * 1000);
String seconds = diffSeconds == 0 ? "" : (diffSeconds + " Sec");
String minutes = diffMinutes == 0 ? "" : (diffMinutes + " Min ");
String hours = diffHours == 0 ? "" : (diffHours + " Hours ");
String days = diffDays == 0 ? "" : (diffDays + " Days ");
return days + hours + minutes + seconds + " ago";
return "" + diffSeconds + " Seconds " + diffMinutes + " Minutes " + diffHours + " Hours " + diffDays + " Days ago";
} }
} }
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<html> <html>
<head> <head>
<title><fmt:message key="rr.summary.title" /></title> <title>Gojara Settings</title>
<link href="./css/rr.css" rel="stylesheet" type="text/css"> <link href="./css/rr.css" rel="stylesheet" type="text/css">
<script src="./js/http.js" type="text/javascript"></script> <script src="./js/http.js" type="text/javascript"></script>
<script src="./js/jquery.js" type="text/javascript"></script> <script src="./js/jquery.js" type="text/javascript"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment