<%-- * Licensed Materials - Property of IBM * * 5724-U18 * * (C) COPYRIGHT IBM CORP. 2006, 2016 All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with * IBM Corp. --%><%-- This JSP renders the header portion in the KPIGRAPH control in the KPI Manager application. --%> <%@page import="psdi.app.kpi.KPIUtil.Trend"%> <%@page import="psdi.app.kpi.KPIUtil.Status"%> <%@ include file="../common/simpleheader.jsp" %><% if(component.getProperty("showheader").equals("true")) { String type = component.getProperty("type"); String headerclass = component.getProperty("headerclass"); String dir = !langcode.equalsIgnoreCase("AR")? "dir='ltr'" : ""; if(type.equalsIgnoreCase("dial")) { String reportImage = component.getProperty("reportlinkimage"); String kpiImage = component.getProperty("kpilinkimage"); KPIGraph graphControl = (KPIGraph)control; String labels[] = wcs.getMessages("kpi",new String[]{"drillreport","drillkpi","lastrunlbl","updatelbl","statuslbl","actuallbl","lastreadlbl","targetlbl","variancelbl"}); String statusClass = textcss+" "; String statusColor = ""; Status status; Trend trend; String sReportName = ""; String sLinkedKPI = ""; Object sKPIDate = ""; Hashtable htKPIData = null; //Get data and draw this control only if there is data if(!graphControl.isNewKPI()) { Vector vecData = graphControl.getKPIData(); if(vecData.size() != 0) { htKPIData = (Hashtable)vecData.elementAt(0); status = (Status)htKPIData.get("status"); trend = (Trend)htKPIData.get("trend"); sReportName = htKPIData.get("reportnum").toString(); sLinkedKPI = htKPIData.get("linkto").toString(); sKPIDate = htKPIData.get("lastupdated"); //IBMBIDI Start String dojoTypeInput = ""; String userCalendar = s.getUserInfo().getCaltype().toLowerCase(); boolean isNational = !CalendarUtils.GREGORIAN.equalsIgnoreCase(userCalendar); Date date = null; if(isNational) { Locale userLocale = s.getUserInfo().getLocale(); try{ date = MXFormat.stringToDateTime(sKPIDate.toString(),userLocale); String usrLocale = userLocale.toString().toLowerCase().replace('_', '-'); String dojoDatePattern = "constraints=\"{"; String dojoLang = "lang=\""+usrLocale+"\""; String dojoPackage = psdi.util.CalendarUtils.getDojoDatePackage(userCalendar); String datePackage = "datePackage=\""+dojoPackage+"\""; %> <% dojoDatePattern+= "datePattern:'"+MXFormat.getDatePattern(userLocale).replace("'","\\'") + "', timePattern:'"+MXFormat.getDisplayTimePattern(userLocale).replace("'","\\'")+"'"; dojoDatePattern+=",locale:'"+usrLocale+"'}\""; dojoTypeInput = dojoTypeInput + " " + dojoDatePattern; dojoTypeInput = dojoTypeInput + " " + datePackage + " " +dojoLang; if(date!=null) dojoTypeInput = dojoTypeInput + "dojovalue='" + date.getTime() +"'"; }catch(Exception e){ dojoTypeInput = ""; } } //IBMBIDI End statusColor = KPIPortlet.getKPIStatusColor(status, wcs); statusClass = KPIPortlet.getKPIClass(status); String graphhdrAutoId=""; if(automation) graphhdrAutoId="automationid=\""+realId+"_graphheadertable\""; %> class="<%=headerclass%>" width="100%" style="background-color: #EDEEED" cellspacing="0" cellpadding="0" align="center"> <%if(!sReportName.equals("") || !sLinkedKPI.equals("")){%> <%}%> <%if(isNational) {%> <%}%> <% }// end if(vecData.size() != 0) else {%>
<%=s.getMessage("kpi", "nochartdata")%>
<% } }//if not new } }//if show header %><%@ include file="../common/componentfooter.jsp" %>