📄 editoutage.jsp
字号:
if(!"0.0.0.0".equals(ipaddress) && thisInterface.isManaged()) {%> <option value="<%=ipaddress%>"><%=thisInterface.getHostname()%></option> <%} }%></select><input type="submit" value="Add" name="addInterfaceButton"><% if(!hasMatchAny) { %><table border=1><%org.opennms.netmgt.config.poller.Interface[] interfaceList=theOutage.getInterface();for(int i=0; i<interfaceList.length; i++) { org.opennms.web.element.Interface[] interfaces=NetworkElementFactory.getInterfacesWithIpAddress(interfaceList[i].getAddress()); for(int j=0; j<interfaces.length; j++) { org.opennms.web.element.Interface thisInterface=interfaces[j]; if(thisInterface.isManaged()) {%> <tr> <td><%=thisInterface.getHostname()%></td> <td><input type="image" src="images/redcross.gif" name="deleteInterface<%=i%>"/></td> </tr><% } }} %></table><% } //end if has match any %></td></tr><tr><td colspan="4"><b>OR</b></td></tr><tr><td colspan="4"><% if(hasMatchAny) { %> <b>Applies to ALL nodes/interfaces</b><% } else { %><input type="submit" name="matchAny" value="All nodes/interfaces"/><% }%></td></tr><tr><td colspan="4"><hr></td></tr><tr><td colspan="4"><b>Times:</b><BR></td></tr><tr id="newDayTimeTR" style="display:<%=("specific".compareToIgnoreCase(theOutage.getType())==0)?"none":"''"%>"><td valign="top">Add time</td><td><select style="display:<%=("weekly".compareToIgnoreCase(theOutage.getType())==0)?"''":"none"%>" id="startNewDayTxt" name="startNewDayTxt"> <option value="sunday">Sun</option> <option value="monday">Mon</option> <option value="tuesday">Tue</option> <option value="wednesday">Wed</option> <option value="thursday">Thu</option> <option value="friday">Fri</option> <option value="saturday">Sat</option> </select><select name="startNewDayNum" id="startNewDayNum" style="display:<%=("monthly".compareToIgnoreCase(theOutage.getType())==0)?"''":"none"%>"> <% for(int i=1; i<32; i++) { %> <option value="<%=i%>"><%=i%></option> <% } %> </select><BR><select name="startNewHour"> <% for(int i=0; i<24; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="startNewMinute"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="startNewSecond"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select> -><BR><select name="endNewHour"> <% for(int i=0; i<24; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="endNewMinute"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="endNewSecond"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select></td><td valign="bottom"><input type="submit" value="Add" name="addDayTime"/></td></tr><tr id="newSpecificTimeTR" style="display:<%=("specific".compareToIgnoreCase(theOutage.getType())==0)?"''":"none"%>"><td valign="top">Add time</td><td><select name="startNewDate"> <% GregorianCalendar today=new GregorianCalendar(); int date=today.get(Calendar.DATE); int month=today.get(Calendar.MONTH)+1; int year=today.get(Calendar.YEAR); for(int i=1; i<32; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>" <%=(date==i)?"selected":""%>><%=i%></option> <% } %> </select> <select name="startNewMonth"> <option value="Jan" <%=(month==1)?"selected":""%>>Jan</option> <option value="Feb" <%=(month==2)?"selected":""%>>Feb</option> <option value="Mar" <%=(month==3)?"selected":""%>>Mar</option> <option value="Apr" <%=(month==4)?"selected":""%>>Apr</option> <option value="May" <%=(month==5)?"selected":""%>>May</option> <option value="Jun" <%=(month==6)?"selected":""%>>Jun</option> <option value="Jul" <%=(month==7)?"selected":""%>>Jul</option> <option value="Aug" <%=(month==8)?"selected":""%>>Aug</option> <option value="Sep" <%=(month==9)?"selected":""%>>Sep</option> <option value="Oct" <%=(month==10)?"selected":""%>>Oct</option> <option value="Nov" <%=(month==11)?"selected":""%>>Nov</option> <option value="Dec" <%=(month==12)?"selected":""%>>Dec</option> </select> <select name="startNewYear"> <option value="2004" <%=(year==2004)?"selected":""%>>2004</option> <option value="2005" <%=(year==2005)?"selected":""%>>2005</option> <option value="2006" <%=(year==2006)?"selected":""%>>2006</option> <option value="2007" <%=(year==2007)?"selected":""%>>2007</option> <option value="2008" <%=(year==2008)?"selected":""%>>2008</option> <option value="2009" <%=(year==2009)?"selected":""%>>2009</option> </select> <select name="startNewSpecificHour"> <% for(int i=0; i<24; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="startNewSpecificMinute"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="startNewSpecificSecond"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select> -><BR><select name="endNewDate"> <% for(int i=1; i<32; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>" <%=(date==i)?"selected":""%>><%=i%></option> <% } %> </select> <select name="endNewMonth"> <option value="Jan" <%=(month==1)?"selected":""%>>Jan</option> <option value="Feb" <%=(month==2)?"selected":""%>>Feb</option> <option value="Mar" <%=(month==3)?"selected":""%>>Mar</option> <option value="Apr" <%=(month==4)?"selected":""%>>Apr</option> <option value="May" <%=(month==5)?"selected":""%>>May</option> <option value="Jun" <%=(month==6)?"selected":""%>>Jun</option> <option value="Jul" <%=(month==7)?"selected":""%>>Jul</option> <option value="Aug" <%=(month==8)?"selected":""%>>Aug</option> <option value="Sep" <%=(month==9)?"selected":""%>>Sep</option> <option value="Oct" <%=(month==10)?"selected":""%>>Oct</option> <option value="Nov" <%=(month==11)?"selected":""%>>Nov</option> <option value="Dec" <%=(month==12)?"selected":""%>>Dec</option> </select> <select name="endNewYear"> <option value="2004" <%=(year==2004)?"selected":""%>>2004</option> <option value="2005" <%=(year==2005)?"selected":""%>>2005</option> <option value="2006" <%=(year==2006)?"selected":""%>>2006</option> <option value="2007" <%=(year==2007)?"selected":""%>>2007</option> <option value="2008" <%=(year==2008)?"selected":""%>>2008</option> <option value="2009" <%=(year==2009)?"selected":""%>>2009</option> </select> <select name="endNewSpecificHour"> <% for(int i=0; i<24; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="endNewSpecificMinute"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select>:<select name="endNewSpecificSecond"> <% for(int i=0; i<60; i++) { %> <option value="<%=(i<10)?"0":""%><%=i%>"><%=i%></option> <% } %> </select></td><td valign="bottom"><input type="submit" value="Add" name="addSpecificTime"/></td></tr><tr><td colspan="4"><table border="1"><%Time[] outageTimes=theOutage.getTime();for(int i=0; i<outageTimes.length; i++) { Time thisTime=outageTimes[i];%><tr> <td><%=(thisTime.getDay()!=null)?shortDayNames.get(thisTime.getDay())+" ":""%><%=thisTime.getBegins()%> - <%=thisTime.getEnds()%></td> <td><input type="image" src="images/redcross.gif" name="deleteTime<%=i%>"/></td></tr><% } %></table></td></tr><tr><td colspan=4><hr></td></tr><tr><td colspan="4"><b>Applies to:<br/><table border="1"><tr><td colspan="2">Notifications</td><td><input type="checkbox" <%=(enabledOutages.contains("notifications"))?"checked":""%> name="notifications"></td></tr><%Iterator keys=pollingOutages.keySet().iterator();boolean doneTitle=false;while(keys.hasNext()) { org.opennms.netmgt.config.poller.Package thisKey=(org.opennms.netmgt.config.poller.Package)keys.next(); Collection pollingPackage=(Collection)pollingOutages.get(thisKey); String name="polling-"+thisKey.getName();%> <tr> <td><%=!doneTitle?"Status polling":""%></td> <td> <%=thisKey.getName()%> </td> <td> <input type="checkbox" name="<%=name%>" <%=enabledOutages.contains(name)?"checked":""%>> </td> </tr><% doneTitle=true;}keys=thresholdOutages.keySet().iterator();doneTitle=false;while(keys.hasNext()) { org.opennms.netmgt.config.threshd.Package thisKey=(org.opennms.netmgt.config.threshd.Package)keys.next(); Collection thresholdPackage=(Collection)thresholdOutages.get(thisKey); String name="threshold-"+thisKey.getName();%> <tr> <td><%=!doneTitle?"Threshold checking":""%></td> <td> <%=thisKey.getName()%> </td> <td> <input type="checkbox" name="<%=name%>" <%=enabledOutages.contains(name)?"checked":""%>> </td> </tr><% doneTitle=true;}keys=collectionOutages.keySet().iterator();doneTitle=false;while(keys.hasNext()) { org.opennms.netmgt.config.collectd.Package thisKey=(org.opennms.netmgt.config.collectd.Package)keys.next(); Collection collectPackage=(Collection)collectionOutages.get(thisKey); String name="collect-"+thisKey.getName();%> <tr> <td><%=!doneTitle?"Data collection":""%></td> <td> <%=thisKey.getName()%> </td> <td> <input type="checkbox" name="<%=name%>" <%=enabledOutages.contains(name)?"checked":""%>> </td> </tr><% doneTitle=true;}%></table></td></tr></table><input type="submit" value="Save" name="saveButton" /></form><form action="admin/sched-outages/index.jsp" method="POST"><input type="submit" value="Cancel" name="cancelButton" /></form></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -