Commit 127ff317 authored by sbade's avatar sbade

removed Refreshed label from graph


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98469 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 125d6683
...@@ -93,6 +93,7 @@ public class GraphComponent extends Composite ...@@ -93,6 +93,7 @@ public class GraphComponent extends Composite
//final ArrayList<FilterInfo> filterList = metaDataDtl.getFilters(metaDataJsnObj); //final ArrayList<FilterInfo> filterList = metaDataDtl.getFilters(metaDataJsnObj);
public GraphComponent(ArrayList<String> parameterList, JSONObject metaDataJsnObj,String showfilter) public GraphComponent(ArrayList<String> parameterList, JSONObject metaDataJsnObj,String showfilter)
{ {
userMail = Window.Location.getParameter("EMP_MAILCODE") == null ? "" : Window.Location.getParameter("EMP_MAILCODE"); userMail = Window.Location.getParameter("EMP_MAILCODE") == null ? "" : Window.Location.getParameter("EMP_MAILCODE");
reportCaption= Window.Location.getParameter("GEO_LOCATION") == null ? "" : Window.Location.getParameter("GEO_LOCATION"); reportCaption= Window.Location.getParameter("GEO_LOCATION") == null ? "" : Window.Location.getParameter("GEO_LOCATION");
String isShowfilter= Window.Location.getParameter("FLAG"); String isShowfilter= Window.Location.getParameter("FLAG");
...@@ -113,14 +114,11 @@ public class GraphComponent extends Composite ...@@ -113,14 +114,11 @@ public class GraphComponent extends Composite
/*if(isCheck) /*if(isCheck)
{ {
RootPanel panel = RootPanel.get("chartContainer"); RootPanel panel = RootPanel.get("chartContainer");
}*/ }*/
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void buildChart(final LinkedHashMap<String, JSONObject> dataMap,ArrayList<String> parameterList,ArrayList<FilterInfo> filterList) public void buildChart(final LinkedHashMap<String, JSONObject> dataMap,ArrayList<String> parameterList,ArrayList<FilterInfo> filterList)
{ {
JSONObject jsonObjFrGraph = null; JSONObject jsonObjFrGraph = null;
String height = null; String height = null;
String width = null; String width = null;
...@@ -138,8 +136,7 @@ public class GraphComponent extends Composite ...@@ -138,8 +136,7 @@ public class GraphComponent extends Composite
String compType = ""; String compType = "";
String component =""; String component ="";
HashMap<String, ArrayList<String>> graphTypeMap = null; HashMap<String, ArrayList<String>> graphTypeMap = null;
String dtSrouce=""; String dtSrouce="";
/*Added By Dhanendra on 25May2015 for Group*/ /*Added By Dhanendra on 25May2015 for Group*/
ArrayList<String> groupNameList = null; ArrayList<String> groupNameList = null;
...@@ -167,7 +164,7 @@ public class GraphComponent extends Composite ...@@ -167,7 +164,7 @@ public class GraphComponent extends Composite
/*Ended By Dhanendra on 25May2015 for Group*/ /*Ended By Dhanendra on 25May2015 for Group*/
/** Add Code By Dhanendra for No Data Found Msg **/ /** Add Code By Dhanendra for No Data Found Msg **/
String parameter=""; /*String parameter="";
boolean isParameter = false; boolean isParameter = false;
for (int i = 0; i < parameterList.size(); i++) for (int i = 0; i < parameterList.size(); i++)
{ {
...@@ -180,7 +177,7 @@ public class GraphComponent extends Composite ...@@ -180,7 +177,7 @@ public class GraphComponent extends Composite
} }
} }
} }*/
/** End Code By Dhanendra for No Data Found Msg **/ /** End Code By Dhanendra for No Data Found Msg **/
if (idList.size() > 0) if (idList.size() > 0)
{ {
...@@ -189,9 +186,7 @@ public class GraphComponent extends Composite ...@@ -189,9 +186,7 @@ public class GraphComponent extends Composite
/*comment line because of container name change by Dhanedra 01-07-15*/ /*comment line because of container name change by Dhanedra 01-07-15*/
//RootPanel panel = RootPanel.get("chartContainer" + idList.get(i)); //RootPanel panel = RootPanel.get("chartContainer" + idList.get(i));
/*comment line because of container name change by Dhanedra 01-07-15*/ /*comment line because of container name change by Dhanedra 01-07-15*/
RootPanel panel = RootPanel.get(idList.get(i));
RootPanel panel = RootPanel.get(idList.get(i));
panel.clear(); panel.clear();
if (panel.getElement().getFirstChild() != null) if (panel.getElement().getFirstChild() != null)
{ {
...@@ -316,7 +311,7 @@ public class GraphComponent extends Composite ...@@ -316,7 +311,7 @@ public class GraphComponent extends Composite
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate); String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label("Refreshed : "+dateformat); Label refreshDateTime = new Label(dateformat);
HorizontalPanel componantTtlPanel = new HorizontalPanel(); HorizontalPanel componantTtlPanel = new HorizontalPanel();
HorizontalPanel dateHPanel = new HorizontalPanel(); HorizontalPanel dateHPanel = new HorizontalPanel();
...@@ -437,8 +432,8 @@ public class GraphComponent extends Composite ...@@ -437,8 +432,8 @@ public class GraphComponent extends Composite
else else
{ {
//RootPanel.get("chartContainer"+componentId).clear(); //RootPanel.get("chartContainer"+componentId).clear();
if(isParameter) //if(isParameter)
{ //{
flexTable = new FlexTable(); flexTable = new FlexTable();
graphCaptionList.clear(); graphCaptionList.clear();
graphCaptioneMap = gridNGraphMeataDataMap.get("componentCaption"+componentId); graphCaptioneMap = gridNGraphMeataDataMap.get("componentCaption"+componentId);
...@@ -467,7 +462,7 @@ public class GraphComponent extends Composite ...@@ -467,7 +462,7 @@ public class GraphComponent extends Composite
/*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/ /*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/
/*RootPanel.get("chartContainer"+componentId).add(flexTable);*/ /*RootPanel.get("chartContainer"+componentId).add(flexTable);*/
} //}
} }
/** End Code By Dhanendra for No Data Found Msg **/ /** End Code By Dhanendra for No Data Found Msg **/
} }
...@@ -832,15 +827,10 @@ public class GraphComponent extends Composite ...@@ -832,15 +827,10 @@ public class GraphComponent extends Composite
alert("Excpeiton :: GraphComponent : clearContainer [" + e.message + "]"); alert("Excpeiton :: GraphComponent : clearContainer [" + e.message + "]");
} }
}-*/; }-*/;
/*End Code for create dyanamic div by Dhanendra for one by one report display*/ /*End Code for create dyanamic div by Dhanendra for one by one report display*/
private native void createDiv(String componentId)
/*-{
try {
$wnd.createDiv(componentId);
} catch (e) {
alert("Excpeiton :: GraphComponent : createDiv [" + e.message + "]");
}
}-*/;
/** End Native Method */ /** End Native Method */
...@@ -878,24 +868,36 @@ public class GraphComponent extends Composite ...@@ -878,24 +868,36 @@ public class GraphComponent extends Composite
FilterInfo filterInfo = null; FilterInfo filterInfo = null;
/** Start Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/ /** Start Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/
objActionPath = "/ibase/" + servletname; objActionPath = "/ibase/" + servletname;
int cnt=0; int cnt=0;
for (int i = 0; i < filterList.size(); i++) if(filterList.size()>0)
{ {
cnt++; for (int i = 0; i < filterList.size(); i++)
filterInfo = filterList.get(i);
if(i==0)
{
objActionPath=objActionPath + "?" + filterInfo.getColName()+"="+parameterList.get(cnt);
}else
{ {
objActionPath=objActionPath + "&" + filterInfo.getColName()+"="+parameterList.get(cnt); cnt++;
filterInfo = filterList.get(i);
if(i==0)
{
objActionPath=objActionPath + "?" + filterInfo.getColName()+"="+parameterList.get(cnt);
}else
{
objActionPath=objActionPath + "&" + filterInfo.getColName()+"="+parameterList.get(cnt);
}
} }
objActionPath=objActionPath+"&dataSourceName=" + dbDataSource + "&reportName="+page+"&viewOptionSelectd="+viewOptionSelectd;
} }
objActionPath=objActionPath+"&dataSourceName=" + dbDataSource + "&reportName="+page+"&viewOptionSelectd="+viewOptionSelectd; /*added by swati - if no filters are present in meta data xml*/
else
{
objActionPath=objActionPath+"?dataSourceName=" + dbDataSource + "&reportName="+page+"&viewOptionSelectd="+viewOptionSelectd;
}
/*ended by swati - if no filters are present in meta data xml*/
/** End Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/ /** End Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/
if(objActionPath.length()>0) // added if by swati
{
RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.POST, objActionPath); RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.POST, objActionPath);
try try
...@@ -931,6 +933,7 @@ public class GraphComponent extends Composite ...@@ -931,6 +933,7 @@ public class GraphComponent extends Composite
} else } else
{ {
Window.alert("Responce for getData null"); Window.alert("Responce for getData null");
e12LoadImg.setLoading(false);
} }
} }
@Override @Override
...@@ -944,6 +947,7 @@ public class GraphComponent extends Composite ...@@ -944,6 +947,7 @@ public class GraphComponent extends Composite
e.printStackTrace(); e.printStackTrace();
e12LoadImg.setLoading(false); e12LoadImg.setLoading(false);
} }
}
} }
} }
public boolean isNumeric(String s) { public boolean isNumeric(String s) {
...@@ -1229,7 +1233,7 @@ public class GraphComponent extends Composite ...@@ -1229,7 +1233,7 @@ public class GraphComponent extends Composite
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate); String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label("Refreshed : "+dateformat); Label refreshDateTime = new Label(dateformat);
this.createOuterDiv(groupName,"G",null); this.createOuterDiv(groupName,"G",null);
HorizontalPanel componantTtlPanel = new HorizontalPanel(); HorizontalPanel componantTtlPanel = new HorizontalPanel();
HorizontalPanel dateHPanel = new HorizontalPanel(); HorizontalPanel dateHPanel = new HorizontalPanel();
......
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