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) {
|
||||
// address
|
||||
private void showAddress(String address) {
|
||||
// Service address
|
||||
SimpleContainer sectionServerAddress = new SimpleContainer();
|
||||
|
||||
HtmlLayoutContainer addressHtml = new HtmlLayoutContainer(
|
||||
"<p style='font-size:12px;'>The base url of the service instance is: " + "<a href='" + address.getValue() + "'>"
|
||||
+ address.getValue() + "</a></p>");
|
||||
"<p style='font-size:12px;'>The base url of the service instance is: " + "<a href='" + address + "'>"
|
||||
+ address + "</a></p>");
|
||||
sectionServerAddress.add(addressHtml, new MarginData());
|
||||
sectionServerAddress.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||
v.add(sectionServerAddress, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||
|
@ -145,27 +145,18 @@ public class ServiceInfoPanel extends FramedPanel {
|
|||
|
||||
private void showServiceInfo(ServiceInfo serviceInfo) {
|
||||
|
||||
if (serviceInfo != null && serviceInfo.getServiceProperties() != null
|
||||
&& !serviceInfo.getServiceProperties().isEmpty()) {
|
||||
if (serviceInfo != null) {
|
||||
|
||||
ServiceInfoData address=null;
|
||||
ArrayList<ServiceInfoData> properties=serviceInfo.getServiceProperties();
|
||||
for(ServiceInfoData serviceInfoData:properties) {
|
||||
if(serviceInfoData.getKey().compareTo("Address")==0){
|
||||
address = serviceInfoData;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(address!=null){
|
||||
properties.remove(address);
|
||||
String address=serviceInfo.getServiceAddress();
|
||||
if(address!=null&&!address.isEmpty()){
|
||||
showAddress(address);
|
||||
}
|
||||
|
||||
FieldSet environmentFieldSet = environmentView();
|
||||
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);
|
||||
environmentVBox.add(grid, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||
} else {
|
||||
|
@ -173,7 +164,6 @@ public class ServiceInfoPanel extends FramedPanel {
|
|||
"<div class='service-property'><p>No Info Available.</p></div>");
|
||||
|
||||
environmentVBox.add(emptyInfoContainer, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||
|
||||
}
|
||||
} else {
|
||||
FieldSet environmentFieldSet = environmentView();
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
import org.gcube.common.authorization.library.provider.UserInfo;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.is.InformationSystemUtils;
|
||||
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.portlets.user.dataminermanager.shared.Constants;
|
||||
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());
|
||||
logger.debug("Service Properties retrieved:" + serviceProperties);
|
||||
if (serviceProperties == null || serviceProperties.isEmpty()) {
|
||||
logger.debug("Service Properties retrieved:" + serviceInfo);
|
||||
if (serviceInfo == null) {
|
||||
logger.error("No DataMiner service properties available!");
|
||||
throw new Exception("No DataMiner service properties available!");
|
||||
} else {
|
||||
logger.info("DataMiner service properties found: ");
|
||||
for (ServiceInfoData serviceInfoData : serviceProperties) {
|
||||
logger.info("DataMiner service properties found");
|
||||
logger.debug("Service Address: "+serviceInfo.getServiceAddress());
|
||||
for (ServiceInfoData serviceInfoData : serviceInfo.getServiceProperties()) {
|
||||
logger.debug("Property: " + serviceInfoData);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue