ref 11711: SAI - Add a simple text viewer so that log files created by Data Miner algorithms can be directly viewed in the browser
https://support.d4science.org/issues/11711 Added service info[ticket #12594] Added support to show log information [ticket #11711] Added support to show files html, json, pdf, txt [ticket #17106] Updated information show to the user when a computation is submitted [ticket #17030] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@181878 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
02d6215600
commit
b220d4d97b
|
@ -130,13 +130,13 @@ public class ServiceInfoPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAddress(ServiceInfoData address) {
|
private void showAddress(String address) {
|
||||||
// address
|
// Service address
|
||||||
SimpleContainer sectionServerAddress = new SimpleContainer();
|
SimpleContainer sectionServerAddress = new SimpleContainer();
|
||||||
|
|
||||||
HtmlLayoutContainer addressHtml = new HtmlLayoutContainer(
|
HtmlLayoutContainer addressHtml = new HtmlLayoutContainer(
|
||||||
"<p style='font-size:12px;'>The base url of the service instance is: " + "<a href='" + address.getValue() + "'>"
|
"<p style='font-size:12px;'>The base url of the service instance is: " + "<a href='" + address + "'>"
|
||||||
+ address.getValue() + "</a></p>");
|
+ address + "</a></p>");
|
||||||
sectionServerAddress.add(addressHtml, new MarginData());
|
sectionServerAddress.add(addressHtml, new MarginData());
|
||||||
sectionServerAddress.getElement().getStyle().setMarginRight(20, Unit.PX);
|
sectionServerAddress.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||||
v.add(sectionServerAddress, new VerticalLayoutData(-1, -1, new Margins(10)));
|
v.add(sectionServerAddress, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
@ -145,27 +145,18 @@ public class ServiceInfoPanel extends FramedPanel {
|
||||||
|
|
||||||
private void showServiceInfo(ServiceInfo serviceInfo) {
|
private void showServiceInfo(ServiceInfo serviceInfo) {
|
||||||
|
|
||||||
if (serviceInfo != null && serviceInfo.getServiceProperties() != null
|
if (serviceInfo != null) {
|
||||||
&& !serviceInfo.getServiceProperties().isEmpty()) {
|
|
||||||
|
|
||||||
ServiceInfoData address=null;
|
String address=serviceInfo.getServiceAddress();
|
||||||
ArrayList<ServiceInfoData> properties=serviceInfo.getServiceProperties();
|
if(address!=null&&!address.isEmpty()){
|
||||||
for(ServiceInfoData serviceInfoData:properties) {
|
|
||||||
if(serviceInfoData.getKey().compareTo("Address")==0){
|
|
||||||
address = serviceInfoData;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(address!=null){
|
|
||||||
properties.remove(address);
|
|
||||||
showAddress(address);
|
showAddress(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
FieldSet environmentFieldSet = environmentView();
|
FieldSet environmentFieldSet = environmentView();
|
||||||
v.add(environmentFieldSet, new VerticalLayoutData(-1, -1, new Margins(10)));
|
v.add(environmentFieldSet, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
|
||||||
if (!properties.isEmpty()) {
|
ArrayList<ServiceInfoData> properties=serviceInfo.getServiceProperties();
|
||||||
|
if (properties!=null&&!properties.isEmpty()) {
|
||||||
Grid<ServiceInfoData> grid = createInfoGrid(properties);
|
Grid<ServiceInfoData> grid = createInfoGrid(properties);
|
||||||
environmentVBox.add(grid, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
environmentVBox.add(grid, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -173,7 +164,6 @@ public class ServiceInfoPanel extends FramedPanel {
|
||||||
"<div class='service-property'><p>No Info Available.</p></div>");
|
"<div class='service-property'><p>No Info Available.</p></div>");
|
||||||
|
|
||||||
environmentVBox.add(emptyInfoContainer, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
environmentVBox.add(emptyInfoContainer, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FieldSet environmentFieldSet = environmentView();
|
FieldSet environmentFieldSet = environmentView();
|
||||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
||||||
import org.gcube.common.authorization.library.provider.UserInfo;
|
import org.gcube.common.authorization.library.provider.UserInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.server.is.InformationSystemUtils;
|
import org.gcube.data.analysis.dataminermanagercl.server.is.InformationSystemUtils;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfoData;
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfoData;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -64,15 +65,16 @@ public class TestInformationSystemRequests extends TestCase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ServiceInfoData> serviceProperties = InformationSystemUtils.retrieveServiceProperties(
|
ServiceInfo serviceInfo = InformationSystemUtils.retrieveServiceInfo(
|
||||||
Constants.DATAMINER_SERVICE_CATEGORY, Constants.DATA_MINER_SERVICE_NAME, serviceCredentials.getScope());
|
Constants.DATAMINER_SERVICE_CATEGORY, Constants.DATA_MINER_SERVICE_NAME, serviceCredentials.getScope());
|
||||||
logger.debug("Service Properties retrieved:" + serviceProperties);
|
logger.debug("Service Properties retrieved:" + serviceInfo);
|
||||||
if (serviceProperties == null || serviceProperties.isEmpty()) {
|
if (serviceInfo == null) {
|
||||||
logger.error("No DataMiner service properties available!");
|
logger.error("No DataMiner service properties available!");
|
||||||
throw new Exception("No DataMiner service properties available!");
|
throw new Exception("No DataMiner service properties available!");
|
||||||
} else {
|
} else {
|
||||||
logger.info("DataMiner service properties found: ");
|
logger.info("DataMiner service properties found");
|
||||||
for (ServiceInfoData serviceInfoData : serviceProperties) {
|
logger.debug("Service Address: "+serviceInfo.getServiceAddress());
|
||||||
|
for (ServiceInfoData serviceInfoData : serviceInfo.getServiceProperties()) {
|
||||||
logger.debug("Property: " + serviceInfoData);
|
logger.debug("Property: " + serviceInfoData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue