diff --git a/WebContent/WEB-INF/snippet/warningIcon.jsp b/WebContent/WEB-INF/snippet/warningIcon.jsp new file mode 100644 index 0000000000..b9c16068b0 --- /dev/null +++ b/WebContent/WEB-INF/snippet/warningIcon.jsp @@ -0,0 +1,9 @@ +<%@ include file="/WEB-INF/snippet/common.jsp" %> + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/tags/pointComponent.tag b/WebContent/WEB-INF/tags/pointComponent.tag index fbba850231..5cf5d997dd 100644 --- a/WebContent/WEB-INF/tags/pointComponent.tag +++ b/WebContent/WEB-INF/tags/pointComponent.tag @@ -58,7 +58,7 @@
@@ -74,7 +74,7 @@
diff --git a/WebContent/resources/view.js b/WebContent/resources/view.js index 3ca1aac54e..ef91abc5b9 100644 --- a/WebContent/resources/view.js +++ b/WebContent/resources/view.js @@ -62,6 +62,7 @@ mango.view.setMessages = function(state) { var warningNode = $("c"+ state.id +"Warning"); if (warningNode && state.messages != null) { $set("c"+ state.id +"Messages", state.messages); + $set("c"+ state.id +"WarningIcon", state.warningIcon); if (state.messages) show(warningNode); else diff --git a/src/com/serotonin/mango/web/dwr/ViewDwr.java b/src/com/serotonin/mango/web/dwr/ViewDwr.java index c665fd184e..34f7435381 100644 --- a/src/com/serotonin/mango/web/dwr/ViewDwr.java +++ b/src/com/serotonin/mango/web/dwr/ViewDwr.java @@ -303,6 +303,7 @@ private ViewComponentState preparePointComponentState(PointComponent pointCompon } state.setInfo(generateContent(request, "infoContent.jsp", model)); + state.setWarningIcon(generateContent(request, "warningIcon.jsp", model)); setMessages(state, request, "warningContent", model); return state; diff --git a/src/com/serotonin/mango/web/dwr/beans/BasePointState.java b/src/com/serotonin/mango/web/dwr/beans/BasePointState.java index 6075e85533..62fb08a070 100644 --- a/src/com/serotonin/mango/web/dwr/beans/BasePointState.java +++ b/src/com/serotonin/mango/web/dwr/beans/BasePointState.java @@ -25,6 +25,7 @@ abstract public class BasePointState implements Cloneable { private String change; private String chart; private String messages; + private String warningIcon; public String getId() { return id; @@ -58,6 +59,14 @@ public void setMessages(String messages) { this.messages = messages; } + public String getWarningIcon() { + return warningIcon; + } + + public void setWarningIcon(String warningIcon) { + this.warningIcon = warningIcon; + } + public void removeEqualValue(BasePointState that) { if (StringUtils.isEqual(change, that.change)) change = null;