ajax urls
This commit is contained in:
parent
3b6f66a5c0
commit
d956eb1636
|
@ -12,45 +12,44 @@ server {
|
|||
proxy_pass http://angular-dev:4200/;
|
||||
}
|
||||
|
||||
location /context-manager/ {
|
||||
proxy_pass http://context-manager:8080/context-manager/;
|
||||
location /ajax/context-manager/ {
|
||||
proxy_pass http://context-manager:8080/context-manager/ajax/;
|
||||
}
|
||||
|
||||
location /dsm/ {
|
||||
proxy_pass http://dsm:8080/dsm/;
|
||||
location /ajax/dsm/ {
|
||||
proxy_pass http://dsm:8080/dsm/ajax/;
|
||||
}
|
||||
|
||||
location /mail-sender/ {
|
||||
proxy_pass http://mail-sender:8080/mail-sender/;
|
||||
location /ajax/mail-sender/ {
|
||||
proxy_pass http://mail-sender:8080/mail-sender/ajax/;
|
||||
}
|
||||
|
||||
location /indexer/ {
|
||||
proxy_pass http://indexer:8080/indexer/;
|
||||
location /ajax/indexer/ {
|
||||
proxy_pass http://indexer:8080/indexer/ajax/;
|
||||
}
|
||||
|
||||
location /mdsm/ {
|
||||
proxy_pass http://mdsm:8080/mdsm/;
|
||||
location /ajax/mdsm/ {
|
||||
proxy_pass http://mdsm:8080/mdsm/ajax/;
|
||||
}
|
||||
|
||||
location /oai-exporter/ {
|
||||
proxy_pass http://oai-exporter:8080/oai-exporter/;
|
||||
location /ajax/oai-exporter/ {
|
||||
proxy_pass http://oai-exporter:8080/oai-exporter/ajax/;
|
||||
}
|
||||
|
||||
location /resource-manager/ {
|
||||
proxy_pass http://resource-manager:8080/resource-manager/;
|
||||
location /ajax/resource-manager/ {
|
||||
proxy_pass http://resource-manager:8080/resource-manager/ajax/;
|
||||
}
|
||||
|
||||
|
||||
location /vocabulary-manager/ {
|
||||
proxy_pass http://vocabulary-manager:8080/vocabulary-manager/;
|
||||
location /ajax/vocabulary-manager/ {
|
||||
proxy_pass http://vocabulary-manager:8080/vocabulary-manager/ajax/;
|
||||
}
|
||||
|
||||
location /wf-exec-postgres/ {
|
||||
proxy_pass http://wf-exec-postgres:8080/wf-exec/;
|
||||
location /ajax/wf-exec-postgres/ {
|
||||
proxy_pass http://wf-exec-postgres:8080/wf-exec/ajax/;
|
||||
}
|
||||
|
||||
location /wf-manager/ {
|
||||
proxy_pass http://wf-manager:8080/wf-manager/;
|
||||
location /ajax/wf-manager/ {
|
||||
proxy_pass http://wf-manager:8080/wf-manager/ajax/;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import eu.dnetlib.services.dsm.service.ProtocolService;
|
|||
import eu.dnetlib.services.dsm.utils.DsmBrowsableFields;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/ajax/dsm")
|
||||
@RequestMapping("/ajax")
|
||||
public class DsmAjaxController extends DnetRestController {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -55,7 +55,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||
import jakarta.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/dsm/1.0")
|
||||
@RequestMapping("/api/1.0")
|
||||
@Tag(name = "OpenAIRE DSM API", description = "the OpenAIRE Datasource Manager API")
|
||||
public class DsmApiControllerV1 extends AbstractDsmController {
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import eu.dnetlib.services.dsm.utils.ResponseUtils;
|
|||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/dsm/2.0")
|
||||
@RequestMapping("/api/2.0")
|
||||
@Tag(name = "OpenAIRE DSM API (version 2.0)", description = "the OpenAIRE Datasource Manager API 2.0")
|
||||
public class DsmApiControllerV2 extends AbstractDsmController {
|
||||
|
||||
|
|
|
@ -1,26 +1,44 @@
|
|||
package eu.dnetlib.wfs.manager.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import eu.dnetlib.common.clients.DnetServiceClientFactory;
|
||||
import eu.dnetlib.common.clients.WfExecutorClient;
|
||||
import eu.dnetlib.common.controller.DnetRestController;
|
||||
import eu.dnetlib.domain.common.KeyValue;
|
||||
import eu.dnetlib.domain.wfs.WfHistoryEntry;
|
||||
import eu.dnetlib.domain.wfs.WorkflowConfiguration;
|
||||
import eu.dnetlib.domain.wfs.WorkflowSection;
|
||||
import eu.dnetlib.domain.wfs.WorkflowSubscription;
|
||||
import eu.dnetlib.wfs.manager.service.WorkflowManagerService;
|
||||
import eu.dnetlib.wfs.procs.ExecutionStatus;
|
||||
import eu.dnetlib.wfs.utils.WorkflowLogger;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/ajax/wf_history")
|
||||
@RequestMapping("/ajax")
|
||||
public class WfAjaxController extends DnetRestController {
|
||||
|
||||
@Autowired
|
||||
private WorkflowLogger logger;
|
||||
|
||||
@GetMapping("/")
|
||||
@Autowired
|
||||
private WorkflowManagerService wfManagerService;
|
||||
|
||||
@Autowired
|
||||
private DnetServiceClientFactory clientFactory;
|
||||
|
||||
@GetMapping("/history")
|
||||
public List<WfHistoryEntry> history(
|
||||
@RequestParam(required = true) final int total,
|
||||
@RequestParam(required = false) final Long from,
|
||||
|
@ -28,7 +46,7 @@ public class WfAjaxController extends DnetRestController {
|
|||
return logger.history(total, from, to);
|
||||
}
|
||||
|
||||
@GetMapping("/byConf/{wfConfId}")
|
||||
@GetMapping("/history/byConf/{wfConfId}")
|
||||
public List<WfHistoryEntry> history(@PathVariable final String wfConfId) {
|
||||
return logger.history(wfConfId);
|
||||
}
|
||||
|
@ -38,4 +56,55 @@ public class WfAjaxController extends DnetRestController {
|
|||
return logger.getLog(processId);
|
||||
}
|
||||
|
||||
@GetMapping("/sections")
|
||||
public List<WorkflowSection> listWfSections() throws Exception {
|
||||
return wfManagerService.listSections();
|
||||
}
|
||||
|
||||
@GetMapping("/sections/{section}")
|
||||
public List<KeyValue<String>> listWfConfigurations(@PathVariable final String section) throws Exception {
|
||||
return wfManagerService.listWfConfigurationsBySection(section)
|
||||
.stream()
|
||||
.map(x -> new KeyValue<>(x.getId(), x.getName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}")
|
||||
public WorkflowConfiguration getWfConfiguration(@PathVariable final String id) throws Exception {
|
||||
return wfManagerService.findWorkflowConfiguration(id);
|
||||
}
|
||||
|
||||
@PostMapping("/conf")
|
||||
public WorkflowConfiguration saveWfConfiguration(@RequestBody final WorkflowConfiguration conf) throws Exception {
|
||||
return wfManagerService.saveWfConfiguration(conf);
|
||||
}
|
||||
|
||||
@DeleteMapping("/conf/{id}")
|
||||
public void deleteWfConfiguration(@PathVariable final String id) throws Exception {
|
||||
wfManagerService.deleteWfConfiguration(id);
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}/start")
|
||||
public ExecutionStatus startWorkflowConfiguration(@PathVariable final String id) throws Exception {
|
||||
final String procId = clientFactory.getClient(WfExecutorClient.class).startWorkflowConfiguration(id);
|
||||
return new ExecutionStatus(procId);
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}/destroy")
|
||||
public ExecutionStatus destroyWorkflowConfiguration(@PathVariable final String id) throws Exception {
|
||||
final WorkflowConfiguration conf = wfManagerService.findWorkflowConfiguration(id);
|
||||
final String procId = clientFactory.getClient(WfExecutorClient.class).startWorkflowConfiguration(conf.getDestroyWf());
|
||||
return new ExecutionStatus(procId);
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}/subscriptions")
|
||||
public List<WorkflowSubscription> listWorkflowSubscriptions(@PathVariable final String id) throws Exception {
|
||||
return wfManagerService.listSubscriptions(id);
|
||||
}
|
||||
|
||||
@PostMapping("/conf/{id}/subscriptions")
|
||||
public void saveWorkflowSubscriptions(@PathVariable final String id, @RequestBody final List<WorkflowSubscription> subscriptions) throws Exception {
|
||||
wfManagerService.saveSubscriptions(id, subscriptions);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,85 +1,12 @@
|
|||
package eu.dnetlib.wfs.manager.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import eu.dnetlib.common.clients.DnetServiceClientFactory;
|
||||
import eu.dnetlib.common.clients.WfExecutorClient;
|
||||
import eu.dnetlib.common.controller.DnetRestController;
|
||||
import eu.dnetlib.domain.common.KeyValue;
|
||||
import eu.dnetlib.domain.wfs.WorkflowConfiguration;
|
||||
import eu.dnetlib.domain.wfs.WorkflowSection;
|
||||
import eu.dnetlib.domain.wfs.WorkflowSubscription;
|
||||
import eu.dnetlib.wfs.manager.service.WorkflowManagerService;
|
||||
import eu.dnetlib.wfs.procs.ExecutionStatus;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/wfs")
|
||||
@RequestMapping("/api")
|
||||
public class WfApiController extends DnetRestController {
|
||||
|
||||
@Autowired
|
||||
private WorkflowManagerService wfManagerService;
|
||||
|
||||
@Autowired
|
||||
private DnetServiceClientFactory clientFactory;
|
||||
|
||||
@GetMapping("/sections")
|
||||
public List<WorkflowSection> listWfSections() throws Exception {
|
||||
return wfManagerService.listSections();
|
||||
}
|
||||
|
||||
@GetMapping("/sections/{section}")
|
||||
public List<KeyValue<String>> listWfConfigurations(@PathVariable final String section) throws Exception {
|
||||
return wfManagerService.listWfConfigurationsBySection(section)
|
||||
.stream()
|
||||
.map(x -> new KeyValue<>(x.getId(), x.getName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}")
|
||||
public WorkflowConfiguration getWfConfiguration(@PathVariable final String id) throws Exception {
|
||||
return wfManagerService.findWorkflowConfiguration(id);
|
||||
}
|
||||
|
||||
@PostMapping("/conf")
|
||||
public WorkflowConfiguration saveWfConfiguration(@RequestBody final WorkflowConfiguration conf) throws Exception {
|
||||
return wfManagerService.saveWfConfiguration(conf);
|
||||
}
|
||||
|
||||
@DeleteMapping("/conf/{id}")
|
||||
public void deleteWfConfiguration(@PathVariable final String id) throws Exception {
|
||||
wfManagerService.deleteWfConfiguration(id);
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}/start")
|
||||
public ExecutionStatus startWorkflowConfiguration(@PathVariable final String id) throws Exception {
|
||||
final String procId = clientFactory.getClient(WfExecutorClient.class).startWorkflowConfiguration(id);
|
||||
return new ExecutionStatus(procId);
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}/destroy")
|
||||
public ExecutionStatus destroyWorkflowConfiguration(@PathVariable final String id) throws Exception {
|
||||
final WorkflowConfiguration conf = wfManagerService.findWorkflowConfiguration(id);
|
||||
final String procId = clientFactory.getClient(WfExecutorClient.class).startWorkflowConfiguration(conf.getDestroyWf());
|
||||
return new ExecutionStatus(procId);
|
||||
}
|
||||
|
||||
@GetMapping("/conf/{id}/subscriptions")
|
||||
public List<WorkflowSubscription> listWorkflowSubscriptions(@PathVariable final String id) throws Exception {
|
||||
return wfManagerService.listSubscriptions(id);
|
||||
}
|
||||
|
||||
@PostMapping("/conf/{id}/subscriptions")
|
||||
public void saveWorkflowSubscriptions(@PathVariable final String id, @RequestBody final List<WorkflowSubscription> subscriptions) throws Exception {
|
||||
wfManagerService.saveSubscriptions(id, subscriptions);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,9 @@ const routes: Routes = [
|
|||
{ path: "", redirectTo: 'info', pathMatch: 'full' },
|
||||
{ path: "info", component: InfoComponent },
|
||||
{ path: "resources/:type", component: ResourcesComponent },
|
||||
{ path: "adv_resources/context", component: ContextsComponent },
|
||||
{ path: "adv_resources/vocabulary", component: VocabulariesComponent },
|
||||
{ path: "adv_resources/protocol", component: ProtocolsComponent },
|
||||
{ path: "adv_resources/email", component: EmailsComponent },
|
||||
{ path: "contexts", component: ContextsComponent },
|
||||
{ path: "vocabularies", component: VocabulariesComponent },
|
||||
{ path: "protocols", component: ProtocolsComponent },
|
||||
{ path: "wfs/:section", component: WfConfsComponent },
|
||||
{ path: "wfs/conf/:conf", component: WfConfsComponent },
|
||||
{ path: "wf_history", component: WfHistoryComponent },
|
||||
|
|
|
@ -14,11 +14,11 @@ export class ISService {
|
|||
}
|
||||
|
||||
loadResourceTypes(onSuccess: Function) {
|
||||
this.httpGet<ResourceType[]>("/resource-manager/ajax/resourceTypes", onSuccess)
|
||||
this.httpGet<ResourceType[]>("/ajax/resource-manager/resourceTypes", onSuccess)
|
||||
}
|
||||
|
||||
loadResourceType(id: string, onSuccess: Function) {
|
||||
this.httpGet<ResourceType>("/resource-manager/ajax/resourceTypes/" + encodeURIComponent(id), onSuccess);
|
||||
this.httpGet<ResourceType>("/ajax/resource-manager/resourceTypes/" + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
|
||||
loadInfo(onSuccess: Function): void {
|
||||
|
@ -26,28 +26,28 @@ export class ISService {
|
|||
}
|
||||
|
||||
loadProtocols(onSuccess: Function): void {
|
||||
this.httpGet<Protocol[]>("/ajax/protocols/", onSuccess);
|
||||
this.httpGet<Protocol[]>("/ajax/dsm/protocols/", onSuccess);
|
||||
}
|
||||
|
||||
loadSimpleResources(type: string, onSuccess: Function): void {
|
||||
this.httpGet<SimpleResource[]>("/resource-manager/ajax/byType/" + encodeURIComponent(type), onSuccess);
|
||||
this.httpGet<SimpleResource[]>("/ajax/resource-manager/byType/" + encodeURIComponent(type), onSuccess);
|
||||
}
|
||||
|
||||
loadSimpleResourceContent(id: any, onSuccess: Function): void {
|
||||
const headers = new HttpHeaders().set('Content-Type', 'text/plain; charset=utf-8');
|
||||
this.httpGetWithOptions<string>("/resource-manager/ajax/resources/" + encodeURIComponent(id) + '/content', {
|
||||
this.httpGetWithOptions<string>("/ajax/resource-manager/resources/" + encodeURIComponent(id) + '/content', {
|
||||
headers, responseType: 'text' as 'json'
|
||||
}, onSuccess);
|
||||
}
|
||||
|
||||
saveSimpleResourceMedatata(res: SimpleResource, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('/resource-manager/ajax/resources/' + encodeURIComponent(res.id) + '/metadata', res, onSuccess, relatedForm);
|
||||
this.httpPost('/ajax/resource-manager/resources/' + encodeURIComponent(res.id) + '/metadata', res, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
saveSimpleResourceContent(id: string, content: string, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
const headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded')
|
||||
let body = new HttpParams().set('content', content);
|
||||
this.httpPostWithOptions('/resource-manager/ajax/resources/' + encodeURIComponent(id) + '/content', body, { headers: headers }, onSuccess, relatedForm);
|
||||
this.httpPostWithOptions('/ajax/resource-manager/resources/' + encodeURIComponent(id) + '/content', body, { headers: headers }, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
addSimpleResource(name: string, type: string, subtype: string, description: string, content: string, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
|
@ -58,11 +58,11 @@ export class ISService {
|
|||
.set('subtype', subtype)
|
||||
.set('description', description)
|
||||
.set('content', content);
|
||||
this.httpPostWithOptions('/resource-manager/ajax/resources/', body, { headers: headers }, onSuccess, relatedForm);
|
||||
this.httpPostWithOptions('/ajax/resource-manager/resources/', body, { headers: headers }, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
deleteSimpleResource(resourceId: string, onSuccess: Function): void {
|
||||
this.httpDelete('/resource-manager/ajax/resources/' + encodeURIComponent(resourceId), onSuccess);
|
||||
this.httpDelete('/ajax/resource-manager/resources/' + encodeURIComponent(resourceId), onSuccess);
|
||||
}
|
||||
|
||||
loadWfHistory(total: number, from: number, to: number, onSuccess: Function): void {
|
||||
|
@ -71,55 +71,55 @@ export class ISService {
|
|||
if (from && from > 0) { params = params.append('from', from); }
|
||||
if (to && to > 0) { params = params.append('to', to); }
|
||||
|
||||
this.httpGetWithOptions<WfHistoryEntry[]>('/wf-manager/ajax/wf_history/', { params: params }, onSuccess);
|
||||
this.httpGetWithOptions<WfHistoryEntry[]>('/ajax/wf-manager/history/', { params: params }, onSuccess);
|
||||
}
|
||||
|
||||
loadWfHistoryForConf(wfConfId: string, onSuccess: Function): void {
|
||||
this.httpGet<WfHistoryEntry[]>('/wf-manager/ajax/wf_history/byConf/' + encodeURIComponent(wfConfId), onSuccess);
|
||||
this.httpGet<WfHistoryEntry[]>('/ajax/wf-manager/history/byConf/' + encodeURIComponent(wfConfId), onSuccess);
|
||||
}
|
||||
|
||||
loadContexts(onSuccess: Function): void {
|
||||
this.httpGet<Context[]>('./ajax/contexts/', onSuccess);
|
||||
this.httpGet<Context[]>('/ajax/contexts-manager/', onSuccess);
|
||||
}
|
||||
|
||||
loadContext(ctxId: string, onSuccess: Function): void {
|
||||
this.httpGet<Context>('./ajax/contexts/' + encodeURIComponent(ctxId), onSuccess);
|
||||
this.httpGet<Context>('/ajax/contexts-manager/' + encodeURIComponent(ctxId), onSuccess);
|
||||
}
|
||||
|
||||
loadContextCategories(ctxId: string, onSuccess: Function): void {
|
||||
this.httpGet<ContextNode[]>('./ajax/contexts/' + encodeURIComponent(ctxId) + '/categories', onSuccess);
|
||||
this.httpGet<ContextNode[]>('/ajax/contexts-manager/' + encodeURIComponent(ctxId) + '/categories', onSuccess);
|
||||
}
|
||||
|
||||
loadContextConcepts(level: number, nodeId: string, onSuccess: Function): void {
|
||||
this.httpGet<ContextNode[]>('./ajax/contexts/' + encodeURIComponent(level) + '/' + encodeURIComponent(nodeId) + '/concepts', onSuccess);
|
||||
this.httpGet<ContextNode[]>('/ajax/contexts-manager/' + encodeURIComponent(level) + '/' + encodeURIComponent(nodeId) + '/concepts', onSuccess);
|
||||
}
|
||||
|
||||
loadVocabularies(onSuccess: Function): void {
|
||||
this.httpGet<Vocabulary[]>('./ajax/vocs/', onSuccess);
|
||||
this.httpGet<Vocabulary[]>('/ajax/vocabulary-manager/vocs/', onSuccess);
|
||||
}
|
||||
|
||||
loadVocabulary(vocId: string, onSuccess: Function): void {
|
||||
this.httpGet<Vocabulary>('./ajax/vocs/' + encodeURIComponent(vocId), onSuccess);
|
||||
this.httpGet<Vocabulary>('/ajax/vocabulary-manager/vocs/' + encodeURIComponent(vocId), onSuccess);
|
||||
}
|
||||
|
||||
loadVocabularyTerms(vocId: string, onSuccess: Function): void {
|
||||
this.httpGet<VocabularyTerm[]>('./ajax/vocs/' + encodeURIComponent(vocId) + '/terms', onSuccess);
|
||||
this.httpGet<VocabularyTerm[]>('/ajax/vocabulary-manager/vocs/' + encodeURIComponent(vocId) + '/terms', onSuccess);
|
||||
}
|
||||
|
||||
saveVocabulary(voc: Vocabulary, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('./ajax/vocs/', voc, onSuccess, relatedForm);
|
||||
this.httpPost('/ajax/vocabulary-manager/vocs/', voc, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
saveVocabularyTerm(vocId: string, term: VocabularyTerm, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('./ajax/vocs/' + encodeURIComponent(vocId) + '/terms', term, onSuccess, relatedForm);
|
||||
this.httpPost('/ajax/vocabulary-manager/vocs/' + encodeURIComponent(vocId) + '/terms', term, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
deleteVocabulary(vocId: string, onSuccess: Function): void {
|
||||
this.httpDelete('./ajax/vocs/' + encodeURIComponent(vocId), onSuccess);
|
||||
this.httpDelete('/ajax/vocabulary-manager/vocs/' + encodeURIComponent(vocId), onSuccess);
|
||||
}
|
||||
|
||||
deleteVocabularyTerm(vocId: string, termCode: string, onSuccess: Function): void {
|
||||
this.httpDelete('./ajax/vocs/'
|
||||
this.httpDelete('/ajax/vocabulary-manager/vocs/'
|
||||
+ encodeURIComponent(vocId)
|
||||
+ '/terms/'
|
||||
+ encodeURIComponent(termCode)
|
||||
|
@ -127,23 +127,23 @@ export class ISService {
|
|||
}
|
||||
|
||||
dsmConf(onSuccess: Function) {
|
||||
this.httpGet<DsmConf>('./ajax/dsm/conf', onSuccess);
|
||||
this.httpGet<DsmConf>('/ajax/dsm/conf', onSuccess);
|
||||
}
|
||||
|
||||
dsmBrowsableFields(onSuccess: Function) {
|
||||
this.httpGet<KeyValue[]>('./ajax/dsm/browsableFields', onSuccess);
|
||||
this.httpGet<KeyValue[]>('/ajax/dsm/browsableFields', onSuccess);
|
||||
}
|
||||
|
||||
dsmBrowse(field: string, onSuccess: Function) {
|
||||
this.httpGet<BrowseTerm[]>('./ajax/dsm/browse/' + encodeURIComponent(field), onSuccess);
|
||||
this.httpGet<BrowseTerm[]>('/ajax/dsm/browse/' + encodeURIComponent(field), onSuccess);
|
||||
}
|
||||
|
||||
dsmSearchByField(field: string, value: string, page: number, pageSize: number, onSuccess: Function) {
|
||||
this.httpGet<Page<Datasource>>('./ajax/dsm/searchByField/' + encodeURIComponent(field) + '/' + page + '/' + pageSize + '?value=' + encodeURIComponent(value), onSuccess);
|
||||
this.httpGet<Page<Datasource>>('/ajax/dsm/searchByField/' + encodeURIComponent(field) + '/' + page + '/' + pageSize + '?value=' + encodeURIComponent(value), onSuccess);
|
||||
}
|
||||
|
||||
dsmSearch(value: string, page: number, pageSize: number, onSuccess: Function) {
|
||||
this.httpGet<Page<Datasource>>('./ajax/dsm/search/' + page + '/' + pageSize + '?value=' + encodeURIComponent(value), onSuccess);
|
||||
this.httpGet<Page<Datasource>>('/ajax/dsm/search/' + page + '/' + pageSize + '?value=' + encodeURIComponent(value), onSuccess);
|
||||
}
|
||||
|
||||
loadMDStores(onSuccess: Function): void {
|
||||
|
@ -151,7 +151,7 @@ export class ISService {
|
|||
}
|
||||
|
||||
loadMDStore(mdId: string, onSuccess: Function): void {
|
||||
this.httpGet<MDStore>('./ajax/mdstores/mdstore/' + encodeURIComponent(mdId), onSuccess);
|
||||
this.httpGet<MDStore>('/ajax/mdstores/mdstore/' + encodeURIComponent(mdId), onSuccess);
|
||||
}
|
||||
|
||||
addMDStore(format: string, layout: string, interpretation: string, type: string, dsName: string, dsId: string, apiId: string, onSuccess: Function, relatedForm?: FormGroup) {
|
||||
|
@ -174,99 +174,99 @@ export class ISService {
|
|||
}
|
||||
|
||||
deleteMDStore(mdId: string, onSuccess: Function): void {
|
||||
this.httpDelete('./ajax/mdstores/mdstore/' + encodeURIComponent(mdId), onSuccess);
|
||||
this.httpDelete('/ajax/mdstores/mdstore/' + encodeURIComponent(mdId), onSuccess);
|
||||
}
|
||||
|
||||
prepareNewMDStoreVersion(mdId: string, onSuccess: Function): void {
|
||||
this.httpGet<MDStoreVersion>('./ajax/mdstores/mdstore/' + encodeURIComponent(mdId) + '/newVersion', onSuccess);
|
||||
this.httpGet<MDStoreVersion>('/ajax/mdstores/mdstore/' + encodeURIComponent(mdId) + '/newVersion', onSuccess);
|
||||
}
|
||||
|
||||
commitMDStoreVersion(versionId: string, size: number, onSuccess: Function) {
|
||||
this.httpGet<any>('./ajax/mdstores/version/' + encodeURIComponent(versionId) + '/commit/' + size, onSuccess);
|
||||
this.httpGet<any>('/ajax/mdstores/version/' + encodeURIComponent(versionId) + '/commit/' + size, onSuccess);
|
||||
}
|
||||
|
||||
abortMDStoreVersion(versionId: string, onSuccess: Function) {
|
||||
this.httpGet<any>('./ajax/mdstores/version/' + encodeURIComponent(versionId) + '/abort', onSuccess);
|
||||
this.httpGet<any>('/ajax/mdstores/version/' + encodeURIComponent(versionId) + '/abort', onSuccess);
|
||||
}
|
||||
|
||||
deleteMDStoreVersion(versionId: string, onSuccess: Function) {
|
||||
this.httpDelete('./ajax/mdstores/version/' + encodeURIComponent(versionId), onSuccess);
|
||||
this.httpDelete('/ajax/mdstores/version/' + encodeURIComponent(versionId), onSuccess);
|
||||
}
|
||||
|
||||
resetReadingMDStoreVersion(versionId: string, onSuccess: Function) {
|
||||
this.httpGet<any>('./ajax/mdstores/version/' + encodeURIComponent(versionId) + '/resetReading', onSuccess);
|
||||
this.httpGet<any>('/ajax/mdstores/version/' + encodeURIComponent(versionId) + '/resetReading', onSuccess);
|
||||
}
|
||||
|
||||
loadMDStoreVersions(mdId: string, onSuccess: Function): void {
|
||||
this.httpGet<MDStoreVersion[]>('./ajax/mdstores/mdstore/' + encodeURIComponent(mdId) + '/versions', onSuccess);
|
||||
this.httpGet<MDStoreVersion[]>('/ajax/mdstores/mdstore/' + encodeURIComponent(mdId) + '/versions', onSuccess);
|
||||
}
|
||||
|
||||
loadMDStoreVersion(versionId: string, onSuccess: Function): void {
|
||||
this.httpGet<MDStoreVersion>('./ajax/mdstores/version/' + encodeURIComponent(versionId), onSuccess);
|
||||
this.httpGet<MDStoreVersion>('/ajax/mdstores/version/' + encodeURIComponent(versionId), onSuccess);
|
||||
}
|
||||
|
||||
loadMDStoreVersionRecords(versionId: string, limit: number, onSuccess: Function): void {
|
||||
this.httpGet<MDStoreRecord[]>('./ajax/mdstores/version/' + encodeURIComponent(versionId) + '/content/' + limit, onSuccess);
|
||||
this.httpGet<MDStoreRecord[]>('/ajax/mdstores/version/' + encodeURIComponent(versionId) + '/content/' + limit, onSuccess);
|
||||
}
|
||||
|
||||
testCleaning(rule: string, xml: string, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
var headers = new HttpHeaders().set('Content-Type', 'text/plain; charset=utf-8');
|
||||
this.httpPostWithOptions('./ajax/mapping/clean?rule=' + encodeURIComponent(rule), xml, { headers, responseType: 'text' as 'json' }, onSuccess, relatedForm);
|
||||
this.httpPostWithOptions('/ajax/mapping/clean?rule=' + encodeURIComponent(rule), xml, { headers, responseType: 'text' as 'json' }, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
loadEmailTemplates(onSuccess: Function): void {
|
||||
this.httpGet<EmailTemplate[]>('./ajax/templates/email/', onSuccess);
|
||||
this.httpGet<EmailTemplate[]>('/ajax/templates/email/', onSuccess);
|
||||
}
|
||||
|
||||
saveEmailTemplate(email: EmailTemplate, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('./ajax/templates/email/', email, onSuccess, relatedForm);
|
||||
this.httpPost('/ajax/templates/email/', email, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
deleteEmailTemplate(id: string, onSuccess: Function): void {
|
||||
this.httpDelete('./ajax/templates/email/' + encodeURIComponent(id), onSuccess);
|
||||
this.httpDelete('/ajax/templates/email/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
loadWfSections(onSuccess: Function) {
|
||||
this.httpGet<WfSection[]>("/wf-manager/api/wfs/sections", onSuccess)
|
||||
this.httpGet<WfSection[]>("/ajax/wf-manager/sections", onSuccess)
|
||||
}
|
||||
|
||||
loadWfConfigurations(sectionId: string, onSuccess: Function): void {
|
||||
this.httpGet<KeyValue[]>('/wf-manager/api/wfs/sections' + encodeURIComponent(sectionId), onSuccess);
|
||||
this.httpGet<KeyValue[]>('/ajax/wf-manager/sections' + encodeURIComponent(sectionId), onSuccess);
|
||||
}
|
||||
|
||||
loadWfConfiguration(id: string, onSuccess: Function): void {
|
||||
this.httpGet<WfConf>('./ajax/wfs/conf/' + encodeURIComponent(id), onSuccess);
|
||||
this.httpGet<WfConf>('/ajax/wf-manager/conf/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
|
||||
saveWfConfiguration(conf: WfConf, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('./ajax/wfs/conf', conf, onSuccess, relatedForm);
|
||||
this.httpPost('/ajax/wf-manager/conf', conf, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
deleteWfConfiguration(id: string, onSuccess: Function): void {
|
||||
this.httpDelete('./ajax/wfs/conf/' + encodeURIComponent(id), onSuccess);
|
||||
this.httpDelete('/ajax/wf-manager/conf/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
|
||||
startWfConfiguration(id: string, onSuccess: Function): void {
|
||||
this.httpGet<WfProcessStatus>('./ajax/wfs/conf/' + encodeURIComponent(id) + '/start', onSuccess);
|
||||
this.httpGet<WfProcessStatus>('/ajax/wf-manager/conf/' + encodeURIComponent(id) + '/start', onSuccess);
|
||||
}
|
||||
|
||||
startDestroyWfConfiguration(id: string, onSuccess: Function): void {
|
||||
this.httpGet<WfProcessStatus>('./ajax/wfs/conf/' + encodeURIComponent(id) + '/destroy', onSuccess);
|
||||
this.httpGet<WfProcessStatus>('/ajax/wf-manager/conf/' + encodeURIComponent(id) + '/destroy', onSuccess);
|
||||
}
|
||||
|
||||
findProcess(id: string, onSuccess: Function): void {
|
||||
this.httpGet<WfProcessStatus>('./ajax/wfs/process/' + encodeURIComponent(id), onSuccess);
|
||||
this.httpGet<WfProcessStatus>('/ajax/wf-manager/process/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
|
||||
killProcess(id: string, onSuccess: Function): void {
|
||||
this.httpDelete('./ajax/wfs/process/' + encodeURIComponent(id), onSuccess);
|
||||
this.httpDelete('/ajax/wf-manager/process/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
|
||||
findWfSubscriptions(id: string, onSuccess: Function): void {
|
||||
this.httpGet<WfSubscription[]>('./ajax/wfs/conf/' + encodeURIComponent(id) + '/subscriptions', onSuccess);
|
||||
this.httpGet<WfSubscription[]>('/ajax/wf-manager/conf/' + encodeURIComponent(id) + '/subscriptions', onSuccess);
|
||||
}
|
||||
|
||||
saveWfSubscriptions(id: string, subscriptions: WfSubscription[], onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('./ajax/wfs/conf/' + encodeURIComponent(id) + '/subscriptions', subscriptions, onSuccess, relatedForm);
|
||||
this.httpPost('/ajax/wf-manager/conf/' + encodeURIComponent(id) + '/subscriptions', subscriptions, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
private httpGet<T>(url: string, onSuccess: Function) {
|
||||
|
|
|
@ -25,12 +25,10 @@
|
|||
</mat-expansion-panel-header>
|
||||
<div>
|
||||
<ng-container *ngFor="let r of resTypes">
|
||||
<div *ngIf="r.simple">
|
||||
<a class="menu-item" [routerLink]="['resources/' + r.id]">
|
||||
{{r.name}}
|
||||
<span class="menu-count">{{r.count}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="menu-item" [routerLink]="['resources/' + r.id]">
|
||||
{{r.name}}
|
||||
<span class="menu-count">{{r.count}}</span>
|
||||
</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
|
@ -40,14 +38,9 @@
|
|||
<mat-panel-title>Advanced Resources</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<div>
|
||||
<ng-container *ngFor="let r of resTypes">
|
||||
<div *ngIf="!r.simple">
|
||||
<a class="menu-item" [routerLink]="['adv_resources/' + r.id]">
|
||||
{{r.name}}
|
||||
<span class="menu-count">{{r.count}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
<a class="menu-item" [routerLink]="['contexts']">Contexts</a>
|
||||
<a class="menu-item" [routerLink]="['protocols']">Protocols</a>
|
||||
<a class="menu-item" [routerLink]="['vocabularies']">Vocabularies</a>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
|
||||
|
|
|
@ -91,8 +91,8 @@ public abstract class AbstractDnetApp {
|
|||
@Bean
|
||||
public GroupedOpenApi publicApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("Broker Public APIs")
|
||||
.pathsToMatch("/**")
|
||||
.group(serverTitle)
|
||||
.pathsToMatch("/api/**")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue