Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@99224 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-08-06 09:25:09 +00:00
parent 589e4ee73d
commit aad85271ee
2 changed files with 29 additions and 9 deletions

View File

@ -30,8 +30,11 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
public class TDMLogs extends Window {
protected static final String TDMLogsServlet = "TDLogsServlet";
protected static final String WIDTH="500px";
protected static final String WIDTH="700px";
protected static final String HEIGHT="500px";
protected static final String CONTENTLOGSWIDTH="674px";
protected static final String CONTENTLOGSHEIGHT="410px";
protected EventBus eventBus;
protected VerticalLayoutContainer verticalContainer;
@ -44,12 +47,12 @@ public class TDMLogs extends Window {
}
public void init(){
setWidth("640px");
setWidth(WIDTH);
setHeight(HEIGHT);
setHeadingText("TDM Logs");
setBodyBorder(false);
setClosable(true);
setResizable(false);
}
protected void createLogsPanel() {
@ -58,6 +61,7 @@ public class TDMLogs extends Window {
logsPanel.setHeaderVisible(false);
ToolBar toolBar = new ToolBar();
TextButton btnReload = new TextButton();
// btnReload.setText("Reload");
btnReload.addSelectHandler(new SelectHandler() {
@ -75,6 +79,8 @@ public class TDMLogs extends Window {
SimpleContainer contentLogs = new SimpleContainer();
contentLogs.setBorders(false);
contentLogs.setWidth(CONTENTLOGSWIDTH);
contentLogs.setHeight(CONTENTLOGSHEIGHT);
verticalContainer = new VerticalLayoutContainer();
verticalContainer.setScrollMode(ScrollMode.AUTO);
@ -84,8 +90,8 @@ public class TDMLogs extends Window {
VerticalLayoutContainer logsPanelLayout=new VerticalLayoutContainer();
logsPanelLayout.add(toolBar, new VerticalLayoutData(-1,-1,new Margins(1)));
logsPanelLayout.add(contentLogs, new VerticalLayoutData(-1,-1,new Margins(1)));
logsPanelLayout.add(toolBar, new VerticalLayoutData(1,32,new Margins(1)));
logsPanelLayout.add(contentLogs, new VerticalLayoutData(1,-1,new Margins(1)));
logsPanel.add(logsPanelLayout);
add(logsPanel);
@ -141,14 +147,18 @@ public class TDMLogs extends Window {
protected void update(String text){
verticalContainer.clear();
/*int body=text.indexOf("<body>");
text=text.substring(body+6);*/
SafeHtmlBuilder builderLogs = new SafeHtmlBuilder();
/*builderLogs.appendHtmlConstant(text);*/
builderLogs.appendEscapedLines(text);
SafeHtml safeLogs = builderLogs.toSafeHtml();
HTML hLogs = new HTML(safeLogs);
verticalContainer.add(hLogs, new VerticalLayoutData(-1,-1,new Margins(1)));
verticalContainer.forceLayout();
verticalContainer.add(hLogs, new VerticalLayoutData(1,-1,new Margins(1)));
forceLayout();
}

View File

@ -14,15 +14,25 @@
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${CATALINA_HOME}/webapps/tabular-data-portlet/logs/TabularDataManagerLogBack.log</file>
<file>${CATALINA_HOME}/webapps/tabular-data-portlet/logs/TabularDataManagerLogBack.log
</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>TabularData.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<!--
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="ch.qos.logback.classic.html.HTMLLayout">
<pattern>%d%thread%-5level%logger%msg</pattern>
</layout>
</encoder> -->
<encoder>
<pattern>%d [%thread] %-5level %logger{35} - %msg%n
</pattern>