removed vos from frontpage

master
Lucio Lelii 2 years ago
parent 2fe7d3d4bc
commit 08838cb6d6

@ -91,37 +91,8 @@ public class FrontPageResource extends ApiResource {
values.put("version", context().configuration().version());
String infrastructure = context().container().configuration().infrastructure();
StringBuilder voValue = new StringBuilder();
Set<String> vos = new HashSet<String>();
//pre-process
for (String scope : context().container().configuration().authorizationProvider().getContexts()) {
ContextBean bean = new ContextBean(scope);
switch (bean.type()) {
case INFRASTRUCTURE:
infrastructure = bean.name();
break;
case VO:
vos.add(bean.name());
break;
case VRE:
vos.add(bean.enclosingScope().name());
infrastructure=bean.enclosingScope().enclosingScope().name();
}
}
//build vo value
int i = 0;
int max = vos.size()-1;
for (String vo : vos) {
String voPrefix = i == 0 ? "" : (i==max?" and ":", ");
voValue.append(voPrefix+"<em>" + vo + "</em>");
i++;
}
values.put("infra", infrastructure);
values.put("vos", voValue.toString());
values.put("status", context().lifecycle().state().toString());

@ -2,8 +2,6 @@ package org.gcube.smartgears.handlers.application.request;
import java.util.concurrent.TimeUnit;
import javax.xml.bind.annotation.XmlRootElement;
import org.gcube.accounting.datamodel.UsageRecord.OperationResult;
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
import org.gcube.accounting.persistence.AccountingPersistence;
@ -21,7 +19,6 @@ import org.slf4j.LoggerFactory;
import io.micrometer.core.instrument.Metrics;
@XmlRootElement(name = Constants.request_accounting)
public class RequestAccounting extends RequestHandler {
private static Logger log = LoggerFactory.getLogger(RequestAccounting.class);
@ -47,7 +44,6 @@ public class RequestAccounting extends RequestHandler {
if (calledMethod.isEmpty())
calledMethod = "/";
calledMethod= e.request().getMethod()+" "+calledMethod;
InnerMethodName.instance.set(calledMethod);
}

@ -7,8 +7,6 @@ import static org.gcube.smartgears.handlers.application.request.RequestError.inv
import java.util.Set;
import javax.xml.bind.annotation.XmlRootElement;
import org.gcube.common.security.ContextBean;
import org.gcube.common.security.ContextBean.Type;
import org.gcube.common.security.providers.SecretManagerProvider;
@ -25,7 +23,6 @@ import org.gcube.smartgears.handlers.application.ResponseEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@XmlRootElement(name = Constants.request_validation)
public class RequestValidator extends RequestHandler {
private static Logger log = LoggerFactory.getLogger(RequestValidator.class);
@ -119,7 +116,7 @@ public class RequestValidator extends RequestHandler {
}
private void validatePolicy(RequestEvent call){
//TODO: must be re-think
//TODO: must be rethought
}
private Secret getSecret(RequestEvent call){

@ -104,7 +104,7 @@
</div>
<div id="middle">
<p>Welcome to <em>${name}</em>,</p>
<p>a resource of the <em>${infra}</em> infrastructure shared in <em>${vos}</em> VOs.</p>
<p>a resource of the <em>${infra}</em> infrastructure</p>
<p style="padding-top:30px">The resource is <em>${status}</em>.</p>
</div>

Loading…
Cancel
Save