modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
| 4 -
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
| 17 +++-
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
| 35 ++++------
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
| 10 --
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
| 2
5 files changed, 31 insertions(+), 37 deletions(-)
New commits:
commit 59561513dd5e014a4ae70b0abfff9ad0ef046f65
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 25 15:57:38 2011 -0400
clean up some of the timeline
diff --git
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
index 978c62e..40aeac8 100644
---
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
+++
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
@@ -57,8 +57,8 @@
String icon =
FunctionTagLibrary.getAlertPriorityURL(alert.getAlertDefinition().getPriority());
StringBuilder buf = new StringBuilder();
for (AlertConditionLog log : alert.getConditionLogs()) {
- buf.append("<b>Condition:</b>" +
log.getCondition().getName() + "<br/>");
- buf.append("<b>Value:</b>" + log.getValue() +
"</b>");
+ buf.append("<b>Condition:</b> " +
log.getCondition().getName() + "<br/>");
+ buf.append("<b>Value:</b> " + log.getValue());
}
String link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Alerts/History/" + alert.getId();
diff --git
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
index c1d3df5..114baf0 100644
---
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
+++
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
@@ -59,13 +59,14 @@
}
String link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Inventory/ChildHistory";
-
+ String username = entry.getSubjectName();
+ String resourceName = entry.getCreatedResourceName();
%>
{ "start" : "<%=sdf.format(entry.getCreatedTime())%>",
- "title" : "Child resource created",
+ "title" : "Child Resource Created",
"link" : "<%=link%>",
- "description" : "<b>User:</b>
<%=(""+entry.getSubjectName()).replaceAll("[\"']","").trim()%><br/><b>Status:</b>
<%=(""+entry.getStatus()).replaceAll("[\"']","").trim()%>",
+ "description" : "<b>Resource Name:</b>
<%=(""+resourceName).replaceAll("[\"']","").trim()%><br/><b>User:</b>
<%=(""+username).replaceAll("[\"']","").trim()%><br/><b>Status:</b>
<%=(""+entry.getStatus())%>",
"icon" : "<%=icon%>",
"color" : "<%=(entry.getStatus() != CreateResourceStatus.FAILURE ?
"#4EB84E" : "#DD5656")%>"
}
@@ -96,12 +97,16 @@
}
String link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Inventory/ChildHistory";
-
+ String username = entry.getSubjectName();
+ String description = "<b>User:</b> "+
username.replaceAll("[\"']","").trim() +
"<br/><b>Status:</b> " + entry.getStatus();
+ if (entry.getResource() != null) {
+ description = "<b>Resource Name:</b> " +
entry.getResource().getName().replaceAll("[\"']","").trim() +
"<br/>" + description;
+ }
%>
{ "start" : "<%=sdf.format(entry.getCreatedTime())%>",
- "title" : "Child resource deleted",
+ "title" : "Child Resource Deleted",
"link" : "<%=link%>",
- "description" : "<b>User:</b>
<%=(""+entry.getSubjectName()).replaceAll("[\"']","").trim()%><br/><b>Status:</b>
<%=(""+entry.getStatus()).replaceAll("[\"']","").trim()%>",
+ "description" : "<%= description %>",
"icon" : "<%=icon%>",
"color" : "<%=(entry.getStatus() != DeleteResourceStatus.FAILURE ?
"#4EB84E" : "#DD5656")%>"
}
diff --git
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
index bb6ced8..d14ab93 100644
---
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
+++
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
@@ -33,15 +33,8 @@
boolean tooManyEvents = false;
PageList<EventComposite> list =
- eventManager.findEventComposites(subject,
EntityContext.forResource(resourceId), begin, end, null,
- null, null, new PageControl(0,10000, new
OrderingField("timestamp", PageOrdering.ASC)));
-
- /* TODO GH: Add alert to screen
- if (list.getTotalSize() != list.size()) {
- tooManyEvents = true;
- }*/
-
-
+ eventManager.findEventComposites(subject, EntityContext.forResource(resourceId),
begin, end, null,
+ null, null, new PageControl(0,10000, new OrderingField("timestamp",
PageOrdering.ASC)));
%>
<%! public String trimLength(String string, int length) {
@@ -51,16 +44,16 @@
public String eventColor(EventSeverity severity) {
switch (severity) {
case DEBUG:
- return "green";
+ return "#00FF00";
case INFO:
- return "blue";
+ return "#0000FF";
case WARN:
- return "olive";
+ return "#FFA500";
case ERROR:
- return "orange";
+ return "#FF0000";
case FATAL:
default:
- return "red";
+ return "#FF0000";
}
}
@@ -81,7 +74,7 @@
return events.get(0).getTimestamp();
}
public String getEventDetail() {
- return events.size() + " events";
+ return events.size() + " Events";
}
public EventSeverity getSeverity() {
EventSeverity highestSeverity = events.get(0).getSeverity();
@@ -157,19 +150,25 @@
String color = eventColor(event.getSeverity());
String icon = FunctionTagLibrary.getEventSeverityURL(event.getSeverity(),
grouped);
- String link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Events/History/" + event.getEventId();
+ String link;
+ if (grouped) {
+ link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Events/History";
+ } else {
+ link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Events/History/" + event.getEventId();
+ }
String detail = null;
if (grouped) {
StringBuilder buf = new StringBuilder();
for (EventComposite childEvent : ((GroupedEventComposite)event).events)
{
+ String childColor = eventColor(childEvent.getSeverity());
buf.append("<a
href='/coregui/CoreGUI.html#Resource/" + resourceId +
"/Events/History/" + childEvent.getEventId() + "'>");
- buf.append("<font size=\"-1\" color=\"" +
color + "\">" +
escapeBackslashes(trimLength(childEvent.getEventDetail(),80)) +
"</font></a><br />");
+ buf.append("<font color=\"" + childColor +
"\">" + escapeBackslashes(trimLength(childEvent.getEventDetail(),80)) +
"</font></a><br />");
}
detail = buf.toString();
} else {
detail = escapeBackslashes(event.getEventDetail());
- detail = "<b>Source:</b>" +
escapeBackslashes(event.getSourceLocation()) +
"<br/><b>Detail:</b>" + detail;
+ detail = "<b>Source:</b> " +
escapeBackslashes(event.getSourceLocation()) + "<br/><b>Detail:</b>
" + detail;
}
diff --git
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
index 5e28985..49fd1cb 100644
---
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
+++
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
@@ -44,17 +44,7 @@
first = false;
String icon =
FunctionTagLibrary.getOperationStatusURL(operation.getStatus());
-
String link = "/coregui/CoreGUI.html#Resource/" + resourceId +
"/Operations/History/" + operation.getId();
-
-// out.write(
-// " <event start=\"" + sdf.format(new
Date(operation.getCreatedTime())) + "\" " +
-// "title=\"Operation: " +
operation.getOperationDefinition().getDisplayName() + "\" \n" +
-//
"link=\"/rhq/resource/operation/resourceOperationHistoryDetails.xhtml?id="
+ resourceId + "&opId=" + operation.getId() + "\" " +
-// "icon=\"" + icon + "\" >\n" +
-// "<b>User:</b> " +
operation.getSubjectName() + "<br/>" +
-// "<b>Status:</b> " +
operation.getStatus() +
-// " </event>\n\n");
%>
{ "start" : "<%=sdf.format(new
Date(operation.getCreatedTime()))%>",
diff --git
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
index ed75a07..17683c7 100644
---
a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
+++
b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
@@ -58,7 +58,7 @@
%>
{ "start" : "<%=sdf.format(configUpdate.getCreatedTime())%>",
- "title" : "Plugin Configuration Change",
+ "title" : "Connection Settings Change",
"link" : "<%=link%>",
"description" : "<b>User:</b>
<%=(""+configUpdate.getSubjectName()).replaceAll("[\"']","").trim()%><br/><b>Status:</b>
<%=(""+configUpdate.getStatus()).replaceAll("[\"']","").trim()%>",
"icon" : "<%=icon%>",